Homematic.keypress event doesn´t trigger my automation

I´m running HA in a VM on my Synology and a HomematicCCU on a raspi. The new custom Homematic integration is working very well and everything should be fine. But there is one thing, i can´t get runnig anymore (did it before, but now it seems to be impossible):

I want to use the homematic.keypress event to trigger an automation. When i look at the event-listener results, the event-data is comming in correctly:

Ereignis 13 ausgelöst 19:53:

{
    "event_type": "homematic.keypress",
    "data": {
        "interface_id": "RaspberryMatic-HmIP-RF",
        "address": "00085BE9A3B1BA",
        "type": "press_long",
        "subtype": 2,
        "device_id": "e0f97bd899ae24d7c3cc36511a05f61c"
    },
    "origin": "LOCAL",
    "time_fired": "2022-04-25T17:53:05.258336+00:00",
    "context": {
        "id": "4d566eea0e1300be5d35bc87eb2e1645",
        "parent_id": null,
        "user_id": null
    }
}

The trigger-part in my automation looks like this:

trigger:
  - platform: event
    event_type: homematic.keypress
    event_data:
      name: 00085BE9A3B1BA
      param: press_long
      channel: 2

I tried nearly everything as “name” in the trigger: the adress, the device_id, the interface_id, all possible names… nothing. The automation isn´t starting.

There is one thing, I recognized: in all the other topics, where the homematic.keypress-event is comming in correctly in HA, in the “data”:-section is a “name”-value and not “adress” like in mine. Is it possible, that there were changes in Rasperrymatic, that the data doesn´t fit anymore? Because I had that automation working for month, and suddenly, a few weeks ago, it stopped working, without changing anything. Now I did a complete new HA installation from the scratch, but still no chance to get it work. Hope someone can help me. Thanx in advance!

Did you try:

trigger:
  - platform: event
    event_type: homematic.keypress
    event_data:
      address: 00085BE9A3B1BA
      type: press_long
      subtype: 2

That being said, with the new integration it is actually preferred to use the device automations which you can set up via UI.

1 Like

Thanks Daniel, that solved the problem! I already tried “adress: 00085BE9A3B1BA” but not in combination with “subtype: 2”. Sometimes it could be so easy.

Btw.: I used the UI to build the automation. When you start on the device-page building the automation, there es no choice for using the “homeatic.keypress”-event as a trigger and when you choose “event” as a trigger in the UI, you have to fill in the event-data as code. Or is there another way to build automations with the UI?

And here it says you have to use the Device as the trigger. Then you can select the event you need. :+1:

… oh, ok. Sorry for the confusion. But now I think I know where the problem is:

When I want to build an automation with the HmIP-BSM, I can´t use the device-button as a trigger:

When i choose a HmIP-BDT, HMIP-WRC2 or HmIP-BRC2 I can use the device-button as a trigger:

That was the reason why i tired to build the automation with the example of the “old” integration.

Try to create an empty automation and select everything manually. It should look something like this:

There you can manually select the device and which Event to listen to.

When I choose the device, i can´t select a trigger:


I get the same behaviour, with my ohter HmIP-BSM-Switch.

With my HmIP-BDT it works fine:

Ok, that might be a bug then. Please open an issue here that contains the information and screenshots you have posted in this thread.

Done. And again thank you for your help and your great work with this integration. I love the new integration because all the other things i tried worked like a charm! :+1: :muscle: