Help with Emulated Hue inside of docker

So I run HASS via the official docker and am trying to get emulated hue to work. Does anyone know what protocol listen_port and advertise_port need? I think this may be what is causing it to not be found.

Alternatively if anyone knows how to set this up inside of docker I would be most grateful if you could share your configs.

Your Docker container should be using net=host, so there is no need to expose ports.

And if I don’t want to/can’t use net=host?

8300 and possibly 8080

Per docs

You can verify that the  `emulated_hue`  integration has been loaded and is responding by pointing a local browser to the following URL:

* `http://<HA IP Address>:8300/description.xml`  - This URL should return a descriptor file in the form of an XML file.
* `http://<HA IP Address>:8300/api/pi/lights`  - This will return a list of devices, lights, scenes, groups, etc.. that  `emulated_hue`  is exposing to Alexa.

For Google Home, verify that the URLs above are using port 80, rather than port 8300 (i.e.  `http://<HA IP Address>:80/description.xml` ).

The docs are wrong. If you specify the value for ports then the ports listed there is incorrect. Regardless it looks like it just cannot work in docker mode. If it can I have yet to find a way to do it…

Works fine for many people. Why can’t you use host network mode?

Works perfectly in docker - I have over 30 emulated hue devices, running Hass.io. Config as per the instructions page.

because i like to have control over what ports are being used. i am running 23 dockers and do not want things conflicting…

can you please share your config for this and what you have config wise for docker? is it running in host mode? if so this is not something that i really want to do.

Yes, it is.

Why?

host_ip: 192.168.1.101
expose_by_default: true
exposed_domains:
  - switch
  - scene
  - vacuum
  - light
  - script

Appears that your version of having control may not be compatible with the running of emulated_hue.

1 Like

The documentation says this could be a problem at pairing time but the way it is stated makes it sound like you can run hass in a docker without host mode. I guess the docs are wrong about this aspect then…

All docker commands and docker-compose configurations in the official documentation for installing homeassistant in a docker container say to use host network mode.

If you choose to configure contrary to official instructions, then you must expect some potential side effects I’m afraid.

That is fine but the docs really need updated on the emulated hue and roku pages since they make it sound possible.

If you don’t think they are correct, submit a change on Github. There is a link at the top of every page. See if what you think gets past the HA devs.

Thanks, will do.

It probably is possible, but you need to understand what to configure HA with based on the configuration of the rest of your system, which will probably involve looking at the source code for emulated_hue, looking at the internal network traffic of your docker stack, looking at your host machine’s networking, and a lot of trial and error.

1 Like