How to detect unused flow (missing mqtt input)

Some MQTT devices battery die, then there is no mqtt-in input.
What is the proper way to cause some action - when a input/mqtt-in has not seen data(been used) for x hours?

You could use the Trigger node for such monitoring. As long as the message arrives at a regular interval you extend the delay. Once it fires, means when no message has arrived within the defined interval, you get an output that you could use to inform you about this. In my case I use many Trigger nodes in this way and I send alerts to Telegram when some component, service or sensor may fail

You should be able to set a last will time, then when broker does not hear from the device in x time, it can send a last will message to node read, which should subscribe to the last will topic.

2 Likes

Sure you can use "last will" but using the Trigger gives a bonus, always showing the actual status of all your (monitored) sensors etc in the flow

But is a matter of personal choice of course

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.