🚨 Alarm System with Z2M Keypad support (KEPZB-110)

:rotating_light: Alarm System with Z2M Keypad support :rotating_light:

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:

:page_with_curl: My GitHub Repo
:blue_book: This blueprint

:closed_book: ZHA version
:orange_book: Z2M version

Version:

  • 2025.04.1: Add Emergency mode for Keypad
  • 2025.04.0: Change variables to be unique per arm_action
  • 2025.03.2: Add audio announcements functionality
  • 2025.03.1: Fix: Scripts for Arming or Pending states do not fire
  • 2025.03.0: Initial version for Z2M with the same features as my other Blueprint.

Highlights:

  • No need for custom components, syncs seamlessly with Z2M-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 text notifications for Alarm Control Panel state changes – default notifications are already set, but you can tweak them to suit your preferences.
  • Customizable audio announcements for Alarm Control Panel state changes, the messages follow the text notifications.
  • 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 Z2M.
  • Text Helpers: to be able to set multiple user codes. See below.

Getting Started:

  1. Download & Install the Blueprint:

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

  1. 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.

  1. 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.

  1. Setup the sensors, notifications, scripts and cameras you want to use per Alarm state:

  1. 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_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.

Open your Home Assistant instance and show your helper entities.
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"

Open your Home Assistant instance and show your action developer tools.

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! :blush:

2 Likes

I have released a new version today with added functionality! Works great for me with my USB connected speaker to my Home Assistant OS device. You could use any Media Player available to your Home Assistant.

New update today, to comply with the changes in HA 2025.4.0 .

Hi, your blueprint is awesome, great and inspiring work! Thank you so much!
A quick question from me: is it possible to implement the SOS button keypress in the given choices?
Much obliged!

I just checked my keypad and didn’t even notice there was a SOS button on it after using it for over a year :rofl: .

Just checked the response how to use it. By double pressing the SOS button it triggers an action called ‘emergency’. So I can implement this in the Blueprint when I have time.

1 Like

Thank you in advance for your time!

New update today. I have implemented the SOS button on the Keypad. Double pressing doesn’t always respond the same way. So it is best to long press the SOS button to trigger the Emergency mode of the Keypad.

2 Likes

You are the best! You blueprint rocks, covering all the possible scenarios! Thank you so much for this…
I’ll give it a try right away!

Best wishes

1 Like