Unavailable lights and switches

In my setup I’ve got combination of yeelights and tp-link switches - often they become unavailable along with the xiaomi gateway - I can I access both either through kasa (tp-link) or Mi Home apps, how can I see why they are unavailable to Home Assistant.

Same is happening to me having these errors many times a day…

2018-04-22 15:51:25 ERROR (Thread-11) [homeassistant.components.light.yeelight] Unable to update bulb status: A socket error occurred when sending the command.
2018-04-22 15:51:25 ERROR (Thread-6) [homeassistant.components.light.yeelight] Unable to update bulb status: A socket error occurred when sending the command.
2018-04-22 15:51:25 ERROR (Thread-9) [homeassistant.components.light.yeelight] Unable to update bulb status: A socket error occurred when sending the command.
2018-04-22 15:53:49 ERROR (Thread-4) [homeassistant.components.light.yeelight] Unable to update bulb status: A socket error occurred when sending the command.

Are your errors same?

I can’t see anything on the system log - is there any other place I need to look ?

same for me

yeelight unavailable every few minutes without notifications

Has anyone got a solution for this ?

Which release of HASS are you running?
I am on 0.68.b0

0.67.1

Here is history for yesterday:

I’m running version 0.67.1

The same happened yestrday and the days before, but luckily this morning i don’ have anymore this problem… very strange but i think it depends from poor internet connections…
Do you have yeelight entries in configuration.yaml or they are self discovered?

So it’s not release dependent

my configuration.yaml:
light:

  • platform: yeelight
    devices:
    10.10.10.10:
    name: Lamp
    transition: 1000

looking at longer period history:

sometimes it satys connected for whole day sometimes its unavailable every few minutes

Hmmm i really would like to know which is better for yeelight components, if use discovery: or put all the lights in configuration.yaml. Actually i use discovery:

Mine are rock solid.

Assign them a static IP in your router. Use that IP to configure them in HASS. (Don’t use discovery).

Be aware that if anyone turns off the power to the bulb it will not be able to communicate.

I already set static IP to all my yeelight, but i was using discovery: so now i must put them in configuration.yaml and set ignore to discovery: ?

That is my preference. I have been using yeelights for a year or so now with no issues like you describe.

1 Like

I have the same also with yeelight and tp-link switches.
Some yeelights are unavailable at times, I know they have poor wifi signal but interestingly I can still control them using the yeelight app. (with a very long response time) Looks like a timeout or something in HA.
As for the tp-link switches they become unavailable while the kasa app controls them just fine. The only way I’m able to get them available in HA is by unplugging them (as I couldn’t find a reset button in the kasa app)

Interesting, I use my yeelights as outdoor lights so they are at the outside perimeter of my house and I haven’t had wifi issues (even with my old cheap wireless router).

I have mine blocked from outside internet access (I don’t use their app after setup). That is the only thing I can think of that would be different in my setup.

That or if you live in a very congested WiFi area, not sure if these use 2.4 or 5 GHz (or both) connections.

I read that some problems can come if you use at the same time HA and MiHome app to control yeelight lights… Really don’t know if this is true or not.

I keep getting this message on the log

components/xiaomi_aqara.py (ERROR)
Got error element in data {“error”:“Invalid key”}

I’ve changed the key on Mi Home App and still says the same error message

none of my automations are now working.

I have fought this problem from the beginning with YeeLight and OMG LIFX! I have finally resolved the issue almost 100% and it has been working well for several months.

I created a separate SSID just for the devices that are tricky. Once inserted in the SSID things are very stable. They seem to want a very quite airspace.