Simple Blueprint : Zigbee2MQTT Frient Keypad for Alarm control panel (ex: Alarmo)

Hi,
I am publishing this simplified blueprint inspired by @AndrejDelany.
It allows you to link a Frient Keypad to the Alarmo module in your Home Assistant.
This automation receives events from the Keypad to manage Alarmo.
It also receives Alarmo state changes to update the status of the Keypad.

Features:

  • Arm All Zones (Lock)
  • Arm Day Zones (Home)
  • Arm Night Zone (Moon)
  • Disarm (Unlock)
  • Emergency (SOS Button long-press)
  • Entry Delay (beep + flashing green light)
  • Exit Delay (beep + flashing red light)
  • Invalid Code (orange light)
  • Alarm in Progress (flashing red light)

Update :

  • Support for multiple PIN codes and RFID tags (updated on 2024/10/10)
  • Add sections and custom action (updated on 2024/11/23)

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

RFID Tips: I’m using NFCTools on Android to read my TAG, and I’ve copied it (preceded by ‘+’) in the list of PIN code.

4 Likes

Doesn’t import. Shows some error.

Corrected!
Thanks🙏

Update :

  • Support for multiple PIN codes and RFID tags (updated on 2024/10/10)

I recently buyed the keypad and installed your blueprint, thanks a lot!

is it possible for extra codes and extra tags to do (a) different action(s)? for example opening the garage port wich i have a button for in HA now? But would like to give some people a tag to open my garage without having to give acces to the home assistant app

Hi,
i can make that if you want


Add sections and custom action (updated on 2024/11/23)

that’s super!

But i found out i control my zigbee through ZHA and not MQTT. It look’s a bit complex to go and change al my zigbee stuff
 Searching for a solution 


Could you make a ZHA blueprint perhaps? would make the world!

I don’t have ZHA, sorry.

There is an article in French explaining how to capture an event and a code from the keypad to trigger an action of your choice in an automation.

It’s a bit more challenging than a blueprint, but try it anyway.

Hi,
any chance to control the LEDs? I do not see an error when entering a wrong PIN and pressing the arm button.

You can easily set it up using ZHA. See my post here. It’s not a blueprint, but it only takes a few minutes to setup and test. I just did this last night.

Any luck? I would love that too

Dear @BeGood,
Happy New Year 2025 :-).
What a nice job you’ve done. Thanks.
I can arm and disarm Alarmo from the Frient keypad using either a PIN code or RFID tags.
But, how can we assign a specific PIN code or rfid tag to a specific user in the Alarmo user list?
I created several users, each with a different rfid tag, but Alarmo report me always the same user that armed or desarn the alarm panel.
With other words: should it be possible to use the pin or rfid tag entered on the keypad to interact with the Alarmo alarm panel than using the control panel PIN code field (of the blueprint)?
Already thanks for your help.
Have a nice evening.

1 Like

Dear all and @BeGood,
I found the solution by slightly adapting your blueprint.
I changed the following in the code:
- conditions:
- condition: trigger
id: keypad_mqtt
sequence:
- choose:
- conditions:
- condition: template
value_template: “{{trigger.payload_json.action == "arm_all_zones" }}”
sequence:
- target:
entity_id: alarm_control_panel.alarmo_all
data:
code: “{{trigger.payload_json.action_code}}”
action: alarm_control_panel.alarm_arm_away
alias: Armer en mode absent
This must be repeated for each modes.
With these modifications, the variables of the initial blueprint are not needed anymore.
Thanks to that, it is not needed anymore to manage the PIN codes and rfid tags in the blueprint but only in Alarmo. It simplifies the management of the system.
Hope this will help others :-).
Regards.

1 Like

Hello Brix7be,

many thanks for your great work to connect Alarmo, Frient Keypad, Zigbee and Home Assistent.
As far the blueprint works great, unfortunatly I had a problem how to handle activating the Alarmo without any Code but deactivating with Code input at the panel.
I just can get all (arm and dissarm) with Code input or all (arm and disarm) without Code.
What I am doing wrong? I still define a Code and a user in Alarmo and than where I need to fill in that code in the Blueprint automation for the keypad? Or isn’t it necessary to fill in a code in the Automation or just when I juse a RFID chip to disarm? I am a bit confused :frowning:
Thanks for a short respons
Tom

I’m using the Frient Keypad with Zigbee2MQTT and Alarmo in Home Assistant. While I’ve successfully set up arming and disarming functions, I’m struggling to get feedback to the keypad, such as LED indicators (armed/disarmed states) and countdown sounds after arming or when waiting for disarm input.

I’ve tried a few blueprints (currently this blueprint), and while they work fine for the basic functionalities, they don’t seem to address the feedback part. Has anyone managed to get these features working with Zigbee2MQTT? If so, could you share how you did it?

With these updates I now have RFID and multiuser pin codes active on my Frient keypad - thanks alot!

I have been trying to get my Frient keypad working and synced with Alarmo for a couple weeks now - your blueprint helped me pull it all together. Thanks so much.

Hi @BeGood,
Is there an option to use the codes to tell me who armed or disarmed the alarm?
I found out that I only can use the serial number of the tags and not there “friendly name” like for example tag:ab05cd06= named Marylou, or can I use the names?

Thank you

I’m in the same situation, but from what I’ve been reading, the keypad doesn’t accept commands back to do things like flash and beep during exit delay etc. would be nice, but so far I haven’t had much luck.

Bonjour " Brix7be",

Je me permets de venir vers vous car j’utilise depuis peu le Blueprint de “Soyez bon” et on peut dire qu’il est opĂ©rationnel et que vous avez modifiĂ© pour que le paramĂ©trage des codes et password puisse se faire sur “Alarmo” uniquement et plus sur les Blueprint & Alarmo.

Aussi, je souhaiterais savoir s’il Ă©tait possible d’avoir le code yaml dans son entier.

Pour information, le code du blueprint me gĂ©nĂšre 9 erreurs de syntaxe dont 8 Ă  priori sur la commande “choose” contenue dans le blueprint.

  • la 1Ăšre : ligne 49 = alarm_control_panel avec le message String does not match the pattern of “LEGACY_SYNTAX^”

  • la 2Ăšme : lignes 249, 259, 269, 279, 289, 299, 309 et 364 : choose = Incorrect type.Expected “object”.

Aussi, j’aurais souhaitĂ© tester votre code complet.

EspĂ©rant trouver un conseil et une aide de votre part, recevez, “Brix7be”, mes cordiales salutations.

Daniel SZYBURA

Bonjour, “Soyez bon”,

D’abord, je tenais Ă  vous remercier pour votre post d’ Octobre 2024 d’une Blueprint (Bygood91) pour l’utilisation du clavier FRIENT et des badges RFID associĂ©s au clavier et Ă  Alarmo.
J’utilise maintenant votre solution sur mon Home Assistant.

NĂ©anmoins, en ouvrant le fichier « frient_keypad_with_alarmo.yaml » avec l’outil VSCode, quelques messages d’erreurs (9) apparaissaient sans toutefois dĂ©ranger apparemment le fonctionnement du Blueprint.

Aussi, je me permets de vous adresser, en piĂšce jointe, votre fichier partagĂ©, avec les quelques modifications liĂ©es Ă  des erreurs de syntaxe du fait de l’évolution de zigbee2mqtt depuis la version 2.2.
‱ 7 erreurs semblent avoir Ă©tĂ© corrigĂ©es lignes la 2Ăšme : lignes 249, 259, 269, 279, 289, 299, 309 sur le fichier original
o erreur : choose = Type incorrect. « Objet » attendu.
 En fait, j’ai supprimĂ© le paramĂštre « choose » pour ne laisser que « default »

Il me reste, néanmoins, deux erreurs de syntaxe ligne 49 et ligne 357 sur le nouveau fichier mis en piÚce jointe.

Avez-vous fait évoluer votre Blueprint depuis Octobre dernier ?
Avez-vous eu les mĂȘmes messages d’erreurs apparaĂźtre depuis le passage de zigbee2mqtt Ă  la version 2.2 ?

Auriez-vous la possibilitĂ©, s’il vous plaĂźt, de partager Ă  nouveau votre Blueprint utilisĂ© actuellement ?

Par avance, merci pour votre aide et encore merci pour le partage de votre Blueprint.

Bien cordialement,

Daniel SZYBURA

blueprint:
  name: "Frient Keypad with Alarm Control Panel (ex: Alarmo)"
  description:
    "This Blueprint allows the synchronisation of an alarm control panel
    with a Zigbee2MQTT keypad. \nThis means that the status of the alarm control panel
    is transmitted to the keypad and vice versa."
  domain: automation
  homeassistant:
    min_version: 2024.6.0
  input:
    keypad_mqtt:
      name: Keypad MQTT
      description:
        Configure MQTT topics for the keypad and manage access codes or
        RFID tags.
      icon: mdi:dialpad
      collapsed: false
      input:
        z2m_keypad_path:
          name: MQTT State Topic of your Zigbee2MQTT Keypad
          description:
            "The State Topic is composed of your Zigbee2MQTT base_topic
            (see your Z2M Addon Configuration) and the Friendly Name of your keypad
            in Z2M.\n Example: zigbee2mqtt/Keypad"
        z2m_keypad_path_set:
          name: MQTT Set Topic of your Zigbee2MQTT Keypad
          description:
            "This is the same as your State Topic, with the addition of
            /set.\n Example: zigbee2mqtt/Keypad/set"
        pin_list:
          name: Keypad Pincode List
          description:
            "A list of valid PIN codes and RFID tags that can be accepted
            by your keypad, separated by semicolons \" ; \".\n You can enter either
            a PIN code or an RFID tag for authentication.\n For example: 1234; +ACF5678B"
    control_panel:
      name: Control Panel
      description: Manage Control Panel settings and actions triggered by state changes.
      icon: mdi:shield-lock
      collapsed: false
      input:
        control_panel:
          name: Control Panel
          description: "An alarm control panel. \nExample: Alarmo or https://www.home-assistant.io/integrations/manual"
          default: []
          selector:
            entity:
              domain:
                - alarm_control_panel
              multiple: false
        pin_control_panel:
          name: Control Panel Pincode
          description: The Valid PIN Code to be used for controlling Control Panel.
    alarmo_actions:
      name: Actions Triggered by Control Panel State Change
      description:
        Define the actions to be performed whenever the alarm panel state
        changes (e.g., armed, disarmed, triggered).
      icon: mdi:shield-alert
      collapsed: true
      input:
        action_arming:
          name: Action Arming
          description:
            An action to be performed when the alarm panel changes to the
            arming state.
          default: []
          selector:
            action: {}
        action_armed_home:
          name: Action Armed Home
          description:
            An action to be performed when the alarm panel changes to the
            armed home state.
          default: []
          selector:
            action: {}
        action_armed_night:
          name: Action Armed Night
          description:
            An action to be performed when the alarm panel changes to the
            armed night state.
          default: []
          selector:
            action: {}
        action_armed_away:
          name: Action Armed Away
          description:
            An action to be performed when the alarm panel changes to the
            armed away state.
          default: []
          selector:
            action: {}
        action_disarmed:
          name: Action Disarmed
          description:
            An action to be performed when the alarm panel changes to the
            disarmed state.
          default: []
          selector:
            action: {}
        action_pending:
          name: Action Pending
          description:
            An action to be performed when the alarm panel changes to the
            pending state.
          default: []
          selector:
            action: {}
        action_panic:
          name: Action Panic
          description:
            An action to be performed when the panic / SOS button of the
            keypad is pressed.
          default: []
          selector:
            action: {}
        action_alarm:
          name: Action Alarm
          description: An action to be performed when alarm is triggered is pressed.
          default: []
          selector:
            action: {}
    custom_action_1:
      name: Special Pin Code 1
      description:
        Set up a specific action to be triggered when PIN code 1 is entered
        (PIN code + any arming button).
      icon: mdi:gesture-tap-button
      collapsed: true
      input:
        custom_pincode_1:
          name: Pin Code 1
          description:
            "Enter the PIN code required to trigger custom action 1 via
            the keypad.

            You can either use the same code from the keypad PIN code list or enter
            a new code that will launch this action."
          default: ""
        custom_action_1:
          name: Action for Pin Code 1
          description:
            Define the action to execute when the PIN code 1 is entered
            on the keypad.
          default: []
          selector:
            action: {}
    custom_action_2:
      name: Special Pin Code 2
      description:
        Set up a specific action to be triggered when PIN code 2 is entered
        (PIN code + any arming button).
      icon: mdi:gesture-tap-button
      collapsed: true
      input:
        custom_pincode_2:
          name: Pin Code Actn 2
          description:
            "Enter the PIN code required to trigger custom action 1 via
            the keypad.

            You can either use the same code from the keypad PIN code list or enter
            a new code that will launch this action."
          default: ""
        custom_action_2:
          name: Action for Pin Code 2
          description:
            Define the action to execute when the PIN code 2 is entered
            on the keypad.
          default: []
          selector:
            action: {}
    custom_action_3:
      name: Special Pin Code 3
      description:
        Set up a specific action to be triggered when PIN code 3 is entered
        (PIN code + any arming button).
      icon: mdi:gesture-tap-button
      collapsed: true
      input:
        custom_pincode_3:
          name: Pin Code 3
          description:
            "Enter the PIN code required to trigger custom action 1 via
            the keypad.

            You can either use the same code from the keypad PIN code list or enter
            a new code that will launch this action."
          default: ""
        custom_action_3:
          name: Action for Pin Code 3
          description:
            Define the action to execute when the PIN code 3 is entered
            on the keypad.
          default: []
          selector:
            action: {}
  source_url: https://github.com/Bygood91/frient_keypad_alarmo/blob/cc1a5270093bc04b2f1f89279336f79be35c3ba4/frient_keypad_with_alarmo.yaml
variables:
  pin_list_var: !input pin_list
  pin_list: "{{ pin_list_var.split(';') }}"
  custom_pincode_1: !input custom_pincode_1
  custom_pincode_2: !input custom_pincode_2
  custom_pincode_3: !input custom_pincode_3
  pin_actions_list:
    "{{ [custom_pincode_1, custom_pincode_2, custom_pincode_3] }}

    "
triggers:
  - trigger: state
    entity_id: !input control_panel
    to: arming
    id: panel_arming
  - trigger: state
    entity_id: !input control_panel
    to: armed_night
    id: panel_armed_night
  - trigger: state
    entity_id: !input control_panel
    to: disarmed
    id: panel_disarmed
  - trigger: state
    entity_id: !input control_panel
    to: armed_away
    id: panel_armed_away
  - trigger: state
    entity_id: !input control_panel
    to: pending
    id: panel_pending
  - trigger: state
    entity_id: !input control_panel
    to: triggered
    id: panel_triggered
  - trigger: mqtt
    topic: !input z2m_keypad_path
    id: keypad_mqtt
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id: panel_arming
        sequence:
          - action: mqtt.publish
            data:
              topic: !input z2m_keypad_path_set
              payload: "{\n\"arm_mode\": \n  {\n  \"mode\": \"exit_delay\"\n  }\n}"
              default: !input action_arming
      - conditions:
          - condition: trigger
            id: panel_armed_away
        sequence:
          - action: mqtt.publish
            data:
              topic: !input z2m_keypad_path_set
              payload: "{\n \"arm_mode\": \n  {\n   \"mode\": \"arm_all_zones\"\n  }\n}"
              default: !input action_armed_away
      - conditions:
          - condition: trigger
            id: panel_disarmed
        sequence:
          - action: mqtt.publish
            data:
              topic: !input z2m_keypad_path_set
              payload: "{\n \"arm_mode\": \n  {\n    \"mode\": \"disarm\"\n  }\n}"
              default: !input action_disarmed
      - conditions:
          - condition: trigger
            id: panel_armed_home
        sequence:
          - action: mqtt.publish
            data:
              topic: !input z2m_keypad_path_set
              payload: "{\n \"arm_mode\": \n  {\n   \"mode\": \"arm_day_zones\"\n  }\n}"
              default: !input action_armed_home
      - conditions:
          - condition: trigger
            id: panel_armed_night
        sequence:
          - action: mqtt.publish
            data:
              topic: !input z2m_keypad_path_set
              payload: "{\n \"arm_mode\": \n  {\n   \"mode\": \"arm_night_zones\"\n  }\n}"
              default: !input action_armed_night
      - conditions:
          - condition: trigger
            id: panel_pending
        sequence:
          - action: mqtt.publish
            data:
              topic: !input z2m_keypad_path_set
              payload: "{\n \"arm_mode\": \n  {\n   \"mode\": \"entry_delay\"\n  }\n}"
              default: !input action_pending
      - conditions:
          - condition: trigger
            id: panel_triggered
        sequence:
          - action: mqtt.publish
            data:
              topic: !input z2m_keypad_path_set
              payload: "{\n \"arm_mode\": \n  {\n   \"mode\": \"in_alarm\"\n  }\n}"
              default: !input action_alarm
      - conditions:
          - condition: trigger
            id: keypad_mqtt
        sequence:
          - choose:
              - conditions:
                  - condition: template
                    value_template:
                      '{{ trigger.payload_json.action_code in pin_list and trigger.payload_json.action
                      == "arm_all_zones" }}'
                sequence:
                  - action: alarm_control_panel.alarm_arm_away
                    target:
                      entity_id: !input control_panel
                    data:
                      code: !input pin_control_panel
              - conditions:
                  - condition: template
                    value_template:
                      '{{ trigger.payload_json.action_code in pin_list and trigger.payload_json.action
                      == "arm_day_zones" }}'
                sequence:
                  - action: alarm_control_panel.alarm_arm_home
                    target:
                      entity_id: !input control_panel
                    data:
                      code: !input pin_control_panel
              - conditions:
                  - condition: template
                    value_template:
                      '{{ trigger.payload_json.action_code in pin_list and trigger.payload_json.action
                      == "arm_night_zones" }}'
                sequence:
                  - action: alarm_control_panel.alarm_arm_night
                    target:
                      entity_id: !input control_panel
                    data:
                      code: !input pin_control_panel
              - conditions:
                  - condition: template
                    value_template:
                      '{{ trigger.payload_json.action_code in pin_list and trigger.payload_json.action
                      == "disarm" }}'
                sequence:
                  - action: alarm_control_panel.alarm_disarm
                    target:
                      entity_id: !input control_panel
                    data:
                      code: !input pin_control_panel
              - conditions:
                  - condition: template
                    value_template: '{{ trigger.payload_json.action == "emergency" }}'
                sequence:
                  - choose:
                    default: !input action_panic
              - conditions:
                  - condition: template
                    value_template:
                      "{{ trigger.payload_json.action_code in custom_pincode_1
                      }}"
                sequence: !input custom_action_1
              - conditions:
                  - condition: template
                    value_template:
                      "{{ trigger.payload_json.action_code in custom_pincode_2
                      }}"
                sequence: !input custom_action_2
              - conditions:
                  - condition: template
                    value_template:
                      "{{ trigger.payload_json.action_code in custom_pincode_3
                      }}"
                sequence: !input custom_action_3
              - conditions:
                  - condition: template
                    value_template:
                      "{{ trigger.payload_json.action_code not in pin_list and
                      trigger.payload_json.action_code not in pin_actions_list and trigger.payload_json.action_code
                      | int(-1) != -1 }}"
                sequence:
                  - action: mqtt.publish
                    data:
                      topic: !input z2m_keypad_path_set
                      payload:
                        "{\n \"arm_mode\": \n  {\n   \"transaction\": \"{{ trigger.payload_json.action_transaction
                        }}\",\n   \"mode\": \"invalid_code\"\n  }\n}"
            default: []
    default: []
mode: parallel
max: 10