Hue bulb changing color wrongly when brightness is 0

Hi,

OH4.0.4
Hue binding
Hue bridge software v1.62.1962154010
bulb: Hue color lamp LCA006

Thing:

UID: hue:device:EG-Wohnzimmer-HueBridge:EG-Wohnzimmer-Stehlampe
label: EG Wohnzimmer Stehlampe
thingTypeUID: hue:device
configuration:
  resourceId: xxx
bridgeUID: hue:bridge-api2:EG-Wohnzimmer-HueBridge

I have linked a color item to the color channel.
If I send a color command including brightness = 0, then the bulb will always change to a purple color, whats also visible in the log:

2024-02-18 18:06:02.011 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' received command 39.129,49.91400,0
2024-02-18 18:06:02.013 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' predicted to become 39.129,49.91400,0
2024-02-18 18:06:02.016 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 39.129,49.91400,81.03 to 39.129,49.91400,0
2024-02-18 18:06:02.174 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_AnAus' changed from ON to OFF
2024-02-18 18:06:02.180 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Helligkeit' changed from 81.03 to 0.4000
2024-02-18 18:06:02.184 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Colortemperature' changed from 56.77 to UNDEF
2024-02-18 18:06:02.188 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 39.129,49.91400,0 to 253.553,100,0

The first 4 lines from the log are as expected, but starting line 5 (brightness changing from 81.03 to 0.4000) its unexpected (it should change to 0, but not to 0.4).
The last line of the log shows that the bulb is not changing to “39.129,49.91400,0” as per the command, but to “253.553,100,0”

Any ideas on how to prevent this?

I cannot just send state OFF, as my use case is different:
The door of the fridge is broken and will not always automatically close. Therefore when the door of the fridge is open for a longer time, I want to activate red light (I know, I could fix the door instead :slight_smile: ).

My rule is working in general and doing the following:

  1. storing current color information within cache
  2. starting a timer, once the door is open for specific duration
  3. changing color to red
  4. once door is closed restoring previous color from #1

The rule is working fine in general, especially if the bulb was ON at the beginning. Restoring color state with brightness > 0 is working fine. However if the bulb was OFF and I want to restore previous color state with an color including brightness = 0, I receive the issue above.

No. All lamps have a minimun dimming level. You can see that in the lamp thing properties in Main UI. You cannot have a lamp being on at a brightness below that minimum dimming level.

Can you please turn on log:set TRACE on the binding, so we can see the command being sent, and the respective state change notification?

Thanks, I have missed the dimmingRange property. It’s 0.2% - 100% for my light. However when the light is off, brightness is also at 0%, therefor wondering how OFF state will work together with the dimmingRange? :thinking:

Thats the log incl trace when sending the command:

Full log

==> /var/log/openhab/openhab.log <==
2024-02-18 21:57:15.497 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> handleCommand() put resource id:311a715a-e54e-4c1b-9114-3e8d4a416b1d, type:light
2024-02-18 21:57:15.501 [DEBUG] [.internal.handler.Clip2BridgeHandler] - putResource() id:311a715a-e54e-4c1b-9114-3e8d4a416b1d, type:light
2024-02-18 21:57:15.505 [TRACE] [.hue.internal.connection.Clip2Bridge] - PUT https://xxx/clip/v2/resource/light/311a715a-e54e-4c1b-9114-3e8d4a416b1d HTTP/2 >> {"type":"light","id":"311a715a-e54e-4c1b-9114-3e8d4a416b1d","on":{"on":false},"dimming":{"brightness":0.2},"color":{"xy":{"x":0.1532,"y":0.0474}}}
2024-02-18 21:57:15.625 [TRACE] [.hue.internal.connection.Clip2Bridge] - HTTP/2 200 (Content-Type: application/json) << {"data":[{"rid":"311a715a-e54e-4c1b-9114-3e8d4a416b1d","rtype":"light"}],"errors":[]}
2024-02-18 21:57:15.656 [TRACE] [.hue.internal.connection.Clip2Bridge] - onEventData() data:[{"creationtime":"2024-02-18T20:57:15Z","data":[{"id":"311a715a-e54e-4c1b-9114-3e8d4a416b1d","id_v1":"/lights/3","on":{"on":false},"owner":{"rid":"0d1d1f4b-fef2-4171-9e26-020c15ce3555","rtype":"device"},"type":"light"},{"dimming":{"brightness":0.4},"id":"311a715a-e54e-4c1b-9114-3e8d4a416b1d","id_v1":"/lights/3","owner":{"rid":"0d1d1f4b-fef2-4171-9e26-020c15ce3555","rtype":"device"},"type":"light"},{"color":{"xy":{"x":0.1532,"y":0.0474}},"color_temperature":{"mirek":null,"mirek_valid":false},"id":"311a715a-e54e-4c1b-9114-3e8d4a416b1d","id_v1":"/lights/3","owner":{"rid":"0d1d1f4b-fef2-4171-9e26-020c15ce3555","rtype":"device"},"type":"light"}],"id":"b41cf029-246d-4708-b1f9-43ac404319fc","type":"update"}]
2024-02-18 21:57:15.662 [DEBUG] [.internal.handler.Clip2BridgeHandler] - onResourcesEventTask() resource count 3
2024-02-18 21:57:15.664 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateChannels() from resource id:311a715a-e54e-4c1b-9114-3e8d4a416b1d, type:light
2024-02-18 21:57:15.668 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'color-temperature' update with '56.77' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.677 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'color-temperature-abs' update with '2857.142857142857142857142857142857 K' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.684 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'color' update with '39.129,49.91400,0' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.691 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'color-xy-only' update with '39.129,49.91400,100' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.695 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'effect' update with 'NO_EFFECT' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.701 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'dimming-only' update with '79.84' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.706 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'on-off-only' update with 'OFF' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.711 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'alert' update with 'NO_ACTION' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.719 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'last-updated' update with '2024-02-18T21:57:15.717959022+0100' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.724 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> onResource() consumed resource id:311a715a-e54e-4c1b-9114-3e8d4a416b1d, type:light
2024-02-18 21:57:15.727 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateChannels() from resource id:311a715a-e54e-4c1b-9114-3e8d4a416b1d, type:light
2024-02-18 21:57:15.730 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'color-temperature' update with '56.77' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.739 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'color-temperature-abs' update with '2857.142857142857142857142857142857 K' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.743 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'color' update with '39.129,49.91400,0' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.750 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'color-xy-only' update with '39.129,49.91400,100' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.753 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'effect' update with 'NO_EFFECT' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.758 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'dimming-only' update with '0.4000' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.764 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'on-off-only' update with 'OFF' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.770 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'alert' update with 'NO_ACTION' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.778 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'last-updated' update with '2024-02-18T21:57:15.775176980+0100' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.781 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> onResource() consumed resource id:311a715a-e54e-4c1b-9114-3e8d4a416b1d, type:light
2024-02-18 21:57:15.783 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateChannels() from resource id:311a715a-e54e-4c1b-9114-3e8d4a416b1d, type:light
2024-02-18 21:57:15.786 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'color-temperature' update with 'UNDEF' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.790 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'color-temperature-abs' update with 'UNDEF' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.794 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'color' update with '253.553,100,0' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.799 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'color-xy-only' update with '253.553,100,100' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.802 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'effect' update with 'NO_EFFECT' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.805 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'dimming-only' update with '0.4000' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.810 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'on-off-only' update with 'OFF' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.813 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'alert' update with 'NO_ACTION' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.817 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> updateState() 'last-updated' update with '2024-02-18T21:57:15.816361732+0100' (fullUpdate:false, isDefined:true)
2024-02-18 21:57:15.819 [DEBUG] [e.internal.handler.Clip2ThingHandler] - 0d1d1f4b-fef2-4171-9e26-020c15ce3555 -> onResource() consumed resource id:311a715a-e54e-4c1b-9114-3e8d4a416b1d, type:light
==> /var/log/openhab/events.log <==
2024-02-18 21:57:15.444 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' received command 39.129,49.91400,0
2024-02-18 21:57:15.450 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' predicted to become 39.129,49.91400,0
2024-02-18 21:57:15.456 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 39.129,49.91400,79.84 to 39.129,49.91400,0
2024-02-18 21:57:15.719 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_AnAus' changed from ON to OFF
2024-02-18 21:57:15.771 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Helligkeit' changed from 79.84 to 0.4000
2024-02-18 21:57:15.793 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Colortemperature' changed from 56.77 to UNDEF
2024-02-18 21:57:15.801 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 39.129,49.91400,0 to 253.553,100,0
2024-02-18 21:57:48.995 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 253.553,100,0 to 253.553,100,0.4000

It seems like the wrong color is already in the PUT request, as the hsb 39.129,49.91400,0 from command should be a warm withe (of cause with 0% brightness), but the corresponding "color":{"xy":{"x":0.1532,"y":0.0474}} from the put request is a dark blue.

Any other tip how I can best read current state of the light bulb, changing it temporarily and then restoring current state, if the color channel is not supporting 0% birghtness?

In the Hue system there are three state variables which are fully orthogonal (i.e fully independent of each other) – namely on/off, dimming, and colorxy. Plus one additional state variable colorTemperature which is a value on a locus in the colorXy space. Principally you can set each of those state variables independently. In OH we have respective (advanced) channels onOffOnly, dimmingOnly, and colorXyOnly which allow you to specifically and individually command and monitor those orthogonal state variables. In OH there is also the colorXy channel which represents an HSB value and which is therefore a non orthogonal “munging” of hue and saturation (HS <=> colorXy), and brightness (B <=> dimming) resp. onOff. This latter channel is supposed to make it easier for users to command the lights via one channel. But if you require more precision control (which apparently you do) then you should use the xxxOnly channels instead.

Many thanks for the log. I will analyse it tomorrow.

1 Like

Thanks a lot for these detailed explanations.

I will also test later, if the colorxy only channel show similar behavior or not and let you know.

I think using color-xy only and on/off only channel instead of the combined color channel will hopefully solve my case.

Yes I get the same feeling. The OH binding converts HSB values to XY values based on a formula published by Philips. Each lamp has a range of color capabilities which is delineated by a triangle of points within the XY space (this is called the color gamut of the lamp). The HSB to XY conversion will in particular produce odd results when the theoretical calculated XY point lies close to the edges of, or outside, the color gamut triangle of the respective lamp. My hypothesis is that this is what is happening in your case. I need to do some manual calculations to check this hypothesis. => Can you please tell me the colorGamut property reported in the thing properties for your lamp?

Side comment, there were a lot of improvements and fixes in 4.1, so you might want to upgrade.

@laursen I did also wonder if PR 3849 might have an impact => WDYT?

I this PR we only add two conversion methodes for convert 3 or 4 bytes color array to HSB and HSB convert back to 3 or 4 byte when you need the withe part seperatly.

Should not have an impact on existing code.

Greets Marco

1 Like

@Matze0211 to test my hypothesis about the colorGamut, can you please try step-wise reducing the saturation, e.g. with the following HSB values, … I am expecting that at some point going down the saturation scale, the theoretical colour point will transition from outside the colorGamut of your lamp to inside, and therefore the PUT xy value should “flip” from a blueish value to a yellowish value.

  • HSB(39, 48, 50)
  • HSB(39, 47, 50)
  • HSB(39, 40, 50)

EDIT: I would also like to see the TRACE log from your lamp that shows its color gamut being downloaded. Can you please disable the lamp thing, turn on trace, and reenable it? In the log there should be an entry containing the text ‘gamut’ in it…

Hi @AndrewFG ,

thanks for looking into this.

1st you will find here my thing properties, including the colorGamut

resourceId:
productCertified: true
hardwareVersion: 100b-114
colorGamut: (0.692,0.308) (0.170,0.700) (0.153,0.048)
dimmingRange: 0.2 % .. 100 %
resourceName: Stehlampe Wohnzimmer
modelId: LCA006
productArchetype: Sultan bulb
resourceType: Device
colorTemperatureRange: 6536 K .. 2000 K
resourceArchetype: Floor shade
productName: Hue color lamp
firmwareVersion: 1.104.2
vendor: Signify Netherlands B.V.

2nd, I did the test and changed from color = 39,48,50 slowly to color = 39,40,50 and did not see any specific issue.
Its only switching if I change from brightness > 0 to brightness = 0 within the color command

2024-02-19 18:01:49.701 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' received command 39,48,50
2024-02-19 18:01:49.703 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' predicted to become 39,48,50
2024-02-19 18:01:49.710 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 38.996,45.59400,50.20 to 39,48,50
2024-02-19 18:01:49.846 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Colortemperature' changed from UNDEF to 51.30
2024-02-19 18:01:49.852 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 39,48,50 to 38.996,45.59400,50.20

2024-02-19 18:02:25.614 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' received command 39,47,50
2024-02-19 18:02:25.617 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' predicted to become 39,47,50
2024-02-19 18:02:25.619 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 38.996,45.59400,50.20 to 39,47,50
2024-02-19 18:02:25.745 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Colortemperature' changed from 51.30 to UNDEF
2024-02-19 18:02:25.749 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 39,47,50 to 38.984,44.65500,50.20

2024-02-19 18:02:33.508 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' received command 39,46,50
2024-02-19 18:02:33.510 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' predicted to become 39,46,50
2024-02-19 18:02:33.513 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 38.984,44.65500,50.20 to 39,46,50
2024-02-19 18:02:33.642 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 39,46,50 to 38.996,43.69200,50.20

2024-02-19 18:02:38.512 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' received command 39,45,50
2024-02-19 18:02:38.517 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' predicted to become 39,45,50
2024-02-19 18:02:38.523 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 38.996,43.69200,50.20 to 39,45,50
2024-02-19 18:02:38.675 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 39,45,50 to 39.000,42.75900,50.20

2024-02-19 18:02:44.239 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' received command 39,44,50
2024-02-19 18:02:44.242 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' predicted to become 39,44,50
2024-02-19 18:02:44.246 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 39.000,42.75900,50.20 to 39,44,50
2024-02-19 18:02:44.369 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 39,44,50 to 38.992,41.78200,50.20

2024-02-19 18:02:49.203 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' received command 39,43,50
2024-02-19 18:02:49.208 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' predicted to become 39,43,50
2024-02-19 18:02:49.219 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 38.992,41.78200,50.20 to 39,43,50
2024-02-19 18:02:49.362 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 39,43,50 to 39.011,40.85300,50.20

2024-02-19 18:02:54.815 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' received command 39,42,50
2024-02-19 18:02:54.899 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' predicted to become 39,42,50
2024-02-19 18:02:54.900 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 39.011,40.85300,50.20 to 39,42,50
2024-02-19 18:02:54.951 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 39,42,50 to 39.002,39.90600,50.20

2024-02-19 18:02:58.478 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' received command 39,41,50
2024-02-19 18:02:58.481 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' predicted to become 39,41,50
2024-02-19 18:02:58.485 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 39.002,39.90600,50.20 to 39,41,50
2024-02-19 18:02:58.605 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 39,41,50 to 39.000,38.9600,50.20

2024-02-19 18:03:02.358 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' received command 39,40,50
2024-02-19 18:03:02.359 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' predicted to become 39,40,50
2024-02-19 18:03:02.362 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 39.000,38.9600,50.20 to 39,40,50
2024-02-19 18:03:02.474 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 39,40,50 to 38.967,37.99700,50.20

2024-02-19 18:07:38.657 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' received command 39,40,1
2024-02-19 18:07:38.660 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' predicted to become 39,40,1
2024-02-19 18:07:38.664 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 38.967,37.99700,50.20 to 39,40,1
2024-02-19 18:07:38.807 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 39,40,1 to 38.967,37.99700,1.190
2024-02-19 18:07:38.813 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Helligkeit' changed from 50.20 to 1.190
2024-02-19 18:07:38.823 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 38.967,37.99700,1.190 to 40.944,20.21700,1.190

2024-02-19 18:07:43.256 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' received command 39,40,0
2024-02-19 18:07:43.258 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' predicted to become 39,40,0
2024-02-19 18:07:43.263 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 40.944,20.21700,1.190 to 39,40,0
2024-02-19 18:07:43.413 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 39,40,0 to 40.944,20.21700,0
2024-02-19 18:07:43.417 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_AnAus' changed from ON to OFF
2024-02-19 18:07:43.431 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Helligkeit' changed from 1.190 to 0.4000
2024-02-19 18:07:43.434 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 40.944,20.21700,0 to 253.553,100,0
2024-02-19 18:07:44.431 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Helligkeit' changed from 0.4000 to 0
2024-02-19 18:07:46.348 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Helligkeit' changed from 0 to 0.4000

If I use the colorXyOnly channel its working fine.
The only “downside” is, that my hope was with the full color channel I can easily backup and restore the current state of the light bulb.
However it seems I need to backup & restore colorXY & on/off state separately within my rule.

1 Like

Ok. Many thanks. This indicates that my hypothesis about color gamut was wrong.

Could you also show me the TRACE log for those tests? In particular the last three (39,40,50) / (39,40,1) / (39,40,0)


==> /var/log/openhab/openhab.log <==
2024-02-19 18:25:36.867 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> handleCommand() put resource id:xxx, type:light
2024-02-19 18:25:36.871 [DEBUG] [.internal.handler.Clip2BridgeHandler] - putResource() id:xxx, type:light
2024-02-19 18:25:36.874 [TRACE] [.hue.internal.connection.Clip2Bridge] - PUT https://xxx/clip/v2/resource/light/xxx HTTP/2 >> {"type":"light","id":"xxx","on":{"on":true},"dimming":{"brightness":50.0},"color":{"xy":{"x":0.4147,"y":0.3908}}}
==> /var/log/openhab/events.log <==
2024-02-19 18:25:36.835 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' received command 39,40,50
2024-02-19 18:25:36.840 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' predicted to become 39,40,50
2024-02-19 18:25:36.848 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 39.068,49.87100,79.84 to 39,40,50
==> /var/log/openhab/openhab.log <==
2024-02-19 18:25:36.959 [TRACE] [.hue.internal.connection.Clip2Bridge] - HTTP/2 200 (Content-Type: application/json) << {"data":[{"rid":"xxx","rtype":"light"}],"errors":[]}
2024-02-19 18:25:36.983 [TRACE] [.hue.internal.connection.Clip2Bridge] - onEventData() data:[{"creationtime":"2024-02-19T17:25:36Z","data":[{"dimming":{"brightness":50.2},"id":"xxx","id_v1":"/lights/3","owner":{"rid":"xxx","rtype":"device"},"type":"light"},{"color":{"xy":{"x":0.4147,"y":0.3908}},"color_temperature":{"mirek":null,"mirek_valid":false},"id":"xxx","id_v1":"/lights/3","owner":{"rid":"xxx","rtype":"device"},"type":"light"}],"id":"37106761-98e2-4fc9-874a-6ce43c5c3a0f","type":"update"}]
2024-02-19 18:25:36.988 [DEBUG] [.internal.handler.Clip2BridgeHandler] - onResourcesEventTask() resource count 2
2024-02-19 18:25:36.990 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateChannels() from resource id:xxx, type:light
2024-02-19 18:25:36.993 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-temperature' update with '56.77' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:36.999 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-temperature-abs' update with '2857.142857142857142857142857142857 K' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:37.003 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color' update with '39.068,49.87100,50.20' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:39.998 [TRACE] [.hue.internal.connection.Clip2Bridge] - onEventData() data:[{"creationtime":"2024-02-19T17:25:36Z","data":[{"dimming":{"brightness":65.02000000000001},"id":"1d44eebc-15e1-4c6a-9801-b0516c194311","id_v1":"/groups/0","owner":{"rid":"675e35c8-9633-42a0-ab61-31fec33bb225","rtype":"bridge_home"},"type":"grouped_light"},{"dimming":{"brightness":65.02000000000001},"id":"6f687ae6-183d-4523-a2fd-9685bd61073a","id_v1":"/groups/2","owner":{"rid":"2e91e911-bf8a-4e99-92c3-a6b9ff34dfe0","rtype":"room"},"type":"grouped_light"},{"dimming":{"brightness":65.02000000000001},"id":"acfda9c7-658f-4bd7-8ce0-7ea440f57c4c","id_v1":"/groups/1","owner":{"rid":"afe31e22-7273-47f9-9f90-9d4bc3c796fe","rtype":"zone"},"type":"grouped_light"}],"id":"bc10a90b-77b6-4cf4-82f9-c64250e9a6a5","type":"update"}]
2024-02-19 18:25:39.999 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-xy-only' update with '39.068,49.87100,100' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:40.085 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'effect' update with 'NO_EFFECT' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:40.088 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'dimming-only' update with '50.20' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:40.090 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'on-off-only' update with 'ON' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:40.094 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'alert' update with 'NO_ACTION' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:40.096 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'last-updated' update with '2024-02-19T18:25:40.096440169+0100' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:40.098 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> onResource() consumed resource id:xxx, type:light
2024-02-19 18:25:40.101 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateChannels() from resource id:xxx, type:light
2024-02-19 18:25:40.101 [DEBUG] [.internal.handler.Clip2BridgeHandler] - onResourcesEventTask() resource count 3
2024-02-19 18:25:40.104 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-temperature' update with 'UNDEF' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:40.106 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-temperature-abs' update with 'UNDEF' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:40.109 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color' update with '38.967,37.99700,50.20' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:40.111 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-xy-only' update with '38.967,37.99700,100' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:40.114 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'effect' update with 'NO_EFFECT' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:40.117 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'dimming-only' update with '50.20' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:40.119 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'on-off-only' update with 'ON' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:40.121 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'alert' update with 'NO_ACTION' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:40.123 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'last-updated' update with '2024-02-19T18:25:40.122765716+0100' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:40.124 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> onResource() consumed resource id:xxx, type:light
==> /var/log/openhab/events.log <==
2024-02-19 18:25:40.004 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 39,40,50 to 39.068,49.87100,50.20
2024-02-19 18:25:40.094 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Helligkeit' changed from 79.84 to 50.20
2024-02-19 18:25:40.108 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Colortemperature' changed from 56.77 to UNDEF
2024-02-19 18:25:40.113 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 39.068,49.87100,50.20 to 38.967,37.99700,50.20
2024-02-19 18:25:40.116 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Color_XY_Only' changed from 39.068,49.87100,100 to 38.967,37.99700,100
==> /var/log/openhab/openhab.log <==
2024-02-19 18:25:43.093 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> handleCommand() put resource id:xxx, type:light
2024-02-19 18:25:43.095 [DEBUG] [.internal.handler.Clip2BridgeHandler] - putResource() id:xxx, type:light
2024-02-19 18:25:43.097 [TRACE] [.hue.internal.connection.Clip2Bridge] - PUT https://xxx/clip/v2/resource/light/xxx HTTP/2 >> {"type":"light","id":"xxx","on":{"on":true},"dimming":{"brightness":1.0},"color":{"xy":{"x":0.3672,"y":0.3643}}}
2024-02-19 18:25:43.175 [TRACE] [.hue.internal.connection.Clip2Bridge] - HTTP/2 200 (Content-Type: application/json) << {"data":[{"rid":"xxx","rtype":"light"}],"errors":[]}
2024-02-19 18:25:43.202 [TRACE] [.hue.internal.connection.Clip2Bridge] - onEventData() data:[{"creationtime":"2024-02-19T17:25:43Z","data":[{"dimming":{"brightness":1.19},"id":"xxx","id_v1":"/lights/3","owner":{"rid":"xxx","rtype":"device"},"type":"light"},{"color":{"xy":{"x":0.3672,"y":0.3643}},"color_temperature":{"mirek":null,"mirek_valid":false},"id":"xxx","id_v1":"/lights/3","owner":{"rid":"xxx","rtype":"device"},"type":"light"}],"id":"9bc1e9d4-ef39-45dc-b134-cdbd4e6d726a","type":"update"}]
2024-02-19 18:25:43.204 [DEBUG] [.internal.handler.Clip2BridgeHandler] - onResourcesEventTask() resource count 2
2024-02-19 18:25:43.205 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateChannels() from resource id:xxx, type:light
2024-02-19 18:25:43.207 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-temperature' update with 'UNDEF' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:43.209 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-temperature-abs' update with 'UNDEF' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:43.211 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color' update with '38.967,37.99700,1.190' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:43.213 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-xy-only' update with '38.967,37.99700,100' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:43.215 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'effect' update with 'NO_EFFECT' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:43.218 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'dimming-only' update with '1.190' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:43.220 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'on-off-only' update with 'ON' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:43.222 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'alert' update with 'NO_ACTION' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:43.224 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'last-updated' update with '2024-02-19T18:25:43.223829542+0100' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:43.225 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> onResource() consumed resource id:xxx, type:light
2024-02-19 18:25:43.227 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateChannels() from resource id:xxx, type:light
2024-02-19 18:25:43.228 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-temperature' update with 'UNDEF' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:43.230 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-temperature-abs' update with 'UNDEF' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:43.232 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color' update with '40.944,20.21700,1.190' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:43.234 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-xy-only' update with '40.944,20.21700,100' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:43.236 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'effect' update with 'NO_EFFECT' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:43.238 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'dimming-only' update with '1.190' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:43.241 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'on-off-only' update with 'ON' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:43.243 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'alert' update with 'NO_ACTION' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:43.245 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'last-updated' update with '2024-02-19T18:25:43.244909042+0100' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:43.246 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> onResource() consumed resource id:xxx, type:light
==> /var/log/openhab/events.log <==
2024-02-19 18:25:43.072 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' received command 39,40,1
2024-02-19 18:25:43.075 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' predicted to become 39,40,1
2024-02-19 18:25:43.080 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 38.967,37.99700,50.20 to 39,40,1
2024-02-19 18:25:43.215 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 39,40,1 to 38.967,37.99700,1.190
2024-02-19 18:25:43.223 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Helligkeit' changed from 50.20 to 1.190
2024-02-19 18:25:43.237 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 38.967,37.99700,1.190 to 40.944,20.21700,1.190
2024-02-19 18:25:43.242 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Color_XY_Only' changed from 38.967,37.99700,100 to 40.944,20.21700,100
==> /var/log/openhab/openhab.log <==
2024-02-19 18:25:44.214 [TRACE] [.hue.internal.connection.Clip2Bridge] - onEventData() data:[{"creationtime":"2024-02-19T17:25:43Z","data":[{"dimming":{"brightness":40.515},"id":"1d44eebc-15e1-4c6a-9801-b0516c194311","id_v1":"/groups/0","owner":{"rid":"675e35c8-9633-42a0-ab61-31fec33bb225","rtype":"bridge_home"},"type":"grouped_light"},{"dimming":{"brightness":40.515},"id":"6f687ae6-183d-4523-a2fd-9685bd61073a","id_v1":"/groups/2","owner":{"rid":"2e91e911-bf8a-4e99-92c3-a6b9ff34dfe0","rtype":"room"},"type":"grouped_light"},{"dimming":{"brightness":40.515},"id":"acfda9c7-658f-4bd7-8ce0-7ea440f57c4c","id_v1":"/groups/1","owner":{"rid":"afe31e22-7273-47f9-9f90-9d4bc3c796fe","rtype":"zone"},"type":"grouped_light"}],"id":"68a27efd-efe9-4236-8b53-30674908816c","type":"update"}]
2024-02-19 18:25:44.216 [DEBUG] [.internal.handler.Clip2BridgeHandler] - onResourcesEventTask() resource count 3
2024-02-19 18:25:46.389 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> handleCommand() put resource id:xxx, type:light
2024-02-19 18:25:46.390 [DEBUG] [.internal.handler.Clip2BridgeHandler] - putResource() id:xxx, type:light
2024-02-19 18:25:46.392 [TRACE] [.hue.internal.connection.Clip2Bridge] - PUT https://xxx/clip/v2/resource/light/xxx HTTP/2 >> {"type":"light","id":"xxx","on":{"on":false},"dimming":{"brightness":0.2},"color":{"xy":{"x":0.1532,"y":0.0474}}}
2024-02-19 18:25:46.475 [TRACE] [.hue.internal.connection.Clip2Bridge] - HTTP/2 200 (Content-Type: application/json) << {"data":[{"rid":"xxx","rtype":"light"}],"errors":[]}
2024-02-19 18:25:46.507 [TRACE] [.hue.internal.connection.Clip2Bridge] - onEventData() data:[{"creationtime":"2024-02-19T17:25:46Z","data":[{"id":"xxx","id_v1":"/lights/3","on":{"on":false},"owner":{"rid":"xxx","rtype":"device"},"type":"light"},{"dimming":{"brightness":0.4},"id":"xxx","id_v1":"/lights/3","owner":{"rid":"xxx","rtype":"device"},"type":"light"},{"color":{"xy":{"x":0.1532,"y":0.0474}},"color_temperature":{"mirek":null,"mirek_valid":false},"id":"xxx","id_v1":"/lights/3","owner":{"rid":"xxx","rtype":"device"},"type":"light"}],"id":"0e946104-5e37-40a6-8f3c-1adaf463f177","type":"update"}]
2024-02-19 18:25:46.509 [DEBUG] [.internal.handler.Clip2BridgeHandler] - onResourcesEventTask() resource count 3
2024-02-19 18:25:46.510 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateChannels() from resource id:xxx, type:light
2024-02-19 18:25:46.512 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-temperature' update with 'UNDEF' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.514 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-temperature-abs' update with 'UNDEF' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.516 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color' update with '40.944,20.21700,0' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.518 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-xy-only' update with '40.944,20.21700,100' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.520 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'effect' update with 'NO_EFFECT' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.523 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'dimming-only' update with '1.190' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.525 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'on-off-only' update with 'OFF' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.527 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'alert' update with 'NO_ACTION' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.529 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'last-updated' update with '2024-02-19T18:25:46.528770470+0100' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.530 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> onResource() consumed resource id:xxx, type:light
2024-02-19 18:25:46.532 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateChannels() from resource id:xxx, type:light
2024-02-19 18:25:46.533 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-temperature' update with 'UNDEF' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.535 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-temperature-abs' update with 'UNDEF' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.537 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color' update with '40.944,20.21700,0' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.540 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-xy-only' update with '40.944,20.21700,100' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.542 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'effect' update with 'NO_EFFECT' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.544 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'dimming-only' update with '0.4000' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.546 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'on-off-only' update with 'OFF' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.549 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'alert' update with 'NO_ACTION' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.551 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'last-updated' update with '2024-02-19T18:25:46.550962982+0100' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.553 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> onResource() consumed resource id:xxx, type:light
2024-02-19 18:25:46.554 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateChannels() from resource id:xxx, type:light
2024-02-19 18:25:46.555 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-temperature' update with 'UNDEF' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.557 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-temperature-abs' update with 'UNDEF' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.559 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color' update with '253.553,100,0' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.561 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-xy-only' update with '253.553,100,100' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.564 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'effect' update with 'NO_EFFECT' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.566 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'dimming-only' update with '0.4000' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.569 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'on-off-only' update with 'OFF' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.571 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'alert' update with 'NO_ACTION' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.573 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'last-updated' update with '2024-02-19T18:25:46.572953516+0100' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:46.575 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> onResource() consumed resource id:xxx, type:light
==> /var/log/openhab/events.log <==
2024-02-19 18:25:46.371 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' received command 39,40,0
2024-02-19 18:25:46.374 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' predicted to become 39,40,0
2024-02-19 18:25:46.377 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 40.944,20.21700,1.190 to 39,40,0
2024-02-19 18:25:46.522 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 39,40,0 to 40.944,20.21700,0
2024-02-19 18:25:46.531 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_AnAus' changed from ON to OFF
2024-02-19 18:25:46.549 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Helligkeit' changed from 1.190 to 0.4000
2024-02-19 18:25:46.565 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Farbe' changed from 40.944,20.21700,0 to 253.553,100,0
2024-02-19 18:25:46.569 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Color_XY_Only' changed from 40.944,20.21700,100 to 253.553,100,100
==> /var/log/openhab/openhab.log <==
2024-02-19 18:25:47.519 [TRACE] [.hue.internal.connection.Clip2Bridge] - onEventData() data:[{"creationtime":"2024-02-19T17:25:46Z","data":[{"dimming":{"brightness":79.84},"id":"1d44eebc-15e1-4c6a-9801-b0516c194311","id_v1":"/groups/0","owner":{"rid":"675e35c8-9633-42a0-ab61-31fec33bb225","rtype":"bridge_home"},"type":"grouped_light"},{"dimming":{"brightness":79.84},"id":"6f687ae6-183d-4523-a2fd-9685bd61073a","id_v1":"/groups/2","owner":{"rid":"2e91e911-bf8a-4e99-92c3-a6b9ff34dfe0","rtype":"room"},"type":"grouped_light"},{"dimming":{"brightness":79.84},"id":"acfda9c7-658f-4bd7-8ce0-7ea440f57c4c","id_v1":"/groups/1","owner":{"rid":"afe31e22-7273-47f9-9f90-9d4bc3c796fe","rtype":"zone"},"type":"grouped_light"}],"id":"c710a138-4345-42b9-9406-25da3090618d","type":"update"},{"creationtime":"2024-02-19T17:25:46Z","data":[{"dimming":{"brightness":0.79},"id":"xxx","id_v1":"/lights/3","owner":{"rid":"xxx","rtype":"device"},"type":"light"}],"id":"fd56d9fc-8d77-43cb-9aa3-d60cbd376469","type":"update"}]
2024-02-19 18:25:47.521 [DEBUG] [.internal.handler.Clip2BridgeHandler] - onResourcesEventTask() resource count 4
2024-02-19 18:25:47.522 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateChannels() from resource id:xxx, type:light
2024-02-19 18:25:47.523 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-temperature' update with 'UNDEF' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:47.524 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-temperature-abs' update with 'UNDEF' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:47.525 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color' update with '253.553,100,0' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:47.526 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-xy-only' update with '253.553,100,100' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:47.528 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'effect' update with 'NO_EFFECT' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:47.530 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'dimming-only' update with '0.7900' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:47.532 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'on-off-only' update with 'OFF' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:47.534 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'alert' update with 'NO_ACTION' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:47.536 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'last-updated' update with '2024-02-19T18:25:47.535729202+0100' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:47.537 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> onResource() consumed resource id:xxx, type:light
==> /var/log/openhab/events.log <==
2024-02-19 18:25:47.535 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Helligkeit' changed from 0.4000 to 0.7900
==> /var/log/openhab/openhab.log <==
2024-02-19 18:25:49.142 [TRACE] [.hue.internal.connection.Clip2Bridge] - onEventData() data:[{"creationtime":"2024-02-19T17:25:49Z","data":[{"dimming":{"brightness":0.4},"id":"xxx","id_v1":"/lights/3","owner":{"rid":"xxx","rtype":"device"},"type":"light"}],"id":"866b9287-3724-4bd0-8c8b-f0bc7ff72cc5","type":"update"}]
2024-02-19 18:25:49.144 [DEBUG] [.internal.handler.Clip2BridgeHandler] - onResourcesEventTask() resource count 1
2024-02-19 18:25:49.145 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateChannels() from resource id:xxx, type:light
2024-02-19 18:25:49.147 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-temperature' update with 'UNDEF' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:49.150 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-temperature-abs' update with 'UNDEF' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:49.152 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color' update with '253.553,100,0' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:49.155 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'color-xy-only' update with '253.553,100,100' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:49.157 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'effect' update with 'NO_EFFECT' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:49.160 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'dimming-only' update with '0.4000' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:49.163 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'on-off-only' update with 'OFF' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:49.166 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'alert' update with 'NO_ACTION' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:49.168 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> updateState() 'last-updated' update with '2024-02-19T18:25:49.168082559+0100' (fullUpdate:false, isDefined:true)
2024-02-19 18:25:49.172 [DEBUG] [e.internal.handler.Clip2ThingHandler] - xxx -> onResource() consumed resource id:xxx, type:light
==> /var/log/openhab/events.log <==
2024-02-19 18:25:49.167 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EG_Wohnzimmer_Stehlampe_Helligkeit' changed from 0.7900 to 0.4000
1 Like

@Matze0211 just a short update: from your logs I can see some conversion issues between HSB and XY particularly at low B values. I think this is due to a problem in the OH core ColorUtils module, probably due to rounding issues. So if I would fix that module for the benefit of the Hue binding, I shall have to make sure that my fix won’t break other bindings that depend on the same ColorUtils. This will take me some time for the full fix and test cycle. And the final result won’t be visible until the next OH milestone release. I will keep you updated, but please be patient.

Thanks for the heads up, I also did not expected that something will change immediately.

Is the following assumption right?
Even if the HSB ↔ XY conversion will be fixed, it will not be supported to send any HSB command with brigthness = 0 to the channel, due to the dimming range parameter (dimmingRange: 0.2 % .. 100 %)?

Therefore I need to change me rule independent of the conversion issue , if I understand correct?

My aim is to make it so that it WILL be supported…

… but I am not yet sure if I can fully achieve that aim … so I would advise you to change your rule if you can already, just in case.

2 Likes

@Matze0211 in case you missed it, I made a PR (link below) that fixes your issue in the Hue binding. So could you please test it, and give your approval (or feedback) in that PR in order to confirm that it solved your issue? TIA

EDIT: I will add a link where you can download the Jar file…

Hi @AndrewFG ,

thanks for working on this!
Not sure if thats intended and will work or not, but I tried to:

  • uninstall the regular binding, than
  • load the 4.2.0 jar within my current 4.0.4 installation

and it is failing with the following error:

2024-03-07 21:40:45.893 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab/addons/org.openhab.binding.hue-4.2.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.hue [318]
  Unresolved requirement: Import-Package: com.google.gson; version="[2.10.0,3.0.0)"
	at org.eclipse.osgi.container.Module.start(Module.java:463) ~[org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:445) ~[org.eclipse.osgi-3.18.0.jar:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) ~[?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) ~[?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) ~[?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) ~[?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) ~[?:?]

If it is only supposed to work with OH4.2.0 milestone build, I need to setup a test environment at the weekend.

That is indeed the case. Sorry for that. In the OH development environment, it is remarkably difficult to make new builds towards a prior OH version…