We often forget to disarm our alarm when we get up in the morning, or the kids get up first and have to wake us up to disarm it. I am putting in a DSC alarm system integrated with Vera, and this got me thinking I could use PLEG to solve this problem. My logic would be based on a sequence of motion events being detected in a certain order -
Motion detected in either of 3 bedrooms
Motion detected in upstairs hallway
Motion detected at bottom of stairs
If these motion events are detected within the space of 5 minutes, disarm the alarm on the 3rd motion detection, as we assume its a family member not a burglar. Would the following work? Am i correct in thinking if you use ; then the events have to happen in that order, so that should satisfy my scenario, however, I am not sure what happens if for example, someone leaves their bedroom (BRMotion), enters the landing (LandingMotion), but before going downstairs, go into the bathroom and then back out again, tripping LandingMotion a second time, before going downstairs (HallwayMotion). I THINK this should be ok as its only testing the sequence based on the last timeeach device was tripped, and as long as the times are in correct sequence and within 5 minutes, it returns true?
Triggers
Name Description
BR1Motion - Motion detected in bedroom 1
BR2Motion - Motion detected in bedroom 2
BR3Motion - Motion detected in bedroom 3
LandingMotion - Motion detected on upstairs landing
HallwayMotion - Motion detected at bottom of stairs in hall
DSCHomeisarmed - A virtual switch that is operated when we arm the DSC for home is on
Conditions
Name Expression
Someoneisgettingup DSCHomeisarmed AND (BR1Motion OR BR2Motion OR BR3Motion);LandingMotion;HallwayMotion < 5:00
The following sequence would be a problem:
Bedroom Motion
Hallway Motion
Bedroom Motion (Someone else)
Stairs Motion
This can be fixed by breaking this down into two sets of ordered operations … that must also be ordered:
BedroomMotion Bedroom1Motion or Bedroom2Motion or Bedroom3Motion
SomeonesAwake BedroomMotion; HallwayMotion < 3:00
SoneoneWentDown SomeonesAwake; StairsMotion < 3:00
Of course this will only work if they are fast acting motion sensors … Not the kind that indicate motion for 5 minutes (and automatically extend on further motion).
Also you can’t use an expression as an element in a sequence expression. The expression does NOT have a timestamp assoicated with it. You can only use a condition or an input variable or explicit time.
[quote=“RichardTSchaefer, post:2, topic:176883”]The following sequence would be a problem:
Bedroom Motion
Hallway Motion
Bedroom Motion (Someone else)
Stairs Motion
This can be fixed by breaking this down into two sets of ordered operations … that must also be ordered:
BedroomMotion Bedroom1Motion or Bedroom2Motion or Bedroom3Motion
SomeonesAwake BedroomMotion; HallwayMotion < 3:00
SoneoneWentDown SomeonesAwake; StairsMotion < 3:00
Of course this will only work if they are fast acting motion sensors … Not the kind that indicate motion for 5 minutes (and automatically extend on further motion).
Also you can’t use an expression as an element in a sequence expression. The expression does NOT have a timestamp assoicated with it. You can only use a condition or an input variable or explicit time.[/quote]
Hmm ok. Do you happen to know if this is usually the case with standard alarm PIRs, or is it more to do with how the DSC alarm reports motion via the plugin? I have not yet ordered the sensors, so if I can find out a type that is fast acting, I can make sure I avoid this problem. I will be using the DSC sensors for quite a few things, so would prefer if they were fast acting ones.
The wired PIRs and all(Wired and Wireless) door/window sensors are typically fast action/reset. Battery operated PIRs (Z-Wave for sure, I am not sure about DCS Wireless) usually have the long on/extend on motion without intermediate notifications. This is to save battery life.
DSC wireless door/window sensors are pretty fast. The DSC wireless PIR sensors have up to a 6 second delay before reporting they are tripped.
I use a re-purposed DSC wireless vanishing door/window sensor on a gate downstairs (used to block the dog) as part of some automation to turn the lights on the stairs at night. As soon as the gate changes its state (close to open, open to close) it is registered on the Vera and the light responds.
The ZWave wireless PIR sensor at the top of the stairs used to do the same for people passing from the bedrooms down is responsive (after some tweaking, Google the forum for info) but there are times it gets quirky and takes a moment longer to report it being tripped.
Best Home Automation shopping experience. Shop at Ezlo!