Page 1 of 1

Battery level detection issues.

Posted: Thursday 05 March 2026 8:53
by Dave21w
I run a test system at work, Pi5, mosquitto and Z2M with a few sensors and switches hanging off it. One sensor which I have 3 off is a ZG-204ZV, miilimeter wave movement sensor with lux, temp and hum. Unlike a lot of the other zigbee sensors, when added these do not create a battery widget in the utility tab. I know I can set a low batt alert level in the settings tab but I need a widget with the value in it (I have my reasons).
I created a dzvents entry which pulls the battery level from the device IDX and publishes it to a custom widget. This was working perfectly up to last Friday (maybe), not sure what beta I was on then but was certainly not more than 5 behind the current one, after updating to 17303 (and now the latest one) it no longer functions, it runs without errors but the value in the widget does not change. If I replace the IDX with a different one the value is pulled from another device the widget updates to what ever that devices batt value is so the script still works.
Yesterday I replaced 3 sets of batteries in the sensors, all showed 100% in Z2M and in the devices page of Domoticz, this morning Z2M and the devices page show 75% (this is normal for this device after 24hrs) but the widget still says 100% and does not change as the percentage drops, sometimes a restart of Domoticz will get the correct value but not always. I don't understand how it can be pulling an incorrect value when the devices page corresponds correctly.