Hi dear Node-RED community,
I do have pool of 16 devices running Node-RED and connected trough MQTT.
There are 15 "slave", each of them connected to a machine and wired to IO & sensors to monitor them.
All those data are being sent to the "master" that display all that on a dashboard. (Each slave also have its own dashboard for dive-in analysis or monitoring if needed)
I do have a basic function to check the status of the machine, to know if it is running or stopped.
I also would like to indicate when there is a connection issue or if the machine is powered off.
The MQTT broker is on the master device.
I do have data coming every few seconds for each slave, so I was considering to have a function to check the time of the last data received for each machine, every 1 minute, and if nothing is received thus I know the machine is either off or facing a connection issue.
I am open to suggestion for better,cleaner way to check the status of those slaves.
I have seen the keep alive feature, the LWT ... but I am really unsure how to apply those in my case since I am interested by the status of the clients, not the broker.