Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing color temperatur is not working correctly #1131

Closed
sub0ne opened this issue Sep 11, 2019 · 1 comment · Fixed by #1266
Closed

Changing color temperatur is not working correctly #1131

sub0ne opened this issue Sep 11, 2019 · 1 comment · Fixed by #1266
Assignees
Milestone

Comments

@sub0ne
Copy link

sub0ne commented Sep 11, 2019

Again tested with Alexa: the changing of color temperatur seems to be incorrect on Philips Hue blubs. The method replaceColorData() is called with ColorMode CT and converted via convertCTtoRGB() to RGB values. This seems not to work correct as comparing bulbs paired with a real hue show complete different colors.

I found the following values were set:
Color change with CT: 383. Resulting RGB Values: 255 163 80 --> CT on hue 331
Color change with CT: 350. Resulting RGB Values: 255 172 100 --> CT on hue 322
Color change with CT: 284. Resulting RGB Values: 255 193 142 --> CT on hue 301
Color change with CT: 234. Resulting RGB Values: 255 212 178 --> CT on hue 283
Color change with CT: 199. Resulting RGB Values: 255 229 207 --> CT on hue 269

Maybe even the conversion from RGB to Hue, Sat, Bri fails as the CT value gets transformed to RGB and from RGB back to Hue, Sat, Bri in my case (I use the color.hsl variable in my item url).

What the algorithm does is exactly what Tanner Helland says. But something seems to be wrong:

CT request Hue (mired): 383
in RGB: 255 163 80
in HSL: 28 100 66
in HSB: 28 69 100
setting CT on Huebulb directly: 383: hue 45.46; sat 154; (bri 254)

HSL and HSB seems to be mixed also in the code

@bwssytems bwssytems self-assigned this Sep 24, 2019
@bwssytems
Copy link
Owner

Will be writing a test case for this and will validate the calculation

@bwssytems bwssytems added the bug label Oct 2, 2019
@bwssytems bwssytems added this to the 5.3.1 milestone Oct 2, 2019
bwssytems added a commit that referenced this issue Dec 14, 2020
Dev branch 5.3.x to create v5.4.0

#1044 Alexa app, error "Device doesn't support requested value" bug question
#1118 Device status update in Alexa App is not working correctly for ha-bridge devices bug duplicate question
#1126 Can't get XY ColorData into URL enhancement question
#1127 Can't get separate hue, saturation and brightness enhancement question
#1128 Wrong color calucation in HS mode bug question
#1131 Changing color temperatur is not working correctly bug question
#1132 Conversion from CIE to RGB incorrect bug question
#1139 Device ID creation fails bug question
#1150 Home Assistant gets null exception during initialization bug question
#1170 Alexa not sending the correct color codes duplicate
#1171 Please add option: If bright request present with on, only send dim enhancement
#1184 Alexa will not discover HABridge question
#1191 When "Use UPNP Address Interface Only" is selected, echo cannot find ha-bridge bug
#1210 [Enahnacement] Have link button timeout be configurable enhancement
#1215 Alexa unable to discover recently added devices to ha-bridge duplicate question
#1227 Feature request: ${intensity.previous} value passing control enhancement
#1239 HA-Bridge has suddenly given up itself - Exception in thread "main" java.lang.NullPointerException bug question
#1243 Alexa device discovery now broke question
#1253 HABridge hue ColorDecode 0 0 0 bug question
#1256 Homeassistant devices not appearing bug question
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants