Eiko Wagenknecht
Software Developer, Freelancer & Founder

Events from Homematic and Homematic IP Buttons

Eiko Wagenknecht

This post is also available in German

I’m currently getting familiar with Home Assistant and integrating my Homematic and Homematic IP buttons. In the process, I noticed an interesting peculiarity that I’d like to document: The different buttons send different events when pressed for a long time, which can lead to unexpected behaviors. In this article, I’ll explain the differences and show how to customize the behavior of the buttons to enable consistent control.

Table of Contents

Hardware

I’ll focus on the relevant hardware used:

Button Presses

In Home Assistant, you can see which events the buttons send when pressed by listening to the homematic.keypress event in the developer tools. It turns out that the buttons send completely different events:

HM-PBI-4-FM Button (Default Settings)

Short press: A “PRESS_SHORT” event is sent on the corresponding channel (1-4).

Long press: After 0.4s, a “PRESS_LONG” event is sent once, then every 0.4s a “PRESS_CONT” event, and immediately upon release a “PRESS_LONG_RELEASE” event. The exact time interval depends on the option “Minimum duration for long button press” in the CCU. The default value is 0.4s.

HmIP-FCI1 / HmIP-FCI6 Buttons (Default Settings)

Short press: A “PRESS_SHORT” event is sent on the corresponding channel (1 for FCI1, 1-6 for FCI6).

Long press: After 0.4s, a “PRESS_LONG” event is sent once, then repeatedly every 0.4s another “PRESS_LONG” event, and immediately upon release a “PRESS_LONG_RELEASE” event. The exact time interval depends on the option “Minimum duration for long button press” in the CCU. The default value is 0.4s. The repeated “PRESS_LONG” events come at most as long as set in “Timeout for long button press” (default value 2min).

HmIP-FCI1 / HmIP-FCI6 Buttons (Without Repetitions)

I didn’t like the default behavior because while it makes sense for a dimmer to trigger the event every x seconds and then increase a level by one step, it’s inappropriate for a switch that should only represent an “On/Off” function with a long press. In that case, you would either need to listen for the first “PRESS_LONG” (which is not trivial to filter out) or for the “PRESS_LONG_RELEASE”, which means something happens only when the switch is released. Neither option is great.

Fortunately, there’s a rather hidden way to customize the behavior: If you set the “Timeout for long button press” to “Not active” in the CCU3, the switch suddenly behaves quite differently:

Short press: A “PRESS_SHORT” event is sent on the corresponding channel (1 for FCI1, 1-6 for FCI6).

Long press: After 0.4s, a “PRESS_LONG” event is sent once, and after another 0.4s a “PRESS_LONG_RELEASE” event, nothing more. So explicitly no repeated events. This allows me to simply listen for “PRESS_LONG” and directly execute the desired action!

Additional Switches

HmIP-DSD-PCB (Doorbell sensor): Sends only “PRESS_SHORT”, regardless of what is set for “Timeout for long button press”.

HM-PB-2-WM55-2: Identical to HM-PBI-4-FM.

I don’t have any more switches available to test this behavior. If you have more data points, please leave a comment, and I’ll be happy to update the post.

No Comments? No Problem.

This blog doesn't support comments, but your thoughts and questions are always welcome. Reach out through the contact details in the footer below.

Support Me

If you found this page helpful and want to say thanks, I would be very grateful if you could use this link for your next purchase on amazon.com. I get a small commission, and it costs you nothing extra. If you'd like to support me in another way, you can find more options here.