OpenMarine
RPI, OpenCPN and buzzer - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1)
+--- Forum: General discussion (https://forum.openmarine.net/forumdisplay.php?fid=2)
+--- Thread: RPI, OpenCPN and buzzer (/showthread.php?tid=1065)

Pages: 1 2 3


RE: RPI, OpenCPN and buzzer - abarrow - 2018-03-15

Is there an actual NMEA string for an AIS event that should generate an alarm? If not, this might be more difficult than I thought.


RE: RPI, OpenCPN and buzzer - jim321 - 2018-03-15

yes abarrow its !AIVDM

http://www.bosunsmate.org/ais/#nmea

seems like a lot of work for something that opencpn already does.

   


RE: RPI, OpenCPN and buzzer - abarrow - 2018-03-15

Yes, but I think he wants to have some sort of remote buzzer. I guess you could just remote the speaker and play the alert sounds that OpenCPN generates.


RE: RPI, OpenCPN and buzzer - Douz - 2018-03-15

I only wanted Opencpn to switch on a GPIO pin instead of opening a wav file.
It seems to be more difficult than I thought.
I'm going to abort...


RE: RPI, OpenCPN and buzzer - shark24 - 2018-03-16

Don't bury your head in the sand. It can be done with the help of node-red.
Connect node-red to signalK and watch for the ais alert. Use the gpio node and trigger your your favourite pin. Hook the pin up to an relay, mosfet, optocoupler, whatever and connect it to your signal-horn.
Get blown away when the alarm triggers Big Grin


RE: RPI, OpenCPN and buzzer - Douz - 2018-03-17

Thank you. I'll try to do that.
...but I'm a noob, and not sure to succeed


RE: RPI, OpenCPN and buzzer - PaddyB - 2018-03-17

(2018-03-16, 02:06 PM)shark24 Wrote: Connect node-red to signalK and watch for the ais alert.

Does such a thing exist?

Sent from my SGP511 using Tapatalk


RE: RPI, OpenCPN and buzzer - shark24 - 2018-03-17

Tbh I don't know. It was a wild guess... Because Jim said there was a NMEA sentence I assumed SignalK could handle it too.
I'm currently not at home and just running a pi zero here so I can't test.


RE: RPI, OpenCPN and buzzer - PaddyB - 2018-03-17

(2018-03-17, 11:07 AM)shark24 Wrote: Tbh I don't know. It was a wild guess... Because Jim said there was a NMEA sentence I assumed SignalK could handle it too.
I'm currently not at home and just running a pi zero here so I can't test.

Not sure there's any ais 'Alarm' messages , they'd be local events anyway to the program?


RE: RPI, OpenCPN and buzzer - shark24 - 2018-03-17

I thought OpenCPN could trigger this 'alarm'. Douz wrote about 'AIS Alarm' so I assumed there is some sort of alarm.

What about the geofence node ( https://www.npmjs.com/package/node-red-node-geofence ). Haven't looked into it but this might be an option to check if an AIS target is in your 'alarm' area.

I guess you can calculate the CPA with node-red but it's not that simple Smile
https://sci-hub.tw/https://doi.org/10.1017/S0373463316000229