al-one / hass-miio-yeelink

Xiaomi Miio Yeelink/Yeelight devices for Home Assistant
172 stars 26 forks source link

Entity Unavailable #54

Closed christianreiss closed 2 years ago

christianreiss commented 2 years ago

Hey folks,

great integration; I use it for several of those Yeelink light. Working like a charm. The only issue I have is that when I start HA it sometimes fails 1 to all devices. The entity is then marked as "Unavailable". Restarting HA works, but this means I Have to start HA 1-3 times in a row to get all the lamps working again.

Is there an option to get each lamp to retry connecting?

al-one commented 2 years ago

Any logs ?

christianreiss commented 2 years ago
2022-06-09 09:55:12 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration miio_yeelink which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-06-09 09:56:28 ERROR (MainThread) [custom_components.miio_yeelink] Got exception while fetching the state for Licht Badezimmer: Unable to discover the device 10.2.1.60

10.2.1.60 (static ip) is ping-able from the HA vm.

# nmap 10.2.1.60 -p80
Starting Nmap 7.80 ( https://nmap.org ) at 2022-06-09 09:58 CEST
Nmap scan report for 10.2.1.60
Host is up (0.070s latency).

PORT   STATE SERVICE
80/tcp open  http
MAC Address: 54:48:E6:6C:BA:75 (Beijing Xiaomi Mobile Software)

This is arbitrary. Re-start HA to fix this.

I-G-1-1 commented 2 years ago

Hi, same issue here

Using hass-miio-yeelink integration (installed by HACS) with two yeelink.light.ceiling22 (with static IPs assigneg by the router) and HomeAssistant core 2022.6.7

The light.ceiling entity somentimes become "unavailable" and the only way to solve is to to reboot HomeAssistant. I tried only to reload the integration in Settings/Integration/Miio For Yeelink/ceiling01/Reload but the light entity doesn't become available again. The only solution is reboot HA. When unavailable in HA the lamp is still online (connected trought wifi) and operable using "Yeelight" or "Xiami Home" apps.

I think the cause of this issue is that the lamp goes offline for a short period, HA during that time don't see the ceiling lamps and correctly tag the related entity as "unavailable". Then the lamps come back online but the integration doesn't react to this event, reloading the integration doesn't solve and to regain control of the lamps HA needs to be restarted.

Basically this issue make the ceiling lamps not reliable to be operated by smart switches trought HA.

What logs can be helpful? Thanks

al-one commented 2 years ago

Maybe try Xiaomi Miot Auto, it might work better.

I-G-1-1 commented 2 years ago

Maybe try Xiaomi Miot Auto, it might work better.

thanks for the help. Migrated to Xiaomi Miot Auto using Local connection (IP with token) and it seems to work better for now.

I-G-1-1 commented 2 years ago

Maybe try Xiaomi Miot Auto, it might work better.

Updated today to Xiaomi Miot Auto to version 0.6.8 and stopped working. I can switch on the light, enable/disable nightlight, but I cannot switch off the ligh. Downgraded to 0.6.7 and is working again.

al-one commented 2 years ago

Xiaomi Miot Auto 0.6.8 has a bug, fixed in 0.6.9.

I-G-1-1 commented 2 years ago

Xiaomi Miot Auto 0.6.8 has a bug, fixed in 0.6.9.

Thanks for the info. I can confirm that after the update to 0.6.9 all is working good again, thanks.