Closed tonybentley closed 8 months ago
Your issue is confusing: you are talking about subscription....to paths...web socket datasource
that I understand to be about getting SK data from one server to another, but the rest of the issue sounds like you are talking about converting sk data to NMEA 2000 data. Which is it?
What exactly are you talking about when you say update interval?
resend
with those valuesduration
with those valuesConversion to nmea2000 works on my machine. Data sent from Data Fiddler, plugin configuration has
"TEMPERATURE_OUTSIDE": {
"enabled": true,
"resend": 5,
"resendTime": 15
},
Debug log:
Jan 12 08:28:17 signalk-to-nmea2000 environment.outside.temperature:2 +38s
Jan 12 08:28:17 signalk-to-nmea2000 emit nmea2000JsonOut {"pgn":130312,"SID":255,"Instance":101,"Source":1,"Actual Temperature":2} +0ms
Jan 12 08:28:22 signalk-to-nmea2000 emit nmea2000JsonOut {"pgn":130312,"SID":255,"Instance":101,"Source":1,"Actual Temperature":2} +5s
Jan 12 08:28:27 signalk-to-nmea2000 emit nmea2000JsonOut {"pgn":130312,"SID":255,"Instance":101,"Source":1,"Actual Temperature":2} +5s
Jan 12 08:28:32 signalk-to-nmea2000 emit nmea2000JsonOut {"pgn":130312,"SID":255,"Instance":101,"Source":1,"Actual Temperature":2} +5s
Jan 12 08:28:44 POST /skServer/inputTest 200 0.825 ms - 485
Jan 12 08:28:49 POST /skServer/inputTest 200 0.968 ms - 602
Jan 12 08:28:49 signalk-to-nmea2000 environment.outside.temperature:3 +17s
Jan 12 08:28:49 signalk-to-nmea2000 emit nmea2000JsonOut {"pgn":130312,"SID":255,"Instance":101,"Source":1,"Actual Temperature":3} +1ms
Jan 12 08:28:53 POST /skServer/inputTest 200 0.726 ms - 485
Jan 12 08:28:54 signalk-to-nmea2000 emit nmea2000JsonOut {"pgn":130312,"SID":255,"Instance":101,"Source":1,"Actual Temperature":3} +5s
Jan 12 08:28:55 POST /skServer/inputTest 200 2.186 ms - 602
Jan 12 08:28:55 signalk-to-nmea2000 environment.outside.temperature:4 +828ms
Jan 12 08:28:55 signalk-to-nmea2000 emit nmea2000JsonOut {"pgn":130312,"SID":255,"Instance":101,"Source":1,"Actual Temperature":4} +0ms
Jan 12 08:29:00 signalk-to-nmea2000 emit nmea2000JsonOut {"pgn":130312,"SID":255,"Instance":101,"Source":1,"Actual Temperature":4} +5s
Jan 12 08:29:05 signalk-to-nmea2000 emit nmea2000JsonOut {"pgn":130312,"SID":255,"Instance":101,"Source":1,"Actual Temperature":4} +5s
Jan 12 08:29:10 signalk-to-nmea2000 emit nmea2000JsonOut {"pgn":130312,"SID":255,"Instance":101,"Source":1,"Actual Temperature":4} +5s
Why do you expect humidity to convert, when signalk-to-nmea2000 has no conversion for it?
Jan 12 22:26:28 POST /skServer/inputTest 200 6.579 ms - 246
Jan 12 22:26:28 signalk-to-nmea2000 environment.inside.refrigerator.temperature:100 +3m
Jan 12 22:26:28 signalk-to-nmea2000 emit nmea2000JsonOut {"pgn":130312,"SID":255,"Instance":107,"Source":7,"Actual Temperature":100} +0ms
Jan 12 22:27:06 POST /skServer/inputTest 200 0.827 ms - 104
Jan 12 22:27:08 POST /skServer/inputTest 200 1.995 ms - 244
Jan 12 22:27:08 signalk-to-nmea2000 environment.inside.engineRoom.temperature:100 +40s
Jan 12 22:27:08 signalk-to-nmea2000 emit nmea2000JsonOut {"pgn":130312,"SID":255,"Instance":103,"Source":3,"Actual Temperature":100} +0ms
Jan 12 22:28:27 POST /skServer/inputTest 200 1.838 ms - 233
Jan 12 22:28:27 signalk-to-nmea2000 environment.inside.temperature:100 +1m
Jan 12 22:28:27 signalk-to-nmea2000 emit nmea2000JsonOut {"pgn":130312,"SID":255,"Instance":102,"Source":2,"Actual Temperature":100} +0ms
I mean it is relativeHumidity
@tkurki thanks for the clarification. I was misunderstanding the Source for xxx input field for each PGN. I thought the field was a mapping to a different path as the source. It's difficult to know what the field represents, and how it correlates to paths without the explanation you provided above. Using Node-Red I was able to set a new path from environment.outside.humidity to environment.outside.relativeHumidity, which worked! So the Source for xxx input field must be a different scenario? Maybe when there are two of the same path of environment.outside.relativeHumidity and the user wants to choose one. But what does the input field accept? Source column in the data browser?
When all else fails read the documentation: https://signalk.org/specification/1.7.0/doc/sources.html
The value should be $source that you see in Data Browser.
From the related Slack thread:
I have a subscription to a few electrical and environmental paths using a signalk web socket datasource. I am using the signalk-to-nmea2000 plugin to convert the paths to NMEA2000 for displaying on a Raymarine MFD.
The following paths are being updated from the subscription and sent to the nmea2000 bus via the websocket data source as expected :
The following paths are not being converted:
The update interval for each path varies between 10 minutes and one hour. I am able to see the updates using the data browser page, but when reading the debug logs from the signalk-to-nmea2000 plugin, I am not seeing the environment pgns in the output event
nmea2000JsonOut
.I suspect this is a bug specific to environment paths.
I can supply configuration JSON, or screenshots of the workflow. Just let me know.