Timed Zone Bypass

john999

Member
Need some help w/ programming logic w/ a HAI OPII...
 
I am looking for an easy way to let the dogs out at night while the alarm is in night mode. My thought is to write some code that would bypass the backdoor zone for 5 minutes when an interior motion detector is tripped, but not quite sure how to write the code. If I set a flag to activate for 5 minutes when the motion is tripped and have the zone bypass when the flag is activated, i believe the zone would bypass, but stay bypassed as I don't believe it can track the status of the flag and then re-activate the zone once the flag expires. Thoughts?? Thanks!
 
That should work, just be careful of unintended consequeces. Like if someone trys to break in at night through the back door. Dog runs to the door and triggers bypass, then when the break-in occurs, no alarm. You could just not have the back door active during night mode. That might be as functional with less false alarm problems. You could just turn off the alarm when the dog goes out, and turn it on when you finished.
 
I do something similar with my garage. We use a remote fob to activate and deactivate our alarm from our car. We have a giant LED sign on the wall that says alarm on or alarm off. Only problem, the fob has a panic button which my wife sometimes presses by mistake instead of alarm off. So I bypass the panic button when the door is open. It works. And the police don't show up by mistake.
 
When the flag expires use the restore zone command.

You'll need two automation blocks

Motion detected, starts flag timer and bypasses zone.
When flag expired it restores the zone.

If it keeps detecting motion it will keep resetting the flag time.

What if the dogs stay outside longer than the timer?
 
Desert_AIP said:
If it keeps detecting motion it will keep resetting the flag time.
 
Of course you could also add a check if the flag was set when motion was detected and only reset it if it wasn't set.
 
Also remember, in HAI logic, when you set a timer, the LONGEST time always takes priority. So if a timer has 4 minutes on it but you set it to 5 minutes, it will now have 5 minutes on it. If a timer has 4 minutes on it and you set it to 2 minutes, it will still have 4 minutes on it. The longest one wins.
 
Also something to think about if this happens to be an HAI wireless PIR is that it only triggers on motion once, and then waits several minutes before it will trigger again.  You won't get a constant not ready for continuous motion.
 
Back
Top