Trigger Delay Question

Posted on
Fri Jun 01, 2012 2:11 pm
toille27 offline
User avatar
Posts: 234
Joined: Jul 18, 2011
Location: Doylestown PA

Trigger Delay Question

I have my skylights triggered to close using a hydreon optical rain sensor and power flash module and it's been working great. I have been trying to implement a new trigger that reopens the skylights after so many minutes, provided that several rules are all met.

Currently when rain is detected Indigo disables the skylight up action (to protect the power supply), closes skylights (takes approximately one minute) and then disables the close skylight trigger for 30 minutes (so rain sensor isn't closing relays whole time). The same rain detection initiates the reopen trigger which checks 3 rules (temperature over 70 degrees, rain sensor off, and skylight motors not closing) and then reopens skylights but with a delayed action of 32 minutes.

The reopen trigger isn't working and I think it's because I'm misunderstanding how the rules and delay work. Does the trigger action check the condition rules immediately and then schedule the action or does the action wait for 32 minutes and then initiate provided the rules are met?

Posted on
Fri Jun 01, 2012 2:45 pm
philc offline
Posts: 156
Joined: May 17, 2011

Re: Trigger Delay Question

This is one I've been bugging Matt and Jay about for a while...
The way it has always worked for me is that the trigger fires when the conditions are met. If you have a delay in the action, it just delays the action WITHOUT rechecking the trigger condition. The way Matt taught me to work around was to use a variable. Use your conditions (the three rules) to change a variable (SKYLIGHT_OK) to TRUE, but with a 32 minute delay. The second trigger fires when the variable changes to TRUE, but has a condition that checks your three rules - so the variable must be true (from 32 minutes ago) and still be true. Then the second trigger can reopen the skylight.

Jay showed me how to use AppleScript to do the same thing, but I'm too much of a numpty to reuse that code for a different setup.

Hope this helps. One of the experts can probably explain it better...
Take care,
Phil

Posted on
Sun Feb 01, 2015 12:26 pm
ryanbuckner offline
Posts: 1075
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Trigger Delay Question

Just ran into this problem too. I used your workaround and seems like I'm just creating more points of failure. Any chance a better work around was created in the releases since this last post?

Posted on
Sun Feb 01, 2015 12:46 pm
philc offline
Posts: 156
Joined: May 17, 2011

Re: Trigger Delay Question

Sorry, no - I have this working on my system pretty well in a couple of different use cases. I don't know of any better way. I do think this would be a great feature to add to Indigo (Jay, Matt...hint), because it seems like a pretty common requirement. I don't like the complexity myself, and it has failed for me a couple of times. I have one of these types of triggers set up to turn off the HVAC if the alarm is faulted (door or window is open) for greater than 30 seconds, then to turn back on once the alarm fault clears. Have had a couple of instances where it didn't cut off...and a couple where it didn't come back on!

Posted on
Sun Feb 01, 2015 3:53 pm
ryanbuckner offline
Posts: 1075
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Trigger Delay Question

Thanks. Your post helped me solve a situation where I want to double check that my patio door is locked when I leave the house. It's triggered when my garage door closes and then looks for my phone to decide if I'm home or not. Unfortunately the FING solution requires a delay so my logic is :

- Trigger when garage door closes
- wait 20 minutes for FING to decide if I'm home
- look for my phone
- lock the door if I'm not found

Like you said, there's added complexity because this should be 1 trigger and 1 variable. Instead it's 5 triggers, 2 variables, and 1 action group. Matt and Jay certainly have enough to work on, so I'm just grateful that it works. But the complexity seems like I'm doing something wrong.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 20 guests

cron