Slow output from signalk-to-nmea0183
I need some help with the signalk-to-nmea0183 plugin. Data is coming out only every 60 seconds. The data originates from sksim and I can see that the data is being output from sksim about every 2 seconds. I can see that in the "Signal K Output" window of sksim, and also I see data changing in KIP at approximately 2 second intervals. However, when I connect TZ iBoat to the TCP port, I only see data every 60 seconds. I assume this is the rate it is coming out of signalk-to-nmea0183.
Questions:
1. Is there any place in signalk-to-nmea0183 to set the output rate?
2. Is there another way to see the output rate of the NMEA data on TCP?
3. Are there other ways to debug or understand this problem?
Additional details:
Signal K is running under openplotter on a raspberry pi 5, connected to my home wifi. An iPad connected to the same wifi network is running TZ iBoat which is the consumer of the NMEA data over TCP. The log in TZ iBoat shows data coming in only every 60 seconds. The only NMEA sentence I'm sending from signalk-to-nmea0183 is RMC (I was sending others but reduced it to just this for debug).
Please let me know if other information would be helpful. I appreciate any help with this, thanks!
24 Replies
Do you have throttle set for that in the plugin configuration?
No, at one point I tried setting it to 1 second to see if that helped, but it didn't
Also, I was able to run Wireshark on the pi to verify that the TCP messages were only being sent every 60 seconds by the signalk-to-nmea0183 plugin.
Try turning on debug logging for that plugin
there seems to be a filter that suppresses duplicates and output is generated only when the output value changes
Thanks Teppo. I'm using simulated data from sksim and with a 6 knot simulated speed, the GPS lat/long values in RMC are definitely changing every second, which I have verified by observing the values in KIP.
@Scott Bender I've turned on debug for signalk-to-nmea0183 plugin. Can you tell me where to find the debug data? Thanks!
In the Server Log
Interestingly, when I turned on debug it stated outputting data about every 2 seconds as confirmed in the debug log and in data being sent to TZ iBoat on the ipad. However, when I logged into the server from my pc to copy the log (by opening http://openplotter:3000/admin/#/serverConfiguration/log in chrome), the rate went back down to 1 per minute, as you can see in the attached log. I have experimented with this a bit and I can see that at times the data is being sent once every 2 seconds and other times (for quite some duration) at the 60 second rate. Any idea what is going on? I don't think it could be just a processor loading issue or something because is always either about every 2 seconds or almost exactly 60 seconds. I haven't made any changes to the plugin setup or anything else when the changes occur. Any idea what could be going on?
I wonder if it something with the simulator
Can you try running with a log file instead
Sure, thanks! Sorry, but I don't know how to do that. Can you give me a pointer?
You can run the server by hand like “signalk-server --sample-n2k-data”
Or you can grab a log file from https://github.com/SignalK/signalk-server/tree/master/samples
GitHub
signalk-server/samples at master · SignalK/signalk-server
An implementation of a Signal K central server for boats. - SignalK/signalk-server
And add a “Data Connection”
Thanks, I'll give that a try
Sorry, haven't had a chance to try that yet, but just noticed this. When it went from every couple seconds to once/minute, it went from 22:55:34 to 22:55:54 and then every entry after that was XX:54, every 60 seconds. Don't know if that is some kind of clue, but it seems like it falls back to some other 'tick'.
SKSim posts requests at the output interval in the settings.
These are http requests which in turn raise deltas via
handleMessage
I would expect to see these requests in the debug log at the configured intervalOkay, things have gone from bad to worse! Tried setting up a connection for file input, things seemed to lock up. I rebooted and now signalk won't start up anymore. I realize this is now off-topic, so let me know if I should move this somewhere else, but before I reinstall everything, does anyone have any ideas what is going wrong and how to resolve. Please see attached transcript from trying to
start signalk-server from the command line (there were a bunch of these NO_EMITTER_ID messages), and apologies if I'm breaking protocol (I'm new at discord).
You can manually disable that connection by editing ~/.signalk/settings.json
Well, SKSim seemed to be working fine. I saw the data getting to KIP at the right rate. The problem seemed limited to the nmea output on TCP from signalk-to-nmea0183 plugin.
Then screenshot the connection settings screen for me
If the only active input is sksim then this should be easy to reproduce: please share your sksim and signalk to nmea0183 setting from .signalk/plugin-config-data
But the error message suggests that you have a loop: the output you are generating is being handled as input. I suggest you start from scratch: rename .signalk, use log file playback with the n2k sample file, activate sk to nmea0183
I couldn't recover from whatever happened to signalk server and had to reinstall. It will take me some time to get things set up again because this is all new to me, but I will get back to you when I get things going again. Thanks so much for for the amazing help! You guys are awesome!
If you only reinstall the server it won’t redo your settings and you will end up right where you left off
So remove/rename .signalk directory
People are using sksim and sk to nmea0183 regularly, just something odd with your setup
@Teppo Kurki you were absolutely correct. Before I saw your message, I reinstalled without moving the .signalk directory and things were actually a bit worse. Then I saw your message and moved the directory, now things are working correctly! I will file this one away for future use. Thank you all SO much for your help!!