-
-
Notifications
You must be signed in to change notification settings - Fork 28.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TP-Link/Kasa integration frequent problem with connection or updating #93312
Comments
Hey there @rytilahti, @TheGardenMonkey, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) tplink documentation |
This just indicates that the connection is broken for a reason or another, but does not give any other hints why that may be happening. Are you seeing any other error message after that in the logs? You could try to enable debug logging to get more information, if nothing else is not shown. |
I'm having similar issue, I have 2 HS103 plugs (2-pack same box) and one in my office shows "unavailable" every few minutes for about 10 seconds. Now my WiFi isn't "Great" in the office but according to the AP this plug is at -70dbm so should be fine (my house isn't that big) and non-Kasa devices seem to work solid in far worse conditions. However to note, the second plug as a test I plugged into in my "game room" which is 20 ft from the AP (-46dbm) and it seems to stay connected 100% at least for the last 24 hrs or so,
|
Please test if the upcoming 2023.7.4 release improves the situation and report back, thanks! |
That duration indicates you might have something blocking your event loop. Can you try putting asyncio in debug mode? You can also do this by enabling Than look for any |
It looks like the timeout is only 5s With esphome we found it could take up to ~25 seconds to establish a connection with poor wifi which is why we bumped the timeout to 30s |
It probably makes sense to have a connect timeout of 30s and half of that for a read/write round trip to deal with poor Wi-Fi connections |
does not seem to be helping in my case (2023.8.1) |
I am also having this same problem |
Same problem. I'm not noticing any issues, just clutters the logs.
|
I was also getting hundreds of the "Unable to connect to the device" log messages for a while. Many of the devices were also going unavailable for 1 second in the logbook. Occasionally the unavailable lights would cause an error in an automation. It seems letting Tplink update the firmware on all the devices has corrected the problem for me. It's been 24 hours and I have no log messages and none of the devices have gone unavailable since. I had always blocked the devices from internet access afraid of Tplink firmware updates blocking local access. I decided to take a chance and let all the devices update to the new firmware. For reference |
Same as others: 2024-02-01 22:29:45.293 ERROR (MainThread) [homeassistant.components.tplink.coordinator] Error fetching 192.168.3.136 data: Unable to connect to the device: 192.168.3.136:9999: [Errno 113] Connect call failed ('192.168.3.136', 9999) |
Same as others with my HS110's (EU). Has been going on for quite a while so I'm not sure with what Home Assistant release the issue first started. The TP-Links are blocked from internet access on my firewall considering their actions of the past, so the firmware is probably old ( In the logs I'm seeing two variants though:
|
These issues should be fixed in the latest HA release 2024.02. |
@home-assistant close |
The problem
I see two kinds of errors with Kasa integration frequently in my logs:
Both errors happen on more than one Kasa smart socket/plug, happen frequently. The example above both represent the same plug (it is a plug on a HS300, but I also see it with KP1125 devices etc.). Whenever I see this and check with a network utility the devices are listed as on-line, respond to ping, and show as "everything fine" in the KASA app.
Overall functionality seems largely unaffected, but the logs are being swamped with these messages.
What version of Home Assistant Core has the issue?
2023.5.3
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
TP-Link/KASA
Link to integration documentation on our website
No response
Diagnostics information
config_entry-tplink-cb4a0b8013ed0f6cb9971a2397e05853.json.txt
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: