Node-Red GPS diff alarm
Hi folks,
Sailing in the Baltic has new challenges with GPS not always reliable.
Made a simple Node-Red flow that compares the different sources for navigation.position and creates a notification if diff is larger then X.
Seems to work but failing to create audio on the "server".
KIP picks up the alarm and sounds terrible ๐ first screenshot
Freeboard do not see the alarm, second screenshot
Trying with Notification player but same as Freeboard does not see the alarm, third screenshot.
The flow simply creates a Signalk Notification when diff between GPS sources are larger than X meters,
The notification is visible in data browser, fourth screenshot.
The best solution would be to connect the Raspberry to a speaker and have that sound the alarms.
Any guidance appreciated!!




7 Replies
I really like this approach. I am adding a second GPS and will implement this since it would be a critical failure if the position was ever compromised. For alarms, I am using Scottโs iOS app WilhelmSK which uses push notifications on all Apple devices. It has been the best way to be notified because I have several devices on the boat that will all notify with sound and badges. If you want to avoid this then you could do a combination of NMEA 2000 alarm and audio from a speaker connected to the PI and use Node Red to make the sound instead of relying on a web client.
Thanks Tony!!
I prefer if possible to let the Pi sound the alarm, like you say no web client or wifi in between....
Not sure how Node-Red can make sound but will check that.
Also check out the notification silencer plugin. You might be able to use kip to switch it off. Basically once an alarm sounds it will keep going until you clear it or it is able to clear itself. Depends on how its triggered
Thanks for the tip :).
The flow compares GPS positions and triggers the alarm if difference greater than X, if difference less than X the alarm is swithed off (status changed).
At least in a test env it works and the siren is silenced ๐
Looking at NMEA2000 alerrt related PGN:s, if I manage to create an alert on the NMEA2000 network I think numerous devices will produce sound and visual alert, e.g. plotter, MFD.
The node read node to send an NMEA-2000 requires input of canboat json or raw actisense string.
Not sure which option is the least complicated but I guess JSON and hence not have to deal with hex strings.
Is this a good plan for alerting?
Anyone who have created such a json?
Any tips?
Reading
https://canboat.github.io/canboat/canboat.html#pgn-list
Where the fields are defined.
If anyone has a json file that would be perfect.
https://github.com/SignalK/signalk-to-nmea2000/blob/master/conversions/notifications.js
@Scott Bender
GitHub
signalk-to-nmea2000/conversions/notifications.js at master ยท Signa...
Plugin to convert Signal K to NMEA2000. Contribute to SignalK/signalk-to-nmea2000 development by creating an account on GitHub.
Brilliant!!
And at the same time makes me feel bad for not knowing what is actually there.
And even ChatGPT knows ๐
See screenshot
