Rule validation

dhiren

Member
Hello Rule Gurus  :pray:
 
I'm trying to setup a rule that will turn off the thermostat if the patio door is open for more than 5 minutes. Would appreciate if someone could help validate the logic as the rule doesnt seem to be firing. I've tried ensure that the logic handles cases where the door is closed within the 5 minutes
 
first rule
when patio door is open
set output 207 on for 5 mins
set counter x to 5
 
second rule
every 1 minute
that output 207 is on
then subtract 1 from counter x
 
third rule
when counter x is 0
and patio door is open
then turn tstat off
 
when patio door is closed
and output 207 is on
then set counte x to 6
turn output 207 off
 
just for clarity I'm also using a counter so i can trigger Homeseer to do a tts announcement once when the door is opened (counter =5) and second when there's a minute left to turn off the tstat (counter =2)
 
Appreicate the help
 
Try changing the second rule to whenever every 60 seconds.
 
The thing I am unsure of having never used the "every x hours y minutes" rule in Elk is how it handles the initial onset of that rule.  It supposedly starts this count at midnight, and I don't know if you first save the rule in the middle of the day, how it handles that.  Does it run the math backwards or does it just ignore the rule until the next day?  Elk does not give you the same dialogue box warning for the every x seconds rule when you are creating it.
 
I'd probably try it with a single rule, timer based then drive it via the fault of the contact, either via a phantom output or directly.
 
While it can be done using multiple rules, remember, in the M1, once the panel hits a "false" on the boolean, the rule stops there.
 
Your first rule effectively overrides rules 2 and 3.  Your fourth rule has something to do with a "rear door" instead of the "patio door".
 
And, it would be much better if you would cut and paste the actual rules.
 
DELInstallations said:
I'd probably try it with a single rule, timer based then drive it via the fault of the contact, either via a phantom output or directly.
 
While it can be done using multiple rules, remember, in the M1, once the panel hits a "false" on the boolean, the rule stops there.
DEL,
Could you please help explain  ?  
 
I want to be able to use HS to do actions based on start of the rule and then one minute before actually turning off the ac and the decreasing counter helps indicate to HS which point we're at . 
 
 
jpmargis said:
Your first rule effectively overrides rules 2 and 3.  Your fourth rule has something to do with a "rear door" instead of the "patio door".
 
And, it would be much better if you would cut and paste the actual rules.
Thanks , Not sure if i get how the first rule overides 2 & 3; unless you mean that the second and third rule won't fire without the first which is as per design.
Rule 4 wording has been corrected. Cannot copy paste as i'm not home:(
 
jpmargis said:
Your first rule effectively overrides rules 2 and 3.  Your fourth rule has something to do with a "rear door" instead of the "patio door".
 
And, it would be much better if you would cut and paste the actual rules.
 
The first rule would actually say
 
Whenever Patio door (zn x)  becomes not secure
Then turn output 207 on for 5 minutes
Then set counter x to 5
 
So it only triggers upon going from secure to not secure.  This would not override the other two rules, it would restart them in the event the door where closed then opened again.  I do believe that that is the OP's intention. 
 
And I do agree that you should post the actual program, not an approximation there of.
 
Back
Top