OpenMarine

Full Version: Resetting NMEA 2000 sources on chart plotter after RPi reboot
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have OpenCPN 3 with all latest updates running on Raspberry Pi Bullseye with PiCAN-M. I have a B&G Vulcan 12R chart plotter on NMEA 2000, amongst other devices. 

When I turn off/on the chart plotter, all continues to work as expected. If I reboot the RPi, I have to re-select three specific sources, always the same ones. The selector on the B&G shows "Signal K [123456]" (the current active source) and "OFF Signal K [123456]" (the old source no longer providing the data. Screen capture of the chart plotter selection screen is attached.

Is there something within Signal K that reinitiates GUID or some unique identifier which would need to be recognized by the chart plotter? I had the same issue on OpenCPN 2 before I rebuilt it on the latest version, but problem remains. I can see the data on UDP network, on Signal K Instrument panel, etc. Just the chart plotter on NMEA 2000 seems to be "looking" for these after each reboot.

Sources:
1. Apparent wind: comes in from LCJ Capteurs through NMEA 0183 and is processed through the nmea0183-to-nmea plugin and through the xdr-parser-plugin, which is then fed out via signalk-to-nmea2000 plugin to the network as Wind (130306) sentence.
2. Air temp: similar to above, comes in from LCJ Capteurs through NMEA 0183 and is processed through the nmea0183-to-nmea plugin and through the xdr-parser-plugin, which is then fed out via signalk-to-nmea2000 plugin to the network as Sea/Air Temp (130310) sentence
3. Barometric pressure: comes in from BME280 sensor, processed via signalk-raspberry-pi-bme280 plugin, which is then fed out via signalk-to-nmea2000 plugin to the network as Atmospheric Pressure (130311) sentence.

Would the issue lie within the signalk-to-nmea2000 plugin? The ~/.signalk/plugin-config-data/sk-to-nmea2000.json contains (abbreviated) corresponding entries:
Code:
    "WINDv2": {
      "enabled": true,
      "resend": 0,
      "resendTime": 10
    },

    "TEMPERATURE_OUTSIDE": {
      "enabled": true,
      "resend": 0,
      "resendTime": 30
    },

    "ENVIRONMENT_PARAMETERS": {
      "enabled": true,
      "resend": 0,
      "resendTime": 30
    },

The NMEA interface is set up as can0 Data Connection:
Code:
    {
      "enabled": true,
      "id": "can0",
      "pipeElements": [
        {
          "options": {
            "logging": false,
            "subOptions": {
              "interface": "can0",
              "type": "canbus-canboatjs"
            },
            "type": "NMEA2000"
          },
          "type": "providers/simple"
        }
      ]
    }

The server log outputs samples:
Code:
Oct 05 20:58:32 2023-10-06T03:58:32.986Z signalk-to-nmea2000 emit nmea2000JsonOut {"pgn":130310,"SID":255,"Water Temperature":288.19,"Outside Ambient Air Temperature":289.15,"Atmospheric Pressure":102705}

Oct 05 20:58:33 2023-10-06T03:58:33.154Z signalk-to-nmea2000 emit nmea2000JsonOut {"pgn":130306,"Wind Speed":0.10288891495408069,"Wind Angle":0.8203047486246348,"Reference":2}

Oct 05 20:58:34 2023-10-06T03:58:34.105Z signalk-to-nmea2000 emit nmea2000JsonOut {"pgn":130311,"Atmospheric Pressure":102703}

From what I can tell, the data is being collected, processed, and sent out correctly. It's the recognition of those sources that seems to challenge the NMEA 2000 devices.