I posted this under an old thread with no responses. I’m guessing it was too old so I’m re-posting it as a new issue. I hope this is ok on the forum but I wonder if anyone else has experienced a problem like this.
My Emulated hue light was working great as mentioned here until I had to rebuild my system. I used the latest version at the time 2.12 (Hassio 98.5) upgraded from 88.4. Funny thing is that
my Alexa app now says “device doesn’t support requested data”
I can see the brightness value change in HA using the “States” page. But,…
when Alexa sets it to 1% brightness, HA States show it to be 4
Alexa shows a status of “device malfunction”
My Configuration.yaml looks like this (used to work):
I’ve deleted the light from Alexa then discovered devices and same behavior. I don’t know why it broke and I hope someone can help me get it going again.
EDIT:
When I look at the json from the emulated hue using my browser hassio-ip:80/api/pi/lights, I see:
Some minor progress but still - the status of the emulated hue on the Alexa app is “Device doesn’t support requested value” and also the values from 1% to 4% are off in HA. A 1% should come back to HA as less than 3 (2.54 but I don’t know if it only sends an integer already rounded off or up or down. ) When we do a states.light.alexa_virtual.attributes.brightness | int / 255 * 100 it used to correctly give a 1, 2, 3 but no more. Now a 1% resolves to 2, 2% also = 2, 3%= 4, 4% = 4, while 5 and up seem to be ok. I realize I could change my multi-command automation to not use 1 through 4, but it just seems unreliable and probably won’t survive another upgrade. I’d rather fix it.
Can someone else run it and let me know what your Alexa says? Also, please let me know what version of HA, emulated_hue, and Alexa_Media add-on you are running?
I finally found this morning the github issues page and saw how broken it has been. You’ll see a writeup from me there today. I’m guessing the coincidence of me rebuilding my system at the same time it broke has stymied my troubleshooting efforts. I thought I was doing something wrong with my new build.
However, I use hassio and it was producing an emulated_hue virtual light just from my configuration.yaml entry without having the hue_api.py in custom_components folder. So I made the folder and put the latest version in the emulated_hue folder. Since nothing happened, some of my troubleshooting included making a tiny text change (swversion=133 instead of 123) in hue_api.py to see what was producing the errors. None of my changes show up which tells me hue support is coming from somewhere else but I can’t find it.
Still working on it so thanks for the assist. I appreciate it.
Thanks for the response Petro.
I don’t think the issue I see is an Alexa cache problem. I use a browser to open port 80 on the HA Pi system running Hassio and I see the hue device JSON string returned from HA. It doesn’t reflect the python script in the components folder. That’s what has me confused as to what is responding to the emulated hue requests.
The JSON string looks ok until I try to turn one of the lights on to a certain brightness. The next time I access the web page I see null values in the return JSON. But the swversion remains 123 not 133 as I explained when I changed it to be 133.
Still scratching my head over that.