999LV / BatteryLevel

Domoticz python plugin to display/log battery level of zwave devices
MIT License
9 stars 5 forks source link

No device created #15

Open rcrocus opened 1 year ago

rcrocus commented 1 year ago

Hello everyone,

I try to install this plugin in Domoticz 2022.2 (build 14928). The installation is OK, but no devices are created.

I have 4 Z-wave devices and 1 on battery (Node 9 Détecteur de pluie) but it appears with 255% battery :

_Status: Gestion Batterie: Entering work loop. Status: Gestion Batterie: Initialized version 0.6.1, author 'logread' Gestion Batterie: Debug logging mask set to: PYTHON PLUGIN QUEUE IMAGE DEVICE CONNECTION MESSAGE ALL Gestion Batterie: 'HardwareID':'22' Gestion Batterie: 'HomeFolder':'/home/pi/domoticz/plugins/BatteryLevel/' Gestion Batterie: 'StartupFolder':'/home/pi/domoticz/' Gestion Batterie: 'UserDataFolder':'/home/pi/domoticz/' Gestion Batterie: 'Database':'/home/pi/domoticz/domoticz.db' Gestion Batterie: 'Language':'fr' Gestion Batterie: 'Version':'0.6.1' Gestion Batterie: 'Author':'logread' Gestion Batterie: 'Name':'Gestion Batterie' Gestion Batterie: 'Address':'localhost' Gestion Batterie: 'Port':'8080' Gestion Batterie: 'Key':'BatteryLevel' Gestion Batterie: 'Mode1':'60' Gestion Batterie: 'Mode2':'75' Gestion Batterie: 'Mode3':'50' Gestion Batterie: 'Mode4':'25' Gestion Batterie: 'Mode5':'001' Gestion Batterie: 'Mode6':'Debug' Gestion Batterie: 'DomoticzVersion':'2022.2 (build 14863)' Gestion Batterie: 'DomoticzHash':'ce58d8b85' Gestion Batterie: 'DomoticzBuildTime':'2022-12-20 08:28:39' Gestion Batterie: Device count: 0 Gestion Batterie: onStart called Gestion Batterie: Setting battery level to full if greater or equal than 75 percent Gestion Batterie: Setting battery level to normal if greater or equal than 50 percent Gestion Batterie: Setting battery level to empty if less or equal than 25 percent Gestion Batterie: Number of icons loaded = 4 Gestion Batterie: Icon 105 batterylevelfull Gestion Batterie: Icon 106 batterylevelok Gestion Batterie: Icon 107 batterylevellow Gestion Batterie: Icon 108 batterylevelempty Gestion Batterie: Using polling interval of 60 minutes Gestion Batterie: Acquiring GIL for 'onStartCallback' Gestion Batterie: Pushing 'onHeartbeatCallback' on to queue Gestion Batterie: Processing 'onHeartbeatCallback' message Gestion Batterie: Acquiring GIL for 'onHeartbeatCallback' Gestion Batterie: Calling message handler 'onHeartbeat' on 'module' type object. Gestion Batterie: Calling domoticz API: http://127.0.0.1:8080/json.htm?type=command&param=zwavegetbatterylevels&idx=13 Gestion Batterie: Node 1 Controller has battery level of 255% Gestion Batterie: Node 5 Fil Pilote RDC has battery level of 255% Gestion Batterie: Node 8 Commande Velux has battery level of 255% Gestion Batterie: Node 9 Détecteur de pluie has battery level of 255% Gestion Batterie: Acquiring GIL for 'onHeartbeatCallback' Gestion Batterie: Pushing 'onHeartbeatCallback' on to queue Gestion Batterie: Processing 'onHeartbeatCallback' message Gestion Batterie: Acquiring GIL for 'onHeartbeatCallback' Gestion Batterie: Calling message handler 'onHeartbeat' on 'module' type object._

Do you know where is the problem ?

Thanks.

999LV commented 1 year ago

Hi ! Are you using the legacy openzwave implementation or the now recommended zwave-js-ui + MQTT ? I wrote the plugin to work with the legacy openzwave. I have not yet tried the new one and hence do not know yet how the plugin could be adapted (if even possible).

rcrocus commented 1 year ago

Hi, Yes I use the legacy openzwave implementation (Version: 1.6-1911-gc6a420ef).

999LV commented 1 year ago

OK thanks. Please note that indeed if battery level reported by openzwave is 255% (as reported in the copy of the log you shared) then it is assumed that the zwave node is not battery powered and therefore no device is created by the plugin.

rcrocus commented 1 year ago

I know, but I have a device on battery : Gestion Batterie: Node 9 Détecteur de pluie has battery level of 255%

This devis is a Popp Z-Rain Rain Sensor+ (https://popp.eu/products/z-rain/). Please find here the documentation : https://manuals.zwave.eu/backend/make.php?lang=en&sku=pope700168&type=popp

999LV commented 1 year ago

I am afraid I cannot help you as far as the plugin is concerned… if openzwave/domoticz report it with batterylevel 255%, this is not a plugin issue.

rcrocus commented 1 year ago

I found the problem might be in the device Popp Z-Rain Rain Sensor+ with the battery level (https://www.domoticz.com/forum/viewtopic.php?t=37756#p284769). I'll relaunch the subject in the forum and if necesary, I'll return here.

Thanks a lot.