How do I enable more debugging information in SK Server?
I am transmitting a PGN (leeway) on the bus. I can see it in the list of PGNs but it doesn't show up under a path. I have probably set a field incorrectly. I would like to determine why it's being dropped. I see it in the log for the bus but not in the server logs. I have tried guessing a few likely settings in server logging but no luck so far.
10 Replies
128000 is not currently supported by n2k-signalk
Pretty easy to add. Open an issue there if it's not something you can tackle. https://github.com/SignalK/n2k-signalk
GitHub
GitHub - SignalK/n2k-signalk: NMEA 2000 to Signal K transformer
NMEA 2000 to Signal K transformer. Contribute to SignalK/n2k-signalk development by creating an account on GitHub.
Yes, I looked at the repo and it's trivial to modify the pgn.js, etc but I have NO idea how to build or test it in my running SK server. Is there any documentation for that or is it more of a general Node.js question (I only know a bit of C++/Arduino and enough JS to make a web page that crashes).
It is a general nodejs question
In this case it’s probably good enough just to the use the “npm test” for testing. You’ll need to implement one anyway.
if I were doing this i'd probably use
n2k-debug
webapp to capture some real world 128000 data, then add a test file for 128000 in https://github.com/SignalK/n2k-signalk/tree/master/test and use the captured data to create test cases with assertions for the outputGitHub
n2k-signalk/test at master · SignalK/n2k-signalk
NMEA 2000 to Signal K transformer. Contribute to SignalK/n2k-signalk development by creating an account on GitHub.
then use
npm test
to run the tests or npx mocha --grep 128000
to run just the tests that have the string 128000I'm a bit confused because "source" as used in the PGN definitions doesn't seem to agree with the concept of source in SK in general. Isn't SK source essentially the device that's emitting the specific data (i.e. PGN)? Whereas in the PGN definitions it seems to be something else (e.g. Heading, or Rate or Variation)...a sub-topic or path?
Sorry, I do not understand your question
What is “source” in the pgn definition?
module.exports = [
{
source: 'Position',
node: 'steering.rudderAngle',
filter: function (n2k) {
return typeof n2k.fields['Position'] !== 'undefined'
}
}
]
That's my question...what does the 'source' field refer to?
(The copy/paste is from 127245.js in n2k-signalk)
It is the ”name of the field to use as the source for this data item in canboat analyzer output”