OpenMarine
MQTT - preventing timeout - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1)
+--- Forum: Node Red (https://forum.openmarine.net/forumdisplay.php?fid=15)
+--- Thread: MQTT - preventing timeout (/showthread.php?tid=815)



MQTT - preventing timeout - JD1 - 2017-10-18

Has anyone implemented a keep-alive or pingreq type setup in node red under OpenPlotter?
I have run into a situation where I believe my mqtt based data stream breaks because data doesn't change for a long time. I have not dug into the matter yet so the cause is a guess on my part. What happens is that depth and wind speed data only gets received by my Node Red setup when the chart plotter is on but of course it gets turned off when the boat is put to sleep at the marina. My mqtt system reports 'ND' as in no data and that might not change in several days. I believe the system ends up timing out and when data becomes available it is no longer reported to the mqtt broker (or the broker no longer accepts it). Data will then no longer update on the display that is fed by the mqtt broker unless I reset the system somehow.
I would like things to automatically 'work' again when data was unavailable or hasn't changed in a long time and then starts to become available again.