This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Auto run VDR plugin on OpenCPN
#1
Hi there,
 I currently have OpenCPN running on a Pi 3 and using the VDR plugin to record AIS targets. It is just a base station on shore and we are prone to long power cuts. Is there a way for the VDR plug in to start recording once OpenCPN opens? At the moment after every power cut i have to remote connect into the Pi and start the recording again. or are there any other AIS recording programs for the Pi that have this feature?

Thanks
Reply
#2
Have you played with node-red? 

This flow should work to save all AIS messages to a file in the /home/pi/ directory called savedais.txt.

Code:
[
   {
       "id": "36d7cef4.ce9742",
       "type": "tcp in",
       "z": "f1a0cb4.fe86138",
       "name": "",
       "server": "client",
       "host": "10.10.10.1",
       "port": "10109",
       "datamode": "stream",
       "datatype": "utf8",
       "newline": "\\n",
       "topic": "",
       "base64": false,
       "x": 177.00001525878906,
       "y": 263.00000762939453,
       "wires": [
           [
               "2ec38e6f.de4e32"
           ]
       ]
   },
   {
       "id": "21e9962f.f4aada",
       "type": "debug",
       "z": "f1a0cb4.fe86138",
       "name": "",
       "active": true,
       "console": "false",
       "complete": "false",
       "x": 730,
       "y": 280,
       "wires": []
   },
   {
       "id": "2ec38e6f.de4e32",
       "type": "switch",
       "z": "f1a0cb4.fe86138",
       "name": "Filter just ais",
       "property": "payload",
       "propertyType": "msg",
       "rules": [
           {
               "t": "regex",
               "v": "!AIVDM*",
               "vt": "str",
               "case": true
           }
       ],
       "checkall": "true",
       "outputs": 1,
       "x": 470,
       "y": 200,
       "wires": [
           [
               "21e9962f.f4aada",
               "b94ee7ad.e95078"
           ]
       ]
   },
   {
       "id": "b94ee7ad.e95078",
       "type": "file",
       "z": "f1a0cb4.fe86138",
       "name": "",
       "filename": "/home/pi/savedais.txt",
       "appendNewline": true,
       "createDir": false,
       "overwriteFile": "false",
       "x": 760,
       "y": 120,
       "wires": []
   },
   {
       "id": "5fab7c2f.223b14",
       "type": "comment",
       "z": "f1a0cb4.fe86138",
       "name": "Saves all AIS messages to a file",
       "info": "",
       "x": 190,
       "y": 140,
       "wires": []
   }
]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)