effective use of Inactivity Watch devices, triggers

Posted on
Mon Oct 21, 2019 12:09 pm
dduff617 offline
Posts: 660
Joined: Jul 05, 2006
Location: Massachusetts, USA

effective use of Inactivity Watch devices, triggers

I'm using inactivity watch devices. I find them useful to alert when there might be trouble.

I like the design of the inactivity-watch and have set up triggers for them. My triggers work ok, but they are firing more than I'd like, so I have a question or possibly a suggestion.

It seems like Indigo thinks that the "found" state of my device changes periodically (and therefore fires triggers of type "device state changed"). This seems to happen in cases even where the value of "found" state doesn't actually change. It looks like this is happening every time the inactivity-watch device is set to check. Ideally, I would like for there to be logic in the plugin that still checks periodically, but uses additional logic to compare the current value against the old value, and if they are the same, do nothing (and thus presumably not trigger any device-state-changed type triggers) vs. only if the value has changed, record the new value.

Posted on
Mon Oct 21, 2019 1:49 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: effective use of Inactivity Watch devices, triggers

Internally Indigo compares the old and new device states (for the device state changed triggers) and only fires if there is an actual change.

Perhaps the found state is getting toggled to an empty string or something momentarily and then toggled back to the original 'found' state?

Image

Posted on
Tue Oct 22, 2019 12:30 pm
dduff617 offline
Posts: 660
Joined: Jul 05, 2006
Location: Massachusetts, USA

Re: effective use of Inactivity Watch devices, triggers

Thanks for clarifying, Matt. I assumed that was what was happening, but didn't want to speculate.. I tried taking a look at the cynical behaviors plugin code, but it seems to use some kind of wrapper layer that I don't really understand.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests