This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Graphing with node red and signalK
#1
I was sitting at anchor the other day and the wind was blowing like stink outside when it occurred to me that a graph of wind speed vs time would be quite interesting.
My setup involves NMEA 0183 feeding to a pi3 running OpenPlotter and this data stream is distributed via wifi in the boat.
I took the signalK data, extracted the wind speed and fed that to a line graph of wind speed vs time. It was supposed to run for an hour. It started just fine (after a bit of trial and error, mostly error) but then after about 5 minutes or so no additional data reached the graph. I could still see wind speed data on the wifi feed but no data was shown on the graph.
I did some googling and found out that there was/is a crashing issues with signalK when too much data is received. I don't know if this is still the case but we are talking maybe one or two data points per second, nothing really high.
Questions:
Is signalK robust enough to use or is it still alpha level stuff?
Is this something that other people have seen and maybe solved?
The way I interpret the graphing output, it is run for x amount of time or x number of data points - is it possible to configure a continuously running graph that displays only the last x hours or x data points. In other words I could look at the last hour of wind speed data whenever I wanted to, the graph is continuousy updated but data older than x hours is dropped from the graph.

I am still having lots of issues wrapping my mind around all this stuff and quite frequently my data stream as far as signalK is concerned just breaks. I use the debug display a lot and for reasons unknown to me, data is not displayed in the debug window a lot of times. I have no idea what I am doing wrong because if I restart processes every once in a while the data starts flowing like I expect it to. At this time I have come to the conclusion that either I am flaky or SignalK and/or node red is flaky. It would be interesting to find out if it is me or if other people have issues like that.
To be clear, I really haven't got a clue of what I am doing yet and I know that I am not giving enough data to really figure out what is happening but rather than banging my head against the wall I figured I would post this rambling story and maybe get a hint to lead me in the right direction ....

Thanks for reading my ramblings ....

BTW, I am running the latest version of OpenPlotter (0.11.6 ??)
  Reply
#2
(05-24-2017, 08:35 PM)JD1 Wrote: I was sitting at anchor the other day and the wind was blowing like stink outside when it occurred to me that a graph of wind speed vs time would be quite interesting.
My setup involves NMEA 0183 feeding to a pi3 running OpenPlotter and this data stream is distributed via wifi in the boat.
I took the signalK data, extracted the wind speed and fed that to a line graph of wind speed vs time. It was supposed to run for an hour. It started just fine (after a bit of trial and error, mostly error) but then after about 5 minutes or so no additional data reached the graph. I could still see wind speed data on the wifi feed but no data was shown on the graph.
I did some googling and found out that there was/is a crashing issues with signalK when too much data is received. I don't know if this is still the case but we are talking maybe one or two data points per second, nothing really high.
Questions:
Is signalK robust enough to use or is it still alpha level stuff?
Is this something that other people have seen and maybe solved?
The way I interpret the graphing output, it is run for x amount of time or x number of data points - is it possible to configure a continuously running graph that displays only the last x hours or x data points. In other words I could look at the last hour of wind speed data whenever I wanted to, the graph is continuousy updated but data older than x hours is dropped from the graph.

I am still having lots of issues wrapping my mind around all this stuff and quite frequently my data stream as far as signalK is concerned just breaks. I use the debug display a lot and for reasons unknown to me, data is not displayed in the debug window a lot of times. I have no idea what I am doing wrong because if I restart processes every once in a while the data starts flowing like I expect it to. At this time I have come to the conclusion that either I am flaky or SignalK and/or node red is flaky. It would be interesting to find out if it is me or if other people have issues like that.
To be clear, I really haven't got a clue of what I am doing yet and I know that I am not giving enough data to really figure out what is happening but rather than banging my head against the wall I figured I would post this rambling story and maybe get a hint to lead me in the right direction ....

Thanks for reading my ramblings ....

BTW, I am running the latest version of OpenPlotter (0.11.6 ??)

Too much data being sent to graphs is known about, something about browser memory maybe?
https://groups.google.com/forum/#!topic/...Z35HAQr1J4

Have a look here, I limit data for the graphs to once a minute and once a second to gauges.
http://forum.openmarine.net/showthread.p...48#pid1548

I've not had any problems with signalK crashing, V0.11.7 is stable on my Pi 3. 
Love it to bits Cool
  Reply
#3
Agree, I would like to have a good tool to store data and show graphs from signal k. We want to reach a beta version of openplotter ASAP and while users make it mature and translations are coming we could start thinking the best way. A momentary solution is node-red of course.

Any open and good web tool to show graphs?
  Reply
#4
I think you might as well first plan to store data that you want on SQL database then these can be displayed with red node or other tools.
  Reply
#5
I've used rrdtools before on v0.8, bit of a run around to set up but worked well, openplotter actions called a bash script with nmea data which was then written to the database. Viewing was with a php webpage. 
http://oss.oetiker.ch/rrdtool/

Not sure it would be the way to go but worth a look anyway. Interesting looking back on data from passages. 
[Image: JIr35Bd.jpg]

Short term temperatures are graphed using node red:
[Image: bdoKkcS.png]
  Reply
#6
An update to my previous issues:
I tried rate limiting my graphing attempt to one data point per second but SignalK still crashed.
Starting with the default Node Red flow that comes with OpenPlotter 0.11.7 (I added my wind speed graph to the default stuff) I attempted to trace the crashing and started systematically removing the flow lines between nodes.
For reasons unknown to me, the flow has decided to run just fine now without any additional crashing. The only thing I did is remove all interconnections between nodes and then adding them back in gradually to see where it starts crashing.
I also found that the standard graph presentation is a running window as I wanted to implement - bonus!
At this point, all I can do is play and observe to see if I can recreate any crashing.
  Reply
#7
I am still having issues but I now believe that it isn't node red based but rather signalk based. It would appear that the signalk server crashes randomly which then stops the data flow to node red. When the data flow stops, it requires a restart of signalk (openplotter/signalk tab/settings/restart).
The signalk/settings/diagnostic window shows no data flowing when things stop. The crashing is random and happens from anywhere near almost right away to up to an hour after the signalk server is restarted.
At the moment I have a number of nodes an mt node red screen but none of them are connected and the signalk server still crashes.
Any suggestions of what I could try to track down this crashing ?

I should add that the dashboard in OpenCPN shows the wind speed and direction even after signalk has crashed - it has never stopped displaying the correct info, it is rock solid.


{
"name": "signalk-server",
"version": "0.1.25",
"timestamp": "2017-05-29T21:15:15.362Z",
"self": "urn:mrn:imo:mmsi:98765432",
"roles": [
"master",
"main"
]
}
  Reply
#8
JD1 we need to know what error message is triggering that crash. Open a terminal and type openplotter, then restart signalk from the openplotter interface and wait for the crash. Copy paste the error message that should appear on the terminal. Thanks.
  Reply
#9
Thanks Sailoog. Here is the output. Note that everything was working until the range error. I did have to restart the signalk server twice and that is probbly reflected in the 'connection refused' error (just a guess)


pi@openplotter:~ $ openplotter
Connection is already closed.
Signal K starting
No settings/defaults.json available
[Errno 111] Connection refused
signalk-server running at 0.0.0.0:3000

Cannot open NGT-1-A device /dev/ttyOP_N2K

GET /signalk/v1/api/vessels/self 200 34.952 ms - 634
no unit for navigation.gnss.differentialReference
no unit for navigation.gnss.horizontalDilution
no unit for navigation.gnss.geoidalSeparation
no unit for navigation.gnss.satellites
no unit for navigation.gnss.quality
RangeError: Invalid time value
at NMEA0183.timestamp (/home/pi/.config/signalk-server-node/node_modules/nmea0183-signalk/lib/NMEA0183.js:204:14)
at NMEA0183._decoder (/home/pi/.config/signalk-server-node/node_modules/nmea0183-signalk/codecs/RMC.js:64:18)
at NMEA0183.decode (/home/pi/.config/signalk-server-node/node_modules/nmea0183-signalk/lib/NMEA0183.js:259:26)
at Parser._decode (/home/pi/.config/signalk-server-node/node_modules/nmea0183-signalk/lib/index.js:128:44)
at /home/pi/.config/signalk-server-node/node_modules/nmea0183-signalk/lib/index.js:172:26
at arrayEach (/home/pi/.config/signalk-server-node/node_modules/lodash/lodash.js:537:11)
at Function.forEach (/home/pi/.config/signalk-server-node/node_modules/lodash/lodash.js:9359:14)
at Parser._transform (/home/pi/.config/signalk-server-node/node_modules/nmea0183-signalk/lib/index.js:169:7)
at Parser.Transform._read (_stream_transform.js:167:10)
at Parser.Transform._write (_stream_transform.js:155:12)
pi@openplotter:~ $
  Reply
#10
ops, it seems an error in the NMEA 0183 parser plugin of signalk-server-node. A crash should not happend even if you provide bad data.

Where do your NMEA 0183 data come from?
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)