# Hue item definition OpenHAB2

**URL:** <https://community.openhab.org/t/hue-item-definition-openhab2/5471>\
**Category:** Bindings\
**Tags:** hue\
**Created:** [December 29, 2015, 1:52pm UTC](https://community.openhab.org/t/hue-item-definition-openhab2/5471 "2015-12-29T13:52:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![eggn1n3](https://community.openhab.org/user_avatar/community.openhab.org/eggn1n3/32/71087_2.png) [@eggn1n3](https://community.openhab.org/u/eggn1n3)\
**Post date:** [December 29, 2015, 1:52pm UTC](https://community.openhab.org/t/hue-item-definition-openhab2/5471/1 "2015-12-29T13:52:19Z")

</div>

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?

Thanks.

---

<div class="post-metadata">

**Author:** ![Markus\_M](https://community.openhab.org/user_avatar/community.openhab.org/markus_m/32/1690_2.png) [@Markus\_M](https://community.openhab.org/u/Markus_M)\
**Post date:** [December 29, 2015, 2:38pm UTC](https://community.openhab.org/t/hue-item-definition-openhab2/5471/2 "2015-12-29T14:38:22Z")

</div>

Hi,

> [@eggn1n3](#):
>
> Switch Hue\_lamp1 “Lamp1” (gDownstairs) { channel=“hue:LWB004:0017881003d0:6” }

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”

---

<div class="post-metadata">

**Author:** ![royw51](https://community.openhab.org/letter_avatar_proxy/v4/letter/r/ee7513/32.png) [@royw51](https://community.openhab.org/u/royw51)\
**Post date:** [December 30, 2015, 3:47pm UTC](https://community.openhab.org/t/hue-item-definition-openhab2/5471/3 "2015-12-30T15:47:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![eggn1n3](https://community.openhab.org/user_avatar/community.openhab.org/eggn1n3/32/71087_2.png) [@eggn1n3](https://community.openhab.org/u/eggn1n3)\
**Post date:** [December 30, 2015, 6:20pm UTC](https://community.openhab.org/t/hue-item-definition-openhab2/5471/4 "2015-12-30T18:20:16Z")

</div>

Thanks @Markus_M , indeed this seems to work now. @royw51 glad that it works for you too 😄.  
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…

---

<div class="post-metadata">

**Author:** ![eggn1n3](https://community.openhab.org/user_avatar/community.openhab.org/eggn1n3/32/71087_2.png) [@eggn1n3](https://community.openhab.org/u/eggn1n3)\
**Post date:** [December 31, 2015, 6:57pm UTC](https://community.openhab.org/t/hue-item-definition-openhab2/5471/5 "2015-12-31T18:57:17Z")

</div>

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

```

---

<div class="post-metadata">

**Author:** ![habnefrage](https://community.openhab.org/user_avatar/community.openhab.org/habnefrage/32/71300_2.png) [@habnefrage](https://community.openhab.org/u/habnefrage)\
**Post date:** [March 29, 2016, 9:58pm UTC](https://community.openhab.org/t/hue-item-definition-openhab2/5471/6 "2016-03-29T21:58:34Z")

</div>

Are there any news on this topic?

---

<div class="post-metadata">

**Author:** ![Brady](https://community.openhab.org/letter_avatar_proxy/v4/letter/b/dec6dc/32.png) [@Brady](https://community.openhab.org/u/Brady)\
**Post date:** [May 28, 2016, 5:18pm UTC](https://community.openhab.org/t/hue-item-definition-openhab2/5471/7 "2016-05-28T17:18:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dominicdesu](https://community.openhab.org/user_avatar/community.openhab.org/dominicdesu/32/533_2.png) [@dominicdesu](https://community.openhab.org/u/dominicdesu)\
**Post date:** [May 28, 2016, 7:37pm UTC](https://community.openhab.org/t/hue-item-definition-openhab2/5471/8 "2016-05-28T19:37:41Z")

</div>

> [@Brady](#):
>
> dy find anything else on this?
> 
> The brightness, color\_temperature, and color all work fine… but I really want a simple on off switch as wel

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

---

<div class="post-metadata">

**Author:** ![rtvb](https://community.openhab.org/letter_avatar_proxy/v4/letter/r/7c8e57/32.png) [@rtvb](https://community.openhab.org/u/rtvb)\
**Post date:** [May 28, 2016, 9:20pm UTC](https://community.openhab.org/t/hue-item-definition-openhab2/5471/9 "2016-05-28T21:20:58Z")

</div>

Me too.

> [@Hue switch to keep settings](https://community.openhab.org/t/hue-switch-to-keep-settings/10870):
>
> This weekend I’ve spent some time testing OH2. The first thing I tried was to access my hue bridge and lamps. I noticed that the only usable channel is the Color channel. The 1.x bindings supported a switch item, color, brightness and temperature. This is very useful, since switch a lamp off and on, will have it remember the last settings (just like with the iOS app). How can I switch my hue lamps off without losing their settings? I currently run 1.8.2 so I have sufficient experience with man…
