HUE Binding: HSBType Color Discrepancy

Tags: #<Tag:0x00007faed48a0b80> #<Tag:0x00007faed48a0a40> #<Tag:0x00007faed48a0900>

Hi Openhabians,

recently i have set up some rules to make my hue bulbs give some information about the house state. For example, when the front door is closed, the porch light will glow green shortly if all doors and windows are shut, red otherwise.
To set the color, I use HSBType, and thats when I saw that for some reason, I can not achieve 100% saturation nor get one color round trip through my rule.
The following experiment will show the behaviour:

GF_Dining_EZEssplatz_Color.sendCommand(new HSBType(new DecimalType(0), new PercentType(100), new PercentType(100)))

Is what I expect to turn the lamp to a fully saturated red with maximum brightness.
The command is well received, the REST API tells me, the Item state is now: 0,100,100.
However, the color of the hue bulb seems washed out.
So I open my All4HUE app and use the color picker. My first find is, the current position of the color picker is not on full saturation. Then I move the color picker to a full red and the bulb actually changes to what i wanted it to be in the first place.
Strangely, the item state updates to 0,100,100 in openhab.
To me, it looks like the maximum saturation value is communicated as something less then 100 percent, and as anything else received would be more than 100 is floored to 100%?

It “works” for blue and green as well… Does anybody experience the same?


AFAIK Hue bulbs use HSBType automatically.




sendCommand(GF_Dining_EZEssplatz_Color, 0,100,100)


EDIT: But you’re right. In HUE APP the saturation is not shown by 100%.

Maybe this is because Philips Hue uses the CIE 1931 color space.

A very good explanation you also can see here.

Maybe it’s not calculated exactly or due to other reasons (e.g. compatibility of non Hue bulbs)?

1 Like

Thanks for your answer!
I tried giving the HSB values as string without the HSBType (“0,100,100”) but the result was the same.
Also HSBType::RED will produce the washed out red with less than 100 percent saturation. I tried it on original Hue Bulbs als well as Innr bulbs.
I think there might be a bug! Is there another way to issue a color command?

Maybe @cweitkamp knows about this? How is the saturation calculated in Hue binding?

Hi all,

Something about the Philips Hue and color:

I just realized there is a second user experiencing the same problem: Hue colors in HSV/HSB differ from the Hue app.

I do not have my development environment handy. Will investigate on it in the next couple of days. Maybe there was a change in the API.

@BobMiles May I ask for your current openHAB version installed? Thanks.

Having the same issue, but mine is an older version. Snapshot #1486 from January 2019.

What you can do in the meantime is to enable DEBUG or TRACE logging for the binding and try to find out what the binding will send towards the Hue API. Basically the saturation in OH HSBType is a percentage from 0-100 which will be multiplied by 2.54 before sending the request. The API accepts saturation values between 0 and 254.

1 Like

Thanks. I’m going to try this tomorow morning.

Thanks for all the info! I’m on 2.4 stable. Rpi3B.
I’ll enable debug tomorrow and will post the information as soon as I have it.
Again, thanks for all your efforts!