The "\u0000" at the start of the nmea 0183 sentence looks odd, where is the wind data coming from?
You could try turning off validate checksum in the connection, with the random text at the start the checksum will likely be wrong.
And full marks for posting some info instead of just "why not work"
Thanks guys. I tried turning off validate checksum and turning on remove null characters which suprisingly didn't change the log output.
The wind data is coming from a NASA Marine wind transducer connected to the RPi running openCPN via a serial to USB adapter. I read on another forum that the standard NMEA0183 sentence has floating point numbers with 1 deceimal place for wind angle and speed. The NASA transducer is outputting integers for those values in the NMEA sentence. For example:
NASA sentence: $WIMWV,345,R,2.3,N,A*21
Normal sentence: $WIMWV,345.0,R,2.3,N,A*21
I'm new to node-red but I think I could use it to clean the leading NULL chars and then convert ints to floats. Unsure whether it's better to then convert this back to an NMEA0183 sentence and then into signalK or send those values directly to a signalK path. Also not sure what's going on with the 'u\0000' in the first place either.
2022-01-05, 01:31 AM (This post was last modified: 2022-01-05, 01:58 AM by PaddyB.)
(2022-01-04, 11:32 PM)ash_perry Wrote: Thanks guys. I tried turning off validate checksum and turning on remove null characters which suprisingly didn't change the log output.
The wind data is coming from a NASA Marine wind transducer connected to the RPi running openCPN via a serial to USB adapter. I read on another forum that the standard NMEA0183 sentence has floating point numbers with 1 deceimal place for wind angle and speed. The NASA transducer is outputting integers for those values in the NMEA sentence. For example:
NASA sentence: $WIMWV,345,R,2.3,N,A*21
Normal sentence: $WIMWV,345.0,R,2.3,N,A*21
I'm new to node-red but I think I could use it to clean the leading NULL chars and then convert ints to floats. Unsure whether it's better to then convert this back to an NMEA0183 sentence and then into signalK or send those values directly to a signalK path. Also not sure what's going on with the 'u\0000' in the first place either.
Just had a play on node red sending various nmea sentences to the server>>
With connections validate checksum off and remove null on ->
This works and shows up as signalk data - $WIMWV,345,R,0,N,A*
But this one doesn't, though does show in the nmeaout event log - \u0000$WIMWV,345,R,0,N,A*
In the log it looks like there's been an extra backslash added as well, might be relevent.. Jan 05 00:23:25 2022-01-05T00:23:25.031Z signalk-server:events:test [ '\\u0000$WIMWV,345,R,0,N,A*' ]
Looks like those leading chars could be the issue?
I have some node red stashed on evernote to calc an nmea checksum, I'll have a play tomorrow & see how easy it is to filter out that message and replace with a more standard one.
Node red is such a great resource to have in signalk, this would likely be a show stopper for probably every other system
didn't take long, evernote is great for stashing stuff and actually finding it again..
in node red insert this, ctrl + i then paste. Might be a cleaner way to do it, but this seems to work..
(2022-01-05, 01:31 AM)PaddyB Wrote: This works and shows up as signalk data - $WIMWV,345,R,0,N,A*
But this one doesn't, though does show in the nmeaout event log - \u0000$WIMWV,345,R,0,N,A*
In the log it looks like there's been an extra backslash added as well, might be relevent.. Jan 05 00:23:25 2022-01-05T00:23:25.031Z signalk-server:events:test [ '\\u0000$WIMWV,345,R,0,N,A*' ]
Looks like those leading chars could be the issue?
This is not correct advice. Your node-red code is off and it is generating data that has backslash as the first character, null as the second one and then the real data. The conversion to SK does not handle this because of the extra backslash.
I just tested and activating the null character removal makes this message pass. Likewise it should fix the original poster's issue.
2022-01-05, 11:17 PM (This post was last modified: 2022-01-05, 11:27 PM by PaddyB.)
(2022-01-05, 07:29 PM)tkurki Wrote: This is not correct advice. Your node-red code is off and it is generating data that has backslash as the first character, null as the second one and then the real data. The conversion to SK does not handle this because of the extra backslash.
I just tested and activating the null character removal makes this message pass. Likewise it should fix the original poster's issue
OK, learning lots today, ta.
And of course you are correct, sending >>
msg.payload = new Buffer([0x00,0x24,0x57,0x49,0x4D,0x57,0x56,0x2C,0x33,0x34,0x35,0x2C,0x52,0x2C,0x30,0x2C,0x4E,0x2C,0x41,0x2A,0x32,0x31]);
with null at the start shows as \u0000$WIMWV,345,R,0,N,A*21, activate null char removal and it's $WIMWV,345,R,0,N,A*21
Thanks for the help guys! I hadn't restarted the signal K server after applying changes to remove null characters. Once restarted this worked although it was quite fun to play around with node-red. With help from PaddyB and google, I was able to create a flow which also solved the issue, although I think the 'remove null character' checkbox is going to be a little more stable.
(2022-01-06, 08:57 AM)ash_perry Wrote: Thanks for the help guys! I hadn't restarted the signal K server after applying changes to remove null characters. Once restarted this worked although it was quite fun to play around with node-red. With help from PaddyB and google, I was able to create a flow which also solved the issue, although I think the 'remove null character' checkbox is going to be a little more stable.
cool, well done! Remove null way to go, though any time spent learning more node red is only a good thing, it's so powerful!