Polling uneccessary - unless...

Posted on
Fri Jul 19, 2019 2:16 am
Umtauscher offline
User avatar
Posts: 566
Joined: Oct 03, 2014
Location: Cologne, Germany

Polling uneccessary - unless...

Hi,

I only have z-wave devices that properly report their status when switched by hand, so I disabled polling for those devices to reduce z-wave network traffic.
Unfortunately that means, if I restart the server, the state of devices is erratic, the more the longer the downtime is - because Indigo doesn't poll them after restart.

What I would need for such szenarios would be to set polling to something like "only after server start". Unfortunately this option doesn't exist.
So my question is - since I don't think a feature update to Indigo is likely to happen - Is there any workarround/plugin to accomplish that?

Any ideas welcome!
Cheers
Wilhelm

Posted on
Fri Jul 19, 2019 6:24 am
FlyingDiver offline
User avatar
Posts: 7213
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Polling uneccessary - unless...

Create a trigger for Indigo startup and put this in the action:

Code: Select all
for dev in indigo.devices.iter("indigo.zwave"):
    indigo.device.statusRequest(dev)

viewtopic.php?f=78&t=20993

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Jul 19, 2019 9:43 am
jay (support) offline
Site Admin
User avatar
Posts: 18216
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Polling uneccessary - unless...

Or, if you only want to update specific devices (which might be more efficient), create a startup trigger that requests a full status update to each of the those devices.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Jul 19, 2019 9:58 am
Umtauscher offline
User avatar
Posts: 566
Joined: Oct 03, 2014
Location: Cologne, Germany

Re: Polling uneccessary - unless...

Thanks Joe for the script and the link.
Thanks Jay for trying to optimize it.

I still think, such things need to go into Indigo's user interface and device setting.

Just my 2 Ct.
Wilhelm

Posted on
Fri Jul 19, 2019 10:13 am
Umtauscher offline
User avatar
Posts: 566
Joined: Oct 03, 2014
Location: Cologne, Germany

Re: Polling uneccessary - unless...

Still a problem:
When I do this, all battery powerd devices end up with a "no ack" state.
Is there a way to filter out battery powered devices in the loop that are not zwave plus?
(I understand polling on z-wave plus also works)

Posted on
Fri Jul 19, 2019 11:49 am
racarter offline
User avatar
Posts: 477
Joined: Jun 18, 2016
Location: North Yorkshire, UK

Re: Polling uneccessary - unless...

This modification will avoid polling battery-powered devices, but I'm afraid that would include Z-Wave Plus ones:

Code: Select all
for dev in indigo.devices.iter("indigo.zwave"):
    if dev.batteryLevel == None:
        indigo.device.statusRequest(dev)

Posted on
Fri Jul 19, 2019 2:45 pm
Umtauscher offline
User avatar
Posts: 566
Joined: Oct 03, 2014
Location: Cologne, Germany

Re: Polling uneccessary - unless...

Thanks, but that does only part of the job.
The primary battery powered devices are not polled any more, but the slave devices of those still fail.
Example:
Fibaro Door Window sensor (skipped)
it's temperature sensor (fails)

Fibaro Motion sensor (skipped)
it's temperatur sensor (fails)
it's tilt/temper sensor (fails)

I hope you get the picture.

Posted on
Fri Jul 19, 2019 2:48 pm
FlyingDiver offline
User avatar
Posts: 7213
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Polling uneccessary - unless...

Sound like using Jay's method to build a list would be easier.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Jul 19, 2019 3:15 pm
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: Polling uneccessary - unless...

To only request status of the main devices (not secondary):

Code: Select all
for dev in indigo.devices.iter("indigo.zwave"):
    if dev.ownerProps["zwDevSubIndex"] == 0 and dev.batteryLevel == None:
        indigo.device.statusRequest(dev)

Image

Posted on
Fri Jul 19, 2019 3:47 pm
Grognard offline
User avatar
Posts: 53
Joined: May 17, 2011
Location: Seabrook, TX

Re: Polling uneccessary - unless...

Now THAT is dang useful. Adding it to my startup script now

Posted on
Sat Jul 20, 2019 3:09 am
Umtauscher offline
User avatar
Posts: 566
Joined: Oct 03, 2014
Location: Cologne, Germany

Re: Polling uneccessary - unless...

Thanks Matt,

now you are nearly there. What is missing are the battery powered devices that use z-wave plus and are able to be polled. I don't know the exact term for this feature, but my spirit thermostats can do it., for example.

matt (support) wrote:
To only request status of the main devices (not secondary):

Code: Select all
for dev in indigo.devices.iter("indigo.zwave"):
    if dev.ownerProps["zwDevSubIndex"] == 0 and dev.batteryLevel == None:
        indigo.device.statusRequest(dev)


Cheers
Wilhelm

Posted on
Sat Jul 20, 2019 10:23 am
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: Polling uneccessary - unless...

I'm not sure that what you need (which is that the module support frequent waking) is available via the device's properties.

However, try adding a check for dev.supportsStatusRequest. Depending on how the devices are defined that might be good enough.

Image

Posted on
Sun Jul 21, 2019 5:43 am
Umtauscher offline
User avatar
Posts: 566
Joined: Oct 03, 2014
Location: Cologne, Germany

Re: Polling uneccessary - unless...

Hi Matt,

I don't think that will do it, because nearly all of my battery powered devices have this set.
The magic keyword seems to be FLiRS support.
Is there any dev property that will reflect, if the device supports that?

Posted on
Sun Jul 21, 2019 10:28 am
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: Polling uneccessary - unless...

Internally Indigo knows about that, but it isn't exposed in the python accessible objects. I'll add it to the request/ToDo list.

Image

Posted on
Sun Jul 21, 2019 11:19 am
Umtauscher offline
User avatar
Posts: 566
Joined: Oct 03, 2014
Location: Cologne, Germany

Re: Polling uneccessary - unless...

As long as you add something to the list, I would prefer an option "poll only at server startup" to the device settings. :roll:
Cheers
Wilhelm

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests