Help with Burglar Alarm rule(s)
-
I would like to replicate a burglar alarm setup I currently have configured with Vera scenes.
I need an entry timer of 60 seconds before the siren goes off.
So the door sensor is armed, I enter the house, this trips and starts a 60 second count down timer.
If within the 60 seconds I have disarm the house, then the siren does not sound and all the door / window contact sensors are disarmed etc and Vera put in to Home Mode.
If I do not disarm the house within the 60 seconds then the siren should sound etc.
Currently I am using three scenes in Vera and the Count Down Timer plugin to achieve this.
The first scene "Burglar Alarm" its triggers are that an armed door / window sensor is tripped. It then also starts the 60 second count down timer.
The second scene "Burglar Alarm Delayed" its trigger is that the count down timer completes. i.e. I have not disarmed the house within the 60 seconds count down, so this second scene would then sound the siren.
If I did disarm the house within the 60 seconds, which is the third scene "Home" which cancels the count down timer, then the second scene is not triggered and therefore the siren does not sound.
I am not sure what is the best way to handle this? or even how to do this count down timer in MSR ? A count down timer that I can stop when I disarm the house, so it does not complete or it does complete if I haven't disarmed the house in time.
This is all I have so far the triggers and the constraints that those door sensors must be in Armed state.
Thanks
-
MikeReadingtonwrote on Apr 29, 2021, 3:56 PM last edited by MikeReadington Apr 29, 2021, 11:57 AM
I am nowhere near an expert at MSR, but I did do something similar for a specific type of alarm. I might have taken the long way around, but it works for me.
I have conditions that trigger an alarm and an alarm cancel condition. When the alarm is triggered, it runs a global reaction with the sequence I want and a final delay for sounding the alarm. When the cancel condition is satisfied, I use a "stop reaction" reaction to cancel that global reaction wherever it is in the sequence.
It's been very solid for me, but I am curious how you end up working through this.
-
I concur. Seems like you could almost get away with using only two Rules:
RULE A > Triggers: (any sensor tripped) > Constraints: (alarm armed?) > SET: Delay 60s, Turn on Siren > RESET: (empty)
RULE B > Triggers: (alarm disarmed) > Constraints: (optional: [RULE STATE] [Rule A] [is TRUE]) > SET: [STOP REACTION] [Rule A Set], Turn off Siren > RESET: (empty)Thoughts?
-
That was the easiest way at my skill level to accomplish what I needed to do.
Along this same lines, I found myself looking for a way to evaluate if a reaction was still running in a condition. Is there a way to do that and I missed it? I don't know how many people would find that useful, but if it was there I would have utilized that.
-
@mikereadington I think you're describing this setup in MSR:
...which would permit the Rule to run if (and only if) the named rule
Run A/C Fan
happened to beSet
(TRUE). -
I saw that, and I have used that to see the state of a rule. I was thinking about something more alone the lines of "Global Reaction State" to see if a long reaction was still running.
-
@mikereadington said in Help with Burglar Alarm rule(s):
... to see if a long reaction was still running.
Sort of like being able to poll "Status" and get back an array of any Rules currently "Running"? I asked for just such a feature a while back, and believe it may already be considered for future revs.
-
toggledbitsreplied to cw-kid on Apr 29, 2021, 6:18 PM last edited by toggledbits Apr 29, 2021, 2:20 PM
@cw-kid Many moons ago I did an alarm simulator for Reactor for Vera. Here's my interpretation of an MSR version:
First, we define three zones: Zone 1 for smoke detectors (always cause noise), Zone 2 for Perimeter devices that when breached activate an entry delay (time to get in and turn off the alarm), and Zone 3 for interior devices (like motion sensors or other interior/instant trigger things). These are just rules; none of them has any reactions. We will use these in other rules we create later.
Now let's determine when we're "breached" in Away mode. If Zone 2 Perimeter is breached (by checking that rule we defined above), there's a 60 second delay implemented by a "sustained for" on the "Perimeter Delayed" group (notice yellow highlight on the options button). The group for the Interiors also uses the Zone 2 rule to cut the interiors off (that is, the interiors only go into alarm if the perimeter is not), which makes sure that an interior motion sensor you may trip after entering during the perimeter delay doesn't suddenly make the siren blast.
Still no reactions. Just building logic at this point.
For Night mode, we instantly trigger on Perimeter trip only, simple:
Again, no reactions yet. Still building logic.
Now, we'll make an "In Alarm" rule to roll-up our two breached rules: if either rule is set (OR) and we're not in "home" mode (constraint), we should be in alarm.
Now we're ready for some reactions. Here's the "Siren On" rule that turns on the siren when in alarm or smoke detectors are going off (smoke detectors make noise in all house modes):
Finally, to turn the siren off when we're not in alarm. This is when either the house mode is set to home, or the breaches/smokes resolve:
There are lots of ways to imagine this problem and myriad solutions. This was just something I had done some time ago, now in MSR form.
-
Thanks guys for all the suggestions a lot to take in.
I'll have a proper read later and see if I can retire my existing scenes setup in Vera and migrate this functionality to MSR.
-
6/9