Emulated_hue seems to ignore advertise_ip

I’m trying to set up an emulated hue on my network to handle my non-Hue lights; below is my config:

emulated_hue:
host_ip: 10.101.0.50
listen_port: 8300
advertise_ip: 10.101.0.50
advertise_port: 1901
upnp_bind_multicast: false
expose_by_default: true
exposed_domains:
  - input_boolean

I’ve already got a container listening on the same IP on port 1900 so I need to use something else. I’ve tried loads of combinations of the available options but I can’t get past the following:

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/src/app/homeassistant/components/emulated_hue/upnp.py", line 124, in run
    ssdp_socket.bind((self.host_ip_addr, 1900))
OSError: [Errno 98] Address already in use

Any suggestions as to why this is happening?

Hi there! I’m having your same issue - did you manage to make it work?

I’m afraid not! I ended up giving up as I never got anywhere with it.

Thanks. Weirdly enough the lights are exposed when I check on the address but Alexa doesn’t pick them up (and I do have also an old gen Dot…).

Thanks anyway!

This typically means there some name confliction for alexa. I’ve had that issue where she doesn’t discover anything because there’s a naming confliction. Also, phillips hue bridge has a limit of ~55-64 (might be wrong on the exact number) lights. I’ve noticed that alexa will not find devices when I send a large number of devices to emulated hue.

Interesting. What do you mean naming conflict, if you don’t mind me asking?

Two devices with the same name

I’m not getting it to work either.

I run hassio inside a deciated ubuntu vm. So my setup is not quite standard, but on the other hand it somewhat mimics the official hassio vm setup. My error looks quite similar:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 213, in _async_setup_component
    result = await task
  File "/usr/src/homeassistant/homeassistant/components/emulated_hue/__init__.py", line 128, in async_setup
    listen = create_upnp_datagram_endpoint(
  File "/usr/src/homeassistant/homeassistant/components/emulated_hue/upnp.py", line 84, in create_upnp_datagram_endpoint
    ssdp_socket.bind(("" if upnp_bind_multicast else host_ip_addr, BROADCAST_PORT))
OSError: [Errno 98] Address in use

My emulated hue config is:

emulated_hue:
  host_ip: 192.168.11.14
  advertise_port: 8081
  listen_port: 8300
  expose_by_default: false
  entities:
    light.alle_lichter_zha_group_0x0003:
      hidden: false

As the error massage says Address already in use, I also changed the ports a little but but that didn’t help. turning off upnp_bind_multicast also changed nothing. I also deleted the config/emulated_hue_ids.json. Any suggestions how to get this to work.

Putting home_assistant on port 80 and use port 80 is not really an option for me, as I’m also running an nginx proxy, that obviously catches that port. Also I think port 80 is only needed for google, and I don’t plan on using that. Are there any other suggestions?