Ok so I’m a noob when it comes to HA, but I’m experienced with networks, IT, programming and security. So take everything I say with a pinch of salt, but I hope this helps someone troubleshoot their emulated hue to get home assistant working,
Background: I’m running hassio as my HA instance, started a few days ago. For the life of me I couldn’t get emulated hue working with alexa - everything looked good, but alexa wasn’t finding anything… theirs loads of info on the net, some good, some confusing, some rubbish, none of it solved my problem. So I decided to set up Haaska instead…and in the process solved my emulated hue issue! Bottom line: don’t believe any post that says ‘emulated hue is broken’ or ‘emulated hue won’t work with Hassio because of docker etc.’ it’s just rubbish - emulated hue works fine if you have the right environment set up.
So if you want to use emulated hue there’s 3 things in my experience that need to be right in your environment for it to work with Alexa:
- your Home Assistant configuration (see the tutorial on this site)
- you have the right network environment for alexa to discover your devices (right ports open and unused etc.)
- you have an echo dot 2nd or 1st generation that is capable of discovering legacy hue devices, some echo hardware doesn’t work as it’s only set up for new hue installations (echo show etc.).
taking (1) first - this is easy, just follow the configuration tutorial. Although set your port to 80 (and only set expose by default to true if you have less than 49 devices otherwise set to false and explicitly expose them in your config - see the tutorial for this) . See my config below:
emulated_hue:
type: alexa
host_ip: 192.168.1.5
listen_port: 80
upnp_bind_multicast: true
expose_by_default: true
Now for (2) - I changed just 2 things on my network and suddenly emulated hue was working. I’m not exactly sure which one did the trick, or maybe it was both. However, the most likely culprit is ports being blocked/in-use by another programme. Alexa uses port 1900 for upnp discovery (along with a lot of others, see here), I had some software on my hassio box that was also using port 1900 - I changed this software to use another port. This is probably what was causing the issue. Ports are where services (like alexa or other software) connect. If they are in use by another programme, blocked or closed, then alexa can’t connect and can’t discover devices. If you are having issues with emulated hue check first whether required alexa ports are in use on your HA box. For completeness, the second thing I changed was to implement SSL on my network using the DuckDyns add-on in preparation for implementing Haaska. I know alexa skills require SSL, but there is nothing out there saying emulated hue (which is not a skill) needs it. However, if you’ve checked for port conflicts then try the SSL fix.
Finally for (3) if you don’t have a 2nd or 1st generation echo dot on your network then forget it. It may work with a echo 1st generation, but in my experience these dots are the only devices that will successfully discover devices using echo hue. Don’t use the app, or go online, ask alexa directly through one of these dots to “discover devices” (actually as long as you have one of these dots on your network it’ll work from any echo). That’s it, your devices will be discovered and you can start messing with the config and them.
So there you have it, late 2018, fresh install of Hassio and emulated hue works fine - don’t believe any of the posts out there on t’internet.
Anyway, hope this helps someone avoid 24hrs of pain, wireshark and nmap like me! Right, I’ll be onto setting up Haaska now as frankly, I’ve already done most of the hard work…darn!
RRMR