Xiaomi Door Sensors always reporting 100% Battery via deCONZ or ZHA

I’ve got several Xiaomi door/window sensors connected via an Aqara hub.
All works well, but I was looking to move over to using a Conbee as people seem to rave about it here. It would also allow me to step out of the Xiaomi cloud and get more privacy.

After some tribulations trying to get the ConbeeII recognised, I tried deCONZ/Phoscon and I tried ZHA. Both return 100% battery for 2 sensors I used as a test. These report 41% and 43% battery level via the Aqara hub (which appears correct for batteries that have been on my shelves for several years, and in use for about >6 months.

Am I missing something or Should I raise a bug on deCONZ/ZHA’s respective githubs?

[edit]
I’m on the latest firmware (deCONZ_ConBeeII_0x264a0700) and I have CR2032 batteries fitted (reported as CR1632 by ZHA). Not sure if the latter is the reason

The Xiaomi devices aren’t very good at following specs. Poke around in the ZHA configuration page and look at the PowerConfiguration attributes like battery_percentage_remaining. It should be 2x the actual percentage.

It probably needs some kind of quirk to fix it.

Thanks. I’ll look into it

You might have guessed I’m quite new to zha. Can tout explain a bit more what quirks are and what I need to do?

The quirks are located here.


Basically if zhaquirks has a match on a device, it “patches” the cluster class and works around whatever bug there is in the device. But first you need to figure out what that bug is, and then code will need to be written and implemented in zhaquirks. You can poke around in the attributes and try to figure out how it’s not meeting the Zigbee spec.

In that github link you can see there are quite a few Xiaomi devices in there already. Maybe a quirk is already being applied? Look in the logs when you pair it and see if there is a match.

I suspect that your specific device is just not in zhaquirks (no signature match), and you can just copy one of the other ones and change the signature and replacement to match your device. It probably needs the same fix as shown in zhaquirks/xiaomi/__init__.py, you can see there is the fix to the battery_reported attribute.

Do you resolved the problem? I have the same problem with aqara AND nortek hub

I’ve returned the stick and since moved to zigbee2mqtt

I’ve done the same as well.

I’d still like some help here please.
I have several buttons (switches) and a couple of motion and contact sensors that i connected to zha.
They all report 100% battery.

Could you give me some more detailed instructions on how to fix this?
Or perhaps recommend a guide?

Thank you in advance.

Sorry, I don’t use ZHA any more, I found Zigbee2mqtt to be much better. You could open an issue here, maybe someone there will help you with it.

Can I use z2m with my sonoff bridge?
Or is it restricted to the USB sticks?

Hi,

I also have Aqara sensors connected via a conbee ii on Pi3 that are always reporting 100% battery.
I have yet to determine how to report the battery level or percentage.
The only indication I have of battery life is when they are no longer reachable.

Has anyone found a fix?

Thanks

Same issue with z2mqtt for anyone wondering…