home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.17k stars 30.57k forks source link

TP-Link devices sporadically unavailable after some time #122802

Closed dinan5 closed 1 month ago

dinan5 commented 3 months ago

The problem

Hello - Can we please re-open this issue? after a power cycle of 6 plugs, the messages subside for a few hours but then reappear sporadically. No where near the volume previously, but still occurring none-the-less.

What version of Home Assistant Core has the issue?

2024.7.3

What was the last working version of Home Assistant Core?

N/A

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

Logger: homeassistant.components.tplink.coordinator Source: helpers/update_coordinator.py:344 integration: TP-Link Smart Home (documentation, issues) First occurred: 3:38:06 PM (1 occurrences) Last logged: 3:38:06 PM

Error fetching xx.xxx.xxx.193 data: Unable to connect to the device: xx.xxx.xxx.193:9999:

Example YAML snippet

No response

Anything in the logs that might be useful for us?

What additional log data do you need?

Additional information

No response

home-assistant[bot] commented 3 months ago

Hey there @rytilahti, @bdraco, @sdb9696, mind taking a look at this issue as it has been labeled with an integration (tplink) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `tplink` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign tplink` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


tplink documentation tplink source (message by IssueLinks)

OldManOfTheSea69 commented 3 months ago

I have also started to experience a similar problem. It appears to be associated with the device receiving a different ip address via DHCP. Example below which shows the error containing the old ip address and Tapo showing the new ip address. I’ve tried all of the normal restarts but I don’t really want to delete and re-add all of my Tapo devices and recreate all of the automations etc. IMG_2181 IMG_2182

sdb9696 commented 3 months ago

@dinan5 what model of plugs are these? Regarding the logs can you enable debug logging for the integration and upload them.

githubrdonefun commented 3 months ago

This is also happening to me. It asks me to authenticate to the cloud service again if I restart. Logging in fixes it temporarily.

s55ma commented 2 months ago

same ...

Ali229 commented 2 months ago

Not sure if I have the same issue but I have LB110 bulb that stops being available both on home assistant and Kasa app. I also have two Smart Plugs - no problem with them.

issue-triage-workflows[bot] commented 2 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

rytilahti commented 2 months ago

@OldManOfTheSea69

I have also started to experience a similar problem. It appears to be associated with the device receiving a different ip address via DHCP. Example below which shows the error containing the old ip address and Tapo showing the new ip address. I’ve tried all of the normal restarts but I don’t really want to delete and re-add all of my Tapo devices and recreate all of the automations etc.

That might be a completely separate issue, but is your homeassistant configured to use both of the networks? If so, the discovery should automatically update the IP address to the config entry. You can manually trigger the discovery by going to the add integration page, start adding a new tplink device, and leaving the host field empty. It will automatically run discovery on all configured network interfaces.

ronyoung commented 2 months ago

I am experiencing my TP-Link devices going up and down like an old man socks every 20-30 seconds. This has been going on for a couple of days for unknown reasons. All I get in the logs are each one of the TP link devices is "unavailable" . Is there anything that I need to do like uninstall the TP link integration or something else that would stop this sporadic behavior?

Happyrobot33 commented 2 months ago

I will concur that I have been having the same issue, sockets will just randomly kick themselves as unavailable. However the interesting part is that they also become unavailable in the kasa app, so it maybe be a TP link issue? unless something with the integration is making it drop that connection to tplink too

ronyoung commented 2 months ago

This afternoon I did a factory reset of my Home Assistant Green and restored from a backup 5 days ago which I perceived was before I tried something that essentially bricked HA.

While HA now runs faster, the TP-Link devices are still randomly becoming unavailable. Unlike Happyrobot33 above, the devices that are currently not working in HA still work with the Kasa app on my phone.

Help!

andreabafile commented 2 months ago

To me this issue is happening almost every time I reboot HA. The only solution found is to unplug the Tapo devices and replug them. Then they're immediately available again. It's driving me crazy. To be clear, on the Tapo app everything is working fine.

image

NuGundam commented 2 months ago

I have been getting the same issue too, it's been driving me nuts because I have motion sensors tied to a lot of the switches and randomly they fail to turn on or off. Wifi signal is good, factory reset them all at least twice, and moved them to a different AP.

palros commented 1 month ago

I am new to HA and the only thing i cant get to work is my Tapo plugs. They simply will not show up, even if i give the IP address. I even bought a HUB to see if that was the issue. It simply will not detect and i have 11 tapo devices.

rytilahti commented 1 month ago

So there are probably different problems reported in this issue. Anyway, stability issues with devices that require authentication should be fixed in the next release (the update cycle does not contact the cloud anymore, #124930). Feel free to test the beta release and report back if this is now fixed.

Happyrobot33 commented 1 month ago

So there are probably different problems reported in this issue. Anyway, stability issues with devices that require authentication should be fixed in the next release (the update cycle does not contact the cloud anymore, #124930). Feel free to test the beta release and report back if this is now fixed.

What is mentioned in that PR actually sounds almost exactly like the issue ive been having so hopefully that fixes it

issue-triage-workflows[bot] commented 1 month ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

AV0uu commented 1 month ago

Unfortunately the issue was not resolved with the latest update. Kasa devices, especially the in-wall outlets are constantly going offline.

yuisheaven commented 1 month ago

I did not have any problems at first but when re-initializing my devices because I was swapping to a multi-account environment, the Tapo and Kasa Hubs also updated their firmware and since then, nothing is working reliable anymore. I am having multiple disconnects daily and for multiple hours. Looking at the logs and my router, the devices are even in the wifi when stating not reachable, so it doesnt seem to be a pure wifi problem. I assume that it might have to do with some kind of rate limit though as I feel like the Tapo Hub and Kasa Hub only make those reliability problems as long as my home assistant tp-link integration is running. I had it disabled today and had no issues with the Hubs.. I'll try to see if it really is that way or if that's just because the Tapo App won't notify me when the Hubs go offline

sdb9696 commented 1 month ago

This is issue is quite old and the original reporter has not responded to the request for more information. Since it was raised, a fix has been released to stop querying for the latest device firmware which was a major cause of stability issues. I will close this issue and request that anyone still having issues with device connections raise a new issue and fill in the issue template with as much info as possible, including debug logs. Many thanks.