How to handle powered Pet Door

woody

New Member
I've successfully converted my home security system to Elk.  But I need advice on how to handle a powered pet door (large enough for someone to crawl into the house) on my exterior perimeter. 
 
The door is triggered by a magnetic collar key using a hall effect sensor (Not very secure, so might try my hand at a custom RFID solution someday).  I have a window contact switch mounted to the pet door & tied to an Elk M1G input.  When the system is armed, I need it to ignore the frequent pet door opening/closing unless it is held open for a period of time, say 5 seconds.
 
I've barely started with elk rules and I'm stumped.  I put the zone into a different area. I created a counter.
 
  Rule 1: WHENEVER Z003-Dog Door (Zn 3) BECOMES SECURE
                      THEN SET Pet Door (Counter 3) TO 0
  Rule 2: WHENEVER Z003-Dog Door (Zn 3) BECOMES NOT SECURE
                      THEN ADD 1 TO Pet Door (Counter 3)
 
  Rule 3: WHENEVER Area 1 Perimeter (Area 1) ARM STATE BECOMES ARMED
                      AND pet door (Counter 3) IS GREATER THAN 5
                             THEN TURN Out002-Siren (Out 2) ON FOR 1 MIN
 
This doesn't work because I can't figure out how to continue to increment the counter by 1 each second until the door is "secure" again" on Rule 2.  Also on Rule 3, Does activating the Out002 activate the burglar alarm?
 
Interesting problem.  Maybe something like this.  May not work, but its a start.   zone3 s/b configured as non-alarm.  out202 is a flag that indicates the door is opened.  out203 is a seconds timer that only fires when the door is opened.  counter1 counts the seconds.
 
 
 
-- doggy door has closed
--    turn off the opened flag
whenever zone 3 is secure
   turn off out202
 
-- doggy door has opened,
--   turn on the opened flag for more than the time needed
--   this insures that any variances in elk timing are not a factor
whenever zone 3 is not secure
  turn on out202 for 10 seconds
 
-- doggy door was opened,
--    reset seconds counter
--    start seconds timer
whenever out202 is turned on
   set counter1 to 0
   turn out203 on for 1 second
 
-- every time the seconds timer is turned on
--   add 1 to seconds counter
whenever out203 is turned on
   add 1 to counter1
 
-- every time the seconds timer is turned off
--    and the door is still opened
--    restart seconds counter
whenever out203 is turned off
    and out202 is on 
    turn on out203 for 1 second
   
-- we have a winner
whenever system is armed away
     and counter1 is greater than 5
     turn out2 on for 1 minute
 
 
you might consider using a screamer near the doggy door instead of the siren.
 
SDA,
 
Thanks.  Hopefully, I'll get time next weekend to give your rules a shot.  I agree on the screamers,  but my house had the siren installed when I moved in.  I haven't gotten around to switching over to screamers....although WAF may go drop further, if I activate a screamer (siren is tolerable) off accidentally while testing.
 
Woody
 
Interesting application.  We've explored this topic many times in the Garage-related threads over the years.
 
The Elk can not have the alarm programmatically triggered - this sucks but it's a limitation of the panel.  You can get a way to do a true alarm trigger by wasting an input and an output.  That may seem worse than it is - the keypads all have an input and output that's rarely used - so you could rig this up at a keypad if needed.  The idea is to wire an output to a zone input then define that zone appropriately (it's like a one-wire connection in the panel thanks to the shared ground and voltage sensing).  Once you have an input that'll control the output, you can trigger that output/alarm zone via rules.  If Zone 193 is set to Burglar Perimeter and output 192 is set to Turn on for 1 second (after the doggy door has been open too long).  That would actually take another output or counter - outputs are better IMO - you turn it on for 10 minutes; restart if triggered again.  
 
sda's approach doesn't look bad - I didn't trace line by line.  The idea with the elk is that you use outputs and timers to cause the actions to happen.  
 
As written in the OP above, the counter will never be more than one. The rule is only activated WHEN (at that moment in time) that the Dog Door becomes not secure. Also, as written above, Rule 3 won't execute unless the Counter is 5 WHEN the alarm is armed.
 
I haven't played with counters much, so check the logic below, and test this... but here's my first shot:
 
Rule 1: WHENEVER Z003-Dog Door (Zn 3) BECOMES SECURE
                      THEN SET Pet Door (Counter 3) TO 0

Rule 2: WHENEVER EVERY 1 SECONDS
                      AND Z003-Dog Door (Zn 3) IS NOT SECURE
                      THEN ADD 1 TO Pet Door (Counter 3)
 
Rule 3: WHENEVER Pet Door (Counter 3) CHANGES TO 5
                      AND AREA ARMED
                      THEN TURN Out002-Siren (Out 2) ON FOR 1 MIN


Note the "AND AREA ARMED" line. I selected the option for ARMED IN ANY MODE, and ANY AREA. If you only want this activated in certain modes, or if you have more than 1 area defined, you'd need to modify this line.
 
I also did a similar application in my own house recently - whenever an entry door in the house gets left or held open too long, all the keypads start beeping until it gets closed.  This is due to indoor-only animals and my youngest child (as well as many contractors) leaving doors open.
 
For my application, I skipped counters and did basically
 
Whenever XXX Becomes Not Secure, Turn on output 100 for 20 seconds.
Whenever Output 100 Turns Off and XXX is Not Secure, BEEP ALL KEYPADS
Whenever XXX Becomes Secure, STOP BEEPING
 
Same basic point except now the panel isn't processing the rule/counter every second.  I have no idea of that creates much load or not.  My first shot at this used counters to keep track of how many exterior doors were open so that just because one closes, it doesn't stop the beeping if others are still open... but it wasn't working, and I didn't see why until I had ripped all that out in favor of this method.
 
Work2Play said:
Same basic point except now the panel isn't processing the rule/counter every second.  I have no idea of that creates much load or not.
 
I've wondered about this very thing, but don't know of a way to check the 'CPU' load of the Elk system - I really haven't looked. A second is a LONG time to a GHz processor, but I also don't have any idea what clock speed is used in the Elk processor...
 
The M1 really doesn't have an issue with timing. Talking a far different beast compared to a PC based processor.
 
I use the second "look into" based rules quite often for held open's and also to drive outputs (favorite being armed LED).
 
All,  I truly appreciate the suggestions and advice!  I used a bit from most of the ideas and came of with the rules below.  I decided to wire an output to a spare zone and then use another "virtual" output rather than a counter for the rules. Seems to be the simplest solution.  Given that I'm a novice at Elk setup and programming, I also posted the zone & output configuration used for the Pet Door. I tested the configuration rules tonight and all seems to work as expected, but I imagine, if it doesn't I won't find out until the most inopportune time.
 
Retyping the rules for this post made me hope there's an easier way.  Is there a way to export rules from ElkRP to a text file to speed up the posting process?
 
Inputs:

  Zone 3: Z003-Pet Dr Inst
     Definition: 16 = Non Alarm
     Type: 0 = EOL Hardware/Wireless
     Area: 3
     Silent Alarm: Yes (Not sure if this is needed)
     Bypassable: Yes
  Zone 25: Z025-Pet Dr O-3
     Definition: 01 = Burglar Perimeter Instant
     Type: 1 = Normally Closed
     Area: 1
     Bypassable: Yes
Outputs:

  Output 2: O-002-Siren
  Output 3: O-003-Pet Dr (Wired to NC Contact)
  Output 103: Used as a virtual counter

Rule Set:
 
  Rule 1: Reset Output 3
     WHENEVER Z003-Pet Dr Inst (Zn 3) BECOMES NOT SECURE
        THEN TURN O-003-Pet Dr (Out 3) OFF
 
 Rule 2: Turn On Output 103 for 8 Seconds
     WHENEVER Z003-Pet Dr Inst (Zn 3) BECOMES NOT SECURE
        THEN TURN Output 103 ON FOR 8 SECS, RESTART TIMER IF RUNNING

 Rule 3: Activate Alarm if Pet Door Held Open 8 Seconds
     WHENEVER Output 103 STATE IS TURNED OFF
        AND Z003-Pet Dr Inst (Zn 3) IS NOT SECURE
            THEN TURN O-003-Pet Dr (Out 3) ON FOR 1 SEC
 
Can you explain what you have connected to OUT3? I'm just not following what turning it ON for 1 second accomplishes in this case...

Does that somehow open/close the door? Or lock/unlock it, or....
 
drvnbysound said:
Can you explain what you have connected to OUT3? I'm just not following what turning it ON for 1 second accomplishes in this case...

Does that somehow open/close the door? Or lock/unlock it, or....
Work2Play gave me the idea above in Post 4, It took me a while to understand his explanation, but eventually it clicked in my mind and made perfect sense so I'll give a shot at explaining it the way I understand it.  The Pet Door Contactor (Zone 3) cannot be used directly to trigger an alarm, since our dogs continue to use the automatic pet door when the Elk M1G is in "Armed" mode.
I wanted to trigger an actual alarm when the pet door was manually held open for a period longer than it normally takes for it to slide open and close (Since the opening is big enough for someone to crawl into the house), but unfortunately the Elk M1G doesn't allow you to trigger a alarm programmatically with a rule.   The work around is to use an output to act like a door/window contactor by wiring Output 3's NC & Neg terminals to the positive & negative terminals for Zone 25.  Therefore when Output 3 is turned on, the  circuit is opened emulating a door/window contact so that Zone 25 triggers an alarm.  Output 3 only needs to be turned on for a short period to put Zone 25 into a violated state which automatically triggers alarm notifications set up in the M1G.  Optionally, rather than turning Output 3 on for a second, Output 3 could be turn on and another rule used to turn it off when Zone 3 is re-secured, but I couldn't see any value to adding another rule.
 
Separate from the Elk Alarm System, I have a Z-Wave Relay wired to the electrical feed to the pet door, so I can turn the Pet Door power off using my Homeseer System.  One of the ways I use this feature is for one day a month our "Bug Guy" comes to spray pesticide. I use the Z-Wave Relay to turn the power off to the pet door, effectively locking the dogs into the house. After the "Bug Guy" leaves, I can remotely turn the pet door back on.  I'm probably a bit excessive, but I even have a small UPS on the pet door, so it works during power outages.
 
Ok, so I understand the logic to use an ouput tied to an input. I just didn't follow that's what you were doing with OUT3 - I follow that now.
 
How are you getting status from the door at all? I'm assuming that's a separate zone?
 
The reason for asking the latter, is I'm just trying to follow the complete logic. As written, I don't follow where Zn 3 becomes secure; one instance when Zn3 is NOT secure you turn OUT3 OFF (RESET), then later you have the AND statement that says when it's NOT secure (same as before) to turn OUT3 on for 1 second.
 
One other comment:
 
You are using the same trigger (WHENEVER statement) for both rules 1 & 2. Is there any reason you didn't combine those?
 
WHENEVER Z003-Pet Dr Inst (Zn 3) BECOMES NOT SECURE      
 THEN TURN O-003-Pet Dr (Out 3) OFF
 THEN TURN Output 103 ON FOR 8 SECS, RESTART TIMER IF RUNNING
 
Back
Top