I see the same issue with a hue LCT015 bulb.
I figured out how to reproduce it and how to fix it, but unfortunately no solution or workaround for fixing it in openhab.
The issue can be triggered by setting the color temperature channel. E.g. via paper UI or rule. When done in a rule, you need to wait a bit before setting a color for the same light. If it is done immediately (in the next line of code), the issue might not trigger.
An example.
- I tell Alexa to turn on the light
2019-07-10 18:40:08.665 [ome.event.ItemCommandEvent] - Item 'DeckenlichtSchlafzimmer_Color' received command ON
2019-07-10 18:40:08.676 [nt.ItemStatePredictedEvent] - DeckenlichtSchlafzimmer_Color predicted to become ON
2019-07-10 18:40:08.679 [vent.ItemStateChangedEvent] - DeckenlichtSchlafzimmer_Color changed from 29,63,0 to 29,63,100
- A rule I have kicks in that switches the light to the color 30,64,100 (warm white), whenever the light is turned on. Not relevant for the issue - it happens with or without this rule.
2019-07-10 18:40:08.680 [ome.event.ItemCommandEvent] - Item 'DeckenlichtSchlafzimmer_Color' received command 30,64,100
2019-07-10 18:40:08.684 [nt.ItemStatePredictedEvent] - DeckenlichtSchlafzimmer_Color predicted to become 30,64,100
2019-07-10 18:40:08.687 [vent.ItemStateChangedEvent] - DeckenlichtSchlafzimmer_Color changed from 29,63,100 to 30,64,100
- The hue bulb decides to change it´s color on it´s own. This is something that happens often but not always: The hue reduces H and S by 1. But I think I saw it once adding 7 to H as well, when I set the light to blue, so the reduction by 1 is maybe only the most common case with the light colors I use.
2019-07-10 18:40:16.894 [vent.ItemStateChangedEvent] - DeckenlichtSchlafzimmer_Color changed from 30,64,100 to 29,63,100
-
Anyway, the light is on with a warm white, now.
-
Let´s trigger the problem by setting the color temperature to 51 using Paper UI
2019-07-10 18:40:42.118 [ome.event.ItemCommandEvent] - Item 'DeckenlichtSchlafzimmer_ColorTemperature' received command 51
2019-07-10 18:40:42.124 [nt.ItemStatePredictedEvent] - DeckenlichtSchlafzimmer_ColorTemperature predicted to become 51
2019-07-10 18:40:42.126 [vent.ItemStateChangedEvent] - DeckenlichtSchlafzimmer_ColorTemperature changed from NULL to 51
2019-07-10 18:40:46.953 [vent.ItemStateChangedEvent] - DeckenlichtSchlafzimmer_Color changed from 29,63,100 to 48,41,100
- Now I tell Alexa to turn off the light.
2019-07-10 18:40:53.144 [ome.event.ItemCommandEvent] - Item 'DeckenlichtSchlafzimmer_Color' received command OFF
2019-07-10 18:40:53.151 [nt.ItemStatePredictedEvent] - DeckenlichtSchlafzimmer_Color predicted to become OFF
2019-07-10 18:40:53.154 [vent.ItemStateChangedEvent] - DeckenlichtSchlafzimmer_Color changed from 48,41,100 to 48,41,0
- I tell Alexa to turn the light on again.
2019-07-10 18:41:04.392 [ome.event.ItemCommandEvent] - Item 'DeckenlichtSchlafzimmer_Color' received command ON
2019-07-10 18:41:04.409 [nt.ItemStatePredictedEvent] - DeckenlichtSchlafzimmer_Color predicted to become ON
2019-07-10 18:41:04.411 [vent.ItemStateChangedEvent] - DeckenlichtSchlafzimmer_Color changed from 48,41,0 to 48,41,100
- Again, my rule kicks in to set the color to 30,64,100
2019-07-10 18:41:04.411 [ome.event.ItemCommandEvent] - Item 'DeckenlichtSchlafzimmer_Color' received command 30,64,100
2019-07-10 18:41:04.417 [nt.ItemStatePredictedEvent] - DeckenlichtSchlafzimmer_Color predicted to become 30,64,100
2019-07-10 18:41:04.421 [vent.ItemStateChangedEvent] - DeckenlichtSchlafzimmer_Color changed from 48,41,100 to 30,64,100
2019-07-10 18:41:06.984 [vent.ItemStateChangedEvent] - DeckenlichtSchlafzimmer_ColorTemperature changed from 51 to NULL
- The light is on again, but instead of a warm white, it is pink.
- In both cases, openhab says, it set the light to 30,64,100.
- The Hue app (on iOS) shows it clearly as a different color, matching the actual color of the light.
So the hue bridge definitely knows what color we actually have
- A side note: It seems the hue bulb (or the bridge) sets the color temperature channel to NULL, whenever you set a color directly. So the issue does not seem to be that the color temperature channel has a value that interferes.
The only fix I found so far is to use the Hue app (on iOS).
If I set a color using the Hue app (any color is fine), the problem goes away and openhab can set the proper color again.
Things I tried:
- Just to be sure the color temperature channel is not involved, I also set the color temperature value in my rule every time before I set the color. I tried 0 and 100. But all it did, was to cause the problem to appear, never to fix it.
- I restarted openhab while the problem appeared. No effect. The problem remained.
- I checked if other colors are off as well, not only 30,64,100. And yes, they are.
So far I ran out of ideas, except for implementing a dirty workaround, which is to force the problem and to adjust my color values to correct for the error.