-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
"Failed to connect" or "Unknown error occurred" when trying to connect to device #776
Comments
I'm getting a similar error, but is device dependent. I can add a smart plug just fine, then discovery will bring up all the other different TAPO products that I have, but if I try to add a hub or a non smart switch, I get the error message you reported above.
I should add that the devices have been working previously. |
I've managed to add the bulbs to the Samsung SmartThings app and connected SmartThings to Home Assistant. It's one additional hop, but the downlights were never going to be 100% local (can't find any downlights with similar specs outside of Hue). This at least provides a reliable means to control the downlights (with minimal lag) from Home Assistant until a solution can be found here. |
This is a duplicate of #759 and is fixed by pull request petretiandrea/plugp100#189 |
@samueljsh Is the device actually at 192.168.5.149? I encountered a bug where the integration would try to connect to the device at config["discovered_device_info"]["ip"] - the original IP address the device was discovered at - rather than config["host"] - the current IP address. Perhaps related? |
It was the actual device IP address. I have 10 of these downlights throughout the house and their IP addresses can be viewed in the Tapo app and the router config. I've tried with various of these devices and their respective IP's, and received the same results. |
This issue is stale because it has been open for 30 days with no activity. |
O mesmo acontece comigo. Estou usando outra integração que está funcionando normal, mas queria usar esta.
|
This issue is stale because it has been open for 30 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
Version of the integration
v3.1.2
Configuration
Tapo L630. Firmware: 1.1.0 Build 230823 Rel. 165100
Describe the bug
I keep receiving a "Failed to connect" or "Unknown error occurred" when trying to connect to devices. I've installed the integration via HACS and have not been able to get much further due to these errors.
I've perused most of the issues and can't find a similar topic. I've confirmed that neither my username or password contain uppercase characters. The errors are always the same, even when testing with incorrect IP, username or password variations.
I am able to ping the devices successfully on port 80 via various network devices, including the device running home assistant.
Debug log
2024-06-08 02:29:05.861 ERROR (MainThread) [custom_components.tapo.config_flow] Failed to setup cannot connect
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1025, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1120, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1102, in create_connection
sock = await self._connect_sock(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1005, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 641, in sock_connect
return await fut
^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 681, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
TimeoutError: [Errno 110] Connect call failed ('192.168.5.149', 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.12/site-packages/plugp100/new/device_factory.py", line 43, in connect
protocol = await _get_or_guess_protocol(config, session)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/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.12/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.12/site-packages/plugp100/protocol/passthrough_protocol.py", line 45, in send_request
response = await self._send_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/plugp100/protocol/passthrough_protocol.py", line 65, in _send_request
await self._login_with_version(self._credential)
File "/usr/local/lib/python3.12/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.12/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.12/site-packages/plugp100/common/utils/http_client.py", line 18, in async_make_post
async with self.session.post(
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 1197, in aenter
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 581, in _request
conn = await self._connector.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 544, in connect
proto = await self._create_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 944, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1257, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1226, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1033, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 192.168.5.149:80 ssl:default [Connect call failed ('192.168.5.149', 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
The text was updated successfully, but these errors were encountered: