home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.04k stars 30.55k forks source link

Homematic: homematic.keypress is sending multiple events #26707

Closed Horizon0156 closed 5 years ago

Horizon0156 commented 5 years ago

Hi all,

first of all: Great job with Home Assistant and all the integrations. I'm currently having a problem with the Homematic integration, respectively with the keypress events.

I'm running Homeassistant as well as the CCU (ReGa less) in separate Docker containers. Everything is working fine so far. However, the automations for my kitchen lights are getting triggered multiple times and I receive multiple keypress events switching between the channels 1 one 2.

For example: I shortly press the HMIP wall switch, event for channel 1 is fired, the lights turn (Philips Hue) on. After about half of a second I got a SHORT_PRESS event on channel which actually disables my lights again. This repeats over an over again between the two channels.

The same wall switch (HMIP-BSM) is working fine with my Hue bulbs in the living room.

Any ideas what could be wrong? Anyone having similar problems? Is this a problem within the integration or more on CCU side?

Many thanks in advance.

Homeassistant Version: 0.98.5 (O)CCU Version: 3.47.10

I recently changed from the HM PCB Adapter to the HMIP USB Stick and cleaned up the Raspberry from all the piVCCU modules and reinstalled the Docker images. Prior to this everything was running fine. Never change a running system, hmmm?! :)

Below you can find the corresponding automation.

- id: 'KuecheAnKurz'
  alias: Schalter Küche (An - Kurz)
  trigger:
  - event_data:
      channel: 1
      name: 000858A9960C09
      param: PRESS_SHORT
    event_type: homematic.keypress
    platform: event
  condition: []
  action:
  - data:
      brightness: 127
      entity_id: light.tisch_1
    service: light.turn_on
  - data:
      brightness: 127
      entity_id: light.tisch_2
    service: light.turn_on
- id: 'KuecheAusLang'
  alias: Schalter Küche (Aus - Lang)
  trigger:
  - event_data:
      channel: 2
      name: 000858A9960C09
      param: PRESS_SHORT
    event_type: homematic.keypress
    platform: event
  condition: []
  action:
  - data:
      brightness: 127
      entity_id: light.tisch_1
    service: light.turn_off
  - data:
      brightness: 127
      entity_id: light.tisch_2
    service: light.turn_off
- id: 'KuecheAusKurz'
  alias: Schalter Küche (Aus - Kurz)
  trigger:
  - event_data:
      channel: 2
      name: 000858A9960C09
      param: PRESS_SHORT
    event_type: homematic.keypress
    platform: event
  condition: []
  action:
  - data:
      entity_id: group.kueche
    service: homeassistant.turn_off
Horizon0156 commented 5 years ago

This was not an issue with Homeassistant or the Homematic integration. The problem is the HMIP-BSM itself.

There is a current detection which automatically sends an event on one of the channels to enable itself. As the HUE bulbs are fading on and there is a low current consumption during this time, the BSM fires the event and the program starts to loop between channel 1 and 2.

The solution is to disable the current detection CURRENTDETECTION_BEHAVIOR on channel 3 to CURRENTDETECTION_INACTIVE_VALUE_OUTPUT_2 depending on your channel that actually sends your HIGH values.

You can find more information in the follwing thread (German) https://homematic-forum.de/forum/viewtopic.php?t=47413