Posted 24 Oct 2021 (edited) I'm a first time Automation Direct user setting up a Click PLus as a publishing client using MQTT. I've got a mountain top, solar site with 3 analogs pressures. Non-mission critical data, just nice to have. I got the MQTT stuff working and am using aa cloud based Node Red instance (it's on the MQTT broker service) to publish the data as 3 gauges on a web page. I've got all of that working, but am trying to figure out to determine if the data is stale. In the winter, we only get 4 or 5 days daylight, so the batteries die and we loose communications daily. I need to figure out a Node Red flow when the data is stale and flag it on the pressure gauge display. I'm thinking of having a free running clock in the PLC, and do a compare in Node Red to determine if it gets stuck. I was just wondering if anyone has any other ideas on how to do it. Edited 24 Oct 2021 by don Share this post Link to post Share on other sites
Posted 25 Oct 2021 What I typically do is set up a hearbeat, a flasher. I usually have them anyway for blinking lights at different rates, so I just send that bit as part of a word of flag bits that get sent. Both stations in the link generate and send a heartbeat so both can check the bit to see if it stops blinking. Blink rate should be much slower than your packet rate to make sure you see both states. Share this post Link to post Share on other sites
Posted 25 Oct 2021 I'm also looking into Last Will and Testament (LWT) which is part of MQTT protocol. I think that may do the trick. Share this post Link to post Share on other sites
Posted 29 Oct 2021 Super easy solution - the published data triggers a time-out node in Node Red. The timer is set 2 or 3 times longer than the publish rate. If it times out, the data is stale and can be flagged as such. Thanks for the suggestions. Share this post Link to post Share on other sites