Python plugin: Battery Level for Z-Wave Devices

Python and python framework
User avatar
Phantom
Posts: 83
Joined: Saturday 31 December 2016 15:47
Target OS: Raspberry Pi
Domoticz version: 3.8922
Location: The Netherlands
Contact:

Re: Python plugin: Battery Level for Z-Wave Devices

Post by Phantom » Tuesday 22 August 2017 19:13

Hey, thanks for the update but it is not shown in git: https://github.com/999LV/BatteryLevel/ there i still see version 0.4.3

Logread
Posts: 201
Joined: Sunday 28 August 2016 7:48
Target OS: Raspberry Pi
Domoticz version:
Location: France
Contact:

Re: Python plugin: Battery Level for Z-Wave Devices

Post by Logread » Tuesday 22 August 2017 19:20

Phantom wrote:
Tuesday 22 August 2017 19:13
Hey, thanks for the update but it is not shown in git: https://github.com/999LV/BatteryLevel/ there i still see version 0.4.3
Good pick... forgot to sync my local development folder... should be ok now

User avatar
Phantom
Posts: 83
Joined: Saturday 31 December 2016 15:47
Target OS: Raspberry Pi
Domoticz version: 3.8922
Location: The Netherlands
Contact:

Re: Python plugin: Battery Level for Z-Wave Devices

Post by Phantom » Tuesday 22 August 2017 19:33

Logread wrote:
Tuesday 22 August 2017 19:20
Phantom wrote:
Tuesday 22 August 2017 19:13
Hey, thanks for the update but it is not shown in git: https://github.com/999LV/BatteryLevel/ there i still see version 0.4.3
Good pick... forgot to sync my local development folder... should be ok now
Yes thanks up to date again :)

PBdA
Posts: 16
Joined: Monday 14 December 2015 17:51
Target OS: Raspberry Pi
Domoticz version: 3.5893
Location: Colomiers, France
Contact:

Re: Python plugin: Battery Level for Z-Wave Devices

Post by PBdA » Tuesday 03 October 2017 11:27

Domoticz 3.8153 + Battery level plugin 4.4 on Rasbian Jessie

I have a strange problem with the plugin. My polling interval is 60 mn. I monitor updates in an LUA script. Each hour battery level of my 6 devices are updated but there are several updates. In log file I see:

Code: Select all

2017-10-03 11:12:28.503  LUA: --> Piles - Remote Fibaro:55
2017-10-03 11:12:28.549  LUA: --> Piles - Remote Fibaro:55
2017-10-03 11:12:28.594  LUA: --> Piles - Remote Fibaro:55
2017-10-03 11:12:28.640  LUA: --> Piles - Remote Fibaro:55
2017-10-03 11:12:28.685  LUA: --> Piles - Remote Fibaro:55
2017-10-03 11:12:28.731  LUA: --> Piles - Remote Fibaro:55
It appears that each hour there is one more line:

Code: Select all

# grep '06:12.*Remote Fibaro:' domoticz.log | wc -l
156
# grep '07:12.*Remote Fibaro:' domoticz.log | wc -l
157
# grep '08:12.*Remote Fibaro:' domoticz.log | wc -l
158
# grep '09:12.*Remote Fibaro:' domoticz.log | wc -l
159
# grep '10:12.*Remote Fibaro:' domoticz.log | wc -l
160
# grep '11:12.*Remote Fibaro:' domoticz.log | wc -l
161
My uptime is 6 days + 16 hours -> 160 updates

The plugin is working well otherwise.

Any idea ?
PBdA

PBdA
Posts: 16
Joined: Monday 14 December 2015 17:51
Target OS: Raspberry Pi
Domoticz version: 3.5893
Location: Colomiers, France
Contact:

Re: Python plugin: Battery Level for Z-Wave Devices

Post by PBdA » Tuesday 03 October 2017 14:16

Looking at the code, I think that self.BatteryNodes should be reset at in pollnodes(self).

Code: Select all

# diff plugin.py.sv plugin.py
133a134
>                 self.BatteryNodes = []
That works for me but I don't know about side effects.
PBdA

Logread
Posts: 201
Joined: Sunday 28 August 2016 7:48
Target OS: Raspberry Pi
Domoticz version:
Location: France
Contact:

Re: Python plugin: Battery Level for Z-Wave Devices

Post by Logread » Wednesday 04 October 2017 11:07

@PBdA,
You are correct. Thanks for uncovering the bug. Currently testing the simple fix you suggested. I'll commit to GitHub later today hopefully.

EDIT: Version 0.4.5 is available from GitHub.
Existing users please upgrade (besides issues with the events system, memory usage was building up over time due to the bug uncovered by @PBdA). First post in the thread has been updated accordingly as well.

User avatar
remb0
Posts: 1002
Joined: Thursday 11 July 2013 22:21
Target OS: Raspberry Pi
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: Python plugin: Battery Level for Z-Wave Devices

Post by remb0 » Wednesday 04 October 2017 20:51

thanks! great work!
maybe an idea to make a compatible list?
I have:
Neo CoolCam Power plug 12A+
Aeotec ZW089 Recessed Door Sensor Gen5+
Aeotec ZW089 Recessed Door Sensor Gen5+
Neo CoolCam Battery Powered PIR Sensor+
Neo CoolCam Water Leakage Detector+
Schlage Link Mini Keypad RFID
Philio Technology Corporation PST02-A 4 in 1 Multi-Sensor+
Danfoss Z Thermostat 014G0013
battery.png
battery.png (30.38 KiB) Viewed 2103 times
as you can see in my screenshot ony the danfoss is working:) the battery was really empty.
the zipato keypad mini in domoticz known as (Schlage Link Mini Keypad RFID) is 64. but this is already a few months so I don't believe it's right.
and in openzwave panel there is no info about the battery stats of the zipato.

are the other devices not compatible with battery info or do I have them wrong configured?

Logread
Posts: 201
Joined: Sunday 28 August 2016 7:48
Target OS: Raspberry Pi
Domoticz version:
Location: France
Contact:

Re: Python plugin: Battery Level for Z-Wave Devices

Post by Logread » Wednesday 04 October 2017 23:30

@remb0,
Thanks for your insight and feedback. The plugin gets its data from openzwave, no more no less. And I noticed as well some zwave devices have an erratic battery level reporting behaviour. But nothing I can do about it in the scope of the plugin.
For non zwave devices, this is definitively out of scope but may be someone can contribute ?

User avatar
Brutus
Posts: 322
Joined: Friday 26 September 2014 9:33
Target OS: Windows
Domoticz version:
Location: Heerlen, The Netherlands
Contact:

Re: Python plugin: Battery Level for Z-Wave Devices

Post by Brutus » Thursday 23 November 2017 20:31

Thnx for this great plugin!
1x Intel NUC D54250WYK (Windows 7 x64)
1x Aeon Labs USB Z-Stick S2
1x P1 Smart Meter USB
19x Fibaro Modules

dextm80
Posts: 102
Joined: Tuesday 24 October 2017 18:32
Target OS: Linux
Domoticz version: 4.10159
Contact:

Re: Python plugin: Battery Level for Z-Wave Devices

Post by dextm80 » Monday 01 January 2018 20:32

Great plugin!
Domoticz on AsRock j3455-ITX 8gb ram - Aeotec ZWave Usb Stick - RFLink 433Mhz
1x Fibaro Wall Plug
1x Fibaro Motion Sensor
2x NeoCoolcam Wall Plug
Netatmo Weather Station - Netatmo Thermostat
Philips Hue Bridge

anton
Posts: 6
Joined: Wednesday 30 August 2017 16:15
Target OS: Windows
Domoticz version:
Contact:

Re: Python plugin: Battery Level for Z-Wave Devices

Post by anton » Friday 12 January 2018 13:07

Hi,

I did everything what is write in the manual.
I don’t see the the plug-in by the hardware.

Gr.
Anton

Logread
Posts: 201
Joined: Sunday 28 August 2016 7:48
Target OS: Raspberry Pi
Domoticz version:
Location: France
Contact:

Re: Python plugin: Battery Level for Z-Wave Devices

Post by Logread » Friday 12 January 2018 14:56

anton wrote:
Friday 12 January 2018 13:07
Hi,

I did everything what is write in the manual.
I don’t see the the plug-in by the hardware.

Gr.
Anton
Domoticz version ? Platform ?

User avatar
Siewert308SW
Posts: 617
Joined: Monday 29 December 2014 16:47
Target OS: Raspberry Pi
Domoticz version: Beta
Location: The Netherlands - Zoutkamp (gn)
Contact:

Re: Python plugin: Battery Level for Z-Wave Devices

Post by Siewert308SW » Friday 12 January 2018 15:16

Just came by to say thx...
Naamloos.png
Naamloos.png (55.67 KiB) Viewed 1497 times
Setup:
- RPi3 - PIco HV3.0A / Domo Beta 3.9XXX / RFXtrx433E / Aeotec Gen5
- RPi3 - PIco HV3.0A / PiHole / PiVPN / NAS / Print Server
- Youless Elec&Gas
- FI9803P Cams
- KD101 detectors
- Zwave & KaKu

MyDomoticz scripts: @GitHub
PIco UPS Toolkit: @GitHub

Logread
Posts: 201
Joined: Sunday 28 August 2016 7:48
Target OS: Raspberry Pi
Domoticz version:
Location: France
Contact:

Re: Python plugin: Battery Level for Z-Wave Devices

Post by Logread » Friday 12 January 2018 22:44

Siewert308SW wrote:
Friday 12 January 2018 15:16
Just came by to say thx...
Naamloos.png
Appreciate :D

anton
Posts: 6
Joined: Wednesday 30 August 2017 16:15
Target OS: Windows
Domoticz version:
Contact:

Re: Python plugin: Battery Level for Z-Wave Devices

Post by anton » Saturday 13 January 2018 17:13

Logread wrote:
Friday 12 January 2018 14:56
anton wrote:
Friday 12 January 2018 13:07
Hi,

I did everything what is write in the manual.
I don’t see the the plug-in by the hardware.

Gr.
Anton
Domoticz version ? Platform ?
Raspberry Pi 2
Domoticz 3,885

shturm
Posts: 10
Joined: Wednesday 14 October 2015 2:46
Target OS: Linux
Domoticz version:
Location: San Jose, CA
Contact:

Re: Python plugin: Battery Level for Z-Wave Devices

Post by shturm » Thursday 01 February 2018 7:37

anton wrote:
Friday 12 January 2018 13:07
Hi,

I did everything what is write in the manual.
I don’t see the the plug-in by the hardware.

Gr.
Anton
I'm having the same problem.
Ubuntu 14.04
Domoticz 3.8153
It's installed in ~/git/domoticz

Any idea why I don't see plugin in the list?

Logread
Posts: 201
Joined: Sunday 28 August 2016 7:48
Target OS: Raspberry Pi
Domoticz version:
Location: France
Contact:

Re: Python plugin: Battery Level for Z-Wave Devices

Post by Logread » Thursday 01 February 2018 8:35

@shturm,

Did you try other plugins ? I suspect this is a domoticz plugin framework issue rather than an issue with this particular plugin.

shturm
Posts: 10
Joined: Wednesday 14 October 2015 2:46
Target OS: Linux
Domoticz version:
Location: San Jose, CA
Contact:

Re: Python plugin: Battery Level for Z-Wave Devices

Post by shturm » Saturday 03 February 2018 5:38


User avatar
Derik
Posts: 2183
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Python plugin: Battery Level for Z-Wave Devices

Post by Derik » Saturday 17 February 2018 21:57

Dear Developer.....
cannot install from the github..
Is there something changed from the wiki?
Everytime i get this error:

Code: Select all

root@odroid:/home/root/domoticz/plugins/BatteryLevel# git clone https://github.com/999LV/BatteryLevel.git BatteryLevel
fatal: could not create work tree dir 'BatteryLevel': No such file or directory
root@odroid:/home/root/domoticz/plugins/BatteryLevel#
And i am sure the map BatteryLevel is in the plugin section..
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups

User avatar
Phantom
Posts: 83
Joined: Saturday 31 December 2016 15:47
Target OS: Raspberry Pi
Domoticz version: 3.8922
Location: The Netherlands
Contact:

Re: Python plugin: Battery Level for Z-Wave Devices

Post by Phantom » Sunday 18 February 2018 12:48

Derik wrote:
Saturday 17 February 2018 21:57
Dear Developer.....
cannot install from the github..
Is there something changed from the wiki?
Everytime i get this error:

Code: Select all

root@odroid:/home/root/domoticz/plugins/BatteryLevel# git clone https://github.com/999LV/BatteryLevel.git BatteryLevel
fatal: could not create work tree dir 'BatteryLevel': No such file or directory
root@odroid:/home/root/domoticz/plugins/BatteryLevel#
And i am sure the map BatteryLevel is in the plugin section..
I think you need to go back 1 folder as you are already in the BatteryLevel map and trying to create the BatteryLevel in there again.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest