Copprhead - Notifications in Node-RED: I'm play...
Notifications in Node-RED: I'm playing with SK/Node-RED to control an external alarm buzzer. An alarm is triggered by a notification for a certain key. For that I'm using the 'notification' node and it works fine for changes.
But when the key/notification goes into alarm state while Node-RED is not "there" (yet), and then Node-RED comes up, it won't be notified of the alarm since the notifications are sent only when the state changes.
Ideally, the notification node would get the current state once when it starts up, and then the changes when they happen. This is not a big deal for keys that update every second (e.g. depth), but it is a problem for keys that change only very occasionally. (Same goes for the 'subscribe' node I think.)
Is there something I'm missing? (I thought maybe I can query the current state on initialization, but I don't see a way how.)
But when the key/notification goes into alarm state while Node-RED is not "there" (yet), and then Node-RED comes up, it won't be notified of the alarm since the notifications are sent only when the state changes.
Ideally, the notification node would get the current state once when it starts up, and then the changes when they happen. This is not a big deal for keys that update every second (e.g. depth), but it is a problem for keys that change only very occasionally. (Same goes for the 'subscribe' node I think.)
Is there something I'm missing? (I thought maybe I can query the current state on initialization, but I don't see a way how.)