Timed Devices plugin

Posted on
Sat Aug 26, 2017 7:34 pm
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Timed Devices plugin

@ stuartcolman:

This request is not as straightforward as it seems. Starting the timer when the last tracked device goes off is incompatible with the 'Any Change' logic (which by definition ignores the difference between on and off). Additionally, the plugin would have to either maintain a tally of how many devices are on (which runs the risk of getting out of sync if there are communication hiccups) or repeatedly querying Indigo about the state of devices (which adds considerable overhead). It could be done, but would break the lean structure of the code as it stands now, which I'm not eager to do.

But as I said before, you can use a Persistence Timer to accomplish this for a single device/variable.

Posted on
Sun Aug 27, 2017 12:01 pm
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Timed Devices plugin

Version 0.0.13 released:

• NEW 'Alive Timer' device type tracks any change (including heartbeat) of another device or variable. Switches to OFF when tracked entity is not updated for user-defined period.
• Plugin devices may now track other plugin devices (but not self)
• Fixed a couple incorrect states on Force On and Force Off
• Update README

Posted on
Sun Aug 27, 2017 12:01 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Timed Devices plugin

Awesome!


Sent from my iPhone using Tapatalk Pro

Posted on
Fri Oct 06, 2017 2:15 pm
vtmikel offline
Posts: 628
Joined: Aug 31, 2012
Location: Boston, MA

Re: Timed Devices plugin

Thanks again for this plugin.

Question:

Is there a way that I can specify a threshold of devices such as what is possible in the activity timer, but that the off timer will not start until the threshold of devices is not met? This way if you have motion, but in a concentrated area, and those sensors are not going "off" then the activity timer also does not expire...

Another way of thinking about it is that I want extensions to be perpetual until the device goes into it's off state.

Posted on
Thu Oct 12, 2017 5:57 pm
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Timed Devices plugin

New version 0.0.16 posted:

• New 'Running Timer' device tracks accumulated time of other device states. See this thread.
• Minor efficiency improvements

Posted on
Thu Oct 12, 2017 6:03 pm
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Timed Devices plugin

Sorry for the delayed response.

vtmikel wrote:
Is there a way that I can specify a threshold of devices such as what is possible in the activity timer, but that the off timer will not start until the threshold of devices is not met? This way if you have motion, but in a concentrated area, and those sensors are not going "off" then the activity timer also does not expire...

Another way of thinking about it is that I want extensions to be perpetual until the device goes into it's off state.

Interesting. All my motion sensors are only on for very brief periods while actively detecting motion. If I understand correctly, yours remain on for some time thereafter.

This should be possible, but it is not clear to me whether it makes more sense as a new device type or an option on the Activity Timer device type. I'll play around with it some this weekend.

Posted on
Mon Oct 16, 2017 7:47 pm
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Timed Devices plugin

New version 0.0.17 posted.

• new Threshold Timer device type
• clearer device configuration UI
• README fixes

New device type should do what vtmikel is looking for. Should also work for stuartcoleman in the case where threshold = 1.

Posted on
Fri Oct 20, 2017 7:03 am
vtmikel offline
Posts: 628
Joined: Aug 31, 2012
Location: Boston, MA

Re: Timed Devices plugin

kmarkley wrote:
New version 0.0.17 posted.

• new Threshold Timer device type
• clearer device configuration UI
• README fixes

New device type should do what vtmikel is looking for. Should also work for stuartcoleman in the case where threshold = 1.


Incredible! Thanks so much! I will test and let you know.

Posted on
Sun Nov 26, 2017 4:08 am
koburg offline
Posts: 167
Joined: Jul 27, 2017

Re: Timed Devices plugin

Hi I got this error

Code: Select all
Timed Devices Error             "Toerre Trumpler Aktiv" count out of sync [count:-1, max:1]


but the devices is working seems to

and I found that your plugin do not support Nordic letters like
Code: Select all
ÆØÅ

dont know if it is displayed correct when you look at it.

Posted on
Tue Nov 28, 2017 8:30 pm
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Timed Devices plugin

koburg wrote:
Hi I got this error but the devices is working seems to

Short version:

This is probably nothing to worry about unless you see it repeatedly, in which case the issue is probably more systemic than just this plugin. You might want to disable/enable the affected device to ensure it gets back in sync.

Long version:

This plugin relies on communication from Indigo about tracked device states. This is pretty reliable, but not bulletproof. Most device types from this plugin are (eventually) self-correcting -- timers expire and/or tracked entities change and the plugin re-evaluates what the device state should be.

But Threshold Timer devices are different. They need to maintain an internal tally of how many tracked entities are on. Incrementing whenever a tracked entity turns on and decrementing when a tracked entity turns off. The bottom line is that if a message from Indigo gets missed, the internal tally can get out of sync with the actual entities being tracked. If the tally drops below zero or is higher than the number of tracked entities, and error is generated as you have seen.

----

I notice that the Threshold Device this error is about is only tracking a single entity ("max: 1"). This device type is intended to track multiple inputs and you may get better results with one of the other plugin device types like Persist or Lockout.


koburg wrote:
and I found that your plugin do not support Nordic letters like
ÆØÅ
dont know if it is displayed correct when you look at it.

I'm not really sure what is entailed to support Nordic letters. Is there a plugin that handles this well that I can try to emulate?

Posted on
Tue Nov 28, 2017 11:31 pm
koburg offline
Posts: 167
Joined: Jul 27, 2017

Re: Timed Devices plugin

kmarkley wrote:
I'm not really sure what is entailed to support Nordic letters. Is there a plugin that handles this well that I can try to emulate?


it is something about the unicode im not learned python code yet but have some courses I wanna try.

I have found some links to maybe a solution for you.

https://www.google.dk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0ahUKEwi139DhhOPXAhVHZFAKHcenDKwQFggqMAA&url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F664372%2Fusing-norwegian-letters-%25C3%25A6%25C3%25B8%25C3%25A5-in-python&usg=AOvVaw2wDFKpZhPQ6TGMnmSPQXK0

https://www.google.dk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0ahUKEwi139DhhOPXAhVHZFAKHcenDKwQFggzMAE&url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F42649280%2Fscandinavian-letters-%25C3%25A6%25C3%25B8%25C3%25A5-in-python-2-7&usg=AOvVaw2UgQPNI8ddjcTt0bAqQgXj

There are some of the plugin that "don't care" about the nordic letters I will get back when I have located those.

Posted on
Thu Nov 30, 2017 2:37 am
racarter offline
User avatar
Posts: 468
Joined: Jun 18, 2016
Location: North Yorkshire, UK

Re: Timed Devices plugin

Hi @kmarkley

Downloaded new version but Indigo thinks it's the same as the old one. Did you forget to bump the version number? :wink:

Posted on
Thu Nov 30, 2017 6:36 am
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Timed Devices plugin

racarter wrote:
Did you forget to bump the version number?

I had bumped the version in the repository, but not the zip file. Thanks for the head's up.

Fixed now.

Posted on
Sun Dec 10, 2017 2:15 am
haavarda offline
User avatar
Posts: 702
Joined: Aug 18, 2012
Location: Norway

Re: Timed Devices plugin

This plugin is really nice. Makes motion triggered lights much easier to set up.

Any idea on how to detect a manual turn on of the lights and induce a override? Is this something that could be added to the plugin?


Sent from my iPhone using Tapatalk

Håvard

Posted on
Mon Dec 11, 2017 4:18 pm
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Timed Devices plugin

haavarda wrote:
This plugin is really nice. Makes motion triggered lights much easier to set up.
Thanks. Glad it is useful.

haavarda wrote:
Any idea on how to detect a manual turn on of the lights and induce a override? Is this something that could be added to the plugin?
I don't think this can be accomplished by the plugin, since the plugin is not actually providing the trigger (just the event for a trigger to respond to).

Presuming that you have something like this:
motion sensors -> Timed Devices device -> trigger -> triggered lights

Then you'd want to add a trigger on the manual switch to disable/enable the trigger in the above chain of causality.

Hope that helps.

Who is online

Users browsing this forum: No registered users and 0 guests