Group & Scene error - Hassio / Kodi TV error
subxero opened this issue · 3 comments
Describe the bug
I am trying to sync the lights I have configured in HASSIO to be used under KODI using the HUE integration that both have.
Steps to Reproduce
Installing a clean version of stable or develop on Home Assistant 2021.8.8 on a RPi4.
Trying to manually add the HUE integration in HASSIO, when activating the link mode I always get an "Unexpected error".
The same on KODI TV 19.1 I install Hue Service and end up with a common message "Hue bridge not found".
Other times it just works and discovers the bridge on both sides but the integration starts duplicating objects and my 9 lights (lifx and xiaomi) end up turning out to be over 500.
Expected behavior
Logs
021-08-24 21:30:33,519 DEBUG emulated_hue.api -- [192.168.123.1] GET /api/aEe56Ad6C446F4f6fbC304acf11F7dbD88D5DA73/
2021-08-24 21:30:33,590 ERROR aiohttp.server -- Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/app/emulated_hue/api.py", line 92, in wrapped_func
return await func(cls, request)
File "/app/emulated_hue/api.py", line 494, in get_full_state
"scenes": await self.async_scene_to_full_state(),
File "/app/emulated_hue/api.py", line 478, in async_scene_to_full_state
scenes_group = scene_data["group"]
KeyError: 'group'
Hardware Info:
- Architecture (Ex: x86, ARM):
- Addon version (Ex: stable or dev):
- Value of "tag_commit_or_branch" if using dev:
- OS (Ex: Windows 10, Ubuntu Buster):
- Hardware (Ex: PC, Raspberry Pi 1/2/3/Zero):
Additional context
It is obviously going to duplicate things in Hass if you add the emulator because the emulator gets the lights from Hass. So you created an infinite loop.
That makes more sense... adding just the HUE bridge in KodiTV I still have errors.
2021-08-24 22:28:01,910 DEBUG emulated_hue.api -- {'lights': ['1'], 'name': 'HOME_THEATER', 'recycle': False, 'type': 'LightScene', 'transitiontime': 100}
2021-08-24 22:28:06,594 DEBUG emulated_hue.api -- [192.168.123.3] GET /api/config
2021-08-24 22:28:06,600 DEBUG emulated_hue.api -- [192.168.123.3] GET /api/B119D4Cb97D90F3f2a1C3c8FDce8eb6266cA8Db2/config
2021-08-24 22:28:06,680 WARNING emulated_hue.api -- Invalid/unknown request: <Request GET /api/B119D4Cb97D90F3f2a1C3c8FDce8eb6266cA8Db2/sensors/1> >
2021-08-24 22:28:08,801 DEBUG emulated_hue.discovery -- Serving SSDP discovery information to ('192.168.123.45', 55940)
2021-08-24 22:28:34,385 DEBUG emulated_hue.discovery -- Serving SSDP discovery information to ('192.168.123.3', 5464)
2021-08-24 22:28:34,386 DEBUG emulated_hue.discovery -- Serving SSDP discovery information to ('192.168.123.3', 5464)
2021-08-24 22:29:08,802 DEBUG emulated_hue.discovery -- Serving SSDP discovery information to ('192.168.123.45', 55940)
2021-08-24 22:32:09,869 DEBUG emulated_hue.api -- [192.168.123.3] GET /api/config
2021-08-24 22:32:09,908 DEBUG emulated_hue.api -- [192.168.123.3] GET /api/B119D4Cb97D90F3f2a1C3c8FDce8eb6266cA8Db2/config
2021-08-24 22:32:09,982 WARNING emulated_hue.api -- Invalid/unknown request: <Request GET /api/B119D4Cb97D90F3f2a1C3c8FDce8eb6266cA8Db2/sensors/1>.