Homematic HM-MOD-EM-8 - no homematic event for switch or sensor-setting (button-setting works fine)

I want to use event data from my HM-MOD-EM-8 to trigger automations, when opening/closing circuit. For this I could use the switch or sensor-setting in CCU3, but these settings don’t generate a homematic event

This is the log entry with switch-setting:

2021-03-31 15:43:36 DEBUG (Thread-3) [pyhomematic._hm] RPCFunctions.event: interface_id = homeassistant-rf, address = PEQ0106163:7, value_key = PRESS, value = True
2021-03-31 15:43:36 INFO (Thread-3) [pyhomematic.devicetypes.generic] HMGeneric.event: address=PEQ0106163:7, interface_id=homeassistant-rf, key=PRESS, value=True
2021-03-31 15:43:36 DEBUG (Thread-3) [pyhomematic.devicetypes.generic] HMGeneric.event: Using callback functools.partial(<function _hm_event_handler at 0x7f0547b1f670>, <homeassistant.core.HomeAssistant object at 0x7f0551bb57f0>, 'rf')

This is the log entry with sensor-setting:

2021-03-31 15:44:13 DEBUG (Thread-3) [pyhomematic._hm] RPCFunctions.event: interface_id = homeassistant-rf, address = PEQ0106163:7, value_key = STATE, value = True
2021-03-31 15:44:13 INFO (Thread-3) [pyhomematic.devicetypes.generic] HMGeneric.event: address=PEQ0106163:7, interface_id=homeassistant-rf, key=STATE, value=True
2021-03-31 15:44:13 DEBUG (Thread-3) [pyhomematic.devicetypes.generic] HMGeneric.event: Using callback functools.partial(<function _hm_event_handler at 0x7f0547b1f670>, <homeassistant.core.HomeAssistant object at 0x7f0551bb57f0>, 'rf')

The Homematic integration detects the state changes, but no homematic event which I can use to trigger an automation is generated.

However, when using button-setting I get an different output:

2021-03-31 15:43:25 DEBUG (Thread-3) [pyhomematic._hm] RPCFunctions.event: interface_id = homeassistant-rf, address = PEQ0106163:7, value_key = PRESS_LONG, value = True
2021-03-31 15:43:25 INFO (Thread-3) [pyhomematic.devicetypes.generic] HMGeneric.event: address=PEQ0106163:7, interface_id=homeassistant-rf, key=PRESS_LONG, value=True
2021-03-31 15:43:25 DEBUG (Thread-3) [pyhomematic.devicetypes.generic] HMGeneric.event: Using callback functools.partial(<function _hm_event_handler at 0x7f0547b1f670>, <homeassistant.core.HomeAssistant object at 0x7f0551bb57f0>, 'rf')
2021-03-31 15:43:25 DEBUG (Thread-3) [homeassistant.components.homematic] Event PRESS_LONG for LF_input channel 7

I can then use this to trigger an automation:

trigger:
  - platform: event
    event_type: homematic.keypress
    event_data:
      name: LF_input
      channel: 7
      param: PRESS_LONG

But I can’t use the button setting for my physical application (detection open/closed state). Can I get the integration to generate a homematic event to trigger automations in switch or sensor-mode?
Or are there a way to trigger automations from the pyhomematic HMGeneric event?

hi,
i know, old topic. But i have the same problem. Did you find a solution ?

The Buttons on the Raspberrymatic Web UI are working and generating a event.
The real physical switch doesnt…

regards

DukyNuky

Hi!

The solution for me was the HomeMatic(IP) local integration (avaliable on HACS). Works much better than (and will eventiually replace) the official integration.

hmm… i already use the hacs extension from the beginning.