Anyone have success with Docker and Emulated Hue+HA?
I have HA running in docker container. Seems that UPNP is not working for me so it is not being discovered.
I can see the http://ha/description.xml but I noticed that UPNP is not discovered when checking using a UPNP discovery tool.
I’m sure it my docker and not HA but looking for ideas.
I expose 8124/TCP for Hue and 8123/TCP for HA Frontend
for the record i should clarify, it worked with net=host set on my rpi2.
since moving (or attempting to move anyway) my hass install to a server with the official image, i haven’t tried net=host yet but i’m assuming it’ll fix it there as well. all i know is that when i moved it (and attempted to keep things separate in docker) i haven’t for the life of me been able to get it working…i’ll try net=host in the morning and let you know if that works, but i would imagine it will.
well, net=host breaks my docker stack because it prevents it from connecting to mysql. ugh. i’d rather not go messing around with that.
seems from the documentation that this is supposed to work, somehow…would be nice if someone who knew how to configure it would chime in here rather than leaving those of us who are having issues hanging like they seem to want to do (i’ve seen several posts from people who are having issues in addition to this one and nobody ever gets a valid fix)…
can now confirm that net=host does in fact fix this…but like i said it broke other parts of my config that i then had to mess around with to get working again (had to change my mysql container to map 3306:3306, and then change my hass config to point to mysql at 127.0.0.1 instead of the much easier way of pointing to “mysql” inside the docker stack).
again, it would be really nice if someone…ANYONE…would help those of us who can’t get this working the way it was obviously intended (and how some people seem to have gotten it working, but without ever letting anyone know how).
Have you tried mapping the ssdp port 1900 to your hass container for discovery? I can only get it to discover my emulated hue in the first minute after creating a fresh hass container. Rebooting an existing hass container doesn’t work for me. And I always unplug my HUE hub. So my Alexa doesn’t stop discovering after finding the real hue hub.
Hope one of this tips will helps you. Took me a few weeks to figure this out and get it to discover my emulated hue again.
Yes. 1900 udp bridged to HA and several different configs for hue tried with this.
@crackers8199
You can use “link” command during docker build to network containers together. Intend.not to do this but it is the docker way to do this --link <name or id>:alias
If you have Echo v2 devices only that seems to cause the issue.
So you need to add:
listen_port: 80
to your configuration.yaml
Emulated Hue within DOCKER
If running in a docker container you will also need to add:
upnp_bind_multicast: true
to your configuration.yaml
and make sure you use the --net=host directive when creating the Home Assistant container. This means that you will have to create the container via the Terminal window as Synologies GUI does not support the --net=host option yet.
If like PSP91 you are running docker on a Synology device then you have the issue that Synology reserves port 80 for a nginx web redirect from Port 80 to Port 5000 (Synology HTTP Port).
For that you will need to make the changes the PSP91 listed in his post to ‘free-up’ port 80 for use by the emulated_hue component in Home Assistant.
I realize this post might be a little old, but I wanted to share my solution. I was quite annoyed that I couldn’t find any combination of options to make Alexa see the devices from emulated_hue.
Then I remembered I was running a firewall on the Home Assistant VM and forgot to open the UPnP port… facepalm.
For anyone having problems with this, I can confirm the following settings work, and devices are discoverable via the Alexa app using second-gen Echo Dots:
Use net=host for your Home Assistant Docker container.
Don’t run Home Assistant or an NGINX redirect over port 80; the emulated_hue component will need it.
Configure the component similar to below (I prefer to explicitly reveal devices, you can opt not to).
Add a couple rules to your iptables INPUT chain.
emulated_hue:
host_ip: (your Home Assistant IP address)
listen_port: 80
expose_by_default: false
entities:
light.bedroom:
name: "Bedroom Lights"
hidden: false