Python plugin: Battery Level for Z-Wave Devices
Moderator: leecollings
- Egregius
- Posts: 2589
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Python plugin: Battery Level for Z-Wave Devices
In my case the XML isn't good either.
I replaced all batteries of my smoke sensors yesterday. All battery levels went to 100%.
Today, one reports as 0%. So I looked at the devices table, all devices from that node just have a - as battery level...
I replaced all batteries of my smoke sensors yesterday. All battery levels went to 100%.
Today, one reports as 0%. So I looked at the devices table, all devices from that node just have a - as battery level...
-
- Posts: 228
- Joined: Sunday 28 August 2016 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: France
- Contact:
Re: Python plugin: Battery Level for Z-Wave Devices
Not clear to me if you are saying the domoticz/Config/zwcfg_0x????????.xml file on your system does not hold an accurate COMMAND_CLASS_BATTERY data for that node, or if my plugin has a bug ?Egregius wrote:In my case the XML isn't good either.
I replaced all batteries of my smoke sensors yesterday. All battery levels went to 100%.
Today, one reports as 0%. So I looked at the devices table, all devices from that node just have a - as battery level...
That being said, you may want to try to manually wake up the culprit smoke sensor and see what happens (may have to wait for one hour to see any change though) ?
- Egregius
- Posts: 2589
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Python plugin: Battery Level for Z-Wave Devices
Yes, the /Config/zwcfg_0x????????.xml contains value="0" for that node.
Or maybe it's a faulty battery, haven't received temps in the last 6 hours... Damn, up to the attic that is.
Or maybe it's a faulty battery, haven't received temps in the last 6 hours... Damn, up to the attic that is.
- capman
- Posts: 153
- Joined: Friday 12 July 2013 20:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Belgium
- Contact:
Re: Python plugin: Battery Level for Z-Wave Devices
A tryded the script , but got a error in my log.
2017-05-27 09:38:25.534 (Baterijen Z-Wave) Initialized version 0.4.0, author 'logread'
2017-05-27 09:38:25.590 (Baterijen Z-Wave) Debug log level set to: 'true'.
2017-05-27 09:38:25.590 (Baterijen Z-Wave) 'Key':'BatteryLevel'
2017-05-27 09:38:25.590 (Baterijen Z-Wave) 'Mode6':'Debug'
2017-05-27 09:38:25.590 (Baterijen Z-Wave) 'Port':'0'
2017-05-27 09:38:25.590 (Baterijen Z-Wave) 'HardwareID':'55'
2017-05-27 09:38:25.590 (Baterijen Z-Wave) 'Version':'0.4.0'
2017-05-27 09:38:25.590 (Baterijen Z-Wave) 'Author':'logread'
2017-05-27 09:38:25.590 (Baterijen Z-Wave) 'Name':'Baterijen Z-Wave'
2017-05-27 09:38:25.590 (Baterijen Z-Wave) 'HomeFolder':'/usr/local/domoticz/var/plugins/BatteryLevel/'
2017-05-27 09:38:25.590 (Baterijen Z-Wave) 'Mode1':'60'
2017-05-27 09:38:25.590 (Baterijen Z-Wave) Device count: 0
2017-05-27 09:38:25.591 (Baterijen Z-Wave) Number of icons loaded = 4
2017-05-27 09:38:25.591 (Baterijen Z-Wave) Icon 120 batterylevelok
2017-05-27 09:38:25.591 (Baterijen Z-Wave) Icon 118 batterylevelfull
2017-05-27 09:38:25.591 (Baterijen Z-Wave) Icon 119 batterylevellow
2017-05-27 09:38:25.591 (Baterijen Z-Wave) Icon 117 batterylevelempty
2017-05-27 09:38:25.591 (Baterijen Z-Wave) Using polling interval of 60 minutes
Error: (Baterijen Z-Wave) Enable to find a zwave controller configuration file !
And all 10 seconds get this message
2017-05-27 09:38:45.459 (Baterijen Z-Wave) Calling message handler 'onHeartbeat'.
2017-05-27 09:38:25.534 (Baterijen Z-Wave) Initialized version 0.4.0, author 'logread'
2017-05-27 09:38:25.590 (Baterijen Z-Wave) Debug log level set to: 'true'.
2017-05-27 09:38:25.590 (Baterijen Z-Wave) 'Key':'BatteryLevel'
2017-05-27 09:38:25.590 (Baterijen Z-Wave) 'Mode6':'Debug'
2017-05-27 09:38:25.590 (Baterijen Z-Wave) 'Port':'0'
2017-05-27 09:38:25.590 (Baterijen Z-Wave) 'HardwareID':'55'
2017-05-27 09:38:25.590 (Baterijen Z-Wave) 'Version':'0.4.0'
2017-05-27 09:38:25.590 (Baterijen Z-Wave) 'Author':'logread'
2017-05-27 09:38:25.590 (Baterijen Z-Wave) 'Name':'Baterijen Z-Wave'
2017-05-27 09:38:25.590 (Baterijen Z-Wave) 'HomeFolder':'/usr/local/domoticz/var/plugins/BatteryLevel/'
2017-05-27 09:38:25.590 (Baterijen Z-Wave) 'Mode1':'60'
2017-05-27 09:38:25.590 (Baterijen Z-Wave) Device count: 0
2017-05-27 09:38:25.591 (Baterijen Z-Wave) Number of icons loaded = 4
2017-05-27 09:38:25.591 (Baterijen Z-Wave) Icon 120 batterylevelok
2017-05-27 09:38:25.591 (Baterijen Z-Wave) Icon 118 batterylevelfull
2017-05-27 09:38:25.591 (Baterijen Z-Wave) Icon 119 batterylevellow
2017-05-27 09:38:25.591 (Baterijen Z-Wave) Icon 117 batterylevelempty
2017-05-27 09:38:25.591 (Baterijen Z-Wave) Using polling interval of 60 minutes
Error: (Baterijen Z-Wave) Enable to find a zwave controller configuration file !
And all 10 seconds get this message
2017-05-27 09:38:45.459 (Baterijen Z-Wave) Calling message handler 'onHeartbeat'.
-
- Posts: 228
- Joined: Sunday 28 August 2016 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: France
- Contact:
Re: Python plugin: Battery Level for Z-Wave Devices
@capman,
I assume that indeed you have a zwave stick connected and functional ? If so, what is the platform you are running Domoticz on (Linux, Windows, ...) ? Can you locate the zwcfg_0x????????.xml file on your system (where ???????? is the unique homeid of your zwave controller)... it should be in the Config subfolder of the Domoticz install folder. If it is not there, then please report on where that file is on your system (you might have a non standard directory setup ?)
I assume that indeed you have a zwave stick connected and functional ? If so, what is the platform you are running Domoticz on (Linux, Windows, ...) ? Can you locate the zwcfg_0x????????.xml file on your system (where ???????? is the unique homeid of your zwave controller)... it should be in the Config subfolder of the Domoticz install folder. If it is not there, then please report on where that file is on your system (you might have a non standard directory setup ?)
- capman
- Posts: 153
- Joined: Friday 12 July 2013 20:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Belgium
- Contact:
Re: Python plugin: Battery Level for Z-Wave Devices
I have it installed on synology beta 3.7468Logread wrote:@capman,
I assume that indeed you have a zwave stick connected and functional ? If so, what is the platform you are running Domoticz on (Linux, Windows, ...) ? Can you locate the zwcfg_0x????????.xml file on your system (where ???????? is the unique homeid of your zwave controller)... it should be in the Config subfolder of the Domoticz install folder. If it is not there, then please report on where that file is on your system (you might have a non standard directory setup ?)
On my config folder a have a file called 'zwcfg.xsd'. It's located in /volume1/@appstore/domoticz/Config/zwcfg.xsd
Code showing under.
- Spoiler: show

- Attachments
-
- zwave.JPG (97.8 KiB) Viewed 4101 times
-
- Posts: 228
- Joined: Sunday 28 August 2016 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: France
- Contact:
Re: Python plugin: Battery Level for Z-Wave Devices
@capman,
The .xsd file is of no use for the plugin... only the zwcfg_0x????????.xml file (where ???????? is the unique homeid of your zwave controller) is required for the plugin to work... I note your zwave stick is a Vision one, while I tested on a Aeotec, so may be openzwave works differently with that controller ? Not sure. Can you send me by pm a directory listing of your domoticz/Config folder ?
The .xsd file is of no use for the plugin... only the zwcfg_0x????????.xml file (where ???????? is the unique homeid of your zwave controller) is required for the plugin to work... I note your zwave stick is a Vision one, while I tested on a Aeotec, so may be openzwave works differently with that controller ? Not sure. Can you send me by pm a directory listing of your domoticz/Config folder ?
- capman
- Posts: 153
- Joined: Friday 12 July 2013 20:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Belgium
- Contact:
Re: Python plugin: Battery Level for Z-Wave Devices
I search in my domoticz structure folders to 'zwcfg' , but nothing found. I send you a pm. Thanks 4 lookingLogread wrote:@capman,
The .xsd file is of no use for the plugin... only the zwcfg_0x????????.xml file (where ???????? is the unique homeid of your zwave controller) is required for the plugin to work... I note your zwave stick is a Vision one, while I tested on a Aeotec, so may be openzwave works differently with that controller ? Not sure. Can you send me by pm a directory listing of your domoticz/Config folder ?

-
- Posts: 1602
- Joined: Friday 18 October 2013 23:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Arnhem/Nijmegen Nederland
- Contact:
Re: Python plugin: Battery Level for Z-Wave Devices
m,mmm
Did have this plugin working.
Only need to upgrade my cb to a Xu4...[ more power needed..
]
Now i do the [ same ] trick..
Only no plugin in domoticz hardware section......
And in the ftp area is see everything i need...
Do i need to start the script or??
Where do i go wrong..
Thanks
Did have this plugin working.
Only need to upgrade my cb to a Xu4...[ more power needed..

Now i do the [ same ] trick..
Only no plugin in domoticz hardware section......
Code: Select all
linaro@odroidxu4:~/domoticz/plugins/BatteryLevel$ sudo chmod +x plugin.py
linaro@odroidxu4:~/domoticz/plugins/BatteryLevel$
linaro@odroidxu4:~/domoticz/plugins/BatteryLevel$ sudo apt-get install git
Reading package lists... Done
Building dependency tree
Reading state information... Done
git is already the newest version (1:2.7.4-0ubuntu1.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
linaro@odroidxu4:~/domoticz/plugins/BatteryLevel$ sudo chmod +x plugin.py
linaro@odroidxu4:~/domoticz/plugins/BatteryLevel$ sudo /etc/init.d/domoticz.sh restart
[ ok ] Restarting domoticz.sh (via systemctl): domoticz.service.
linaro@odroidxu4:~/domoticz/plugins/BatteryLevel$ cd
linaro@odroidxu4:~$ cd ~/domoticz/plugins/BatteryLevel
linaro@odroidxu4:~/domoticz/plugins/BatteryLevel$ git reset --hard
HEAD is now at dd0d29b Version 0.4.2
linaro@odroidxu4:~/domoticz/plugins/BatteryLevel$ git pull --force
Already up-to-date.
linaro@odroidxu4:~/domoticz/plugins/BatteryLevel$ sudo chmod +x plugin.py
Do i need to start the script or??
Where do i go wrong..
Thanks
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
-
- Posts: 228
- Joined: Sunday 28 August 2016 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: France
- Contact:
Re: Python plugin: Battery Level for Z-Wave Devices
I think the sequence of shell commands you send is not finished... you need to restart domoticz AFTER you update the plugin and make the script executable...Derik wrote:m,mmm
Did have this plugin working.
Only need to upgrade my cb to a Xu4...[ more power needed..]
Now i do the [ same ] trick..
Only no plugin in domoticz hardware
Thanks
This should do it
-
- Posts: 1602
- Joined: Friday 18 October 2013 23:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Arnhem/Nijmegen Nederland
- Contact:
Re: Python plugin: Battery Level for Z-Wave Devices
strange,
Do everything i need to do for the 3 time.
No plugin
ast beta..
Do the thing as subscribe here in the topic...
see the map an all the stuff.
Reboot
Refresh hardware list
no plugin
Do everything i need to do for the 3 time.
No plugin
ast beta..
Do the thing as subscribe here in the topic...
see the map an all the stuff.
Reboot
Refresh hardware list
no plugin
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
-
- Posts: 228
- Joined: Sunday 28 August 2016 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: France
- Contact:
Re: Python plugin: Battery Level for Z-Wave Devices
Which version of Domoticz are you running ? I saw on the forum that some of the recent beta builds had python disabled... do you have other python plugins installed and working (or not)... If no plugin works, then definitely a domoticz issueDerik wrote:strange,
Do everything i need to do for the 3 time.
No plugin
ast beta..
Do the thing as subscribe here in the topic...
see the map an all the stuff.
Reboot
Refresh hardware list
no plugin
-
- Posts: 1602
- Joined: Friday 18 October 2013 23:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Arnhem/Nijmegen Nederland
- Contact:
Re: Python plugin: Battery Level for Z-Wave Devices
Last beta..
New hardware xu4 ..
With other kernell perhaps that??
Or can i mananual install python
Or check the versions
New hardware xu4 ..
With other kernell perhaps that??
Or can i mananual install python
Or check the versions
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
-
- Posts: 228
- Joined: Sunday 28 August 2016 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: France
- Contact:
Re: Python plugin: Battery Level for Z-Wave Devices
A new version (0.4.3) is available from the GitHub repository. The plugin should now work on Synology platforms (different location of the openzwave files compared to "standard" Linux or Windows installs). Thanks to @capman for raising the issue and testing the new version 

-
- Posts: 21
- Joined: Monday 20 June 2016 11:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.7722
- Location: Netherlands
- Contact:
Re: Python plugin: Battery Level for Z-Wave Devices
I have the same problem as derik, also latest beta. Can't see the plugin in the hardware list.
Raspberry Pi 3 - Domoticz 3.7722 - Aeon Labs Z-Stick GEN5 - RFXcom version: Ext/1012- Logitech Harmony Elite - Homebridge - Fibaro FGMS-001-ZW5 - Fibaro FGDW-002-01 - KAKU stuff.
-
- Posts: 21
- Joined: Monday 20 June 2016 11:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.7722
- Location: Netherlands
- Contact:
Re: Python plugin: Battery Level for Z-Wave Devices
Problem solved by installing python from the wiki:https://www.domoticz.com/wiki/Using_Python_plugins
Raspberry Pi 3 - Domoticz 3.7722 - Aeon Labs Z-Stick GEN5 - RFXcom version: Ext/1012- Logitech Harmony Elite - Homebridge - Fibaro FGMS-001-ZW5 - Fibaro FGDW-002-01 - KAKU stuff.
-
- Posts: 1602
- Joined: Friday 18 October 2013 23:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Arnhem/Nijmegen Nederland
- Contact:
Re: Python plugin: Battery Level for Z-Wave Devices
Not by me:
And instal the plugin
reboot
check and double ..
No hardware in my list for the battery
Code: Select all
linaro@odroidxu4:~/domoticz$ dpkg -l | grep libpython3
ii libpython3-dev:armhf 3.5.1-3 armhf header files and a static library for Python (default)
ii libpython3-stdlib:armhf 3.5.1-3 armhf interactive high-level object-oriented language (default python 3 version)
ii libpython3.5:armhf 3.5.2-2ubuntu0~16.04.1 armhf Shared Python runtime library (version 3.5)
ii libpython3.5-dev:armhf 3.5.2-2ubuntu0~16.04.1 armhf Header files and a static library for Python (v3.5)
ii libpython3.5-minimal:armhf 3.5.2-2ubuntu0~16.04.1 armhf Minimal subset of the Python language (version 3.5)
ii libpython3.5-stdlib:armhf 3.5.2-2ubuntu0~16.04.1 armhf Interactive high-level object-oriented language (standard libra ry, version 3.5)
linaro@odroidxu4:~/domoticz$ cd
linaro@odroidxu4:~$ sudo apt-get install python3-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-dev is already the newest version (3.5.1-3).
The following packages were automatically installed and are no longer required:
gir1.2-javascriptcoregtk-3.0 gir1.2-soup-2.4 gir1.2-webkit-3.0 inxi
libarchive13 libboost-python1.58.0 libexiv2-14 libgd3 libgdata-common
libgdata22 libglib2.0-bin libgoa-1.0-0b libgoa-1.0-common libgphoto2-6
libgphoto2-port12 libimobiledevice6 libjavascriptcoregtk-3.0-0 libmate-menu2
libmtp-common libmtp9 liboauth0 libpcre16-3 libpcre3-dev libpcre32-3
libpcrecpp0v5 libplist3 libusbmuxd4 libwebkitgtk-3.0-0
libwebkitgtk-3.0-common python3-polib
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
linaro@odroidxu4:~$
reboot
check and double ..
No hardware in my list for the battery
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
- Phantom
- Posts: 87
- Joined: Saturday 31 December 2016 14:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.11652
- Location: The Netherlands
- Contact:
Re: Python plugin: Battery Level for Z-Wave Devices
Thanks for the plugin.
I have installed it today and works great.
I have installed it today and works great.
-
- Posts: 21
- Joined: Monday 20 June 2016 11:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.7722
- Location: Netherlands
- Contact:
Re: Python plugin: Battery Level for Z-Wave Devices
Works for some time, but domoticz crashes. Is there a solution for this?
Raspberry Pi 3 - Domoticz 3.7722 - Aeon Labs Z-Stick GEN5 - RFXcom version: Ext/1012- Logitech Harmony Elite - Homebridge - Fibaro FGMS-001-ZW5 - Fibaro FGDW-002-01 - KAKU stuff.
-
- Posts: 82
- Joined: Saturday 13 December 2014 21:20
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Python plugin: Battery Level for Z-Wave Devices
Same issue here, 2 times a day Domoticz crashes now, when disabling the plugin, no crashes anymoreTakeAway wrote:Works for some time, but domoticz crashes. Is there a solution for this?
Verzonden vanaf mijn iPad met Tapatalk
Who is online
Users browsing this forum: No registered users and 1 guest