Hi everyone,
I’m trying to propgram my hue bulbs for my setup. For that purpose, I’m attempting to dump my existing scenes from the hue app and place them in functions. In general, it works well, but I have weird effects with the colors. I have an LED panel which is programmed to look yellow-ish. I execute my dump function and it returns something like this (the dump function is designed that I just copy&paste the result into an text editor, remove the prefix and then place it into a separate rule or function):
2016-04-09 11:33:13.403 [INFO ] [enhab.model.script.getHueLight] - setColorHueItem.apply(Light_Paneel, 33.81318681318681029779327218420803546905517578125, 78, 100)
so the hue is somewhere between red and yellow. Should be fine in my eyes.
To verify the value, I am reading the state of that bulb from the command line. It returns the following:
{
“manufacturername”: “dresden elektronik”,
“modelid”: “FLS-PP3”,
“name”: “Paneel”,
“state”: {
“alert”: “none”,
“bri”: 254,
“colormode”: “xy”,
“ct”: 383,
“effect”: “none”,
“hue”: 6154,
“on”: true,
“reachable”: true,
“sat”: 197,
“xy”: [
0.4565,
0.394
]
},
“swversion”: “33048736”,
“type”: “Extended color light”,
“uniqueid”: “xxx”
}
Now when I execute that same command in a separate rule, I weirdly get a different color than the one I have just dumped. It is somewhat more red than yellow.
I dump the values again and I get the following:
2016-04-09 11:37:58.587 [INFO ] [enhab.model.script.getHueLight] - setColorHueItem.apply(Light_Paneel, 33.8131866455078125, 78, 100)
So this is almost the same. I get the state of the bulb from the command line again:
{
“manufacturername”: “dresden elektronik”,
“modelid”: “FLS-PP3”,
“name”: “Paneel”,
“state”: {
“alert”: “none”,
“bri”: 254,
“colormode”: “hs”,
“ct”: 500,
“effect”: “none”,
“hue”: 6154,
“on”: true,
“reachable”: true,
“sat”: 198,
“xy”: [
0.5089,
0.3892
]
},
“swversion”: “33048736”,
“type”: “Extended color light”,
“uniqueid”: “xxx”
}
Ok, so what I notice is that hue/sat/brightness match mostly, but the color mode is different now than in the scene that I programmed with my Hue app. Also, the x/y parameters are different.
So can anybody tell me what the problem is and how I can read the color correctly? I have a hunch that either the device or the bridge converts the xy color space wrongly to hsb, what do you think?
Thanks a lot in advance!