Home Automation - Battery Polling

Discussions about RaZberry - Z-Wave board for Raspberry computer
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Home Automation - Battery Polling

Post by pz1 »

Module still causing problems. I submitted an issue for it. Hope I did that correctly.
Since 29-12-2016 I am no longer a moderator for this forum
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Home Automation - Battery Polling

Post by pz1 »

pz1 wrote:Module still causing problems. I submitted an issue for it. Hope I did that correctly.
Apparantly I was to soon with this remark. I had not download the code again, and tested it.
I was merely reporting my experiment done on 28 May 2014 09:43.
So I was surprised with the remark on the issue tracker saying:
You use older code. Current code in develop branch fixed it quite some time ago.
On further study this afternoon, I learned that the code (index.js, config.json) from the develop had indeed some minor fixes on the 28 of May. I just installed that. The reported error on restart does indeed not return anymore. But the returned JSON still does not report low batteries even though my StellaZ's have been queried twice since restart.

Code: Select all

http://ras_ip:8083/ZAutomation/api/v1/devices/BatteryPolling_9

{"data":{"id":"BatteryPolling_9","metrics":{"probeTitle":"Battery","scaleTitle":"%","level":"","icon":"","title":"Battery digest 9"},"tags":[],"location":null,"deviceType":"battery","updateTime":1401807894},"code":200,"message":"200 OK","error":null}
PS: I continued posting here, because the thread on the issue tracker was closed.
Since 29-12-2016 I am no longer a moderator for this forum
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Home Automation - Battery Polling

Post by pz1 »

Just for the record:
Now almost a day later the HA-UI has 6 correct warnings:

Code: Select all

3/06/14 - 20:57Device Battery 11:0 is low batteryhide
3/06/14 - 21:12Device Battery 11:0 is low batteryhide
4/06/14 - 2:57Device Battery 11:0 is low batteryhide
4/06/14 - 3:5Device Battery 11:0 is low batteryhide
4/06/14 - 8:57Device Battery 11:0 is low batteryhide
4/06/14 - 8:59Device Battery 11:0 is low battery
The call does now report the level value, but not the "failing" device.

Code: Select all

{"data":{"id":"BatteryPolling_9","metrics":{"probeTitle":"Battery","scaleTitle":"%","level":0,"icon":"","title":"Battery digest 9"},"tags":[],"location":null,"deviceType":"battery","updateTime":1401865166},"code":200,"message":"200 OK","error":null}
Am I missing something? I hoped I could somehow pass the failing device number to the OpenRemote interface.
Since 29-12-2016 I am no longer a moderator for this forum
User avatar
PoltoS
Posts: 7649
Joined: 26 Jan 2011 19:36

Re: Home Automation - Battery Polling

Post by PoltoS »

At start it will make Get requests, but devices will not report that info back - you need to wait for them to wakeup. That's why you got it with a delay
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Home Automation - Battery Polling

Post by pz1 »

Yesterday I made a complete new 1.7.0 install, and updated the complete automation directory with:
sudo /etc/init.d/z-way-server stop
cd /opt/z-way-server
sudo rm -Rf automation
git clone https://github.com/Z-Wave-Me/home-automation.git automation
cd automation
git checkout develop
This morning I found that:
- The battery polling module had produced 1296 warnings of a low battery. The check was scheduled for tuesdays only.
- I tried to disable battery polling, which gave a nice red bullet. Unfortunately after reopening the preferences screen, all the modules that I had disbaled, showed enabled again?
Please note that the StellaZ battery that leads to these warnings is indicating 0% since december. (note: it is a pre-production device that I started using since May 2013 when the batteries were at 40%)

Can others confirm this problem?
Edit: Anyone who knows how to get rid of all those warnings?
Since 29-12-2016 I am no longer a moderator for this forum
User avatar
PoltoS
Posts: 7649
Joined: 26 Jan 2011 19:36

Re: Home Automation - Battery Polling

Post by PoltoS »

The disable is indeed broken. this is in our issues list
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Home Automation - Battery Polling

Post by pz1 »

pz1 wrote: - The battery polling module had produced 1296 warnings of a low battery. The check was scheduled for tuesdays only.
I looked further in the list where I found that every minute a warning was procuced instead of the expected once a week.
Also the warnings list hadn't cleared after Zway rstart and full reboot. Don't know if that is a bad or a good thing. A Clear All button would be helpful for such long lists.
Since 29-12-2016 I am no longer a moderator for this forum
User avatar
PoltoS
Posts: 7649
Joined: 26 Jan 2011 19:36

Re: Home Automation - Battery Polling

Post by PoltoS »

It is a feature ;) You should read it to hide it. Indeed, "Mark all as read" is a good thing to do!

As for every minute report, this module creates requests weekly, but makes notification each time it receives a value back (since we don't know when will we receive a feedback from the sleeping device). Are you sure not one is requesting back this info every minute? Or there is unsolicited report every minute?

May be it is a good thing to rewrite the module to change notifications in it to make them less often.
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Home Automation - Battery Polling

Post by pz1 »

PoltoS wrote:It is a feature ;)
I know you are a qualified programmer :mrgreen:
By the way, I noticed on git that you guys are working very hard these days. Really appreciate
Are you sure not one is requesting back this info every minute? Or there is unsolicited report every minute?
My OpenRemote controller used to request the value every 6 hours. I increased that to 24 hours. I do display the value on an Android. I am not sure if that generates extra calls behind the scenes. Will double check that.
Since 29-12-2016 I am no longer a moderator for this forum
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Home Automation - Battery Polling

Post by pz1 »

pz1 wrote: I increased that polling interval to 24 hours.
Still get multiple updates per day. They have increased to 4 now:
BatteryPolling.PNG
BatteryPolling.PNG (25.23 KiB) Viewed 9076 times
I had to completely restart RasPi just before the message Z-wave device ID 11 is back, because the HA user interface did not load anymore. It had been running some 4 or 5 days.
Feels like memory leaks. Is there some way for me to check it that might be the case?
Since 29-12-2016 I am no longer a moderator for this forum
Post Reply