LIFX: Address already in use

For process of elimination, I’ve statically assigned addresses in my DHCP server as follows:

[code]host lifx_livingroom_1 {
hardware ethernet D0:73:D5:12:D6:4A;
fixed-address 192.168.0.29;
}

host lifx_livingroom_2 {
hardware ethernet D0:73:D5:13:2B:D9;
fixed-address 192.168.0.30;
}

host lifx_bedroom_1 {
hardware ethernet D0:73:D5:10:49:32;
fixed-address 192.168.0.31;
}

host lifx_bedroom_2 {
hardware ethernet D0:73:D5:10:43:73;
fixed-address 192.168.0.32;
}[/code]

Here’s the error message I am getting every time I restart HASS:

16-09-13 12:25:10 homeassistant.components.light: Error while setting up platform lifx
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 107, in _setup_platform
    discovery_info)
  File "/usr/lib/python3.5/site-packages/homeassistant/components/light/lifx.py", line 113, in setup_platform
    lifx_library = LIFX(add_devices_callback, server_addr, broadcast_addr)
  File "/usr/lib/python3.5/site-packages/homeassistant/components/light/lifx.py", line 50, in __init__
    broadcast_addr)
  File "/fileserver/users/homeassistant/.homeassistant/deps/liffylights.py", line 100, in __init__
    self._sock.bind((listener_addr, UDP_PORT))
OSError: [Errno 98] Address already in use

What would trigger the exception?

Hey

I have lifx light at home and the only thing I have in my configuration.yaml is

light:
  platform: lifx
  server: 10.10.1.128
  broadcast: 10.10.1.255

Server is my Rpi IP

And my lights automatically appears in HASS.

It seems to me I tried restarting my whole server in Arch Linux. I don’t know what is triggering “address already in use.”

But once I did, it works.

I did not make any changes to my configuration file for LIFX.

I’d suggest something else was listening on UDP port 56700 as that’s the port liffylights will listen on to talk to Lifx globes.

Well then it makes sense to use netstat since that will tell me which process links to which port. I did not know which port I should be listening for, but now I know. Thanks.

1 Like

did you find out what was blocking UDP 56700?
I am using HASSbian and everytime I restart via systemctl, this same issue appear. It will be ok again after I restart the rpi.
Thanks

Ah… 6 months and it’s been so long… I don’t use LIFX at the time being, so sorry I cannot be of help.

1 Like

hi ok thanks for your reply anyway :slight_smile: