I'm upgrading my light scene controller to support being triggered by presence sensors. Eventually I will have about 12 lighting zones in the home, each with one or more presence sensors.
The idea is that when someone moves or makes noise, it will trigger one of the lighting scenes, and it will continue to stay on that scene until a preset time after there has been no additional movement or noise (i.e. extend the delay).
(FYI - an aside - I've been testing the audio sensor as a way of only extending - not actually triggering - the lights to come on, and it has been a bit of a revelation - it's a very reliable way of preventing that thing where you're dead still and the lights go off.)
So far I've used the Trigger node which is excellent, but I don't think this persists over re-deploy in Node-RED. This becomes more of a problem as I plan to play around with Node-RED a lot but also don't want to cast various rooms into darkness (or leave lights on, or do anything that changes other family members' expectations of the system...)
I envisage there could be 4 or 5 delays running at a time, determining the lighting in a room, and a single re-deploy of Node-RED would kill them all.
Is there some other way of using the delay node to allow it to continue "counting" even when I re-deploy? Or do I need to code some other kind of timer system, e.g. store timeouts in global context and then poll them every second then turn off the lights once current time is past the set time?