New LIFX integration: LIFX bulbs no longer connecting

I upgraded to the latest Home Assistant version and now my LIFX bulbs are no longer being found. The bulbs are successfully connected to my network and are sitting on a separate VLAN which my HA instance is also running on.

Before upgrading, my settings worked:

light:
  - platform: lifx
    server: 192.168.2.1
    broadcast: 192.168.2.255
    allow_unreachable: true

After upgrading, I have tried:

  1. No new LIFX config, just attempting to use the default of all interfaces to broadcast to
  2. With new LIFX config
lifx:
  light:
    server: 192.168.2.1
    broadcast: 192.168.2.255

However no matter what I do, it never finds any bulbs despite the bulbs showing on my network…

The only way I can get them to work is by downgrading to 0.80.1.

Any ideas how I can get it working?

If you have a firewall, the LIFX integration will now use a random port and not always 56700.

Thanks @amelchio - that’d be it.

You wouldn’t happen to know the port range I need to open up would you? Still UDP I’m guessing? Can’t seem to find anything in the code or docs.

Home Assistant will always initiate outgoing communication to UDP port 56700. You must allow responses to that.

I think it should work with a standard connection tracking firewall that allows outgoing connections but I did not test it yet.

1 Like

You were right @amelchio - thanks!

Inspecting open connections to my HA box, I found the following connections being opened up:

Proto Recv-Q Send-Q Local Address           Foreign Address         State
udp        0      0 192.168.2.1:42186       192.168.2.111:56700     ESTABLISHED
udp        0      0 192.168.2.1:59177       192.168.2.112:56700     ESTABLISHED

I just had to add the following rule to my firewall on my IOT VLAN:

-A INPUT -i enp1s0.10 -p udp --sport 56700 -j ACCEPT

My LIFX bulbs are now working again on the latest version of HA!

1 Like