Here I find a bug:
The battery level display is an incorrect percentage. The current power supply is 3.06V, which should show 100%, but in reality it shows 95%.
I search infos in the offical respository:
I want to refer to these schemes to observe the voltage values, but in reality, the callback registered for “PowerConfiguration. attributes. BatteryVoltage. ID” in “zigbee_handlers” has not been called at all.
What should I do next? Thanks!
Why should it show 100%? A full battery is around 3.2 V so 95% isn’t unreasonable.
Have you read the default battery handler code in the Lua libraries? That is where a lot of the interesting stuff can be found. A few Zigbee leak sensor devices are using bespoke code for a voltage lookup table or a linear conversion, but the majority are leaving things to the default handlers.
Thanks! I confirmed with our electronic engineer what you said, and the full charge voltage is indeed around 3.2V!
But our PDM hope to display it in the panel program like the following table:
I have previously configured the table in the following file:
By printing the log in the function “device_init” , I confirm that the configuration has taken effect. But when the supply voltage is 3.08V, the display still hasn’t reached 100%.
Hi,@nayelyz
I solved the problem by referencing the driver of “zigbee-presence-sensor”.
It looks like the call “battery_defaults.enable_battery_voltage_table” is not working properly.