question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Colors aren't mapping properly for Echo Glow

See original GitHub issue

Describe the bug The color values read from an Echo Glow light do not always produce the same colors when used to turn on the light.

To Reproduce Steps to reproduce the behavior:

  1. Use Alexa to turn on Echo glow to Green, 100%.
  2. Wait for values to update. Result:
supported_color_modes: hs
color_mode: hs
brightness: 255
hs_color: 120, 100
rgb_color: 0, 255, 0
xy_color: 0.172, 0.747
friendly_name: name
supported_features: 17
  1. Change light to different color.
  2. Use any of hs, rgb, xy, or color name Green to turn light on again.
  3. Wait for values to update. Relevant result:
brightness: 255
hs_color: 83.654, 81.569
rgb_color: 172, 255, 46
xy_color: 0.328, 0.597

(Alexa app displays “Custom” for color) However, salmon works via color name, but not using the returned color values, which appear to be for red instead:

hs_color: 0, 100
rgb_color: 255, 0, 0
xy_color: 0.701, 0.299

Expected behavior When using Echo-supported colors, I would expect the colors set from HA to match the colors set via Alexa.

Screenshots None

System details

  • Home-assistant (version): core-2021.7.1
  • Hassio (Yes/No): No
  • alexa_media (version from const.py or HA startup): 3.10.6
  • alexapy (version from pip show alexapy or HA startup): 1.25.1
  • Amazon 2FA is enabled (y/n). We will not debug login issues if unanswered: y

Logs Setting color salmon:

2021-07-19 11:05:22 DEBUG (MainThread) [alexapy.alexaapi] b***t@g*******g: static PUT: https://alexa.amazon.com/api/phoenix/state returned 200::application/json
2021-07-19 11:05:22 DEBUG (MainThread) [alexapy.alexaapi] b***t@g*******g: set_light_state response: {'controlResponses': [{'code': 'SUCCESS', 'message': None, 'data': None, 'entityId': '0000000000000000000000000000'}, {'code': 'SUCCESS', 'message': None, 'data': None, 'entityId': '0000000000000000000000000000'}, {'code': 'SUCCESS', 'message': None, 'data': None, 'entityId': '0000000000000000000000000000'}], 'errors': []} for data: {"controlRequests": [{"entityId": "0000000000000000000000000000", "entityType": "ENTITY", "parameters": {"action": "turnOn"}}, {"entityId": "0000000000000000000000000000", "entityType": "ENTITY", "parameters": {"action": "setBrightness", "brightness": "10.196078431372548"}}, {"entityId": "0000000000000000000000000000", "entityType": "ENTITY", "parameters": {"action": "setColor", "colorName": "salmon"}}]}

Setting xy_color [0.701, 0.299]:

2021-07-19 11:12:17 DEBUG (MainThread) [alexapy.alexaapi] b***t@g*******g: static PUT: https://alexa.amazon.com/api/phoenix/state returned 200::application/json
2021-07-19 11:12:17 DEBUG (MainThread) [alexapy.alexaapi] b***t@g*******g: set_light_state response: {'controlResponses': [{'code': 'SUCCESS', 'message': None, 'data': None, 'entityId': '0000000000000000000000000000'}, {'code': 'SUCCESS', 'message': None, 'data': None, 'entityId': '0000000000000000000000000000'}, {'code': 'SUCCESS', 'message': None, 'data': None, 'entityId': '0000000000000000000000000000'}], 'errors': []} for data: {"controlRequests": [{"entityId": "0000000000000000000000000000", "entityType": "ENTITY", "parameters": {"action": "turnOn"}}, {"entityId": "0000000000000000000000000000", "entityType": "ENTITY", "parameters": {"action": "setBrightness", "brightness": "20.0"}}, {"entityId": "0000000000000000000000000000", "entityType": "ENTITY", "parameters": {"action": "setColor", "colorName": "red"}}]}

Setting color green:

2021-07-19 11:05:50 DEBUG (MainThread) [alexapy.alexaapi] b***t@g*******g: static PUT: https://alexa.amazon.com/api/phoenix/state returned 200::application/json
2021-07-19 11:05:50 DEBUG (MainThread) [alexapy.alexaapi] b***t@g*******g: set_light_state response: {'controlResponses': [{'code': 'SUCCESS', 'message': None, 'data': None, 'entityId': '0000000000000000000000000000'}, {'code': 'SUCCESS', 'message': None, 'data': None, 'entityId': '0000000000000000000000000000'}, {'code': 'SUCCESS', 'message': None, 'data': None, 'entityId': '0000000000000000000000000000'}], 'errors': []} for data: {"controlRequests": [{"entityId": "0000000000000000000000000000", "entityType": "ENTITY", "parameters": {"action": "turnOn"}}, {"entityId": "0000000000000000000000000000", "entityType": "ENTITY", "parameters": {"action": "setBrightness", "brightness": "100.0"}}, {"entityId": "0000000000000000000000000000", "entityType": "ENTITY", "parameters": {"action": "setColor", "colorName": "lime"}}]}

Additional context I know this feature is still in development, and that the way Amazon does things is a huge pain. I really appreciate that you added this and that it’s even possible at all now, so huge thanks!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
blm126commented, Jul 27, 2021

Ok, lets take one more shot at this. I fixed a brightness handling bug during color conversion and updated my list of colors to match the exact values the Alexa app displays. Salmon now works for me in all directions.

I tested a a bunch of different colors and everything looks good, but please give it a shot as well.

0reactions
brgerigcommented, Aug 3, 2021

Hmmm, I thought I had, but maybe I hadn’t. I’m not sure when I’ll get a chance to, so sounds like it’s probably best to release for now. Sounds like @blm126’s latest changes are really thorough. Thank you both for working on that, particularly you, Brady! (Speaking of which, it sadly appears that you don’t have any way for me to buy you a coffee. Let me know if that were to change.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tap Your Echo Glow to Change Colors - Amazon.com
Open Devices "" . Select Lights, then select your Echo Glow. Go to Tap and turn feature on or off. Tap your device...
Read more >
How To Set Up Echo Glow - YouTube
Echo Glow : https://amzn.to/31CwgTrIn this video we teach you how to set up your Amazon Echo Glow. The Amazon Echo Glow is a...
Read more >
Everything You Need to Know About Amazon Glow
Amazon's newest Echo-like device connects kids with friends, games, art, and information. From remote learning to new skills, ...
Read more >
The 240+ Best Black Friday 2022 Deals Still Available Sunday
Echo Glow emits 16 different colors. Can also cue a countdown to bedtime. Echo Glow needs to be controlled by an Amazon Echo...
Read more >
Amazon Echo - Wikipedia
Amazon Echo, often shortened to Echo, is an American brand of smart speakers developed by Amazon. Echo devices connect to the voice-controlled intelligent ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found