Xiaomi Sensors - Battery Level - anybody know what it really means?

No, me neither. I bought a 3V CR1632 the other day to try with one of my door sensors and fitted it this morning. Battery level changed from 49 to 55, not quite what I would have expected but at least it changed.

Edit: within minutes, the battery level dropped to 51.

1 Like

I’ve graphed the battery level value.

As you can see, once it reaches a value is almost flat. Maybe a signal level?

5 Likes

Fascinating graph, revin.

I’ve read everything on every forum about Xiaomi Aqara sensors, and it seems that the battery_level reported is simply meaningless?

So what happens when the sensors run out of battery, they just silently stop working?

@revin,
Would you mind sharing the code snippet for your graph?
Would love to use that!

I’ve had a motion sensor not working properly for a while. The current battery level is being reported as 33, so that is possibly the minimum level to operate correctly. Haven’t put a new battery in it yet.

I posted some background here: Xiaomi Aqara > Battery level

1 Like

I am having serious problems with the Xiaomi temperature sensors. I have tried changing batteries, as you can see in the attached timeline. But batteries drains very quickly (within one or two weeks), I loose connection to the sensors. I wouldn’t mind if the battery reading was wrong, as most of you points out, but I do experience drop-outs when the battery gets to about 60%. Then I can push to button on the sensor to get it working again, and it runs for about 1 week more to about 35-37% and then it drops out again.I have tried changing batteries, but with same results.

Am I doing something wrong, how can you get your sensors to work for months ? - When I only get weeks ?

Hoping for some advice on the matter, as I now have 6 sensors that all have the exact same behavior.

/snowatom

Are they far away from the gateway? It could be due to low connectivity.

Well I have 6 sensors around the house, and the gateway somewhere in the middle. But all acts the same no matter the placement.

I had this connectivity issue. For me It was 2.4ghz wifi interference as the frequencies are close to Zigbee. Try manually setting your wifi router to a channel away from 11 like 1 or 5.

1 Like

Same behavior here.

Did you find any solution?

Try @Haden suggestion as this is most likely not a battery issue.

After the sensors was lost a couple of times, it stabilized. It would seem that a voltage of some sort in the batteries causes this. I am using different brands of batteries, all with same issues. But when the Battery level gets below 40%, it seems to hold its voltage and the sensors are not loosing connection any more.

Can someone please paste a snippet of the code to read the batteries? Still does not work here after 2 hours for the Switch and Cube… as they only have it as attributes.
I read the same attributes from the hue motion sensor, but it just does not work with the xiaomis.

Here you go. 

  - platform: template
    sensors:
      bedroom_thermometer_battery:
        friendly_name: "Bedroom Battery"
        unit_of_measurement: '%'
        value_template: "{{ state_attr('sensor.temperature_158d000234878e', 'battery_level') | round(0) }}"
        device_class: "battery"
1 Like

I have already the problem, that the XIAOMI Sensors don´t have the right Battery Level.
Has anyone solved this Problem ?
thx.

mine still shows ~45 after 2 years…

Yeah, it’s like it is, it only updates after a half year or more

HA shows not the voltage, but the electrical capacity of the battery.
I suppose…

here’s a formula I found for calculating the battery level

Math.min(Math.round((voltage - 2200) / 10), 100);

I don’t know if it’s accurate, but it’s what I’m using.

here’s where I found it: https://github.com/pierrecle/node-red-contrib-mi-devices/blob/4c8978decf996006a952588413fce228d99d6a6c/src/utils.js