Yeelight: Unable to update bulb status: Bulb closed the connection

HA 0.67.1
I have 6 Yeelight bulb RGB and 2 Bedside Lamp.

I have bunch of these:

2018-04-22 07:58:40 ERROR (Thread-13) [homeassistant.components.light.yeelight] Unable to update bulb status: Bulb closed the connection.
2018-04-22 07:58:45 ERROR (Thread-11) [homeassistant.components.light.yeelight] Unable to update bulb status: Bulb closed the connection.
2018-04-22 07:59:43 ERROR (Thread-18) [homeassistant.components.light.yeelight] Unable to update bulb status: Bulb closed the connection.
2018-04-22 07:59:48 ERROR (Thread-4) [homeassistant.components.light.yeelight] Unable to update bulb status: Bulb closed the connection.
2018-04-22 08:02:48 ERROR (Thread-18) [homeassistant.components.light.yeelight] Unable to update bulb status: Bulb closed the connection.

  • Every light is updated to the lastest firmware and LAN mode is enabled.
  • 4 bulbs and 1 bedlamp are connected to the router (like the Rpi with HA) : Fritz Box 3490
  • 2 bulbs and 1 bedlamp are connected to the repeater : Fritz Box 450E

I get these errors from the ones connected to the router and from the repeater as well, even if not much traffic on the wifi is present.

Plus, sometimes, after a little of “turn on/turn off”, some random light goes definitively off-line in HA (instead with the Yeelight app, this goes for a couple of minutes).

Same here, getting the logs below every ~20mins, using Hassbian 0.68.1.

[homeassistant.components.light.yeelight] Failed to connect to bulb 192.168.1.17, X: A socket error occurred when sending the command.
[homeassistant.components.light.yeelight] Unable to update bulb status: Bulb closed the connection.

Disinstalling any Yeelight/Mihome app and changing the channel of wi-fi (I fixed one instead of leaving to the router the “best choice”) helped me a lot!

How did that help you? Have you stopped seeing the error logs?

I told you:

  • Disinstalling any Yeelight / MiHome app
  • Changhing Wifi channel and pick a fixed one

Tried that, still seeing the aforementioned error logs in 0.69.0. Bulbs working ok though.

Hi, i’m getting the same issue, is there a way to figure out which bulb is triggering this error ? I have a bulb which is offline & i want to be sure which error message is for which bulb.

I’m getting this issue as well. Yeelight behaviour seems particularly inconsistent when using HomeKit (through Hass.io).
Occasionally the lights will show as “unavailable”. They have fixed ips and a strong WiFi connection (so aren’t channel hopping).

When they show as “unavailable” in hassio, they work just fine in in MiHome / Yeelight. I don’t see at all how removing those apps would help…

@shad0wca7
My guess is: is the socket is busy answring a request form the app, MAYBE, it is not able to answer quickly to a request from the HA.

It would make some sense but this is appearing regularly in the log. Even with the apps fully closed.

i get the same errors yet I NEVER use the app so I don’t think that is the issue, plus they often occur when no-one is home (so no chance of app interfering)

I block WAN access through a firewall rule in my router for all Yeelight/Xiaomi devices in my network and never use the apps. I unblock them periodically to check for new firmware. I haven’t seen these errors in a long time, and now see a handful of them every day. Nothing has changed other than upgrading Hass to each version as it comes out. Currently on 0.73.1 and see 3 errors in the last few hours.

2 Yeelight strips
1 Xiaomi Aqara hub with an accesory button

Same here, getting the logs below every ~10mins, using Hassbian 0.73.0.
Unable to turn on music mode.
it’s a Mi ceiling light. using a mikrotik board.

Just for interest, what IP address or domain are you blocking? (What does Xiaomi/Yeelight use)

I gave each of them a static IP and then on my WAN_OUT rules, I just block that IP. I have an EdgeRouterX, but other routers should be the same.

1 Like

Hmm… not sure my router will let me do that… I’ll need to check. Thanks. (Fritz 7590)

If it doesn’t have specific blocking abilities, either through rules or simple check boxes, you can usually just use parental control settings and set it to no time allowed online.

thanks. Good idea. I have not checked yet what I can do - not that worried in any case to be honest but that’s a good idea.

As an update on this. I’ve turned off discovery and set music mode on for the yeelights (bedside) and light strip. No more errors in the log!

I also sometimes get this message but not so often. Mostly because the blub is offline because i accidentally turned of the light switch :roll_eyes:

But i get a ton of messages from my vaccum. Sometimes every few seconds.

Unable to discover device on x.x.x.x

But it responds to all my commands from HA.

Could be possible that pi-hole is blocking some sites but i think i whitelisted everything.