Hey there,
I know this is probably the 5000th issue in the forum about the connection issues with Yeelights and right from the start I also have to say: I’m so close to smash all of my lights, if these issues won’t be fixed.
So first: I am using the lamps with Home Assistant (HA), which made me aware how often these issues occur. But if a lamp is offline in HA, it’s also offline in the Yeelight app. So let’s not talk about the Yeelight app.
So like many people, I see multiple issues with my Yeelights, ending up in two different main issues:
- Constant flapping state in Home Assistant: A bulb or Ceiling light suddenly gets unavailable in HA and then comes back the next scan interval, so ~30 seconds after.
- Bulbs getting completely unresponsive, but still showing up in my router as connected device, but you can’t even Telnet to them. You have to power off and on. No way it ever comes back on its own
These are all my Yeelights / Mi Lights:
- 3x Color bulbs (color2)
- 2x Mi bedside Lamp 2 (bslamp2)
- 2x Ceiling lights (YLXD42YL)
- 1x Ceiling light (YLXD50YL)
- 1x Pendant Light (ceiling10)
The most painful are actually the Mi Bedside lamps: They go on/offline like every 5 minutes!!
Let’s start with #1:
Also as many people already posted, I can see this happening in the HA logs every few minutes:
2020-11-13 15:58:42 ERROR (SyncWorker_37) [homeassistant.components.yeelight] Unable to update device 192.168.178.35, [Bedroom] Bedside Lamp Andy: Bulb closed the connection.
or
2020-11-13 00:35:04 ERROR (SyncWorker_17) [homeassistant.components.yeelight] Unable to update device 192.168.178.35, [Bedroom] Bedside Lamp Andy: A socket error occurred when sending the command.
I also tried to do a simple Python script that uses the Yeelight Python library to simply open a socket connection and listen to events. The events come in and work but after like 3-5 minutes the socket connection goes stale; not a single event comes in anymore. Also no exception is happening, but that can be because I might not handle the exceptions well in my little test script. But ultimately, it’s the same HA sees: The “socket connection just breaks” (I don’t know how to correctly phrase that, as I don’t know what’s actually happening).
I’ve spend so much time to really knowing that it is 100% not my Wi-Fi:
That’s my Wi-Fi setup:
- Router: Fritz!Box 7530
- The Fritz!Box is located pretty much in the middle of my 85qm² apartment
- Two TP-Link Powerline adapters, newest Gen, 1300MBit (effectively doing only 300-600, but whatever…).
- They broadcast the same SSID as the router
What I did to ensure it is not my Wi-Fi:
- Removed all powerline adapters to ensure it’s not them: Issues still happening
- Bought two Fritz! 1300 Wi-Fi repeaters and have them instead of the powerline: Issues still happening
- Bought a complete new router(!!!): Issues still happening
- Back to my Fritz!Box and placing a Bedside lamp literally 1m away from the Fritz!Box: Issues still happening
It’s not my Wi-Fi. It is the Yeelight firmware or hardware. And again: even though I performed the tests only with a Bedside lamp, all lamps have this same issue #1. The Bedside lamps are just crazy insane with it.
Another issue I’m seeing mainly with the color bulbs, but also with the ceiling and pendant lights (not that much with the bedside lamps though. Actually not sure if I ever saw that happening for them), is:
Issue #2:
The bulbs go completely unresponsive, but still having a Wi-Fi connection: My Fritz!Box lists them as being actively connected. Over hours and days if I don’t do anything to them. But neither HA can connect to them, nor can I do a simple Telnet!
Look at this screen where I try to telnet to two color2 bulbs (.40 and .44, which are still listed as being actively connected in my Fritz!Box backend), but fail to connect. But another bulb (.37) works. I just did the connection to .37 to showcase that this telnet is actually working, if the bulb would respond:
One thing I realized though was, that with the new router I (temporarily) bought, the issues were happening way less than before. So I thought what it might be, because it can’t be the signal strength: Remember the Bedside lamp next to the router.
I realized that I (as a kind of fan of privacy) have denied Internet access for all my smart devices in my home, incl. the Yeelights. And they don’t need to have internet access, as they all have LAN mode active and purely communicate locally through my HA. And that works, if they don’t decide to have connection issues all the time.
So I allowed internet access again for them and WOULD YOU LOOK AT THAT: The issues reduced by 90%! They are still happening but waaaaay less. Actually: #2 I have not seen yet with internet access activated. But #1 still happens, but again: way less.
So my conclusion is that all Yeelights at least hate it to not have internet, which is absolutely, utterly ridiculous!! Especially, if you offer a LAN mode, there is not a single reason for internet access, except Yeelight wanting to know if my lights are on or off!
But again: These issues still happen with internet access allowed so this is either not the only reason, or they keep to loose the connection for… god knows why.
I’m of course on the newest firmware 2.0.1. something or 2.1… I don’t know anymore and honestly: It doesn’t matter. This happens since 1.8 at least…
I’m really happy to try out debug builds you send me or anything else how I could help getting rid of these issues. I’m a developer, I’m quite experienced with a few things, incl the ESP8266 modules you’re using and the ESP tool to flash them. So I hope I can be a valuable resource of help to get this fixed!
At least: Do not require internet access / Do not have the lights restart (or whatever they do) if they can’t reach your servers!!
I really, really want to get this fixed finally. I spend so much money and work and time into these Yeelights and I like their look & feel. It would be a shame to dump them all and buy new ones…
Greetings,
Andy!