biddster / node-red-contrib-schedex

Scheduler for node-red which allows you to enter on/off times as 24hr clock (e.g. 01:10) or suncalc events (e.g. goldenHour). It also allows you to offset times and randomise the time within the offset.
22 stars 17 forks source link

Fenced event times #79

Closed pkess closed 3 years ago

pkess commented 4 years ago

Hello, i am using your schedex clock for control of my shutters on my house. They are controlled with sunrise and sunset in my setup. Now i would like to configure something to limit the times. E.g. in summer the sunrise is very early but i would like to configure the node not to send the on event before 6:30 in the morning. Later this year when the sunrise is later than 6:30 i would like to send the on message according with the real sunrise time again. Is this already possible?

biddster commented 3 years ago

It's not possible with Schedex on its own @pkess. You might be able to do it with a combination of node-red-contrib-time-range-switch and schedex.

There may be a node that does this natively.

Try this:

[{"id":"cc3047e1.b95848","type":"time-range-switch","z":"b1b066c7.899d78","name":"","lat":"","lon":"","startTime":"sunrise","endTime":"11:00","startOffset":0,"endOffset":0,"x":408,"y":139,"wires":[["8f23193b.f0baf8"],[]]},{"id":"c50fee13.6e8e9","type":"schedex","z":"b1b066c7.899d78","name":"","passthroughunhandled":false,"suspended":false,"lat":"","lon":"","ontime":"06:30","ontopic":"on","onpayload":"on","onoffset":0,"onrandomoffset":0,"offtime":"","offtopic":"","offpayload":"","offoffset":0,"offrandomoffset":0,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":219,"y":139,"wires":[["cc3047e1.b95848"]]},{"id":"4ddcd66b.52d598","type":"schedex","z":"b1b066c7.899d78","name":"","passthroughunhandled":false,"suspended":false,"lat":"","lon":"","ontime":"sunrise","ontopic":"on","onpayload":"on","onoffset":0,"onrandomoffset":0,"offtime":"","offtopic":"","offpayload":"","offoffset":0,"offrandomoffset":0,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":218,"y":77,"wires":[["1bbcfab8.bb6025"]]},{"id":"1bbcfab8.bb6025","type":"time-range-switch","z":"b1b066c7.899d78","name":"","lat":"","lon":"","startTime":"06:30","endTime":"11:00","startOffset":0,"endOffset":0,"x":395,"y":77,"wires":[["8f23193b.f0baf8"],[]]},{"id":"8f23193b.f0baf8","type":"debug","z":"b1b066c7.899d78","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":669,"y":109,"wires":[]}]
pkess commented 3 years ago

Hi, thank you for your advise. I opened your suggestion and i understand the approach.

I just think there could be a cooler way. But as it seems like i am the only one that is interrested in this feature it might not be worth the effort.

biddster commented 3 years ago

It's always difficult as it's tempting to keep building things into Schedex, but I think this one is better handled by using 2 nodes.