Hello,
I have a konnected board as my home alarm system and I could use some assistance
setting up some automations for the piezo buzzer. I’m using the Manual Control Panel
I’m sure I’ve absolutely butchered some of the automation below, development is not my profession and I’m about 2 weeks into setting this up though having a lot of fun with it.
I’m running v. 0.94.4
Presently, there are 2 ways to activate the alarm:
- arm_home= I put in my PIN, press arm_home and it arms the alarm instantly. Useful when you’re going to sleep
- arm_away = I put in my PIN, press arm_away and it arms the alarm after 60 seconds, so you have 60 seconds to leave the house.
During these 60 seconds, the state of the alarm is ‘pending’, after 60 seconds, it changes to ‘arm_away’
So once I punch in my PIN on my keypad and press ‘arm_away’, the following things happen:
1- I have a visual timer that kicks in and counts down 60 seconds
2- Alexa TTS says “Perimeter defenses online in 60 seconds”
3- The piezo buzzer beeps once per second for 50 seconds,
4- The piezo buzzer beeps 3 times per second for the last 10 seconds (to express a sense of urgency to exit the house)
The issue I’m experiencing is that if I set ‘arm_away’ to trigger the automation but decide within 60 seconds to disarm the system, the piezo buzzer continues to beep down to the entire 60 seconds (step #3 & #4) even though the system has now been disarmed.
I have another automation that does the following when I ‘disarm’ the system:
1- The timer is canceled
2- The piezo buzzer 50 second switch turns off
3- The piezo buzzer 10 second switch turns off
4- The siren stops if it got triggered
5- Alexa TTS says “Perimeter defenses, offline”
So sequence 1 and 5 happen (I’m assuming #4 also does but haven’t tested it yet) but 2 and 3 don’t. I was hoping steps 2 and 3 would exit the other automation but doesn’t seem like it’s working.
Essentially, I’m looking for a way to exit the automation once the state of the alarm has changed from ‘pending’ to ‘disarmed’
I tried replacing switch.turn_off with homeassistant.turn_off but that did not work.
I also tried creating a new piezo buzzer countdown (that only runs for 10 ms then stops) to see if I could somehow ‘override’ the other countdown, but that also did not work.
The 2 automations I mentioned above are below:
Disarmed Automation:
#################################################
# When the alarm has been disarmed. The following things happen:
# 1- Timer is canceled
# 2- Piezo 50 second countdown stops (not working)
# 3- Piezo 10 second countdown stops (not working)
# 4- The siren turns off
# 5- Alexa says "Perimeter defenses, offline"
#################################################
- alias: Alarm Disarmed
trigger:
- platform: state
entity_id: alarm_control_panel.alarm
to: disarmed
action:
- service: timer.cancel
entity_id: timer.arm_away_timer
- service: switch.turn_off
entity_id: switch.countdown_50
- service: switch.turn_off
entity_id: switch.countdown_10
- service: switch.turn_off
entity_id: switch.siren_2
- service: media_player.alexa_tts
data:
entity_id: media_player.my_echo_dot
message: "Perimeter defenses, de-activated"
#################################################
#################################################
Arm_away automation:
#################################################
# When the alarm has been set to Arm_away, you have 60 seconds to
# leave the house. This happens:
# 1- Alexa will say you have 60 seconds
# 2- Countdown timer will start
# 3- Piezo buzzer will start the 50 second countdown
# 4- Piezo buzzer will start the 10 second countdown
#################################################
- alias: Arm Away
initial_state: 'on'
trigger:
- platform: state
entity_id: alarm_control_panel.alarm
from: disarmed
to: pending
action:
- service: media_player.alexa_tts
data:
entity_id: media_player.my_echo_dot
message: "Perimeter defenses will activate in 60 seconds"
- service: timer.start
entity_id: timer.arm_away_timer
- service: switch.turn_on
entity_id: switch.countdown_50
- delay: 00:00:50
- service: switch.turn_on
entity_id: switch.countdown_10
#################################################
#################################################
Thank you in advance!