Signal K

SK

Signal K

Join the community to ask questions about Signal K and get answers from other members.

Join

questions

announcements

server

specification

plugins-and-webapps

sensors

nmea2000

node-red

wilhelmsk

sensesp

Copprhead - My alarm flows are working almost f...

My alarm flows are working almost fine now using polling notifications every 2 secs in a loop that is started by an inject node ("once after .1 s"). The following "change node" initializes the global alarm state variable, then the polling happens (which changes the alarm state variable if an alarm notification was found) and this gets repeated after a delay of 2s. Unfortunately the polling loop is not started when I restart the SK server. I can tell because the alarm is not triggered when necessary and in NR editor I don't see the debug output from the poll loop. If I then move one of the nodes and redeploy (no code changes), the loop is started and the alarm is triggered. Restart SK and again it's not working until I redeploy. As if this wouldn't be strange enough, another loop which is started the same way and makes an "alive" blink every 4s is working after restarts....

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.)...

PaddyB - Would this be a good place to share so...

Would this be a good place to share some useful node-red flows?