Homematic - Actions for HmIP-KRCA (this black 4-button keychain remote control)

Hey,

I just like the Idea of getting Automations done in one place with blueprints - as I said already in my other HmIP-BSM Blueprint.

So, I just used, again, the perfect work from @AndrejDelany (Homematic - Actions for HmIP-WRC6 / HM-PB-6-WM55 and changed it a little bit to fit it to HmIP-KRCA devices. Nothing special.

As @AndrejDelany s Work, you need to use the Homematic device name. And if it’s still not working, please keep in mind, you need to extract the keypress events (see: homematic.keypress events for Homematic IP devices. By the way: If you like to debug this, just head to “Developer Tools” --> “Events” in your Home Assistant and subscribe “homematic.keypress” (without quote signs) in the bottom “Listen to events” Box.

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

blueprint:
  name: Actions for HmIP-KRCA
  description: When a button is pressed, the defined actions will be executed. Please keep in mind, that long-press actions might be executed multiple times, according to your configured minimum duration for long press. This can be configured in your CCU.
  domain: automation
  input:
    switch:
        name: HmIP-KRCA Device
        description: Please select a HmIP-KRCA (4 button keychain remote control) entity of your Homematic (not Homematic Cloud) integration by typing in the name of the device which was set in your CCU.
        
    action_first_short:
        name: Action
        description: First Button (top, empty house symbol), Short Press
        default: []
        selector:
            action: {}
    action_first_long:
        name: Action
        description: First Button (top, empty house symbol), Long Press
        default: []
        selector:
            action: {}
    action_second_short:
        name: Action
        description: Second Button (person inside a house-symbol), Short Press
        default: []
        selector:
            action: {}
    action_second_long:
        name: Action
        description: Second Button (person inside a house-symbol), Long Press
        default: []
        selector:
            action: {}
    action_third_short:
        name: Action
        description: Third Button (on-off symbol), Short Press
        default: []
        selector:
            action: {}
    action_third_long:
        name: Action
        description: Third Button (on-off symbol), Long Press
        default: []
        selector:
            action: {}
    action_fourth_short:
        name: Action
        description: Fourth Button (bottom, lightbulb symbol), Short Press
        default: []
        selector:
            action: {}
    action_fourth_long:
        name: Action
        description: Fourth Button (bottom, lightbulb symbol), Long Press
        default: []
        selector:
            action: {}

trigger:
  - platform: event
    event_type: homematic.keypress
    event_data:
      name: !input 'switch'
      
condition: []
    
action:
  - choose:
      - conditions:
          - condition: template
            value_template: >-
              {{ trigger.event.data.channel == 1 and trigger.event.data.param == 'PRESS_SHORT' }}
        sequence: !input 'action_second_short'
      - conditions:
          - condition: template
            value_template: >-
              {{ trigger.event.data.channel == 1 and trigger.event.data.param == 'PRESS_LONG' }}
        sequence: !input 'action_second_long'
      - conditions:
          - condition: template
            value_template: >-
              {{ trigger.event.data.channel == 2 and trigger.event.data.param == 'PRESS_SHORT' }}
        sequence: !input 'action_first_short'
      - conditions:
          - condition: template
            value_template: >-
              {{ trigger.event.data.channel == 2 and trigger.event.data.param == 'PRESS_LONG' }}
        sequence: !input 'action_first_long'
      - conditions:
          - condition: template
            value_template: >-
              {{ trigger.event.data.channel == 3 and trigger.event.data.param == 'PRESS_SHORT' }}
        sequence: !input 'action_fourth_short'
      - conditions:
          - condition: template
            value_template: >-
              {{ trigger.event.data.channel == 3 and trigger.event.data.param == 'PRESS_LONG' }}
        sequence: !input 'action_fourth_long'
      - conditions:
          - condition: template
            value_template: >-
              {{ trigger.event.data.channel == 4 and trigger.event.data.param == 'PRESS_SHORT' }}
        sequence: !input 'action_third_short'
      - conditions:
          - condition: template
            value_template: >-
              {{ trigger.event.data.channel == 4 and trigger.event.data.param == 'PRESS_LONG' }}
        sequence: !input 'action_third_long'

mode: parallel
max: 10

Hope, it’s useful for someone.

2 Likes

Thanks a lot! The blueprint works fine when configuring it and pressing the buttons. However, when clicking save I only get a “rename” popup. I confirm that, go back to check the blueprint and no settings were saved. I do not see anything in the HA log (and am running HA as docker version 2023.10.3).

Hi all

Can somebody explain please in detail how to setup the blueprint ?
What I did so far, I have entered the name in the device field the name from CCU device and as action I have selected to turn off the light in my office. Unfortunately its not working, but I suppose I am missing here something…

No, as far as I understood what you did, this should be it.

Maybe you want to share a screenshot or your yaml config?

Regards,
Jens

alias: blub
description: 4_Homematic IP_Handsender 1
use_blueprint:
  path: >-
    jesc/homematic-actions-for-hmip-krca-this-black-4-button-keychain-remote-control.yaml
  input:
    switch: 4_Homematic IP_Handsender 1
    action_fourth_short:
      - service: light.turn_on
        target:
          entity_id:
            - light.licht_buro
        data: {}
    action_fourth_long:
      - service: light.turn_off
        metadata: {}
        data: {}
        target:
          entity_id: light.licht_buro

Honestly, this looks about right (even though I don’t know if “spaces” in names are allowed, I try to get around them).

Do you have a Trace or something?

Regards,
Jens

Hello, considering this as portable HA Alarm remote but I’m not sure what I need to make it work, whether the integration is working locally or via some cloud…
I currently don’t own any Homematic hub or other devices and don’t plan to buy.
Just want to use this device as portable HA remote.

Is HmIP-KRC4 model supported and working with latest 2024 HA versions?
Which Add-on + Integration I need for this blueprint to work?
thanks a lot in advance