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

Group & Scene error - Hassio / Kodi TV error #193

Closed
subxero opened this issue Aug 24, 2021 · 3 comments
Closed

Group & Scene error - Hassio / Kodi TV error #193

subxero opened this issue Aug 24, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@subxero
Copy link

subxero commented Aug 24, 2021

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

@subxero subxero added the bug Something isn't working label Aug 24, 2021
@alexyao2015
Copy link
Member

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.

@subxero
Copy link
Author

subxero commented Aug 24, 2021

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>.

@alexyao2015
Copy link
Member

#50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants