|
|
|
Page 1 of 1
|
[ 2 posts ] |
|
| Author |
Message |
|
toille27
Joined: Jul 18, 2011 Posts: 12
|
 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?
|
| Fri Jun 01, 2012 2:11 pm |
|
 |
|
philc
Joined: May 17, 2011 Posts: 91
|
 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
|
| Fri Jun 01, 2012 2:45 pm |
|
|
|
Page 1 of 1
|
[ 2 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 0 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|