When I go to the IP to check status xxx:8300/api/homeassistant/lights, I get:
500 Internal Server Error
Server got itself in trouble
At the same time in my log:
2017-08-08 11:00:29 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/aiohttp/web_protocol.py”, line 422, in start
resp = yield from self._request_handler(request)
File “/srv/homeassistant/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/lib/python3.4/site-packages/homeassistant/components/http/init.py”, line 421, in handle
result = handler(request, **request.match_info)
File “/srv/homeassistant/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/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
I have my HASS installed in virtualenv, so I did the:
sudo setcap ‘cap_net_bind_service=+ep’ /srv/homeassistant/bin/python3
You didn’t need that setcap thing, that’s only for Google Home’s that use port 80, the Alexa setting uses 8300. However, the Alexa version is deprecated and using the Google Home one is recommended for both, this is what I use…
Have you tried turning off global expose and just adding one switch to see if that works. There is a limit to the number Alexa can handle which I believe is 40 odd
I can’t, for the life of me, find the location of the json…
So to recap. I readded type Alexa in the config. I can now access the xx:8300/api/homeassistant/lights and see a bunch of equipment. But still no luck when trying to discover with Alexa.
I shouldn’t have to add a Smart Home Skill right?
Thanks!
Okay. Some progress. Looking at the results I had on xx:8300/api/homeassistant/lights, and some examples online it didn’t match up.
So I then added the emulated_hue_ids.json (with one entry) to my /.homeassistant folder. Now the results look better on the xx:8300/api/homeassistant/lights and xx:8300/description.xml.
But I am still not able to discover anything in my Alexa app. Still unsure if I have to enable a skill…
It should just work, I literally stuck the config in I shared above and after a restart everything instantly appeared to Alexa and Harmony. That was on a Mac Mini and I’ve recently done it to a clean install of Hass.io with the same results.
I’m very happy with it, the add-ons system makes it a piece of cake to add functions I’ve been unsure on trying and gives a no effort more secure environment.
You just need to be sure the add-ons you want either exist already (the most popular ones do), be happy to wait for it or create it yourself!
The buzz of being part of something very new is fun too