Hue item definition OpenHAB2

Hi all,

I am having issues defining a HUE lamp in OH2. In OH1 I defined my HUE lamps in items like this:
Switch Hue_lamp1 “Lamp1” (gDownstairs) { hue=“6” }

But for OH2 you seem to define it like this?
Switch Hue_lamp1 “Lamp1” (gDownstairs) { channel=“hue:LWB004:0017881003d0:6” }

It doesn’t work so I am assuming I am missing something. I only want to switch on/off my lamp.
Any idea what I am doing wrong?



What if you add a channel to your item configuration (depending on the bulb you use):

  • channel=“hue:LWB004:0017881003d0:6:color”

  • channel=“hue:LWB004:0017881003d0:6:brightness”

  • channel=“hue:LWB004:0017881003d0:6:color_temperature”

Not to hijack the question but I am working on Hue lights and had the same issue. As Markus_M suggested, added “brightness” to my item definition and things started working correctly.

Thanks @Markus_M , indeed this seems to work now. @royw51 glad that it works for you too :smile:.
I am testing this a bit and noticed that if you update the items file while OH2 is running some lamps do not pick up the new definition correctly. They don’t respond or other lams are switched on. Restarting OH2 does the trick. Now I need to test if all the buttons on basic UI are updated correctly…

Ok, today I did some more testing with the basic UI web interface. The hue lamps respond to the switches (on/off) but they are not updated when I use the Philips app. I created the file hue.cfg in services with the line: refresh=2000 and I can see in the logs that the states change, but not the switches. Any suggestions?

15-12-31 19:54:18.663 [INFO ] [smarthome.event.ItemStateEvent:43   ] - Hue_iris updated to 100
2015-12-31 19:54:18.670 [INFO ] [s.event.ItemStateChangedEvent :43   ] - Hue_iris_color changed from 307,85,24 to 307,85,100
2015-12-31 19:54:28.676 [DEBUG] [b.hue.handler.HueBridgeHandler:106  ] - Status update for Hue light 12 detected.
2015-12-31 19:54:28.680 [INFO ] [ome.event.ThingStatusInfoEvent:43   ] - 'hue:LLC010:0017881003d0:12' updated: ONLINE
2015-12-31 19:54:28.685 [INFO ] [smarthome.event.ItemStateEvent:43   ] - Hue_iris_color updated to 307,85,0
2015-12-31 19:54:28.691 [DEBUG] [s.c.internal.items.ItemUpdater:84   ] - Received update of a not accepted type (PercentType) for item Hue_iris
2015-12-31 19:54:28.693 [INFO ] [smarthome.event.ItemStateEvent:43   ] - Hue_iris updated to 0
2015-12-31 19:54:28.696 [INFO ] [s.event.ItemStateChangedEvent :43   ] - Hue_iris_color changed from 307,85,100 to 307,85,0

Are there any news on this topic?

Did anybody find anything else on this?

The brightness, color_temperature, and color all work fine… but I really want a simple on off switch as well.

Just use a Switch item defined for the color/brightness channel?

Me too.