Hyperion Pairing issues
Bubbgump209 opened this issue · 13 comments
Describe the bug
Hyperion 2.0.12 cannot pair.
Steps to Reproduce
Use the Hyperion wizard to connect to Hue Emulator. However, hass-emulated-hue sees the "push the button" request and notifies accordingly. Once link mode is enabled, Hyperion does not see hass-emulated-hue as a valid bridge. I manually created a user via /debug/clip.html and tried to pair in standard (non Entertainment API) and that does not work either.
Expected behavior
Hyperion discovers and pairs to the Emulator (It finds and pairs to a real V2 bridge without issue) in Entertainment API and /or standard old API mode.
Logs
Attached
Hardware Info:
-
Architecture: x86
-
Addon version: stable latest 0.2.10
-
OS: Debian 11 Bullseye
-
Hardware: VM
Additional context
The Hyperion instance is at 192.168.73.114 and the Home Assistant instance is 192.168.73.49. 192.168.73.10 is a Control4 and 192.168.40.53 is my laptop. Description.xml as presented by the emulator is attached. The referral to index.html gives a 404 on the emulator.
It would seem that it doesn't like something about our response. It could only support the v2 API or perhaps it doesn't like something with the v1 API implementation. I couldn't say for sure as I don't use Hyperion and am not familiar with the code base.
Same issue in my place/configuration. I found this request on Hyperion side - hyperion-project/hyperion.ng#1407 . Maybe this can help in future?
I think the hint here IMO is that Hyperion is using API v1 and we can rule out that any issue is the emulator not being API v2.
2022-01-01 10:07:35,383 WARNING emulated_hue.api -- Invalid/unknown request: <Request OPTIONS /api/ >
Seems like the issue is here. Will give that a look.
Can you pull the refactor
branch using the addon or the standard Docker container and provide the logs from the emulator when pairing?
I'm a putz and it took me a bit to realize there was a dev instance I could install and specify the branch. In any event, we seem to be working. Let me do further testing, but early indications are good.
It seems that things pair, but the bridge is otherwise broken. Log output:
2022-01-25 21:29:48,717 DEBUG emulated_hue.apiv1 -- [192.168.73.114] PUT /api/IioOki1Z4qS563mrzViJYfPblrBdPOl-0u0mJKiK/lights/1/state
2022-01-25 21:29:48,718 DEBUG emulated_hue.apiv1 -- {"xy":[0.1724,0.7468],"bri":254}
2022-01-25 21:29:48,729 ERROR aiohttp.server -- Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/app/emulated_hue/apiv1.py", line 68, in wrapped_func
return await func(cls, request, request_data)
File "/app/emulated_hue/apiv1.py", line 204, in async_put_light_state
await self.__async_light_action(entity, request_data)
File "/app/emulated_hue/apiv1.py", line 624, in __async_light_action
await device.async_execute()
File "/app/emulated_hue/controllers/devices.py", line 269, in async_execute
await self._ctrl_hass.async_turn_on(
File "/app/emulated_hue/controllers/homeassistant.py", line 42, in async_turn_on
await self._hass.call_service(
File "/usr/local/lib/python3.10/site-packages/hass_client/client.py", line 209, in call_service
return await self.send_command(msg)
File "/usr/local/lib/python3.10/site-packages/hass_client/client.py", line 257, in send_command
return await future
hass_client.exceptions.FailedCommand: Command failed: two or more values in the same group of exclusion 'Color descriptors' @ data[]
Can you upload more of the log output prior to the error occuring as an attachment?
Ignore me. I can't reproduce it now. I rebuilt the container to get clean logs and then it worked all of a sudden. It's working really, really well too.
I have seen those myself on rare occurrences so it may be a new bug. Please upload a full log if you do encounter it again.
I am noticing Hue Essentials having issues with /clip/v2/resource/entertainment. Do you want a new issue? This one seems solved.
NM, see the comment in the other thread about v2. Calling this closed.
Pushed out a new fix, so you shouldn't be able to get those errors from above anymore. Just make sure to restart the dev addon to have the changes applied.