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

Alexa not sending the correct color codes #1170

Closed
Perforex opened this issue Jan 1, 2020 · 2 comments · Fixed by #1266
Closed

Alexa not sending the correct color codes #1170

Perforex opened this issue Jan 1, 2020 · 2 comments · Fixed by #1266
Milestone

Comments

@Perforex
Copy link

Perforex commented Jan 1, 2020

I'm implementing a device that is using MQTT to control some multi coloured LED lights via a microprocessor. When I change the light colour from the "Test Color" button on the Devices screen all is well and the correct 6 character hex code is sent to the MQTT queue. However, when I do the same from Alexa I get a spurious code, usually x"FDFDFF" but sometimes a slight variant.

Here's the MQTT string from the device:

{"clientId":"hab001","topic":"home/colour/test","message":${color.rgbx},"qos":"1","retain":"false"}

@amoksworld
Copy link

Same problem here ...

I use a HTTP call with ${color.rgbx} and when I test color from habridge web interface it is working correctely:

http:https://127.0.0.1/fhem?cmd=set%20Light%20rgb%20${color.rgbx}

But when I ask Alexa to change the color, the resulting HEX code is wrong.

I also tested with ${color.rx}${color.gx}${color.bx} instead and got the same result.
Even with another API call that includes ${color.r}${color.g}${color.b} the colors are mixed.

http:https://127.0.0.1/fhem?cmd=set%20Light%20wcrgb%200%200%20${color.r}%20${color.g}%20${color.b}

But I get reproduceable responses ... so I did a little bit of debugging...
First thing: It seems that changing the luminance in habridge (or with alexa) has an impact on the calculation, because when I set different luminance values the RGB/RGBX code change.
When set lumination to high and ask Alexa to set a color, she says something like "value out of scope"
Second I noticed, that when I say "blue" and expect that the last 2 of the 6 HEX chars change, they are set to 00. If I play with the luminance, I see the first 4 HEX chars changing, but the last 2 stay at 00 what seems to be wrong to me.

Hope someone can find the error and fix that little thing.

@bwssytems
Copy link
Owner

Also an issue with #1132

@bwssytems bwssytems added this to the 5.3.1 milestone Dec 8, 2020
This was referenced Dec 12, 2020
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.

3 participants