Emulated Hue & Google Home Error

Hey all

Setup emulated_hue component on 0.50.2. Getting the following error:

2017-08-03 01:20:48 WARNING (Thread-4) [homeassistant.components.emulated_hue] Listen IP address not specified, auto-detected address is
2017-08-03 01:21:29 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/aiohttp/web_protocol.py”, line 422, in start
resp = yield from self._request_handler(request)
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/aiohttp/web.py”, line 306, in _handle
resp = yield from handler(request)
File “/usr/lib/python3.4/asyncio/coroutines.py”, line 143, in coro
res = yield from res
File “/usr/lib/python3.4/asyncio/coroutines.py”, line 143, in coro
res = yield from res
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/http/init.py”, line 421, in handle
result = handler(request, **request.match_info)
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/emulated_hue/hue_api.py”, line 78, in get
number = self.config.entity_id_to_number(entity.entity_id)
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/emulated_hue/init.py”, line 196, in entity_id_to_number
number = str(max(int(k) for k in self.numbers) + 1)
ValueError: max() arg is an empty sequence

Config: (tried various other combinations of options)

listen_port: 80

descriptions file shows up and says this:

1 0 urn:schemas-upnp-org:device:Basic:1 HASS Bridge (192.168.171.xxx) Royal Philips Electronics http://www.philips.com Philips hue Personal Wireless Lighting Philips hue bridge 2015 BSB002 http://www.meethue.com 1234 uuid:2f402f80-da70-11e1-9b23-dfffdfdfdfdfdfdfdf

When I go /api/pi/lights, the above error shows on the log.

Already did the setcap

Any advice? Thanks

1 Like

Same issue here

I was able to fix the issue. Try manually creating a file called “emulated_hue_ids.json” in the same folder where your configuration.yaml file is. Thanks

yep, known issue: https://github.com/home-assistant/home-assistant/issues/8740

I created a file with just a single entry and the others were automatically added without a problem. I haven’t tried creating an empty file.

{"1": "light.living_room_back"}