LIFX bulb randomly unavailable

Hello,

I have a LIFX bulb that I have integrated using the integration page. It worked very well the past months but since about 1 week the lamp becomes randomly unavailable in Home Assistant. Using the Lifx app, I can always access the lamp so this problem only happens via Home Assistant.

I’ve already tried a factory reset of the lamp and reinstalling the integration in HA.

I’ve been having this happen recently too. This normally happens when some type of restart happens on home assistant or the network.

Disconnecting the integration and reconnecting does not do anything. It almost seems like something’s changed with the LIFX api.

For me, the bulbs usually reconnect within 24 hours.

It’s been happening for at least the last month where prior to that they were some of the most consistent, steady bulbs I owned.

For me the disconnects happen all the time and it reconnects within an hour, so it does not stay disconnected so long as in your case. It is really strange because 1 month ago this bulb was really reliable.

I wish there was a fix for this really strange issue.

I have 50 Lifx bulbs all working as expected.

I have one Lifx light that is in a poor wifi reception area and it takes a little longer than the others to reconnect after a restart. Usually within minutes though.

I have had the same problem over the past couple weeks. Seems to happen for me in the afternoon/evening time. My nighttime automations stop working and when I check, HA says the bulbs are off, but they are on. Hitting the switch in HA does nothing. The LIFX app is working fine. So I restart HA and it seems to work again until the following evening, then back to the same issue.

this problem lasted for me about 1 week that the LIFX bulb is randomly not available in Home Assistant (they LIFX app worked all the time). Now after this 1 week everything is working again perfectly without me having done anything to it. It is a real strange problem why this is happening with Home Assistant and LIFX.

How many wifi clients do you have and what are you using for access points?

I found a fix for me as well that I was just coming online to share and was happy to see you’re set as well. Anyway, I began thinking it was a network issue of some kind. I’ve been using PiHole for my DHCP server for months and recently upgrade to PiHole 5. I decided to try and switch back to using my ddwrt dhcp server and lo and behold, it worked without issue.

I spent a lot of time in the last few weeks looking into this. Tried seeing if I could identify a bug within the source code as well. It does look like there could be some improved error handling or logging in the code however I didn’t spend a lot of time figuring out how the component and the python package worked (GitHub - frawau/aiolifx: Python 3 /asyncio library for Lifx) to identify an issue. Only reason I say it could use some is because in the logs I would see a message that says the bulb was discovered then quickly one that says it couldn’t be initialized with no details as to why.

That error is triggered here core/homeassistant/components/lifx/light.py at 352c572e5dcc6f469a8f5eef161dc220fb798dbe · home-assistant/core · GitHub when it’s not able to retrieve details from the bulb. So it finds it on the network but can’t talk to it. Not sure what would prevent that when utilizing PiHoles DHCP but it seemed to be the culprit for me.

I can confirm what you are saying. I also had PiHole running in my network and this must have caused the issue. Now that I’m no longer using it, I’m not getting anymore problems with Lifx. :slight_smile:

I’ve had the same issue, seems like it probably started around the same time as these posts.

Mine stop being controlled by HA, they go unavailable, but work fine from the lifx app. Only rebooting it or HA seem to fix it.

I have pihole in my network but it is not the dhcp server.

Has anyone found a solid fix for this one? I also am running pihole, but it’s not serving dhcp, but have noticed my 3 bulbs have been disconnected from HA for months, but they work in the LIFX app

These problems are usually because people have firewalls or NAT setups (including Docker without --net=host) that block the responses from the bulbs.

thats certainly possible, while I do have all of my IOT devices on a segregated vlan, the LIFX devices WERE working with HA for 2 years, and then just stopped. I double checked my FW rules, and no new rules have been implemented in over a year.

I’ll get some cycles to dig into it soon, its just not high on my priority list. I’ll try moving some devices to a less restricted vlan and see what happens.

so total goof on my part. I updated my edgerouter and lost my broadcast configs. In case anyone else on UBNT gear runs across this. You’ll need to setup bcast-relay after an update.

2 Likes

Mine has just started going offline while still being available in the lifx app. Ugh

I use several Lifx bulbs and fought with this for almost a couple of years. My fix was to create a virtual AP and join all my Lifx bulbs to that VAP. This limits the chatter the bulbs have to deal with. Have not had a problem since and has been good for a couple of years.

This fixed my similar problem with Lifx lights becoming randomly unavailable.
In configuration.yaml add
LIFX:
light:
- server: xxx.xxx.xxx.xxx #ip address HA server
- broadcast: xxx.xxx.xxx.xxx #ip address first light
- broadcast: xxx.xxx.xxx.xxx.#ip address each other light

Notes: server statement might not be needed.
xxx.xxx.xxx.255 to broadcast to a range doesn’t work for me
On Raspberry Pi might need to
sudo apt install ufw
sudo ufw allow from any port 56700 proto udp

1 Like