Alarm System with Z2M Keypad support

This blueprint is no longer supported, please switch to my new blueprint:

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

Thank you for your job @danieldeni , it was amazing

I have just a question on your blueprint.
It seems the arm button on the Keypad (with the lock icon) doesn’t trigger the automation.
It seems that only user code enter via the keypad trigger the automation.
Did I understand correctly?

Thks again for your work

it seems to the following condition is always false when I arm from the Keypad

      - alias: Alarm Keypad to Alarm Main sync
        conditions:
          - condition: trigger
            id: alarm_keypad
          - condition: template
            value_template: "{{ trigger.payload_json.action_code in alarm_code_user_state }}"

I add a card to set a value in input text alarm_code_main for example.
Have you any idea ?

And is it possible to know which entity triggers the alarm ?
Thks a lot

Yes, it will only arm if you input the code. Otherwise the result is empty and it won’t run any automations as the state doesn’t change.

It is currently not supported to arm without a code on the physical keypad, as it would also be able to disarm without a code then, which you don’t want on the physical keypad.

The virtual alarm_control_panel inside Home Assistant can be armed/disarmed without a code.

Ok I will try to adapt that to arm without code from keypad
Thks for your reply

Would be great to add the user (determined by the code from the input_text) who triggered the automation to the notification. Can you add this?

I’ve tried to implement it, but it’s not as easy as I thought. The variable for the code is not used in a way that it can be used for the notification as the notification is not triggered by the input of the code itself.

I would need to rework the logic of the Blueprint to be able to implement the Names of the entries. Not sure when I would have the time for it as it’s quite a big rework of the logic to be able to achieve that.

I have found that the camera does in fact not share a snapshot into the notifications (at least not within android),

I made a small test yaml to actually get a snapshot to my phone, this seems to be working, maybe something in the config is missing, I don’t actually see the automation steps for the snapshot / image.

alias: TEST - Camera Snapshot
description: ""
triggers: []
conditions: []
actions:
  - action: camera.snapshot
    metadata: {}
    data:
      filename: /media/NetworkShare_SMB_Media/camera/snapshot.jpg
    target:
      device_id: df2dc680dd01d6462895ece6c13e331a
  - action: notify.mobile_app_sm_s928b
    metadata: {}
    data:
      data:
        image: /media/local/NetworkShare_SMB_Media/camera/snapshot.jpg
        entity_id: camera.camera_bedroom
        actions:
          - action: URI
            title: Open Camera
            uri: /dashboard-home/cameras
      message: someone is in your room!
      title: Movement!
mode: single

The blueprint does not do that no. It was only supported in iOS to send a camera feed directly into the notification.

Which I only found out when switching back to Android. As I didn’t find it useful to have just a screenshot I haven’t implemented that.

For now you could make a script that does that and prompt it where you need the snapshot.

ah gotcha,

I wasn’t aware of it NOT being able in android before,
I thought I had just missed it.

Still using the blueprint daily and it works like an absolute charm,
I’ll build it as a script then :slight_smile:

Hi @danieldeni

I noticed that when I try to disable the alarm, if the entity has a code defined, the blueprint fails to send the entered code correctly.

From what I understand, the blueprint tries to send the list of codes defined in the configuration, but the ‘alarm_control_panel.alarm_disarm’ action only accepts a single code. Isn’t there an error?

Hi, which entity ‘has a code defined’ in your example? Do you mean the Manual Alarm Control Panel in HA you have created in your environment?

I am using it without a code within HA itself as it’s not possible to use multiple codes with the native Manual Alarm Control Panel, only with something like Alarmo your Alarm Control Panel itself can accept multiple codes.