Trigger only when condition occurs for a given duration?

Posted on
Tue Dec 15, 2020 6:08 pm
jheddings offline
User avatar
Posts: 149
Joined: Dec 01, 2013
Location: Denver, CO

Trigger only when condition occurs for a given duration?

Something that would help with several of my triggers is to have a "duration" value... This would be a configuration parameter that only executes when the trigger condition has occurred for a given period of time. For example, when certain sensors detect motion for more than a few seconds turn on a light (no need to turn on lights if I just move between rooms).

Today, I'm getting around this using Timers. The problem with that approach is twofold:
1) Indigo becomes cluttered with more timers and triggers than necessary.
2) It can be harder to debug behaviors since the original event is asynchronous from the actions that take place.

It's workable as-is, just tossing it out an an idea for future releases. Of course, if there is a better way to solve this in Indigo currently, I'm all ears!

Posted on
Wed Dec 16, 2020 5:22 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Trigger only when condition occurs for a given duration?

I do that sort of thing with Timers as well. Feels like the right balance given Indigo's real-time event architecture.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Dec 16, 2020 5:25 pm
FlyingDiver offline
User avatar
Posts: 7216
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Trigger only when condition occurs for a given duration?

For the presence detection cases, give my new pre-release plugin a try: viewtopic.php?f=216&t=24528

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

Posted on
Fri Dec 18, 2020 1:34 pm
jheddings offline
User avatar
Posts: 149
Joined: Dec 01, 2013
Location: Denver, CO

Re: Trigger only when condition occurs for a given duration?

Thanks for the thoughts and feedback! Timers are working well, just a little cumbersome to get them all set up.

Joe- I'll give that a spin over the holidays.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests