Closed singlerider closed 9 months ago
Any errors is the log?
Oh, it looks like you're running from a git clone? Is there a reason you're doing that?
You should not have to manually install serialport, so it's hard to say what else is wrong here. Can you please try running from an npm global install as instructed in the README?
I confirm the issue persists with a global install:
$ npm install -g signalk-server
➜ which signalk-server
/home/shane/.nvm/versions/node/v14.5.0/bin/signalk-server
(The issue being that the "Connected" status is fleeting).
The reason why I ran from a clone
is because the global install and Docker methods all failed to perform the duty of connecting to this USB device.
Your git clone was not in a functioning shape, per the error message saying that simple
module vould not be found.
If the problem persists there should be some other error messages, the information you provided is no longer valid.
@tkurki , I explain in my original message that the error message provided is resolved by manually installing serialport
. I agree that there should be more error messages. However, there are none. The information I provided is still valid as the behavior is the same. There are no relevant error messages from the global installation.
Sorry, I don’t understand: title says one thing about connection in dashboard, but messages talk about manual install of serialport.
What exactly is the ’behavior’ that you refer to?
Installing serialport
is tangential. It's not the issue described. There is no known cause of the issue described.
On the Server Logs page, enter "signalk:streams:serialport,canboatjs:ydgw02", and turn on "Remember Debug", then restart, this should give us some more info in the logs.
Interesting!
Thanks for the tip, @sbender9.
Here are some logs:
Aug 01 15:42:40 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDMWV,158.9,R,4.6,M,A*24 +1ms
Aug 01 15:42:40 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDHDG,58.4,0.0,E,,*06 +1ms
Aug 01 15:42:40 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDMWV,158.9,R,4.6,M,A*24 +2ms
Aug 01 15:42:40 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDVWR,158.9,R,9.0,N,4.6,M,16.6,K*6B +2ms
Aug 01 15:42:40 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDHDG,58.5,0.0,E,,*07 +491ms
Aug 01 15:42:40 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDHDM,58.5,M*07 +1ms
Aug 01 15:42:40 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDMWV,162.4,R,4.4,M,A*22 +1ms
Aug 01 15:42:40 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDHDG,58.5,0.0,E,,*07 +0ms
Aug 01 15:42:40 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDMWV,162.4,R,4.4,M,A*22 +1ms
Aug 01 15:42:40 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDVWR,162.4,R,8.7,N,4.5,M,16.2,K*6E +1ms
Aug 01 15:42:41 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDHDG,58.6,0.0,E,,*04 +495ms
Aug 01 15:42:41 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDHDM,58.6,M*04 +1ms
Aug 01 15:42:41 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDMWV,161.0,R,4.5,M,A*24 +1ms
Aug 01 15:42:41 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDHDG,58.6,0.0,E,,*04 +1ms
Aug 01 15:42:41 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDMWV,161.0,R,4.5,M,A*24 +1ms
Aug 01 15:42:41 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDVWR,161.0,R,8.9,N,4.6,M,16.5,K*63 +1ms
Aug 01 15:42:41 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDHDG,58.6,0.0,E,,*04 +493ms
Aug 01 15:42:41 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDHDM,58.6,M*04 +1ms
Aug 01 15:42:41 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDMWV,159.6,R,4.6,M,A*2A +1ms
Aug 01 15:42:41 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDHDG,58.6,0.0,E,,*04 +1ms
Aug 01 15:42:41 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDMWV,159.6,R,4.6,M,A*2A +0ms
Aug 01 15:42:41 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDVWR,159.6,R,9.1,N,4.7,M,16.8,K*6B +2ms
Aug 01 15:42:42 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDHDG,58.7,0.0,E,,*05 +493ms
Aug 01 15:42:42 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDHDM,58.7,M*05 +1ms
Aug 01 15:42:42 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDMWV,164.2,R,4.6,M,A*20 +1ms
Aug 01 15:42:42 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDHDG,58.7,0.0,E,,*05 +1ms
Aug 01 15:42:42 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDMWV,164.2,R,4.6,M,A*20 +1ms
Aug 01 15:42:42 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDVWR,164.2,R,9.1,N,4.7,M,16.9,K*60 +1ms
Aug 01 15:42:42 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDHDG,58.7,0.0,E,,*05 +493ms
Aug 01 15:42:42 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDHDM,58.7,M*05 +1ms
Aug 01 15:42:42 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDMWV,168.6,R,4.6,M,A*28 +1ms
Aug 01 15:42:42 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDHDG,58.7,0.0,E,,*05 +0ms
Aug 01 15:42:42 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDMWV,168.6,R,4.6,M,A*28 +1ms
Aug 01 15:42:42 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDVWR,168.6,R,9.0,N,4.6,M,16.7,K*66 +0ms
Aug 01 15:42:43 canboatjs:ydgw02 [error] undefined Error: Invalid parts. - $YDHDG,58.7,0.0,E,,*05 +496ms
It looks like data is attempting to be read, after all. Does this suggest a configuration problem on my end? If so, any tips?
Here's what I was seeing regarding the connection status disappearing, @tjkurki and @sbender9:
Oh! I guess you have to put it in RAW mode. I should do this automatically, but I don't have a device to test with.
Connect to the device and enter MODE RAW
@sbender9, you seem to have nailed it.
The text you screenshot was located in the Yacht Devices YDNU02 User Manual:
https://www.yachtd.com/downloads/ydnu02.pdf
I set the mode to RAW, then unplugged and plugged it back in, then:
There are still some suspicious logs I see in the Node server:
canboatjs:ydgw02 [warning] 65311 no conversion found for pgn {"canId":486481667,"prio":7,"src":3,"dst":255,"pgn":65311,"time":"00:21:17.530"} +9s
canboatjs:ydgw02 [warning] 65535 no conversion found for pgn {"canId":486539011,"prio":7,"src":3,"dst":255,"pgn":65535,"time":"00:21:18.991"} +1s
canboatjs:ydgw02 [warning] 65311 no conversion found for pgn {"canId":486481667,"prio":7,"src":3,"dst":255,"pgn":65311,"time":"00:21:27.730"} +9s
canboatjs:ydgw02 [warning] 65535 no conversion found for pgn {"canId":486539011,"prio":7,"src":3,"dst":255,"pgn":65535,"time":"00:21:29.083"} +1s
canboatjs:ydgw02 [warning] 65311 no conversion found for pgn {"canId":486481667,"prio":7,"src":3,"dst":255,"pgn":65311,"time":"00:21:37.730"} +9s
canboatjs:ydgw02 [warning] 65535 no conversion found for pgn {"canId":486539011,"prio":7,"src":3,"dst":255,"pgn":65535,"time":"00:21:39.009"} +1s
canboatjs:ydgw02 [warning] 65311 no conversion found for pgn {"canId":486481667,"prio":7,"src":3,"dst":255,"pgn":65311,"time":"00:21:47.731"} +9s
canboatjs:ydgw02 [warning] 65535 no conversion found for pgn {"canId":486539011,"prio":7,"src":3,"dst":255,"pgn":65535,"time":"00:21:49.040"} +1s
canboatjs:ydgw02 [warning] 65311 no conversion found for pgn {"canId":486481667,"prio":7,"src":3,"dst":255,"pgn":65311,"time":"00:21:57.914"} +9s
canboatjs:ydgw02 [warning] 65535 no conversion found for pgn {"canId":486539011,"prio":7,"src":3,"dst":255,"pgn":65535,"time":"00:21:59.054"} +1s
canboatjs:ydgw02 [warning] 65311 no conversion found for pgn {"canId":486481667,"prio":7,"src":3,"dst":255,"pgn":65311,"time":"00:22:07.916"} +9s
canboatjs:ydgw02 [warning] 65535 no conversion found for pgn {"canId":486539011,"prio":7,"src":3,"dst":255,"pgn":65535,"time":"00:22:09.085"} +1s
canboatjs:ydgw02 [warning] 65311 no conversion found for pgn {"canId":486481667,"prio":7,"src":3,"dst":255,"pgn":65311,"time":"00:22:18.013"} +9s
canboatjs:ydgw02 [warning] 65535 no conversion found for pgn {"canId":486539011,"prio":7,"src":3,"dst":255,"pgn":65535,"time":"00:22:18.919"} +1s
canboatjs:ydgw02 [warning] 65311 no conversion found for pgn {"canId":486481667,"prio":7,"src":3,"dst":255,"pgn":65311,"time":"00:22:28.118"} +9s
canboatjs:ydgw02 [warning] 65535 no conversion found for pgn {"canId":486539011,"prio":7,"src":3,"dst":255,"pgn":65535,"time":"00:22:29.040"} +930ms
Should I worry about those or should I expect smooth sailing? :boat:
Also, I'll volunteer to test whatever you'd need regarding this setup. I didn't make the connection that RAW mode was necessary even after I RTFM'd.
Those warnings are ok. It's just pgn's that canboatjs does not understand. You can turn that debugging off and they will go away.
Yeah, I'd like to add the code to automatically put it in RAW mode. Would be a big help if you could test it. I'll reach out when that is ready. Are you on the Signal K Slack?
@sbender9 , I'm not in the Slack, but I am in the sparsely-populated and not-oft-used Freenode IRC channel. 'Joining now. Thanks! I'm comfortable that this issue is resolved and I'm glad SEO can make it searchable for anyone else with this issue. 'See you in Slack!
Close this as it seems resolved, open another for proper initialisation of YD usb device?
Regarding #1093 , an attempted fix to resolve this issue:
I always run this project from source. I attempted to run two different versions of the project.
The first version I tried (as a control) is at cba18e2d8fe38600877e5c699341e1c26eaeef5e and the symptoms described in this issue still persist.
The next version I tried (the presumed fix) is at f02bbb5807e0d238b202445f1cd25ab09d4682cd and it definitely switches the MODE of the YDNU02 from Auto
to RAW
. However, I still had to npm install serialport
to get it to work.
@sbender9 , thank you for coming through.
What node version are you using?
If you npm list
what versions of serialport are installed and where in the deps tree? Maybe share the whole output as a gist.
Node version: v14.5.0
Dependency Tree: https://gist.github.com/singlerider/5ac8c231b8cd1b644b8f05bf37ec48a1
I think your need to manually install serialport stems from "too new" Node version: we are still officially at Node 10, and it looks like the serialport dependency is slightly messed up
Serialport docs say that SerialPort officially supports all Active, Maintenance and Current LTS releases of Node.js, that is ambiguous, as older versions' documentations still state that. I think for Node v14 you need serialport@9.
Time to update to serialport@9 throughout, I think @sbender9 .
Closing as stale.
Using a Yacht Devices YDNU-02 NMEA 2000 USB Gateway, I am unable to successfully retrieve any data from the Signal K Node Server.
Configuration in "Connections" tab:
Note: I had to manually
npm install serialport
in order to avoid an error:Even after installing
serialport
, I get the issue I mentioned at the beginning.