SignalK / signalk-server

An implementation of a Signal K central server for boats.
http://signalk.org
Apache License 2.0
322 stars 156 forks source link

PCDIN or MXPGN in NMEA0183 stream #1645

Closed macjl closed 1 year ago

macjl commented 1 year ago

Hello,

I’m try to read a NMEA0183 stream that contain PCDIN and MXPGN sentences (engine datas). And it seems that these sentences are not processed by Signalk, as there are no engines datas shown.

Should these sentence be read in a NMEA0183 ? Or should I send them to a N2k stream ?

Example of datas in this NMEA stream :

\s:serial,c:1696759211*3D\$MXPGN,01F200,2838,00441FFFFF7FFFFF*12
\s:serial,c:1696759212*3E\$MXPGN,01F214,6824,03BA0A0A00FFFF73*1C
\s:serial,c:1696759212*3E\$MXPGN,01F214,6824,0283050C00FFFF73*63
\s:serial,c:1696759212*3E\$PCDIN,01F200,B35A7B99,38,003A1FFFFF7FFFFF*2A
\s:serial,c:1696759212*3E\$PCDIN,01F201,B35A79DF,38,00FFFFFFFFDB8D6E05FF7FC80D4800FFFFFFFF7F000000007F7F*29
\s:serial,c:1696759212*3E\$PCDIN,01F214,B35A7A3B,E0,008805FF7FFFFF7E*51
\s:serial,c:1696759212*3E\$PCDIN,01F214,B35A7A3B,E0,0183055500FFFF7E*2A
\s:serial,c:1696759212*3E\$MXPGN,01F200,2838,003A1FFFFF7FFFFF*60
\s:serial,c:1696759212*3E\$MXPGN,01F214,68E0,008805FF7FFFFF7E*6D
\s:serial,c:1696759212*3E\$MXPGN,01F214,68E0,0183055500FFFF7E*16
\s:serial,c:1696759212*3E\$PCDIN,01F200,B35A7D8C,38,004D1FFFFF7FFFFF*55
\s:serial,c:1696759212*3E\$PCDIN,01F201,B35A7BD3,38,00FFFFFFFFDB8D6E05FF7FC80D4800FFFFFFFF7F000000007F7F*27
\s:serial,c:1696759212*3E\$PCDIN,01F214,B35A7D92,38,006E05FF7FFFFFFF*51
\s:serial,c:1696759212*3E\$MXPGN,01F200,2838,004D1FFFFF7FFFFF*62
\s:serial,c:1696759212*3E\$MXPGN,01F214,6838,006E05FF7FFFFFFF*12
\s:serial,c:1696759213*3F\$PCDIN,01F200,B35A7F80,38,00531FFFFF7FFFFF*52
\s:serial,c:1696759213*3F\$PCDIN,01F201,B35A7DC6,38,00FFFFFFFFDB8D6E05FF7FC80D4800FFFFFFFF7F000000007F7F*23
\s:serial,c:1696759213*3F\$PCDIN,01F214,B35A7DF0,24,032E0A0A00FFFF91*5A
\s:serial,c:1696759213*3F\$PCDIN,01F214,B35A7DF0,24,0282050B00FFFF91*51
sbender9 commented 1 year ago

I don't know what that is at the beginning of each line. Pretty sure the parser can't handle that.

macjl commented 1 year ago

That’s NMEAv4 Tag blocks, generated by Kplex (http://www.stripydog.com/kplex/configuration.html#tag)

It seems that these tags are supported by SignalK for other native NMEA0183 sentences, but not for PCDIN/MXPGN, which are N2k messages sent within NMEA0183. When removing the tags, engine and batteries data are now shown. Could it be considered as a bug ?

sbender9 commented 1 year ago

Yes, I'd say it's a bug

sbender9 commented 1 year ago

But the bug is in canboatjs

sbender9 commented 1 year ago

Would you mind opening an issue over there for this? I can get it fixed this week.

sbender9 commented 1 year ago

This is fixed, can you please try it out?

macjl commented 1 year ago

Sorry, I didn’t find how to try it. I’m running SignalK within a container, and did not find hot to update the canboatjs library, as the docker image still include v2.5.4. Can you help me to update this lib? Otherwise, when the docker image will include canboatjs 2.5.5, I’ll test it.

sbender9 commented 1 year ago

I'm actually not sure how to best updated it. @tkurki?

tkurki commented 1 year ago

signalk/signalk-server:master is built off master on commits, so that’s the easiest route once something lands there.

Other than that you can go inside a running container, update what you want and docker commit to save the updates as a new image.

3rd option is to build your own image.

macjl commented 1 year ago

Hello,

As the master version in docker hub now includes canboatjs 2.5.5, I have tested it, and it works.

Thank you for your job.