stas-demydiuk / domoticz-zigbee2mqtt-plugin

zigbee2mqtt plugin for domoticz
MIT License
136 stars 98 forks source link

Add support for `battery_low` feature #513

Closed SargonofAssyria closed 3 years ago

SargonofAssyria commented 3 years ago

Version: 2020.2 (build 12732) Build Hash: fc9c7c2d0-modified Compile Date: 2020-12-07 15:53:06 dzVents Version: 3.0.18 Python Version: 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0] Plugin: 3.0.0

These device give some errors: https://www.zigbee2mqtt.io/devices/ZNCZ02LM.html#xiaomi-zncz02lm Error: can not process numeric item "energy"

https://www.zigbee2mqtt.io/devices/SEA802-Zigbee.html#saswell-sea802-zigbee Error: can not process binary item "battery_low"

stas-demydiuk commented 3 years ago

For energy, I probably suppress the error without any action as Domoticz calculates energy internally. Regarding battery_low, do you think it is worse to create additional device for that item?

SargonofAssyria commented 3 years ago

The battery_low device should be created because this device does not give a battery percentage. So it is the only way to know if battery is almost empty. I guess you can suppress the "energy" error.

stas-demydiuk commented 3 years ago

Support for the feature has been added. @SargonofAssyria, @salopette, could you please update the plugin and check

salopette commented 3 years ago

Now the bug is gone! Thanks!

SargonofAssyria commented 3 years ago

Thanks! Yes battery device is added. The only thing is that the device is a contact device and the status is Closed, when I want to put a battery icon on it, it is gayed out. That's valid but does not display well. Unfortunately there is no device as Contact inverted. The only errors left are: 2021-01-17 15:34:29.698 Error: (Zigbee) UPS: can not process numeric item "energy" 2021-01-17 15:34:29.699 Error: (Zigbee) UPS: can not process binary item "power_outage_memory" 2021-01-17 15:34:29.701 Error: (Zigbee) Hobbykamer: can not process numeric item "local_temperature_calibration"

Are these already added to the issues?

stas-demydiuk commented 3 years ago

For local_temperature_calibration #541 ticket is created For the rest ones no tickets so far

SargonofAssyria commented 3 years ago

See: https://github.com/stas-demydiuk/domoticz-zigbee2mqtt-plugin/issues/551