I am running Home Assistant inside a docker container (not using host mode) and I am unable to get the hue emulation to work. My current docker compose config for Home Assistant:
homeassistant:
container_name: homeassistant
restart: unless-stopped
image: homeassistant/raspberrypi4-homeassistant
volumes:
- ${DATADIR}/homeassistant/config:/config
- /etc/localtime:/etc/localtime:ro
- /dev/serial/by-id/:/dev/serial/by-id/
ports:
- 8123:8123
- 80:80
cap_add:
- NET_BIND_SERVICE
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
and the hue config:
# hue emulation
emulated_hue:
listen_port: 80
host_ip: 192.168.2.4 # which is the IP of the pi running docker
expose_by_default: true
exposed_domains:
- light
This is resulting in the following error at startup:
Error during setup of component emulated_hue
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/setup.py”, line 215, in _async_setup_component
result = await task
File “/usr/src/homeassistant/homeassistant/components/emulated_hue/init.py”, line 131, in async_setup
listen = create_upnp_datagram_endpoint(
File “/usr/src/homeassistant/homeassistant/components/emulated_hue/upnp.py”, line 73, in create_upnp_datagram_endpoint
ssdp_socket.setsockopt(
OSError: [Errno 99] Address not available
Does anyone know what is causing this or how to fix it? Do I need to also add advertise_ip to the config or add some UPNP ports?