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?
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.
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.
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.