Situation: a bunch of door and motion sensors + 3 Zigbee Tuya siren (which supports different sounds)
I want to achieve the following:
When a sensor is triggered...
All sirens in the house start giving a subtle warning sound @ 50% volume. This warns the user
that the alarm is about to go off. This shall go on for 15 seconds...
--->if the user cancels the alarm, then all sirens are turned off.
After 15 seconds, the same sirens will go into alarm mode (panic sounds @ max volume). This shall go on for at least 10 minutes
This is how I am planning to do this:
RULE # 1 (Alarm Sequence)
I'll first create a rule for the sirens.. This rule will not have triggers, just the actions. This way i can have different Rules (with the actual triggers) that will run the actions of this rule.
The actions for this rule shall be:
Action 1: Run custom action > playSound -> Beeps @ volume 50% for 15 seconds
Action 2: Run custom action > playSound -> Alarm @ volume 100% for 600 seconds (Delay = 15 seconds)
Concept: The warning beeps will play first 15 seconds, followed by the full alarm siren.
RULE #2: Trigger
Several triggers (sensors and SOS buttons) in several areas with different conditions that, if met, will Run the Rule Actions of RULE #1 (start alarm sequence)
RULE #3 Cancel Button
The same SOS buttons, if double pressed, will Stop RULE ACTIONS of RULE #1 and Disarm the Security
I've not tried this yet but so far in theory this could work.... But I'm wondering
Do you guys have an idea of a better way to do this
How will this behave if several sensors were triggered all running the same rule action = will this result in duplicate executions (stacking)?!
- eg. Burglar enters the door (triggers door sensor), moves into the hallway (triggers motion detector) ... so both sensors will have different rules all firing actions of RULE #1 (alarm sequence)
- I also to give the user option to hit the panic button, with the following behavior:
if user Presses the panic button
A. During the warning beeps, full alarm is engaged. (This way if it's a real emergency the user does not need to wait for 15 seconds before the alarm goes off)
B. When sirens are inactive (no triggers), alarm sequence is started (This is a way for user to manually trigger the alarms, but has 15 seconds to cancel. Of course if during this warning sequence user pushes the panic button again then warning sequence is skipped, full alarm engaged.(same behavior in A)