Hue Binding - Dimmer Switch

Did you read the documentation behind the link I posted above?

Yes, I read it. And now I read it once again. Could be a good alternative for using rules. Thanks. And the hue binding does not provide profiles, yet?

No, the Hue binding does not have specific profiles yet. The profiles listed in the documentation are system profiles which can be used on any item link you like.

Now my idea is to introduce a Hue specific profile for the Dimmer Switch and Tap Switch. It would allow you to omit the rule but offers a very flexible way to configuring it for your purpose.

2 Likes

Never mind… I just realized I approach this dimmer_switch the wrong way.

In haven’t used profiles before, but reading the documentation it seems pretty straightforward. Just to be sure I am not missing anything, I have a question about usage of the standard trigger channel profiles.

Let’s take the example from the OH documentation, modified for the Hue dimmer switch:

Color Bedroom_Light {channel="hue:0210:1:bulb1:color", channel="hue:0820:xxxxxxxxxxxx:dim_bedroom:dimmer_switch" [profile="rawbutton-toggle-switch"]}

Using profiles, I assume it is not possible to link it to a specific event, like ‘1003’ so it handles a long press of button 1?

I am not sure if one of the existing trigger profiles will work with the Hue Switches. Most of them need a PRESSED event to be dispatched.

Not yet. But that is exactly the feature I want to add for Hue specific profiles :wink:. I already put together a simple piece of code for an ON-OFF- toggle and a PLAY-PAUSE-toggle example. I did not test it so far. Maybe I find a second to upload it later this day.

If it will work the configuration will look like this:

Switch LivingRoomLight { channel="hue:0210:1:myBulb:color", channel="hue:0830:1:tap_living_room:tap_switch_event" [profile="hue:toggle-switch", event="34.0"] }
Player LivingRoomKodiRemote { channel="kodi:kodi:myKodi:control", channel="hue:0830:1:tap_living_room:tap_switch_event" [profile="hue:toggle-player", event="17.0" ] }
Dimmer LivingRoomKodiVolume { channel="kodi:kodi:myKodi:volume", channel="hue:0830:1:tap_living_room:tap_switch_event" [profile="hue:generic-command", event="16.0", command="DECREASE" ], channel="hue:0830:1:tap_living_room:tap_switch_event" [profile="hue:generic-command", event="18.0", command="INCREASE" ] }

No rule anymore …

1 Like

OK, I’ll stop saying thank you after this (Thank You :grinning:), but its great to see the Hue binding getting some serious attention and updates!

May I suggest one little ‘fix’ for the binding: wouldn’t it be better to get rid of the ‘.0’ of all events. In the Hue bridge they are all without the extra decimal.

Thank you too. It helps a lot if there are reputable people out there who help testing and who giving useful feedback instead of complaining. Makes a lot more fun :+1:.

@noppes123, @Celaeno1

Here is a test version for the Hue specific profiles. I implemented three different version for testing: “Hue Toggle Switch Profile”, “Hue Toggle Player Profile” and “Hue Generic Command Profile” - I hope the names are self explanatory. For an example how you can use them see here.

This test version contains a fix for the events triggered on startup too.

3 Likes

I was only able to do a quick test on the toggle, that worked without any problems.

Switch LivingRoomTogglye { channel="zwave:device:uzb:node37:switch_dimmer1", channel="hue:0830:yxyxyxyxyxyx:5:tap_switch_event" [profile="hue:toggle-switch", event="34.0"] }

1 Like

I’m going to test it tomorow and will post my results.

Will test tomorrow too. Stay tuned.:grinning:

Hello @cweitkamp thank you very much for the update on hue binding.

Do you have a jar with the last fix you did ? I would also like to try it so I can give some feedbacks too if needed.
Thank you in advance

@sbeex Yes, I have. It is linked few posts above:

Some initial results from quick tests of the binding:

  • There is some dependency issue with the mqttgeneric binding, which results in repeated attempts to install the oh240 version of the Hue binding as well (set to Installed state). Probably an issue with that binding? BTW, I run 2.4.0 Release Build.
[ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-mqttgeneric': Error restarting bundles:
        Could not resolve module: org.eclipse.smarthome.binding.hue [220]
  Another singleton bundle selected: osgi.identity; osgi.identity="org.eclipse.smarthome.binding.hue"; type="osgi.bundle"; version:Version="0.11.0.201901011457"; singleton:="true"
  • For the Hue Tap devices events seem to be triggered only once every few attempts (key presses) if I set the parameters: sensorPollingInterval=200, pollingInterval=5. With the defaults, it is about one missing event every 5-6 presses of a Tap switch.
  • No events are triggered on startup anymore. :+1:
  • I tried the toggle switch profile which does turn the light and switch on/off (with the restriction mentioned before):
Switch SW_DiningLight1 {channel="hue:0220:xxxxxxxxxxxx:bulb_dining1:brightness", channel="hue:0830:xxxxxxxxxxxx:tap_dining:tap_switch_event" [profile="hue:toggle-switch", event="18.0"]}
  • Haven’t tested the Dimmer switches yet.

UPDATE:

  • I could not reproduce the missing event issue anymore after restarting the bundle, neither with the defaults nor with the shorter polling times. The weird thing is that when the binding missed a key pressed event in my initial test, the Hue bridge did detect the key pressed status and fired its own rule (I still have Hue rules defined for the Taps).

  • The Dimmer Switch also works with the toggle-switch profile for toggling a Hue light on and off.

  • While doing key press stress tests with the Tap, at a certain moment there was an event “98.0” when I accidentally pressed both key “17.0” and “18.0” at the same time:

[model.script.HUErule.TapSwitch.Event] - HUE Tap Remote switch event hue:0830:xxxxxxxxxxxx:tap_dining:tap_switch_event triggered 98.0
  • With both “16.0” and “34.0” pressed, event “101.0” is triggered. In my setup it is physically impossible to press other combinations at the same time because the switch is behind a wall-mounted Busch-Jaeger frame and toggle switch, but I guess there are more combinations possible. Anyone with a Tap switch still in tact care to test?

Hi!

Just read about the new profiles and it seems those make life a lot easier.
(Reminds me of creating groups in KNX …) :slight_smile:
Will you update the binding shortly the “official” way or is this only possible in 2.5?

Thank you

Thanks for detailed testing. I tried to reproduce your findings with my Hue Dimmer Switch but it was not possible. I never received a “combined event” like you. Maybe a Busch-Jaeger specific behavior?

Everything has to go the “official” way (snapshot, milestone, release) … I already submitted a work-in-progress Pull Request.

I probably was not clear enough, but I meant the Hue Tap, not the Dimmer Switch. :grinning:

You were. But as I do not have access to a Hue Tap I used my Dimmer …

So, no magic with the Dimmer Switch then.