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

Sunrise/Sunset question #53

Closed davidginn524 closed 5 years ago

davidginn524 commented 5 years ago

Hello. Great node, use it for tons of flows. I had a question thought about the sunrise/sunset aspect. I am able to set the on off action based on the sunrise/sunset options. This is great. However is there a way to trigger on the sunrise/sunset and THEN in the on/off payloads send the sunrise/sunset time? What I have been doing is having a function afterwards that triggers a timestamp then sends it down the flow but it would be nice to forgo that option and just send the sunset/sunrise times in the payload. Maybe it's an option I am missing like $sunrise? or something

biddster commented 5 years ago

If you send an input payload of info or info_local, schedex will emit a payload that contains the on/off times. So if your schedex node is on at sunset, the on time in the info output payload will be sunset.

Check out the readme for more info.

davidginn524 commented 5 years ago

that is perfect! I didn't even think of that duh! i do info but forgot I could parse the output