Battery low notification

Like most here, I have a number of sensors that are battery powered. Some of which publish a low battery MQTT code.

Handling that will be straightforward however, I’m interested to know how you are testing it and determining the low battery MQTT code.

So, what do you do?

My sensors publish a % value, and I send a notification when the value goes below a threshold.

But that seems to obvious an answer, so I’m not sure it was really your question.

Yes. That’s what I expected. But how are you testing it?

Testing what?

How are you testing that the devices actually updates for low voltage correctly without waiting for it to decay over time, or do you just expect that it’s correct?

The hardware is a very simple voltage divider from the power supply to ground, so there is very little to go wrong. Once it gives a valid reading, the battery voltage has to go down, and so does the reading. So I never tested it. But it is happening :grinning:

2 Likes

This has been on the back burner for me but thought I’d give it another go.

I have about 20 sensors and it’s a pain not knowing the battery state.

Where are you picking up the data for graph?

Would you be so kind as to share your code please?

You should have a look at this topic. it creates all the battery sensors for you.

Thanks!

I’ll have a look at that.

All of my battery sensors are RF through Sonoff RF Bridges flashed with Tasmota.

When a sensor is triggered it outputs this:

tele/RF_bridge_east/RESULT = {"RfReceived":{"Sync":9750,"Low":320,"High":960,"Data":"34F63A","RfKey":"None"}}

The “Data” is the device identifier and I’m assuming one of the other numbers is battery but can’t be sure.