Keeping getting this error 'Connection error: try_connect_all failed' when trying to add tp link tapo devices to Home Assistant
The problem
I've recently solved an issue with Home Assistant not working due to upgrading to the latest versions of everything.
After solving this issue and updating all my addons and services, I have an new (reoccurring) issue with my TP Link Tapo devices not working.
I found out TP has an official addon now so I installed that and removed the community developed ones.
Now I keep getting the following error: Connection error: try_connect_all failed when I try to add my devices.
Firstly I've spent several hours trying to add the devices.then I thought it might be a good idea to restart Home Assistant after removing the Tapo community addons. Now I keep getting this issue when the devices are trying to be initialised:
Failed setup, will retry: Unable to communicate with the device connect: ("Device connection error: 192.168.1.231: Cannot connect to host 192.168.1.231:80 ssl:<ssl.SSLContext object at 0x7f7cfef140> [Connect call failed ('192.168.1.231', 80)]", ClientConnectorError(ConnectionKey(host='192.168.1.231', port=80, is_ssl=False, ssl=<ssl.SSLContext object at 0x7f7cfef140>, proxy=None, proxy_auth=None, proxy_headers_hash=None), OSError(113, "Connect call failed ('192.168.1.231', 80)")))
I don't think TP Link Tapo and Home Assistant are a good choice for a smart home combination, each time something changes, I have to spend a long time getting it working. It shouldn't be this hard setting up my smart devices with home assistant and can understand why some people are put off but it.
Is any one able to help??? 😢
What version of Home Assistant Core has the issue?
core-2025.3.4
What was the last working version of Home Assistant Core?
core-2025.3.4
What type of installation are you running?
Home Assistant OS
Integration causing the issue
TP Link Smart Home
Link to integration documentation on our website
https://www.home-assistant.io/integrations/tplink/
Diagnostics information
home-assistant_tplink_2025-03-24T23-28-39.995Z.log
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
In the image below, you'll see 4 out of my 6 devices connected, but then 1 out of the 4 isn't working.
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 closeCloses the issue.@home-assistant rename Awesome new titleRenames the issue.@home-assistant reopenReopen the issue.@home-assistant unassign tplinkRemoves the current integration label and assignees on the issue, add the integration domain after the command.@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue.@home-assistant remove-label needs-more-informationRemove 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)
Tengo el mismo problema. si activo la pestaña video en directo da error de autentificacion.
I keep getting "Unable to authenticate: Device response did not match our challenge on ip 192.168.1.136, check that your e-mail and password (both case-sensitive) are correct." on all my Tapo devices. The user name and password are correct so no idea why
I keep getting "Unable to authenticate: Device response did not match our challenge on ip 192.168.1.136, check that your e-mail and password (both case-sensitive) are correct." on all my Tapo devices. The user name and password are correct so no idea why
I too am getting this. It started with an authentication error on a camera. I've removed it and now cannot add it back. I've changed username/password to confirm they are correct. I have deleted the camera from the app and readded, still no luck.
After giving up on this that evening and only getting 4/6 devices added I left it and went to sleep. When I logged in the next day the integration had auto discovered the missing 2/6 devices and I managed to add them quite easily. Not sure what was happening the night before, it's like the tech was just being a pain in my a**.
I have exactly same problem as [blackthorn87]. Is there any workaround for it?
Started getting this this morning too ‘try_connect_all failed‘ Integration needs reconfiguration,but when I put in my login details for tplink I get the above error after a timeout.
Started getting this this morning too ‘try_connect_all failed‘ Integration needs reconfiguration,but when I put in my login details for tplink I get the above error after a timeout.
I'm starting to think either the plugin just isn't optimised, or requires some time to discover smart home devices, or low powered devices (like the raspberry pi 3) just need time to discover and process...
Agree, after trying again later, it failed communicating to a specific defined matter device, so I retried and it completed successfully. So maybe it is just too short a timeout. Note I run on an i5 PC not on a pi.
I am on a i5 nus and still could not get to connect. After checking in the app on my phone I realised all Tapo devices were no longer connected to the internet, they were connected via Bluetooth to my phone, I deleted all devices from the app and factory reset them, then set them back up on the app and connecting fine now.
Also getting this - I had to update IP of one of my Kasa devices and it makes me connect - using correct account details but after a long try I get the error 'try_connect_all failed' Running in Docker on my Synology. I can control the outlet via the Kasa app - just not HA.
Same problem here. On a Proxmox VM. Managed to get some devices working by editing the IP address in core.config_entries, but it would be nice if the integration could be fixed. Seems like the integration isn't pulling the device details from TP Link.
Same problem here. On a Proxmox VM. Managed to get some devices working by editing the IP address in
core.config_entries, but it would be nice if the integration could be fixed. Seems like the integration isn't pulling the device details from TP Link.
Can you show the configuration yaml you used to do this? I’m still getting the try_connect_all error after HA integration asks me to put in the bulb’s IP address.
Same problem here. On a Proxmox VM. Managed to get some devices working by editing the IP address in
core.config_entries, but it would be nice if the integration could be fixed. Seems like the integration isn't pulling the device details from TP Link.Can you show the configuration yaml you used to do this? I’m still getting the
try_connect_allerror after HA integration asks me to put in the bulb’s IP address.
Sure, the path to the relevant file is ~/config/.storage/core.config_entries. You can then search for the device alias and edit the ip address on that line before restarting homeassistant. Probably wise to backup first! :)
Has anyone been able to fix this? Yesterday my home assistant device died because TP Link tried to reach my 3 devices more than 4600 times in 38 minutes. The message is the same of the one posted up here in the ticket. Is is because we blocked internet access to these devices as we want to run them 100% local? Could it be possible that the parental control restriction from my router are generating this issue? The have been working greath both in HA and in the Tapo app. No clue why they looped for 5k times yesterday shutting off my home assistant server. Thanks @rytilahti, @bdraco, @sdb9696
Happy to make a separate ticket if y'all want, but I'm having the same problem with Smart Home TP-Link KL50 smart bulb. It's added in the Kasa app and works, but not in HA. No additional info in the system logs (the ones displayed in the HA GUI), if I should look somewhere else, let me know.
I also looked at @gm5dna 's suggestion but the device isn't in my core.config_entries, potentially because it's not getting through the auth process.
Just to add that I have been getting similar messages/failures, especially after a host restart (used to be RPi now is Proxmox on a Mini PC).
A quick fix is resetting/unplugging the TAPO device. After a few seconds the device is back online.
This is the error message in case someone wants to review it:
Tapo Plug P110-1 P110
[1 device](https://192.168.1.52:8123/config/devices/device/df22ef297d6718b88711f32d3f51eaf5) and [23 entities](https://192.168.1.52:8123/config/entities?historyBack=1&config_entry=1275d1d8ffa1f00b6507042b600e2d21)
Failed setup, will retry: Unable to communicate with the device connect: ("Device connection error: 192.168.1.178: Cannot connect to host 192.168.1.178:80 ssl:<ssl.SSLContext object at 0x7f42392bd250> [Connect call failed ('192.168.1.178', 80)]", ClientConnectorError(ConnectionKey(host='192.168.1.178', port=80, is_ssl=False, ssl=<ssl.SSLContext object at 0x7f42392bd250>, proxy=None, proxy_auth=None, proxy_headers_hash=None), OSError(113, "Connect call failed ('192.168.1.178', 80)")))
@zdepian do you have parental control restriscions/some kind of protections on your router as well? Or did you block internet access to these devices? Doing some research online, this might be able to block communication on port 80 like it's showing in the error. I'm not an expert but if you don't have anything like that setup on your router I think the problem is another one.
@giovanniong98 thanks for the recommendation. I have no restrictions on my router. Tapo devices that are encountering this issue (and at a random fashion, sometimes they do sometimes they do not) are tapo plugs (P110 and P100 ones) and tapo led strips. If it were a router issue, I assume the error would be consistent and on all devices.
I have the same as @katelovescode, I can't get my credentials to be accepted. I have enabled third party compatibility (which must have turned off in an app update) and I have 2 P110 plugs already in HA, but it won't let me add any new devices because of this problem. The below config_flow error was in my log (10.0.0.38 is the new device I was trying to add at the time).
2025-04-28 08:32:40.990 ERROR (MainThread) [custom_components.tapo.config_flow] Failed to setup cannot connect
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 1115, in _wrap_create_connection
sock = await aiohappyeyeballs.start_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<5 lines>...
)
^
File "/usr/local/lib/python3.13/site-packages/aiohappyeyeballs/impl.py", line 122, in start_connection
raise first_exception
File "/usr/local/lib/python3.13/site-packages/aiohappyeyeballs/impl.py", line 73, in start_connection
sock = await _connect_sock(
^^^^^^^^^^^^^^^^^^^^
...<6 lines>...
)
^
File "/usr/local/lib/python3.13/site-packages/aiohappyeyeballs/impl.py", line 208, in _connect_sock
await loop.sock_connect(sock, address)
File "/usr/local/lib/python3.13/asyncio/selector_events.py", line 641, in sock_connect
return await fut
^^^^^^^^^
File "/usr/local/lib/python3.13/asyncio/selector_events.py", line 681, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('10.0.0.38', 80)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/config/custom_components/tapo/config_flow.py", line 314, in _async_get_device
device = await connect(config=config, session=session)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/plugp100/new/device_factory.py", line 43, in connect
protocol = await _get_or_guess_protocol(config, session)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/plugp100/new/device_factory.py", line 65, in _get_or_guess_protocol
return await _guess_protocol(config, session)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/plugp100/new/device_factory.py", line 94, in _guess_protocol
info = await protocol.send_request(device_info_request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/plugp100/protocol/passthrough_protocol.py", line 45, in send_request
response = await self._send_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/plugp100/protocol/passthrough_protocol.py", line 65, in _send_request
await self._login_with_version(self._credential)
File "/usr/local/lib/python3.13/site-packages/plugp100/protocol/passthrough_protocol.py", line 84, in _login_with_version
session_or_error = await self._passthrough.handshake(self._url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/plugp100/protocol/securepassthrough_transport.py", line 70, in handshake
response = await self._http.async_make_post(url, json=request_body)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/plugp100/common/utils/http_client.py", line 18, in async_make_post
async with self.session.post(
~~~~~~~~~~~~~~~~~^
url, json=json, headers=self.common_headers
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
) as response:
^
File "/usr/local/lib/python3.13/site-packages/aiohttp/client.py", line 1425, in __aenter__
self._resp: _RetType = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/aiohttp/client.py", line 703, in _request
conn = await self._connector.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
req, traces=traces, timeout=real_timeout
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 548, in connect
proto = await self._create_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 1056, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 1400, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 1369, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<7 lines>...
)
^
File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 1130, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 10.0.0.38:80 ssl:default [Connect call failed ('10.0.0.38', 80)]
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/config/custom_components/tapo/config_flow.py", line 143, in async_step_user
device = await self._async_get_device(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tapo/config_flow.py", line 322, in _async_get_device
raise CannotConnect from error
custom_components.tapo.errors.CannotConnect
I have the same issue with a C210 with Firmware version v1.4.5
Erreur de connexion : ("Device connection error: 192.168.0.111: Cannot connect to host 192.168.0.111:443 ssl:<ssl.SSLContext object at 0x7f0ff03d6c30> [Connect call failed ('192.168.0.111', 443)]", ClientConnectorError(ConnectionKey(host='192.168.0.111', port=443, is_ssl=True, ssl=<ssl.SSLContext object at 0x7f0ff03d6c30>, proxy=None, proxy_auth=None, proxy_headers_hash=None), ConnectionRefusedError(111, "Connect call failed ('192.168.0.111', 443)")))
Looks like the Camera Firmware turn it up again. 2 months after auth resolution due to TO Link auth method update, they did it again ah ah
For some reason this morning HA discovered my P110 and when I added it the credentials worked, so I added the rest of my new devices the same way I tried when I got the above error and that worked too, so the credential check seems to be working again. Thanks.
I'm also having the same issue. Frigate no longer would connect via rtsp. Motioneye was working, now not. I updated the login details to the cameras, and now neither will connect. Very frustrating as this had been working faultlessly for some months now.
Same issue here, I fixed it by uninstalling and installing the integration. It happened after a power outage, so I think IP changes may confuse the integration.
Same problem here. On a Proxmox VM. Managed to get some devices working by editing the IP address in
core.config_entries, but it would be nice if the integration could be fixed. Seems like the integration isn't pulling the device details from TP Link.Can you show the configuration yaml you used to do this? I’m still getting the
try_connect_allerror after HA integration asks me to put in the bulb’s IP address.Sure, the path to the relevant file is
~/config/.storage/core.config_entries. You can then search for the device alias and edit the ip address on that line before restarting homeassistant. Probably wise to backup first! :)
What to edit? I looked one device in this file, IP address is same as its IP address. Didn't find anything wrong
Same issue here, I fixed it by uninstalling and installing the integration. It happened after a power outage, so I think IP changes may confuse the integration.
I also started having this issue after power outage for 3 TS200 switches.
I uninstalled and re-installed the problematic device - providing IP address would require authentication, which never works for me - so I clicked on "restart" button on the TS200, then it was found right after I type in IP address again. However, it becomes unavailable again after HA reboots.
Hi all, same issue here. Tried resetting and adding some bulbs manually to avoid TSS auto configuration but the problem persists.
I fixed the issue by removing device_tracker from configuration.yaml.
I was also running into this issue. I confirmed third party apps were allowed in the Tapo app, I rebooted HA, nothing. Once I rebooted the camera itself in the Tapo app I was able to connect my camera to HA. Now I'm getting rtsp errors and cannot access the stream, but I at least got past this issue.
After a reset due to a power outage, all my bulbs linked without issue, so I'm good now.