Openhab2 milight binding

hi all,

I have just updated to the latest openhab2 snapshot, which comes with a native milight binding. Unfortunately, I could not find any documentation on what works and what doesn’t. Looking at the code I can see that there is ledcolor, ledbrightness and ledtemperature are available. But for example I could not make the on\off function work (tried something like this: Switch Light_LR_Bulb5 “Label” {channel=“milight:rgbLed:ACCF2346858C:9”} )

any help would be appreciated.

I had a similar issue when upgrading. I experimented with a few ideas using rules. For instance, setting the brightness to a specific value with ledbrightness will not turn the bulb on if it is already off. However, setting the colour to white with a specific brightness will, which gives you the ability to make an on off switch in rules:

Set up a dummy switch:

Switch Light_LR_Bulb5 “OnOff”

So this is not linked to the milight.

Then set up a Color picker that is linked:

Color Light_LR_Bulb5C “Label” {channel=“milight:rgbLed:ACCF2346858C:9:ledcolor”}

Then you can use a rule to set the colour to white and the brightness to 100% when the dummy switch is turned on:

rule "light switch"
Item Light_LR_Bulb5 received command ON
sendCommand(Light_LR_Bulb5C, new HSBType (new DecimalType(0),new PercentType(0),new PercentType(100)))

And the same with percenttype 0 for off.

This works for me, although it’s odd that there is no obvious method of simply powering on or off.