-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On and off switched #50
Comments
This isn't as straightforward as it sounds. Schedex doesn't know if you want dusk to 22:00 the following day. To be able to work this out we'd have to conceive some form of same day mode? Dunno, I'll have to think it through. |
Maybe this is similar to #79. |
Here is an example using It will only allow to switch on between 14 and 21:50. So the lights will not be turned on for less than 10 minutes
|
I also run into this situation. This must be a rather common situation. I'm surprised it doesn't surface more often. I solved it using the node-red-contrib-time-range-switch as suggested but it's messy and potentially hard to maintain. See example below. I think it could make sense to only fire the on event if there is no scheduled off time for the node or if the scheduled off time is in the future. That would make sense if you schedule lights. I'm sure someone has a use case for the current behaviour so an option to check for a scheduled future off time would be great. [{"id":"76942900.8715b8","type":"schedex","z":"e3172c0a.a249c","name":"","passthroughunhandled":false,"suspended":false,"lat":"56.3159","lon":"12.7694","ontime":"","ontopic":"","onpayload":" {"On":true}","onoffset":"-30","onrandomoffset":true,"offtime":"sunriseEnd","offtopic":"","offpayload":" {"On":false}","offoffset":"30","offrandomoffset":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":290,"y":180,"wires":[["7b26dee8.59b3"]]},{"id":"794030d1.a9416","type":"inject","z":"e3172c0a.a249c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"on","payloadType":"str","x":110,"y":120,"wires":[["d88253f7.d21748"]]},{"id":"7b26dee8.59b3","type":"json","z":"e3172c0a.a249c","name":"","property":"payload","action":"","pretty":false,"x":530,"y":180,"wires":[["50d93267.590724","9d485bb8.6101f","b5da80e.97afc8","a3000652.7473e","23d03e66.b974ca","19683998.5ed3b6"]]},{"id":"42a03237.eaec9c","type":"inject","z":"e3172c0a.a249c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"off","payloadType":"str","x":110,"y":180,"wires":[["76942900.8715b8"]]},{"id":"ee4fe27b.ddc7b","type":"schedex","z":"e3172c0a.a249c","name":"","passthroughunhandled":false,"suspended":false,"lat":"56.3159","lon":"12.7694","ontime":"sunsetStart","ontopic":"","onpayload":" {"On":true}","onoffset":"30","onrandomoffset":true,"offtime":"","offtopic":"","offpayload":" {"On":false}","offoffset":"30","offrandomoffset":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":270,"y":360,"wires":[["5922b3d8.9ad764"]]},{"id":"27ed7806.dfacb8","type":"comment","z":"e3172c0a.a249c","name":"Utebelysning","info":"","x":130,"y":60,"wires":[]},{"id":"a1904971.61077","type":"time-range-switch","z":"e3172c0a.a249c","name":"","lat":"56.3159","lon":"12.7694","startTime":"1:00","endTime":"sunriseEnd","startOffset":0,"endOffset":"-40","x":470,"y":60,"wires":[["7b26dee8.59b3"],[]]},{"id":"d88253f7.d21748","type":"schedex","z":"e3172c0a.a249c","name":"","passthroughunhandled":false,"suspended":false,"lat":"56.3159","lon":"12.7694","ontime":"6:30","ontopic":"","onpayload":" {"On":true}","onoffset":"-30","onrandomoffset":true,"offtime":"","offtopic":"","offpayload":" {"On":false}","offoffset":"30","offrandomoffset":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":270,"y":120,"wires":[["a1904971.61077"]]},{"id":"5922b3d8.9ad764","type":"time-range-switch","z":"e3172c0a.a249c","name":"","lat":"56.3159","lon":"12.7694","startTime":"11:00","endTime":"22:00","startOffset":0,"endOffset":0,"x":450,"y":360,"wires":[["7b26dee8.59b3"],[]]},{"id":"246317d4.80cbd","type":"schedex","z":"e3172c0a.a249c","name":"","passthroughunhandled":false,"suspended":false,"lat":"56.3159","lon":"12.7694","ontime":"","ontopic":"","onpayload":" {"On":true}","onoffset":"30","onrandomoffset":true,"offtime":"22:00","offtopic":"","offpayload":" {"On":false}","offoffset":"45","offrandomoffset":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":280,"y":300,"wires":[["7b26dee8.59b3"]]}] |
Maybe not the best title, but here goes:
I'm using ontime: dusk and off time 22:00.
Works great in the winter, but here in the summer, dusk is actually later than 22:00, resulting in OFF at 22.00 and ON at dusk, leaving my lights on the whole night.
In this case, it should just keep off at all time.
The text was updated successfully, but these errors were encountered: