Alarm System with ZHA Keypad support
This blueprint offers a robust, flexible solution for those who want a fully integrated alarm system without the hassle of additional custom components. Whether you’re using it for home security, office monitoring, or any other application, this setup ensures that your alarm system is responsive and easy to manage.
Links:
Version:
- 2025-01-23: Make it possible to select your own Mobile Apps for notifications and implement an Always, Fire, Gas and Moisture mode.
- 2025-01-21: Fixed bug where scripts weren’t running
- 2025-01-20: Initial Version
Highlights:
- No need for custom components, syncs seamlessly with ZHA-connected keypads.
- Supports multiple user codes, including hexadecimal codes for RFID tags.
- The logic to verify codes is built into the blueprint, so your alarm panel doesn’t need to support multiple codes.
- Customizable notifications for Alarm Control Panel state changes – default notifications are already set, but you can tweak them to suit your preferences.
- Option to show a live camera feed from any of your cameras inside the notification of state changes.
- Customizable scripts for each alarm state change.
Requirements:
- Home Assistant 2024.8.0 or later: as it is made with the newer syntax.
- Alarm Panel: Manual Alarm Panel is enough to use this.
- Physical Keypad: Implemented and tested with the frient Intelligent Keypad connected through ZHA.
- Text Helpers: to be able to set multiple user codes. See below.
Getting Started:
- Download & Install the Blueprint:
- Select the mandatory entities:
Follow the instructions in the Blueprint to make a basic setup. If you don’t have all the entities needed, see below how to create.
- Create a Text Helper, per code you want to use:
pattern: "^[0-9A-F+]+$"
You can create the Text Helper directly from the GUI of the blueprint or it’s also possible through YAML, see below.
- Setup the sensors, notifications, scripts and cameras you want to use per Alarm state:
- Setup the sensors, notifications, scripts and cameras you want to use for independent sensors:
YAML setup:
I find it easy to split my config into packages, so I can easily find different yaml entities related to specific device type. You can include the following in your Home Assistant config:
homeassistant:
packages: !include_dir_named packages
Make sure to create packages folder in your /config/ directory.
I created a file called alarm.yaml in my packages folder with the following contents:
alarm_control_panel:
- platform: manual
name: Alarm
code_arm_required: false
armed_away:
arming_time: 30
delay_time: 20
armed_home:
arming_time: 0
delay_time: 10
armed_night:
arming_time: 0
delay_time: 20
input_text:
alarm_code_keypad:
name: Alarm Code Keypad
icon: mdi:dialpad
min: 1
max: 16
mode: password
pattern: "^[0-9A-F+]+$"
alarm_code_user_1:
name: Alarm Code User 1
icon: mdi:dialpad
min: 1
max: 16
mode: password
pattern: "^[0-9A-F+]+$"
alarm_code_user_2:
name: Alarm Code User 2
icon: mdi:dialpad
min: 1
max: 16
mode: password
pattern: "^[0-9A-F+]+$"
alarm_code_user_3:
name: Alarm Code User 3
icon: mdi:dialpad
min: 1
max: 16
mode: password
pattern: "^[0-9A-F+]+$"
This creates the manual alarm_control_panel, which this Blueprint uses as the controller of your Alarm system. You can select a different arming_time and delay_time per mode.
As I am using the Packages option, I can also put my Text Helpers in the same .yaml file to keep everything together.
After creating the Text Helpers in YAML or in the GUI you can set the pincodes yourself.
The content of the Text Helper is stored in your HA database, so is ‘safe’ in there. As an admin you can see the state of the Helper and see the stored code, but in your Automations the code is not visible.
You can also set the code with an Action on the Dev Tools page.
action: input_text.set_value
target:
entity_id: input_text.alarm_code_user_1
data:
value: "1234"
Join the Community:
I can’t wait to see how you all use this Blueprint to enhance your smart homes. Please share your experiences, tips, and any creative uses you come up with. Together, we can make our homes smarter and more connected than ever!
Happy automating!