Color Light { channel="hue:LCT001:1:bulb1:color" }
Dimmer Light_ColorTemp { channel="hue:LCT001:1:bulb1:color_temperature" }
Two questions about this:
What does the “1” in the item’s channel definition stand for? Seems to be the lightId? But isn’t this already defined in the things file?
Why do I need to mention the think type (LCT001) and the thing id (bulb1) in the channel definition? isn’t it clear from the things file that thing bulb1 is of type LCT001?
These make up the full address of the THING, you can’t use just one section, it much be complete.
hue:LCT001:1:bulb1
Think of it as you would your residential address; No. 35 for example is quite useless if I don’t know what street, what city and what country your house is in.
In the example you are basically linking your item Light_ColorTemp to this bulb on the color_temperature channel.
Thanks for your explanation. I also found out that “1” is not the lightId but the bridgeId.
So the channel seems to have this format: binding:thingType:bridge:thing:channel.
But then again, when I look at the example above: hue:LWB004:0017881003d0:6:color this would mean that “6” is the name of the thing (defined in the .things file). Probably that is what confused me.
This channel supports adjusting the brightness value. Note that this is not available, if the color channel is supported.
That is quite interesting? This hasn’t been the case in OH1 but I can in the LCT001.xml definition, that channel “brightness” is not listed.
Nevertheless, my lamp LCT001 works with both brightness and color channel, using these items:
Dimmer COLampBrightness {channel="hue:LCT001:00178812c614:COLamp:brightness"}
Color COLampColor {channel="hue:LCT001:00178812c614:COLamp:color"}
and logs: 2016-05-27 18:34:02.263 [INFO ] [home.event.ItemChannelLinkAddedEvent] - Link 'COLampBrightness-hue:LCT001:00178812c614:COLamp:brightness' has been added.
I assume this is possible because the code of the hue binding does not check whether the brightness channel exists on this thing type. As the handler implementation is the same for all thing types, it knows how to deal with brightness, so it simply does it… Kind of “useful bug”