Problem getting the Hue Dimmer Switch to work and solution

  • Platform information: Raspberry Pi 4 model B Rev 1.2
    • Hardware: ARMv8 - mem:4GB - storage: 32GB
    • OS: Raspbian GNU/Linux 10 (buster)
    • Java Runtime Environment: OpenJDK Runtime Environment Zulu11.45+27-CA (build 11.0.10+9-LTS)
    • openHAB version: 3.0.1
  • Issue of the topic: Problem getting the Hue Dimmer Switch to work and solution
  • Configurations:
    Using the GUI method and the inbox, I’ve added my hue bridge in which I have set up two dimmer switch controls. That action revealed these dimmer switches and I added them as an Thing. From this page If I wanted to add it as an item I simply get a message to interact with it through rules, iow, I cannot create an item out of it.
    1. Identifier: “hue:0820:ecb5fa25ef84:2”
      Label: “Keukenlichten”
    2. Identifier: “hue:0820:ecb5fa25ef84:11”
      Label: “Garage+Tuin verlichting”

I’ve created a file for my rules to capture this trigger event using code commonly found on this forum:

rule "MyHueDimmer Gar+Tuin"
when
    Channel "hue:0820:ecb5fa25ef84:11:dimmer_switch_event" triggered or
    Channel "hue:0820:ecb5fa25ef84:2:dimmer_switch_event" triggered
then
    logInfo("DimmerTest", "receivedEvent= {}", receivedEvent.getEvent())
end

However, I can click as much as I want on any and all of these switches, not one click makes it into the log-file.
Searching the forum I found that a bug report is already made indicating clics are missed on frequent occasions but my situation is slightly different as I can’t seem to get any event through from the hue bridge. So far the problem …

But I went on and added the “hue:xxx:xxx:x:dimmer_switch” as an Item (as opposed to the “dimmer_switch_event”)
It should give me the number of the button that was last pressed but instead I got the event codes here as a number: (1002.0 ; 2000.0 ; 2002.0 ; …)

For completeness: my log file from connecting the hue bridge until reception of the first clics

2021-04-15 12:03:32.845 [INFO ] [ue.internal.handler.HueBridgeHandler] - Creating new user on Hue bridge 192.168.1.11 - please press the pairing button on the bridge.

2021-04-15 12:03:33.372 [INFO ] [ue.internal.handler.HueBridgeHandler] - Creating new user on Hue bridge 192.168.1.11 - please press the pairing button on the bridge.

2021-04-15 12:03:33.893 [INFO ] [ue.internal.handler.HueBridgeHandler] - Creating new user on Hue bridge 192.168.1.11 - please press the pairing button on the bridge.

2021-04-15 12:03:33.918 [INFO ] [ue.internal.handler.HueBridgeHandler] - User has been successfully added to Hue bridge.

==> /var/log/openhab/events.log <==

2021-04-15 12:03:33.935 [INFO ] [openhab.event.ConfigStatusInfoEvent ] - ConfigStatusInfo [configStatusMessages=[]]

==> /var/log/openhab/openhab.log <==

2021-04-15 12:03:34.498 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:0820:ecb5fa25ef84:2' to inbox.

2021-04-15 12:03:34.507 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:0840:ecb5fa25ef84:3' to inbox.

2021-04-15 12:03:34.516 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:0840:ecb5fa25ef84:4' to inbox.

2021-04-15 12:03:34.525 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:0850:ecb5fa25ef84:6' to inbox.

2021-04-15 12:03:34.532 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:0850:ecb5fa25ef84:7' to inbox.

2021-04-15 12:03:34.539 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:0840:ecb5fa25ef84:8' to inbox.

2021-04-15 12:03:34.546 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:0820:ecb5fa25ef84:11' to inbox.

==> /var/log/openhab/events.log <==

2021-04-15 12:03:34.498 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'hue:0820:ecb5fa25ef84:2' has been added.

2021-04-15 12:03:34.507 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'hue:0840:ecb5fa25ef84:3' has been added.

2021-04-15 12:03:34.517 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'hue:0840:ecb5fa25ef84:4' has been added.

2021-04-15 12:03:34.525 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'hue:0850:ecb5fa25ef84:6' has been added.

2021-04-15 12:03:34.532 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'hue:0850:ecb5fa25ef84:7' has been added.

2021-04-15 12:03:34.540 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'hue:0840:ecb5fa25ef84:8' has been added.

2021-04-15 12:03:34.547 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'hue:0820:ecb5fa25ef84:11' has been added.

2021-04-15 12:03:34.550 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'hue:bridge:ecb5fa25ef84' changed from OFFLINE (CONFIGURATION_ERROR): Not authenticated. Press pairing button on the Hue bridge or set a valid user name in configuration. to ONLINE

==> /var/log/openhab/openhab.log <==

2021-04-15 12:03:37.519 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:0220:ecb5fa25ef84:2' to inbox.

2021-04-15 12:03:37.528 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:0220:ecb5fa25ef84:3' to inbox.

2021-04-15 12:03:37.560 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:group:ecb5fa25ef84:0' to inbox.

2021-04-15 12:03:37.570 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:group:ecb5fa25ef84:1' to inbox.

2021-04-15 12:03:37.585 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:group:ecb5fa25ef84:2' to inbox.

==> /var/log/openhab/events.log <==

2021-04-15 12:03:37.519 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'hue:0220:ecb5fa25ef84:2' has been added.

2021-04-15 12:03:37.528 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'hue:0220:ecb5fa25ef84:3' has been added.

2021-04-15 12:03:37.561 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'hue:group:ecb5fa25ef84:0' has been added.

2021-04-15 12:03:37.571 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'hue:group:ecb5fa25ef84:1' has been added.

2021-04-15 12:03:37.585 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'hue:group:ecb5fa25ef84:2' has been added.

2021-04-15 12:04:55.921 [INFO ] [openhab.event.InboxRemovedEvent     ] - Discovery Result with UID 'hue:0820:ecb5fa25ef84:11' has been removed.

2021-04-15 12:04:55.928 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'hue:0820:ecb5fa25ef84:11' changed from UNINITIALIZED to INITIALIZING

2021-04-15 12:04:55.947 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'hue:0820:ecb5fa25ef84:11' changed from INITIALIZING to ONLINE

2021-04-15 12:05:05.228 [INFO ] [openhab.event.InboxRemovedEvent     ] - Discovery Result with UID 'hue:0820:ecb5fa25ef84:2' has been removed.

2021-04-15 12:05:05.233 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'hue:0820:ecb5fa25ef84:2' changed from UNINITIALIZED to INITIALIZING

2021-04-15 12:05:05.250 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'hue:0820:ecb5fa25ef84:2' changed from INITIALIZING to ONLINE

2021-04-15 13:28:13.325 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'GarageTuinLicht_SwitchState' changed from NULL to 1000.0

2021-04-15 13:28:13.841 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'GarageTuinLicht_SwitchState' changed from 1000.0 to 1002.0

2021-04-15 13:28:21.544 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'GarageTuinLicht_SwitchState' changed from 1002.0 to 1000.0

2021-04-15 13:28:22.060 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'GarageTuinLicht_SwitchState' changed from 1000.0 to 1002.0

2021-04-15 13:28:35.410 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'GarageTuinLicht_SwitchState' changed from 1002.0 to 2000.0

2021-04-15 13:28:35.927 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'GarageTuinLicht_SwitchState' changed from 2000.0 to 2002.0

As you can see, my rule didn’t go off

Long story short: I believe something has changed in this hue binding since the dimmer_swich_event channel is no longer working but instead we have to use the “dimmer_switch”-channel as an Item and work from there using the default rules that can be used on items.

I didn’t find this info anywhere yet, so I thought it deserves mentioned to help out others.
I hope it does…

Cheers,