Breaking changes in hue binding

The master of ESH now contains a major refactoring of the hue binding, which will become part of the openHAB 2 distro with the next stable ESH build. (I am creating such a build every couple of days, in average once a week, whenever the lastest changes should flow from ESH to OH2).

The changes in the hue binding imho bring great benefit: Instead of having thing types per bulb model (LCT001, etc.), it now supports instead generic types (i.e. dimmable/tunable/color/extendedcolor lights) and thus supports ANY device that is connected to the hue bridge, even new models from 3rd party vendors (like Osram). As there was quite a proliferation of new models in the past, I think this step was absolutely necessary.

The reason why I mention it here is that this change means that the old (modelId-based) thing types were dropped - and thus your existing Things (be it through auto-discovery or defined in a *.things file) won’t be recognized anymore. You will have to either delete and re-discover them or to adapt your Thing definition in the file.

Please refer to the updated documentation of the hue binding for details.

Cheers,
Kai

1 Like

FTR, this is now active in openHAB through https://hudson.eclipse.org/smarthome/job/SmartHomeDistribution-Stable/86/.

First tests indiciates that everything is working fine: the binding discovered all of my Osram/Philips bulbs (incl. one which was not supported before 1616 ).

Looks like moving to the generic approach was the right choice.

Thanks for this change!

Tried it out, looking good!

With some more testing I now think that there is a bug with the special handling of Osram bulbs. It looks like that for older firmware versions the switch-off is not working properly. Interestingly this happens only when using a manually defined switch item in Basic/Classic UI. PaperUI is working fine. Also bulbs on new firmware working ok. Details in the Github issue.

I’ve installed OH2 using the apt-get method, how can i try just these changes related to the hue binding ?

PaperUI is showing binding-hue - 0.8.0.b5, can i just uninstall this one using the GUI and copy the jar file to my addons folder ? If yes, where can i download the jar ?

I just tried the method i proposed, it doesnt work - I removed the “old” binding using PaperUI, downloaded the zip file from cloudbees, extraced just the hue jar file from it and put it to my addons folder. Now I’m getting the following error in openhab.log:

> 2016-07-02 17:19:36.745 [ERROR] [binding.hue.handler.HueBridgeHandler] - An unexpected error occurred: org.eclipse.smarthome.core.thing.ThingUID.<init>(Ljava/lang/String;Lorg/eclipse/smarthome/core/thing/ThingUID;Ljava/lang/String;)V
> java.lang.NoSuchMethodError: org.eclipse.smarthome.core.thing.ThingUID.<init>(Ljava/lang/String;Lorg/eclipse/smarthome/core/thing/ThingUID;Ljava/lang/String;)V
>         at org.eclipse.smarthome.binding.hue.internal.discovery.HueLightDiscoveryService.getThingUID(HueLightDiscoveryService.java:144)[211:org.eclipse.smarthome.binding.hue:0.9.0.201606271451]
>         at org.eclipse.smarthome.binding.hue.internal.discovery.HueLightDiscoveryService.onLightAddedInternal(HueLightDiscoveryService.java:103)[211:org.eclipse.smarthome.binding.hue:0.9.0.201606271451]
>         at org.eclipse.smarthome.binding.hue.internal.discovery.HueLightDiscoveryService.onLightAdded(HueLightDiscoveryService.java:99)[211:org.eclipse.smarthome.binding.hue:0.9.0.201606271451]
>         at org.eclipse.smarthome.binding.hue.handler.HueBridgeHandler.notifyLightStatusListeners(HueBridgeHandler.java:448)[211:org.eclipse.smarthome.binding.hue:0.9.0.201606271451]
>         at org.eclipse.smarthome.binding.hue.handler.HueBridgeHandler.access$7(HueBridgeHandler.java:443)[211:org.eclipse.smarthome.binding.hue:0.9.0.201606271451]
>         at org.eclipse.smarthome.binding.hue.handler.HueBridgeHandler$1.run(HueBridgeHandler.java:108)[211:org.eclipse.smarthome.binding.hue:0.9.0.201606271451]
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_91]
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[:1.8.0_91]
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[:1.8.0_91]
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[:1.8.0_91]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_91]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_91]
>         at java.lang.Thread.run(Thread.java:745)[:1.8.0_91]

Guess I have to use the complete openhab version from cloudbees.

Correct!