Steve-Mcl / node-red-contrib-cron-plus

A flexible scheduler node for Node-RED (featuring full dynamic control, sunrise/sunset by location and Timezone support)
MIT License
45 stars 12 forks source link

Feature request: A built in method to re-trigger the last event #68

Open thinkbig1979 opened 11 months ago

thinkbig1979 commented 11 months ago

It would be great if there was a way to re-trigger the most recent event in the schedule . That way, if things get out of sync downstream of the node, and you just want to get back to what the state should be right now, you would fire this method off.

E.g. You are using this node to trigger settings on a light, and there was a power outage. After the outage, the light came back on in the state it was in when it lost power, but it missed 3 cron events during the outage, and is therefore in the wrong state. Now I want to set it back to what it should currently be, based on the cron events. So I want to trigger "last" or "previous" or something to that effect.

Hope this makes sense :-)

Karine005 commented 7 months ago

Hello, have you solved your problem ? I'm interested. Thanks.

thinkbig1979 commented 7 months ago

Hello, have you solved your problem ? I'm interested. Thanks.

Hi @Karine005, I am currently using Node-Red context variables to store the 'previous' preset, which can then be recalled at will. It works without too much fuss, but I'd still prefer a solution within the node itself. :-)