How to Enable Alexa Guard Mode via Home Assistant using Presence Detection
Amazon Alexa Guard needs Presence detection. Having to say “I’m home” or “I’m leaving” is an annoying way to arm/disarm such a helpful feature like Alexa Guard Mode. Too many times we leave the house and forget to enable it and security is all about consistency. Home Assistant to the rescue! Using Home Assistant, HACS, and Alexa Media Player, we are able to set up some simple automations to Enable and Disable Alexa Guard Mode AUTOMATICALLY using presence detection.
If you don’t know about Alexa Guard, it is a service built into most Echo devices that when enabled, will put the echo devices into a type of sentry mode. They will listen for breaking glass, Alarms (like Smoke Detectors or Sirens), and other unusual crashes or bangs. If heard, Amazon will alert you via an App push and give you the opportunity to listen to a 10-second clip and then optionally drop-in to the house to communicate or listen. It’s not a full replacement for a security system but it’s an amazing addition to any system already in place.
I really can’t think of a non-tin-foil hat reason to not enable it. You’ve already bought into having echo devices in your house, you might as well get full use out of them.
Check out the YouTube video below for a step by step walkthrough but high level, you need to do the following:
- Enable Alexa Guard
- Install HACS – Check out Kiril’s Video for this [How to install HACS]
- Install Alexa Media Player
- Enable Arm/Disarm via Home Assistant
Once you have the building blocks in place, the Home Assistant YAML is pretty easy.
# Arms Alexa Guard. Disarms in the Announcements.yaml - service: alarm_control_panel.alarm_arm_away entity_id: alarm_control_panel.alexa_guard
# Only Disarm if armed. Otherwise, Exit out. - condition: state entity_id: alarm_control_panel.alexa_guard state: armed - service: alarm_control_panel.alarm_disarm entity_id: alarm_control_panel.alexa_guard
It’s two pieces, one that arms and one that disarms. Strategically place these bits of code in automations that trigger when people arrive and leave and you are all set. The Alexa Media Player custom component provides the bridge to make it all work.
I really liked this weekend project and hope you give it a try if you have echo devices in the house.
Happy Automating!
– Carlo