Low battery or dead devices domoticz mqtt

Hi,

I am looking for a node or flow to check the status of batteries and dead devices.

Somebody with a good solution? Or examples.

I can read the battery voltages of some devices using MQTT. Setting various values (Low, Warning or whatever) and comparing to the actual voltage, you can send a message, warning or otherwise, in my case via Telegram. (Or you could display values/warnings on a screen.)

Yes, but is there a way to read only dead devices and low battery? And not to configure every devices.

And then send an message.

You can't really read a dead device. So you need a way to tell if a device is alive, not dead.

Depending on the capabilities of the device you could

  • Ping it at intervals. If there is no response trigger your notification flow.
  • Have it send "heartbeat" messages at intervals. If the heartbeat stops, trigger your notification flow.
  • If the time elapsed since the last reading exceeds n seconds, trigger your notification flow.

If your device can measure it's own battery level, have it send that data as the heartbeat payload.

With MQTT it may be possible to use the LWT (Last Will and Testament).

1 Like

LWT is good yes.
By default Node-red will receive the "Offline" message 30 seconds after the device drops off the network.

It's basically the same as my heartbeat suggestion but built-in to MQTT.

2 Likes

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