Synchronize Ring Alarm Keypad v2 with Alarmo

All this blueprint does is reflect Alarmo’s state. What’s going on here is that you have “Use exit delay” turned on in the advanced settings for the sensor(s) in question. That tells Alarmo that someone leaving home is expected to trip those sensors in the process of leaving, so it has no way to know until the delay expires that they’re tripped because they’re left open, rather than as a part of someone leaving.

Turn that setting off for the sensor, and it’ll notify you immediately if it’s open when you try to arm the system.

how can I adapt this to use the Aqara M1S alarm system?

I’ve tried to set the Intergration to homekit_device, but it still cannot find the alarm system.

EDIT:
Kinda janky but I created Manual alarm panel and created an automation to change the alarm status of the M1S, since it doesn’t have a code to sync with.

How can I get the countdown red lightbar to work and also change the away mode buttons colour to red?

blueprint:
  name: Ring Keypad Automations
  description: Automations to use the Ring Keypad with an Alarm Panel integration.  See https://github.com/ImSorryButWho/HomeAssistantNotes/blob/main/RingKeypadV2.md for more information.
  domain: automation
  input:
    keypad:
      name: Keypad Device
      description: The device entry for the Ring keypad
      selector:
        device:
          manufacturer: Ring
          integration: zwave_js
    alarm:
      name: Alarm Control Panel entity
      description: The Alarm Control Panel to synchronize the keypad with
      selector:
        entity:
          domain: alarm_control_panel
    selected_action_police:
      name: Selected Action Police
      description: Select the action for Police Button
      default: []
      selector:
        action:
    selected_action_fire:
      name: Selected Action Fire
      description: Select the action for Fire Button
      default: []
      selector:
        action:
    selected_action_medical:
      name: Selected Action Medical
      description: Select the action for Medical Button
      default: []
      selector:
        action:
variables:
  alarm: !input alarm
mode: parallel
max: 10
trigger:
  - platform: event
    event_type: "zwave_js_notification"
    event_data:
      command_class: 111
      device_id: !input keypad
      event_type: 2
    id: code_entered
  - platform: event
    event_type: "zwave_js_notification"
    event_data:
      command_class: 111
      device_id: !input keypad
      event_type: 3
    id: keypad_disarm
  - platform: event
    event_type: "zwave_js_notification"
    event_data:
      command_class: 111
      device_id: !input keypad
      event_type: 5
    id: keypad_arm_away
  - platform: event
    event_type: "zwave_js_notification"
    event_data:
      command_class: 111
      device_id: !input keypad
      event_type: 6
    id: keypad_arm_home
  - platform: event
    event_type: zwave_js_notification
    event_data:
      command_class: 111
      device_id: !input 'keypad'
      event_type: 16
    id: keypad_fire
  - platform: event
    event_type: zwave_js_notification
    event_data:
      command_class: 111
      device_id: !input 'keypad'
      event_type: 17
    id: keypad_police
  - platform: event
    event_type: zwave_js_notification
    event_data:
      command_class: 111
      device_id: !input 'keypad'
      event_type: 19
    id: keypad_medical
  - platform: event
    event_type: "alarmo_failed_to_arm"
    event_data:
      reason: "invalid_code"
    id: invalid_code
  - platform: event
    event_type: "alarmo_failed_to_arm"
    event_data:
      reason: "open_sensors"
    id: need_bypass
  - platform: state
    entity_id: !input alarm
    to: disarmed
    id: alarm_disarmed
  - platform: state
    entity_id: !input alarm
    to: arming
    id: alarm_arming
  - platform: state
    entity_id: !input alarm
    to: armed_away
    id: alarm_armed_away
  - platform: state
    entity_id: !input alarm
    to: armed_home
    id: alarm_armed_home
  - platform: state
    entity_id: !input alarm
    to: pending
    id: alarm_pending
  - platform: state
    entity_id: !input alarm
    to: triggered
    id: alarm_triggered
action:
  choose:
    - conditions:
        - condition: trigger
          id:
            - code_entered
            - keypad_disarm
      sequence:
        - service: alarm_control_panel.alarm_disarm
          entity_id: !input alarm
          data:
            code: "{{ trigger.event.data.event_data }}"
    - conditions:
        - condition: and
          conditions:
            - condition: trigger
              id: keypad_arm_away
            - condition: state
              entity_id: !input alarm
              state: "disarmed"
      sequence:
        - service: alarm_control_panel.alarm_arm_away
          entity_id: !input alarm
    - conditions:
        - condition: and
          conditions:
            - condition: trigger
              id: keypad_arm_home
            - condition: state
              entity_id: !input alarm
              state: disarmed
      sequence:
        - service: alarm_control_panel.alarm_arm_home
          entity_id: !input alarm
    - conditions:
        - condition: trigger
          id: invalid_code
      sequence:
        - service: zwave_js.set_value
          target: 
            device_id: !input keypad
          data:
            command_class: "135"
            endpoint: "0"
            property: "9"
            property_key: "1"
            value: 1
    - conditions:
      - condition: trigger
        id: need_bypass
      sequence:
        - service: zwave_js.set_value
          target: 
            device_id: !input keypad
          data:
            command_class: "135"
            endpoint: "0"
            property: "16"
            property_key: "1"
            value: 1
    - conditions:
        - condition: trigger
          id: alarm_disarmed
      sequence:
        - service: zwave_js.set_value
          target: 
            device_id: !input keypad
          data:
            command_class: "135"
            endpoint: "0"
            property: "2"
            property_key: "1"
            value: 1
    - conditions:
        - condition: trigger
          id: alarm_armed_away
      sequence:
        - service: zwave_js.set_value
          target: 
            device_id: !input keypad
          data:
            command_class: "135"
            endpoint: "0"
            property: "11"
            property_key: "1"
            value: 1
    - conditions:
        - condition: trigger
          id: alarm_armed_home
      sequence:
        - service: zwave_js.set_value
          target: 
            device_id: !input keypad
          data:
            command_class: "135"
            endpoint: "0"
            property: "10"
            property_key: "1"
            value: 1
    - conditions:
        - condition: trigger
          id: alarm_arming
      sequence:
        - service: zwave_js.set_value
          target: 
            device_id: !input keypad
          data:
            command_class: "135"
            endpoint: "0"
            property: "18"
            property_key: "7"
            value: "{{ state_attr(alarm, 'delay')}}"
    - conditions:
        - condition: trigger
          id: alarm_pending
      sequence:
        - service: zwave_js.set_value
          target: 
            device_id: !input keypad
          data:
            command_class: "135"
            endpoint: "0"
            property: "17"
            property_key: "7"
            value: "{{ state_attr(alarm, 'delay')}}"
    - conditions:
        - condition: trigger
          id: alarm_triggered
      sequence:
        - service: zwave_js.set_value
          target: 
            device_id: !input keypad
          data:
            command_class: "135"
            endpoint: "0"
            property: "13"
            property_key: "1"
            value: 1
    - conditions:
      - condition: trigger
        id: keypad_fire
      sequence: !input selected_action_fire
    - conditions:
      - condition: trigger
        id: keypad_police
      sequence: !input selected_action_police
    - conditions:
      - condition: trigger
        id: keypad_medical
      sequence: !input selected_action_medical

It would probably be worth starting a separate thread, and providing more information about your setup and what you’re trying to accomplish. I’m not at all familiar with the Aqara alarm, and don’t want to derail this thread.

Does anyone ever have reliability issues with their Ring Keypads? I have two in my house, and it seems like about 1 in 20 times they don’t correctly sync or transmit commands to Home Assistant. It manifests sometimes as the command executing (ie, Arming the alarm for home) but not updating the state of the keypad, or not sending the command to Home assistant at all (frustrating when the disarm timer is counting down and entering the disarm code doesn’t seem to do anything).

I’ve tried healing the nodes in Zwave JS UI, but I have a lot of zwave devices in my home (including right near the keypads) and they are all rock solid except for these two keypads.

So two questions: Has anyone else experienced this and if so found a solve, and seperately, is there anyway for this blueprint to occasionally check proactively if the keypad is out of sync with Alarmo state and try and correct it? That would at least help solve the “keypad state didn’t update correctly” part.

1 Like

You’re not alone - there’s a long thread on the ZWaveJS github page. The issue seems to have gotten better with newer ZWaveJS versions, and generally seems to get better if you disable the motion sensor (by setting config parameter 15 to 0).

Unfortunately, the keypad doesn’t report what state it’s in, so there’s no easy way to way to manually re-synchronize the state if a transition is missed. The only thing I can think to do is try to monitor the ZWaveJS successful / unsuccessful commands counters for the device, which might work. I’ll play with it when I get some time, and see if I can make that work.

3 Likes

I’ve created a new thread here, if you have any idea on how to get the away status and alarm count down to work.

This. Disabling the motion sensor helps a lot.

1 Like

I too have this issue. 2x v2 keypads with motion disabled but very unpredictable whether you can use the keypad to disarm. Would really welcome a fix.

2 Likes

For me, disabling motion sensor fixed the issue, though I miss being able to see the alarm state by walking by the control panel. Wish that wasn’t required.

1 Like

This looks like exactly what I need. Just a quick question for everyone:

The three buttons on the side… Are you able to utilize them to trigger actions? Ideally I’d like them to be “all lights on” “all lights off”… Maybe throw a sticker on top or something.

Thanks in advanced

Regarding the connect/disconnect issues, my Z-Wave stick was surrounded by my Hue-bridge, RFXCom and the Zigbee stick, I moved the Z-wave stick to the other side of the concrete wall and this helped a lot, occasualy the keypad does disconnect but like once a week or so for 2 minutes, I can live with that.

@supovitz I tried that a while ago but found it inpractical as you need to hold those buttons for 3 or 5 seconds or so, I programmed the 2 left buttons of the 3 on top to open the front gate and turn on the lights.

Hey there,

Very good thread and blueprint as I am thinking of using Alarmo and a physical keypad; Ring Keypad v2 looks really good.

The synchronizations are both directions, right?
So if arming/disarming in Alarmo or in HA companion app the Ring keypad will detect that and change status and the opposite?

1 Like

Correct. The blueprint watches for changes to Alarmo’s state, and updates the keypad as appropriate.

3 Likes

Hello,
After some months with alarmo and Ring Keypad 2… the only issue was keypad lost connection from time to time, fixed re-interviewing the node once a week with the advance tool in ZWave JS UI.
Now I’m trying to setup the bypass warning voice in keypad when open sensor.
I already turned loud enough the bypass sound in the keypad, also deactivated the advance setting “Bypass automatically” for some sensors in Alarmo, but still the keypad doesn’t say anything when arming with open sensors.
Could someone please explain what I’m missing?
Thanks in advance

I have Alarmo setup and Ring Keypad v2 paired.

Using

  • Core: 2024.6.0
  • Supervisor: 2024.06.0
  • Operating System: 12.3
  • Frontend: 20240605.0

Imported the blueprint
Create automation for the blueprint
Configured it and it finds both Ring Keypad and Alarmo
Checked YAML
When saving it nothing gets created (no automation)

Anyone with an idea whats wrong?

YAML

alias: My Ring Keypad Automations
description: ""
use_blueprint:
  path: ImSorryButWho/synchronize-ring-alarm-keypad-v2-with-alarmo.yaml
  input:
    keypad: bbc8c41f534be4fa475c4a3c6ca8f085
    alarm: alarm_control_panel.alarmo
    selected_action_police:
      - service: notify.pushover
        metadata: {}
        data:
          message: Police button pressed
    selected_action_fire:
      - service: notify.pushover
        metadata: {}
        data:
          message: Fire button pressed
    selected_action_medical:
      - service: notify.pushover
        metadata: {}
        data:
          message: Medical button pressed

No idea - that looks correct. Are there any errors in the log?

Do you have “use exit delay” turned on for those sensors? If it’s on, Alarmo thinks they may be open as part of you leaving, so it has no way to know there’s an error until the exit delay expires.

If it’s not set, this sounds like an Alarmo bug.

Thanks for your quick reply @ImSorryButWho
I have not used Blueprints before but i don’t think I am using it wrong (quite difficult to do wrong :wink: ) but tested with another Blueprint and the same behavior :frowning:

Nothing in the logs

I think I have found the reason…

I have automations in automation folder and this in the configuration.yaml

automation: !include_dir_merge_list automation

Blueprints creates in automations.yaml which isn’t loaded but they are there.
Need to find out how to load both the file and folder -or- copy them into automations

Now working :slight_smile: thanks for your effort in this blueprint @ImSorryButWho :+1: