Homematic Button HM-PB-4-WM don't trigger automation


#1

when I press the physical button, the push is displayed in the UI of Homematic, but the automation isn’t triggered.
when I trigger the button via the UI of Homematic, the automation starts.

I do not understand why the light is only turned on when I simulate the keystrokes in the UI,
but not when I actually press the physical button.

The Automation must be correct, because it is running by triggering the Button in the UI of Homematic:

- alias: LED Diele einschalten
  initial_state: true
  hide_entity: false
  trigger:
    - platform: event
      event_type: homematic.keypress
      event_data:
        name: JEQ0051355
        channel: 4
        param: PRESS_SHORT
  action:
    - service: script.licht_magic
      data_template:
        value1: 'green'
        value2: '5'

Can anybody explain ?


#2

Are you sure your name: section is correct?

Mine is as follows:

- alias: Keypress1_Short
  trigger:
    platform: event
    event_type: homematic.keypress
    event_data:
      name: HM-PB-4Dis-WM JEQ0705375
      channel: 1
      param: PRESS_SHORT
  action:
    service: input_select.select_option
    data:
      entity_id: input_select.heatingmode
      option: 'At Home'

#3

i think so, but i’ll give it a try …


#4

No.

Now the automation doesn’t work.

The Problem is, that the automation work, when i push the button in the UI of Homematic !?


#5

Pushing the button runs the action but doesn’t test the trigger so the trigger must be the issue.


#6

Did you observe the events in Home Assistant when setting the log-level to DEBUG? I would assume that using channel 4 is the problem. If I’m not mistaken the device has two physical buttons (pressing the upper half and the lower half). Those would be channels 1 and 2. Internally the device may have additional channels (3 and 4), but those are not usable outside of the CCU I think.
It may also be that even channel 2 does not work. There’s no line in actors.py that gives 2 channels to the device, and the default is just a single channel. Here the log output of the events HASS receives would be helpful to fix this.


#7

It’s curious that when I press the physical button, nothing happens in the Home Assistant log. Only in the Homematic UI the operation is displayed. But if I click on the virtual button in Homematic, the following log entry will be registered and the automation will be executed:

2017-11-12 19:44:48 DEBUG (Thread-14) [homeassistant.components.homematic] Event PRESS_SHORT for JEQ0051355 channel 4


#8

This feels like pyhomematic is missing this remote in its decice types list.

Feels like it should have 4 channels (the name even suggests that)

Think this needs a PR to the pyhomematic library?


#9

In fact am I not wrong?

if "RC-4" in self.TYPE or "PB-4" in     self.TYPE:
                return [1, 2, 3, 4]

Should do it


#10

I can’t get my automation to work either :frowning:

2019-03-12 23:31:26 INFO (Thread-3) [pyhomematic.devicetypes.generic] HMGeneric.event: address=PEQ0372264:2, interface_id=homeassistant-rf, key=PRESS_SHORT, value=True
2019-03-12 23:31:26 DEBUG (Thread-3) [pyhomematic.devicetypes.generic] HMGeneric.event: Using callback functools.partial(<function _hm_event_handler at 0x7f70dc0d6488>, <homeassistant.core.HomeAssistant object at 0x7f70e1142d68>, ‘rf’)
2019-03-12 23:31:26 DEBUG (Thread-3) [homeassistant.components.homematic] Event PRESS_SHORT for Handsender channel 2
2019-03-12 23:31:26 DEBUG (Thread-3) [pyhomematic._hm] RPCFunctions.event: interface_id = homeassistant-rf, address = PEQ0372264:2, value_key = INSTALL_TEST, value = True
2019-03-12 23:31:26 INFO (Thread-3) [pyhomematic.devicetypes.generic] HMGeneric.event: address=PEQ0372264:2, interface_id=homeassistant-rf, key=INSTALL_TEST, value=True
2019-03-12 23:31:26 DEBUG (Thread-3) [pyhomematic.devicetypes.generic] HMGeneric.event: Using callback functools.partial(<function _hm_event_handler at 0x7f70dc0d6488>, <homeassistant.core.HomeAssistant object at 0x7f70e1142d68>, ‘rf’)

My config looks like this:

- id: '1552426931404'
  alias: Switches - HM-RC-4-3 - 2
  trigger:
  - event_data:
      channel: '2'
      name: Handsender
      param: PRESS_SHORT
    event_type: homematic.keypress
    platform: event
  condition: []
  action:
  - data:
      entity_id: switch.jeq0462078
    service: switch.toggle

If I trigger it manually the switch toggles. I’ve also tried the device name “HM-RC-4-3 PEQ0372264” instead of “Handsender”. Turned off secure communication as well for testing.

Any idea what’s wrong here?


#11

Please use proper formatting for your automation. It’s explained in the blue box on the top of every site you visit here. Without seeing the indentation it’s hard to judge if that might be a problem.
At first sight Handsender for the name probably is correct. Try removing the quotation-marks around channel 2.


#12

Thank you Daniel - you were right: it works without quotation marks!

Maybe this should be considered a bug since I created the automations with the build-in editor of HA’s preferences section?


#13

Yes. Please open an issue for this at the Home Assistant repository with a precise description on how you created the automation, and what was required to fix it. :+1: