I am trying to get a number of milight bulbs running, so far with some success …
Current problem:
- 1xiBox
- a few RGB+CCT spots
- org.openhab.binding.milight-2.5.0-SNAPSHOT.jar
Items:
Dimmer bathA "Bathroom all" {channel="milight:rgbwwLed:14fb9196:ledbrightness"}
Color bathA_color "Bathroom all color" {channel="milight:rgbwwLed:14fb9196:ledcolor"}
Dimmer bathA_temp "Bathroom all temp" {channel="milight:rgbwwLed:14fb9196:ledtemperature"}
Dimmer bathA_saturation "Bathroom all sat" {channel="milight:rgbwwLed:14fb9196:ledsaturation"}
I am trying to use them setting bathA_color, e.g. like this:
var HSBType color = HSBType.fromRGB(255,255,255);
sendCommand( bathA_color, color );
e.g. trying to switch from off state to white at full white which results in (events log):
2019-06-26 18:43:29.621 [ome.event.ItemCommandEvent] - Item 'bathA_color' received command 0,0,100
2019-06-26 18:43:29.622 [nt.ItemStatePredictedEvent] - bathA_color predicted to become 0,0,100
2019-06-26 18:43:29.628 [vent.ItemStateChangedEvent] - bathA_color changed from 0,0,0 to 0,0,100
2019-06-26 18:43:29.629 [vent.ItemStateChangedEvent] - bathA changed from 0 to 100
Looks good so far. However, if I have a look at my bulbs, they have some red component. Not always, possibly depending on what they had before(?).
So, what am I missing? Isn’t setting the color overriding all previous settings? And if not, what would I use then in order to set an arbitrary color just without knowing in what state the bulbs have been before?
Even worse, it seems, that sometimes the above sendcommand() does not switch on the lights. The sequence
var HSBType color = HSBType.fromRGB(255,255,255);
sendCommand( bathA_color, color );
# lights do *NOT* switch on, though log says color 0,0,100 is set
# some time passes by ... until user clicks a button
sendCommand( bahA, 0 );
# some time passes by ... until user clicks another button
sendCommand( bathA_color, color );
# lights are finally on!