cannot connect h200

Deze fout is ontstaan door een aangepaste integratie.
Logger: custom_components.tapo.config_flow
Source: custom_components/tapo/config_flow.py:118
Integration: TP-Link Tapo (documentation, issues)
First occurred: 16:39:26 (1 occurrences)
Last logged: 16:39:26
Failed to setup cannot connect
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 980, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs)  # type: ignore[return-value]  # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1085, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1069, in create_connection
sock = await self._connect_sock(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 973, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 628, in sock_connect
return await fut
^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 668, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
TimeoutError: [Errno 110] Connect call failed ('<IP_ADDRESS>', 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 215, in _try_setup_api
await client.initialize()
File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 62, in initialize
await self._guess_protocol()
File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 218, in _guess_protocol
response = await self.execute_raw_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 71, in execute_raw_request
return (await self._protocol.send_request(request)).map(lambda x: x.result)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 42, in send_request
response = await self._send_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 62, in _send_request
await self._login_with_version(self._credential)
File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 81, in _login_with_version
session_or_error = await self._passthrough.handshake(self._url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/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.11/site-packages/plugp100/common/utils/http_client.py", line 18, in async_make_post
async with self.session.post(
File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1141, in aenter
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 536, in _request
conn = await self._connector.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 540, in connect
proto = await self._create_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 901, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1209, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1178, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 988, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host <IP_ADDRESS>:80 ssl:default [Connect call failed ('<IP_ADDRESS>', 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 118, in async_step_user
tapo_client = await self._try_setup_api(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tapo/config_flow.py", line 220, in _try_setup_api
raise CannotConnect from error
custom_components.tapo.errors.CannotConnect

Same problem with me.
"Unknown error occurred" when trying to add h200.
H200 hub connects successfully through Tapo camera control integration.

This is my log.
2023-10-28 12:43:15.608 ERROR (MainThread) [custom_components.tapo.config_flow] Failed to setup cannot connect
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 980, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs)  # type: ignore[return-value]  # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1085, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1069, in create_connection
sock = await self._connect_sock(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 973, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 628, in sock_connect
return await fut
^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 668, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
TimeoutError: [Errno 110] Connect call failed ('<IP_ADDRESS>', 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 215, in _try_setup_api
await client.initialize()
File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 62, in initialize
await self._guess_protocol()
File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 218, in _guess_protocol
response = await self.execute_raw_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 71, in execute_raw_request
return (await self._protocol.send_request(request)).map(lambda x: x.result)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 42, in send_request
response = await self._send_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 62, in _send_request
await self._login_with_version(self._credential)
File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 81, in _login_with_version
session_or_error = await self._passthrough.handshake(self._url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/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.11/site-packages/plugp100/common/utils/http_client.py", line 18, in async_make_post
async with self.session.post(
File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1141, in aenter
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 536, in _request
conn = await self._connector.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 540, in connect
proto = await self._create_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 901, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1209, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1178, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 988, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host <IP_ADDRESS>:80 ssl:default [Connect call failed ('<IP_ADDRESS>', 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 118, in async_step_user
tapo_client = await self._try_setup_api(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tapo/config_flow.py", line 220, in _try_setup_api
raise CannotConnect from error
custom_components.tapo.errors.CannotConnect

'<IP_ADDRESS>'

Is this a local ip address '<IP_ADDRESS>'?

yes local

same error
Deze fout is ontstaan door een aangepaste integratie.
Logger: custom_components.tapo.config_flow
Source: custom_components/tapo/config_flow.py:118
Integration: TP-Link Tapo (documentation, issues)
First occurred: 21:09:37 (1 occurrences)
Last logged: 21:09:37
Failed to setup cannot connect
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 980, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs)  # type: ignore[return-value]  # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1085, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1069, in create_connection
sock = await self._connect_sock(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 973, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 628, in sock_connect
return await fut
^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 668, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
TimeoutError: [Errno 110] Connect call failed ('<IP_ADDRESS>', 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 215, in _try_setup_api
await client.initialize()
File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 62, in initialize
await self._guess_protocol()
File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 218, in _guess_protocol
response = await self.execute_raw_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 71, in execute_raw_request
return (await self._protocol.send_request(request)).map(lambda x: x.result)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 42, in send_request
response = await self._send_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 62, in _send_request
await self._login_with_version(self._credential)
File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 81, in _login_with_version
session_or_error = await self._passthrough.handshake(self._url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/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.11/site-packages/plugp100/common/utils/http_client.py", line 18, in async_make_post
async with self.session.post(
File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1141, in aenter
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 536, in _request
conn = await self._connector.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 540, in connect
proto = await self._create_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 901, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1209, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1178, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 988, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host <IP_ADDRESS>:80 ssl:default [Connect call failed ('<IP_ADDRESS>', 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 118, in async_step_user
tapo_client = await self._try_setup_api(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tapo/config_flow.py", line 220, in _try_setup_api
raise CannotConnect from error
custom_components.tapo.errors.CannotConnect

Would be better I think H200 not to be mentioned in supported devices till this has been sorted out.

Same for me so far the H200 can not connect.
H200 firmware : 1.2.23
home-assistant-p100 : 2.11
HomeAssistant : 2023.11.0

same here. It tries to connect 80 port, but camera 80 port is closed. 443 is open

Same here
H200 firmware : 1.2.23
home-assistant-p100 : 2.11
Core : 2023.11.2
Supervisor: 2023.11.3
OS 11.1
Nothing new to add !, same errors :(

Tapo has released a new authentication flow recently. It is advertised as encrypt_type: 3. In short, they turned to using a challenge response protocol to address security issues. Context here:
https://docs.google.com/presentation/d/1zdG803ZWzpvpM0LFUE-MU2lusrOALOAaroGsQ9dj42Y/edit#slide=id.p

Hi guys, to fix issue with h200 I need someone runs this python script, and report here the output
import asyncio
import os

from plugp100.api.hub.hub_device import HubDevice
from plugp100.api.light_effect_preset import LightEffectPreset
from plugp100.api.tapo_client import TapoClient
from plugp100.common.credentials import AuthCredential

async def main():
    # create generic tapo api
    username = os.getenv("USERNAME", "<tapo_email>")
    password = os.getenv("PASSWORD", "<tapo_password>")

    credentials = AuthCredential(username, password)
    client = TapoClient(credentials, "<tapo_device_ip>")
    await client.initialize()

    print(await client.get_device_info())
    print(await client.get_child_device_list())
    print(await client.get_child_device_component_list())

if __name__ == "__main__":
    loop = asyncio.new_event_loop()
    loop.run_until_complete(main())
    loop.run_until_complete(asyncio.sleep(0.1))
    loop.close()

Hi,
I can help but not sure where to save this script on HA and how to run it? I have an H200 and HA installed with terminal access.

I can " join in " but as you , i have no idea what and howto :)

You must create a python file, like main.py and then run python main.py. You can run It on same HA machine

dont know how to "make it run in studio-code-s , does it work to run in terminal ?

hmmm wait, am i in the wrong "issue" here ? , i thought this was about to setup H200 in the integration
Not about ... LightEffectPreset

dont know how to "make it run in studio-code-s , does it work to run in terminal ?
➜  /config cd custom_components/tapo
➜  tapo python tapodebug.py
Traceback (most recent call last):
  File "/homeassistant/custom_components/tapo/tapodebug.py", line 4, in <module>
    from plugp100.api.hub.hub_device import HubDevice
ModuleNotFoundError: No module named 'plugp100'

do i have to "initiate" the setup of H200 , and then run python fil.py ?

Install plugp100 by pip install plugp100

Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/aiohttp/connector.py", line 988, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/base_events.py", line 1085, in create_connection
raise exceptions[0]
File "/usr/lib/python3.11/asyncio/base_events.py", line 1069, in create_connection
sock = await self._connect_sock(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/base_events.py", line 973, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/lib/python3.11/asyncio/selector_events.py", line 634, in sock_connect
return await fut
^^^^^^^^^
File "/usr/lib/python3.11/asyncio/selector_events.py", line 674, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
TimeoutError: [Errno 110] Connect call failed ('<IP_ADDRESS>', 80)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/homeassistant/tapo.py", line 26, in
loop.run_until_complete(main())
File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/homeassistant/tapo.py", line 17, in main
await client.initialize()
File "/usr/local/lib/python3.11/dist-packages/plugp100/api/tapo_client.py", line 62, in initialize
await self._guess_protocol()
File "/usr/local/lib/python3.11/dist-packages/plugp100/api/tapo_client.py", line 235, in _guess_protocol
response = await self.execute_raw_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/plugp100/api/tapo_client.py", line 71, in execute_raw_request
return (await self._protocol.send_request(request)).map(lambda x: x.result)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/plugp100/protocol/passthrough_protocol.py", line 42, in send_request
response = await self._send_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/plugp100/protocol/passthrough_protocol.py", line 62, in _send_request
await self._login_with_version(self._credential)
File "/usr/local/lib/python3.11/dist-packages/plugp100/protocol/passthrough_protocol.py", line 81, in _login_with_version
session_or_error = await self._passthrough.handshake(self._url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-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.11/dist-packages/plugp100/common/utils/http_client.py", line 18, in async_make_post
async with self.session.post(
File "/usr/local/lib/python3.11/dist-packages/aiohttp/client.py", line 1187, in aenter
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/aiohttp/client.py", line 574, in _request
conn = await self._connector.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/aiohttp/connector.py", line 540, in connect
proto = await self._create_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/aiohttp/connector.py", line 907, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/aiohttp/connector.py", line 1231, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.11/dist-packages/aiohttp/connector.py", line 1200, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/aiohttp/connector.py", line 996, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host <IP_ADDRESS>:80 ssl:default [Connect call failed ('<IP_ADDRESS>', 80)]
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f1aefe02810>

➜  tapo python tapodebug.py
Traceback (most recent call last):
  File "/homeassistant/custom_components/tapo/tapodebug.py", line 7, in <module>
    from plugp100.common.credentials import AuthCredential
ModuleNotFoundError: No module named 'plugp100'
➜  tapo

What am i doing wrong here ? ... i just tried "tapo_test_helper.py"

PS: i run  HA "internal" (http), no https-portforwarding-or reverse-proxy or the likes

And this is the trace from trying to setup Hub using host-name, instead of IP
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1155, in _create_direct_connection
hosts = await asyncio.shield(host_resolved)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 874, in _resolve_host
addrs = await self._resolver.resolve(host, port, family=self._family)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/resolver.py", line 33, in resolve
infos = await self._loop.getaddrinfo(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 867, in getaddrinfo
return await self.run_in_executor(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/socket.py", line 962, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno -5] Name has no usable address
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 215, in _try_setup_api
await client.initialize()
File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 62, in initialize
await self._guess_protocol()
File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 218, in _guess_protocol
response = await self.execute_raw_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 71, in execute_raw_request
return (await self._protocol.send_request(request)).map(lambda x: x.result)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 42, in send_request
response = await self._send_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 62, in _send_request
await self._login_with_version(self._credential)
File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 81, in _login_with_version
session_or_error = await self._passthrough.handshake(self._url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/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.11/site-packages/plugp100/common/utils/http_client.py", line 18, in async_make_post
async with self.session.post(
File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1141, in aenter
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 536, in _request
conn = await self._connector.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 540, in connect
proto = await self._create_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 901, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1169, in _create_direct_connection
raise ClientConnectorError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host h200:80 ssl:default [Name has no usable address]
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 118, in async_step_user
tapo_client = await self._try_setup_api(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tapo/config_flow.py", line 220, in _try_setup_api
raise CannotConnect from error
custom_components.tapo.errors.CannotConnect

Here is the trace from trying to setup with IP
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 980, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1085, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1069, in create_connection
sock = await self._connect_sock(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 973, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 628, in sock_connect
return await fut
^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 668, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
TimeoutError: [Errno 110] Connect call failed ('<IP_ADDRESS>', 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 215, in _try_setup_api
await client.initialize()
File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 62, in initialize
await self._guess_protocol()
File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 218, in _guess_protocol
response = await self.execute_raw_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 71, in execute_raw_request
return (await self._protocol.send_request(request)).map(lambda x: x.result)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 42, in send_request
response = await self._send_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 62, in _send_request
await self._login_with_version(self._credential)
File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 81, in _login_with_version
session_or_error = await self._passthrough.handshake(self._url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/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.11/site-packages/plugp100/common/utils/http_client.py", line 18, in async_make_post
async with self.session.post(
File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1141, in __aenter__
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 536, in _request
conn = await self._connector.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 540, in connect
proto = await self._create_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 901, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1209, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1178, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 988, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host <IP_ADDRESS>:80 ssl:default [Connect call failed ('<IP_ADDRESS>', 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 118, in async_step_user
tapo_client = await self._try_setup_api(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tapo/config_flow.py", line 220, in _try_setup_api
raise CannotConnect from error
custom_components.tapo.errors.CannotConnect

First i should say, i have no deep knowledge in either HA, or this integration, but i have seen quite alot "issues" lately related to "network/resolve" , and also know there past months has been "some" remodeling at the OS and Supervisor level, in regards to HA's Network manager etc. ... I obviously have no idea whether this can be related, just though i would mention it , examples below is related to the HA-Host it self, i believe
https://github.com/home-assistant/supervisor/pull/4476
https://github.com/home-assistant/operating-system/pull/2763/commits
But i noticed in "tapo-hub.py"
49            config_entry_id=self.entry.entry_id,
50            connections={(device_registry.CONNECTION_NETWORK_MAC, device_info.mac)}

MAC seems no longer being used in the ./storage/core.device_registry
Again, i have no idea how this "inferno" of HA and integrations/add-ons works ... but i like it :)

I have a similar output to boheme61 and its trying to connect on port 80. I can confirm a port check to the H200 shows a result of not listening on port 80. It is listening on port 443
1

yeah , i also had this in my mind, but i couldn't figure out how to "listen", i tried with wireshark, but had no idea howto, and didn't know howto "remote sniffing" HA as im running VMware in Debian,
So if you have a good(easy to understand) tutorial to recommend, id be happy ... well i didn't try hard to figure it out, i been readin Changelogs and pull-requests instead : ))

I just used netcat to test port 80 and port 553 on the target H200.  443 connects and 80 times out

confirmed ! , thou it doesn't explain the errors
socket.gaierror: [Errno -2] Name or service not known
socket.gaierror: [Errno -5] Name has no usable address
But maybe thats just because the Hub haven't been registered in "core.device_registry"
Thou these errors don't occur using IP, in the setup, it's when using host-name
And "Name has no "address" in the "core.device_registry"
In config_flow , these are imported from "const"
CONF_HOST = "host"
CONF_MAC = "mac"
but neither IP-number , nor MAC is registered in core.device_registry for any Devices in this integration, so i wonder what's happening when these are called in "config_entries"
Anyways, it obvious doesn't get that far, as it doesn't seems communicate over post 80

well i forgot, i "installed" plugg100, prior to getting this gaie-info :)
This is what tapo_client.py does
class TapoClient:
    def __init__(
        self,
        auth_credential: AuthCredential,
        ip_address: str,
        port: Optional[int] = 80,
        http_session: Optional[aiohttp.ClientSession] = None,
        protocol_type: TapoProtocolType = TapoProtocolType.AUTO,
    ):
        self._auth_credential = auth_credential
        self._ip_address = ip_address
        self._port = port
        self._http_session = http_session
        self._protocol_type = protocol_type
        self._protocol: Optional[TapoProtocol] = None

    async def initialize(self):
        if self._protocol_type == TapoProtocolType.KLAP:
            self._protocol = KlapProtocol(
                auth_credential=self._auth_credential,
                host=self._ip_address,
                port=self._port,
                http_session=self._http_session,
            )
        elif self._protocol_type == TapoProtocolType.PASSTHROUGH:
            self._protocol = PassthroughProtocol(
                auth_credential=self._auth_credential,
                host=self._ip_address,
                port=self._port,
                http_session=self._http_session,
            )
        else:
            await self._guess_protocol()

    async def close(self):
        await self._protocol.close()

I just used netcat to test port 80 and port 443 on the target H200. 443 connects and 80 times out

This is really interesting, the tapo library communicate over http. I will release a new version of api to test the same code snippets but using https

Alternatively you can form my library edits python code and try to communicate over https (443) and try if it wokrs

Don't worry I'm editing code to allows 443, so I will release a new version of plugp100, but I need someone test my changes, cause I don't have h200 physically

I am experiencing the same problem with H200 and "Failed to connect" error. In the log there is also the known message about the unsuccessful connection on the port 80. I can help with the testing as well once changed to the port 443.

I have the same issue in that I get the 'Failed to Connect' error when trying to add an H200 Hub.   How are things progressing with the correction of this issue?

Ok, I have been release a new version of plugp100 to try new https. So please install lastest version of plugp100 by pip install plugp100==3.14.0 and then edit my previous script by api = TapoClient.create(credentials, <address>, 443, True) the last flag (True) will enable https

This is with the updated plugp100
and with this Edit in the .py file
client = TapoClient.create(credentials, "<IP_ADDRESS>", 443, True)
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/aiohttp/connector.py", line 988, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/base_events.py", line 1112, in create_connection
transport, protocol = await self._create_connection_transport(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/base_events.py", line 1145, in _create_connection_transport
await waiter
File "/usr/lib/python3.11/asyncio/sslproto.py", line 574, in _on_handshake_complete
raise handshake_exc
File "/usr/lib/python3.11/asyncio/sslproto.py", line 556, in _do_handshake
self._sslobj.do_handshake()
File "/usr/lib/python3.11/ssl.py", line 979, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: EE certificate key too weak (_ssl.c:992)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/homeassistant/tapo.py", line 38, in
loop.run_until_complete(main())
File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/homeassistant/tapo.py", line 17, in main
await client.initialize()
File "/usr/local/lib/python3.11/dist-packages/plugp100/api/tapo_client.py", line 70, in initialize
await self._guess_protocol()
File "/usr/local/lib/python3.11/dist-packages/plugp100/api/tapo_client.py", line 247, in _guess_protocol
response = await self.execute_raw_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/plugp100/api/tapo_client.py", line 79, in execute_raw_request
return (await self._protocol.send_request(request)).map(lambda x: x.result)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/plugp100/protocol/passthrough_protocol.py", line 41, in send_request
response = await self._send_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/plugp100/protocol/passthrough_protocol.py", line 61, in _send_request
await self._login_with_version(self._credential)
File "/usr/local/lib/python3.11/dist-packages/plugp100/protocol/passthrough_protocol.py", line 80, in _login_with_version
session_or_error = await self._passthrough.handshake(self._url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-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.11/dist-packages/plugp100/common/utils/http_client.py", line 18, in async_make_post
async with self.session.post(
File "/usr/local/lib/python3.11/dist-packages/aiohttp/client.py", line 1187, in aenter
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/aiohttp/client.py", line 574, in _request
conn = await self._connector.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/aiohttp/connector.py", line 540, in connect
proto = await self._create_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/aiohttp/connector.py", line 907, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/aiohttp/connector.py", line 1231, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.11/dist-packages/aiohttp/connector.py", line 1200, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/aiohttp/connector.py", line 990, in _wrap_create_connection
raise ClientConnectorCertificateError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host <IP_ADDRESS>:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: EE certificate key too weak (_ssl.c:992)')]
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fea15d0f9d0>

Maybe i don't know what im doing, well i dont :) ... and here is my result
➜  tapo python main.py
Traceback (most recent call last):
  File "/homeassistant/custom_components/tapo/main.py", line 26, in <module>
    loop.run_until_complete(main())
  File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/homeassistant/custom_components/tapo/main.py", line 16, in main
    TapoClient.create(credentials, "<IP_ADDRESS>", 443, True)
  File "/usr/local/lib/python3.11/dist-packages/plugp100/api/tapo_client.py", line 39, in create
    url = f"{'https' if is_https else 'http'}://{address}:{port}/app"
                        ^^^^^^^^
NameError: name 'is_https' is not defined

another try, seems like i didn't get the latest plaup100
thou this time i got this
Traceback (most recent call last):
  File "/homeassistant/custom_components/tapo/main1.py", line 28, in <module>
    loop.run_until_complete(main())
  File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/homeassistant/custom_components/tapo/main1.py", line 21, in main
    print(await client.get_device_info())
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/plugp100/api/tapo_client.py", line 96, in get_device_info
    return (await self._protocol.send_request(get_info_request)).map(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: TapoProtocol.send_request() missing 1 required positional argument: 'request'

Maybe i need some detailed guidance, really don't know what to write in the "script" and where

this is from my latest attempt to add the hub:
2023-11-28 00:13:03.320 DEBUG (MainThread) [custom_components.tapo.coordinators] Finished fetching tapo data in 0.058 seconds (success: True)
2023-11-28 00:13:16.675 DEBUG (MainThread) [custom_components.tapo.setup_helpers] Creating new API to create a coordinator for 80227FFAB9A91D5A9C2F01ACB6E9378E20B4B2AE
2023-11-28 00:13:17.700 DEBUG (MainThread) [custom_components.tapo.setup_helpers] Creating new API to create a coordinator for 80221CB1ADD2AFF58B290E9B1FA34E1020B4DA96
2023-11-28 00:13:24.363 DEBUG (MainThread) [custom_components.tapo.coordinators] Finished fetching tapo data in 0.053 seconds (success: True)
2023-11-28 00:13:24.526 DEBUG (MainThread) [custom_components.tapo.coordinators] Finished fetching tapo data in 0.135 seconds (success: True)
2023-11-28 00:13:33.306 DEBUG (MainThread) [custom_components.tapo.coordinators] Finished fetching tapo data in 0.045 seconds (success: True)
2023-11-28 00:13:51.876 ERROR (MainThread) [custom_components.tapo.config_flow] Failed to setup cannot connect
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 980, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)  # type: ignore[return-value]  # noqa
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1085, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1069, in create_connection
    sock = await self._connect_sock(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 973, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 628, in sock_connect
    return await fut
           ^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 668, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
TimeoutError: [Errno 110] Connect call failed ('<IP_ADDRESS>', 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 215, in _try_setup_api
    await client.initialize()
  File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 62, in initialize
    await self._guess_protocol()
  File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 235, in _guess_protocol
    response = await self.execute_raw_request(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 71, in execute_raw_request
    return (await self._protocol.send_request(request)).map(lambda x: x.result)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 42, in send_request
    response = await self._send_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 62, in _send_request
    await self._login_with_version(self._credential)
  File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 81, in _login_with_version
    session_or_error = await self._passthrough.handshake(self._url)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/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.11/site-packages/plugp100/common/utils/http_client.py", line 18, in async_make_post
    async with self.session.post(
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1141, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 536, in _request
    conn = await self._connector.connect(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 540, in connect
    proto = await self._create_connection(req, traces, timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 901, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1209, in _create_direct_connection
    raise last_exc
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1178, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 988, in _wrap_create_connection
    raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host <IP_ADDRESS>:80 ssl:default [Connect call failed ('<IP_ADDRESS>', 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 118, in async_step_user
    tapo_client = await self._try_setup_api(user_input)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tapo/config_flow.py", line 220, in _try_setup_api
    raise CannotConnect from error

Thing i "figured it out! got similar result as johannijs above ... after also installing Release 2.12.0
➜  tapo python main1.py
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/aiohttp/connector.py", line 992, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/base_events.py", line 1112, in create_connection
    transport, protocol = await self._create_connection_transport(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/base_events.py", line 1145, in _create_connection_transport
    await waiter
  File "/usr/lib/python3.11/asyncio/sslproto.py", line 574, in _on_handshake_complete
    raise handshake_exc
  File "/usr/lib/python3.11/asyncio/sslproto.py", line 556, in _do_handshake
    self._sslobj.do_handshake()
  File "/usr/lib/python3.11/ssl.py", line 979, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: EE certificate key too weak (_ssl.c:992)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/homeassistant/custom_components/tapo/main1.py", line 28, in <module>
    loop.run_until_complete(main())
  File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/homeassistant/custom_components/tapo/main1.py", line 19, in main
    await client.initialize()
  File "/usr/local/lib/python3.11/dist-packages/plugp100/api/tapo_client.py", line 70, in initialize
    await self._guess_protocol()
  File "/usr/local/lib/python3.11/dist-packages/plugp100/api/tapo_client.py", line 247, in _guess_protocol
    response = await self.execute_raw_request(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/plugp100/api/tapo_client.py", line 79, in execute_raw_request
    return (await self._protocol.send_request(request)).map(lambda x: x.result)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/plugp100/protocol/passthrough_protocol.py", line 41, in send_request
    response = await self._send_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/plugp100/protocol/passthrough_protocol.py", line 61, in _send_request
    await self._login_with_version(self._credential)
  File "/usr/local/lib/python3.11/dist-packages/plugp100/protocol/passthrough_protocol.py", line 80, in _login_with_version
    session_or_error = await self._passthrough.handshake(self._url)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-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.11/dist-packages/plugp100/common/utils/http_client.py", line 18, in async_make_post
    async with self.session.post(
  File "/usr/local/lib/python3.11/dist-packages/aiohttp/client.py", line 1187, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/aiohttp/client.py", line 574, in _request
    conn = await self._connector.connect(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/aiohttp/connector.py", line 544, in connect
    proto = await self._create_connection(req, traces, timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/aiohttp/connector.py", line 911, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/aiohttp/connector.py", line 1235, in _create_direct_connection
    raise last_exc
  File "/usr/local/lib/python3.11/dist-packages/aiohttp/connector.py", line 1204, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/aiohttp/connector.py", line 994, in _wrap_create_connection
    raise ClientConnectorCertificateError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host <IP_ADDRESS>:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: EE certificate key too weak (_ssl.c:992)')]
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f1f0418bc50>

Hi,
I updated to the new version but I still get the Failed Setup error message.
Details and the log file have been posted in GitHub.  I hope it helps.
Regards,
Trevor.
On Mon, 27 Nov 2023, 21:55 petretiandrea, @.***> wrote:

Ok, I have been release a new version of plugp100 to try new https. So
please install lastest version of plugp100 by pip install plugp100==3.14.0
and then edit my previous script by api = TapoClient.create(credentials,
, 443, True) the last flag (True) will enable https
—
Reply to this email directly, view it on GitHub
https://github.com/petretiandrea/home-assistant-tapo-p100/issues/578#issuecomment-1828589429,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A5NISWCXKEOLTBWJ3BVAOTTYGT42LAVCNFSM6AAAAAA6D7HXTOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRYGU4DSNBSHE
.
You are receiving this because you commented.Message ID:
@.***>

PS: I've tried to "lower/raise" encryption , but neither works,below 512 said has to be above, and 4096 said the same as above, so, seems like it's really not "EE certificate" causes
Maybe it's MD5 related, look at below "Issue", caused when Tapo-Cams got the new "encryption-model"
BR

is anything else we can do to test and help fixing this?

I need a volunteer to schedule a remote call or give me access to a device to try it

I need a volunteer to schedule a remote call or give me access to a device to try it

I volunteer, I have the same problem and the device

I don't know if this helps, or if it's a red herring for debugging but I set up a reverse proxy for the Integration to talk to on port 80 that forwarded everything to my H200 on SSL. This is the error the integration setup displayed.
`Failed to setup cannot connect
Traceback (most recent call last):
File "/config/custom_components/tapo/config_flow.py", line 215, in _try_setup_api
await client.initialize()
File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 70, in initialize
await self._guess_protocol()
File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 260, in _guess_protocol
raise error
plugp100.responses.tapo_exception.TapoException: Returned unknown error_code: -40401  msg: No message
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 118, in async_step_user
tapo_client = await self._try_setup_api(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tapo/config_flow.py", line 218, in _try_setup_api
self._raise_from_tapo_exception(error)
File "/config/custom_components/tapo/config_flow.py", line 227, in _raise_from_tapo_exception
raise CannotConnect from exception
custom_components.tapo.errors.CannotConnect
`

I need a volunteer to schedule a remote call or give me access to a device to try it

if you need access to an H200 just drop me a line. But from looking at the code it only tries a HTTP port 80 connections and this is now closed on the H200, it only run HTTPS port 443. So the codes needs to fixed to take that into effect.
HTTPS needs to be only TLS 1.2 connections, this should be ok from Homeassistance, the connection should just trust the certificate, as it looks to be a selfsigned.
###########################################################
    testssl.sh       3.1dev from https://testssl.sh/dev/
    (13f0388 2022-02-02 13:34:23 -- )

      This program is free software. Distribution and
             modification under GPLv2 permitted.
      USAGE w/o ANY WARRANTY. USE IT AT YOUR OWN RISK!

       Please file bugs @ https://testssl.sh/bugs/

###########################################################

 Using "OpenSSL 1.1.1f  31 Mar 2020" [~98 ciphers]
 on Ayumi:/usr/bin/openssl
 (built: "May 24 17:14:51 2023", platform: "debian-amd64")

 Start 2023-12-12 12:24:39        -->> <IP_ADDRESS>:443 (<IP_ADDRESS>) <<--

 rDNS (<IP_ADDRESS>):    --
 Service detected:       HTTP

 Testing protocols via sockets except NPN+ALPN

 SSLv2      not offered (OK)
 SSLv3      not offered (OK)
 TLS 1      not offered
 TLS 1.1    not offered
 TLS 1.2    offered (OK)
 TLS 1.3    not offered and downgraded to a weaker protocol
 NPN/SPDY   not offered
 ALPN/HTTP2 not offered

 Testing cipher categories

 NULL ciphers (no encryption)                      not offered (OK)
 Anonymous NULL Ciphers (no authentication)        not offered (OK)
 Export ciphers (w/o ADH+NULL)                     not offered (OK)
 LOW: 64 Bit + DES, RC[2,4], MD5 (w/o export)      not offered (OK)
 Triple DES Ciphers / IDEA                         not offered
 Obsoleted CBC ciphers (AES, ARIA etc.)            offered
 Strong encryption (AEAD ciphers) with no FS       offered (OK)
 Forward Secrecy strong encryption (AEAD ciphers)  not offered

 Testing server's cipher preferences

 Has server cipher order?     yes (OK)
 Negotiated protocol          TLSv1.2
 Negotiated cipher            AES256-GCM-SHA384
 Cipher per protocol

Hexcode  Cipher Suite Name (OpenSSL)       KeyExch.   Encryption  Bits     Cipher Suite Name (IANA/RFC)
-----------------------------------------------------------------------------------------------------------------------------
SSLv2
 -
SSLv3
 -
TLSv1
 -
TLSv1.1
 -
TLSv1.2 (server order)
 x9d     AES256-GCM-SHA384                 RSA        AESGCM      256      TLS_RSA_WITH_AES_256_GCM_SHA384
 x3d     AES256-SHA256                     RSA        AES         256      TLS_RSA_WITH_AES_256_CBC_SHA256
 x35     AES256-SHA                        RSA        AES         256      TLS_RSA_WITH_AES_256_CBC_SHA
 x9c     AES128-GCM-SHA256                 RSA        AESGCM      128      TLS_RSA_WITH_AES_128_GCM_SHA256
 x3c     AES128-SHA256                     RSA        AES         128      TLS_RSA_WITH_AES_128_CBC_SHA256
 x2f     AES128-SHA                        RSA        AES         128      TLS_RSA_WITH_AES_128_CBC_SHA
TLSv1.3
 -

 Testing robust forward secrecy (FS) -- omitting Null Authentication/Encryption, 3DES, RC4

 No ciphers supporting Forward Secrecy (FS) offered

 Testing server defaults (Server Hello)

 TLS extensions (standard)    "renegotiation info/#65281" "EC point formats/#11" "max fragment length/#1" "encrypt-then-mac/#22" "extended master secret/#23"
 Session Ticket RFC 5077 hint no -- no lifetime advertised
 SSL Session ID support       yes
 Session Resumption           Tickets no, ID: no
 TLS clock skew               -2 sec from localtime
 Client Authentication        none
 Signature Algorithm          SHA1 with RSA -- besides: users will receive a strong browser WARNING
 Server key size              RSA 1024 bits (exponent is 65537)
 Server key usage             Digital Signature, Non Repudiation, Key Encipherment
 Server extended key usage    --
 Serial                       BC43D87A6D471F3A (OK: length 8)
 Fingerprints                 SHA1 2ADCD3A7C7F039BCCF8175811B790A5795DF65EF
                              SHA256 A68510F07E2D6D60BC5A74125443EBC0C00BDD65BFDE02B06E283E41A344E9C2
 Common Name (CN)             TPRI-DEVICE
 subjectAltName (SAN)         missing (NOT ok) -- Browsers are complaining
 Trust (hostname)             certificate does not match supplied URI
 Chain of trust               NOT ok (chain incomplete)
 EV cert (experimental)       no
 Certificate Validity (UTC)   201 >= 60 days (2014-07-04 05:47 --> 2024-07-01 05:47)
                              >= 10 years is way too long
 ETS/"eTLS", visibility info  not present
 Certificate Revocation List  --
 OCSP URI                     --
                              NOT ok -- neither CRL nor OCSP URI provided
 OCSP stapling                not offered
 OCSP must staple extension   --
 DNS CAA RR (experimental)    not offered
 Certificate Transparency     --
 Certificates provided        1
 Issuer                       TPRI-CA (TPRI from US)
 Intermediate Bad OCSP (exp.) Ok

 Testing HTTP header response @ "/"

 HTTP Status Code             200 OK
 HTTP clock skew              Got no HTTP time, maybe try different URL?
 Strict Transport Security    not offered
 Public Key Pinning           --
 Server banner                (no "Server" line in header, interesting!)
 Application banner           --
 Cookie(s)                    (none issued at "/")
 Security headers             Cache-Control: no-cache
 Reverse Proxy banner         --

 Testing vulnerabilities

 Heartbleed (CVE-2014-0160)                not vulnerable (OK), no heartbeat extension
 CCS (CVE-2014-0224)                       not vulnerable (OK)
 Ticketbleed (CVE-2016-9244), experiment.  not vulnerable (OK), no session ticket extension
 ROBOT                                     not vulnerable (OK)
 Secure Renegotiation (RFC 5746)           supported (OK)
 Secure Client-Initiated Renegotiation     not vulnerable (OK)
 CRIME, TLS (CVE-2012-4929)                not vulnerable (OK)
 BREACH (CVE-2013-3587)                    no gzip/deflate/compress/br HTTP compression (OK)  - only supplied "/" tested
 POODLE, SSL (CVE-2014-3566)               not vulnerable (OK), no SSLv3 support
 TLS_FALLBACK_SCSV (RFC 7507)              No fallback possible (OK), no protocol below TLS 1.2 offered
 SWEET32 (CVE-2016-2183, CVE-2016-6329)    not vulnerable (OK)
 FREAK (CVE-2015-0204)                     not vulnerable (OK)
 DROWN (CVE-2016-0800, CVE-2016-0703)      not vulnerable on this host and port (OK)
                                           make sure you don't use this certificate elsewhere with SSLv2 enabled services
                                           https://censys.io/ipv4?q=A68510F07E2D6D60BC5A74125443EBC0C00BDD65BFDE02B06E283E41A344E9C2 could help you to find out
 LOGJAM (CVE-2015-4000), experimental      not vulnerable (OK): no DH EXPORT ciphers, no DH key detected with <= TLS 1.2
 BEAST (CVE-2011-3389)                     not vulnerable (OK), no SSL3 or TLS1
 LUCKY13 (CVE-2013-0169), experimental     potentially VULNERABLE, uses cipher block chaining (CBC) ciphers with TLS. Check patches
 Winshock (CVE-2014-6321), experimental    not vulnerable (OK) - GCM rollup ciphers found
 RC4 (CVE-2013-2566, CVE-2015-2808)        no RC4 ciphers detected (OK)

 Running client simulations (HTTP) via sockets

 Browser                      Protocol  Cipher Suite Name (OpenSSL)       Forward Secrecy
------------------------------------------------------------------------------------------------
 Android 4.4.2                TLSv1.2   AES256-GCM-SHA384                 No FS
 Android 5.0.0                TLSv1.2   AES256-SHA                        No FS
 Android 6.0                  TLSv1.2   AES256-SHA                        No FS
 Android 7.0 (native)         TLSv1.2   AES256-GCM-SHA384                 No FS
 Android 8.1 (native)         TLSv1.2   AES256-GCM-SHA384                 No FS
 Android 9.0 (native)         TLSv1.2   AES256-GCM-SHA384                 No FS
 Android 10.0 (native)        TLSv1.2   AES256-GCM-SHA384                 No FS
 Chrome 74 (Win 10)           TLSv1.2   AES256-GCM-SHA384                 No FS
 Chrome 79 (Win 10)           TLSv1.2   AES256-GCM-SHA384                 No FS
 Firefox 66 (Win 8.1/10)      TLSv1.2   AES256-SHA                        No FS
 Firefox 71 (Win 10)          TLSv1.2   AES256-SHA                        No FS
 IE 6 XP                      No connection
 IE 8 Win 7                   No connection
 IE 8 XP                      No connection
 IE 11 Win 7                  TLSv1.2   AES256-GCM-SHA384                 No FS
 IE 11 Win 8.1                TLSv1.2   AES256-GCM-SHA384                 No FS
 IE 11 Win Phone 8.1          TLSv1.2   AES256-SHA256                     No FS
 IE 11 Win 10                 TLSv1.2   AES256-GCM-SHA384                 No FS
 Edge 15 Win 10               TLSv1.2   AES256-GCM-SHA384                 No FS
 Edge 17 (Win 10)             TLSv1.2   AES256-GCM-SHA384                 No FS
 Opera 66 (Win 10)            TLSv1.2   AES256-GCM-SHA384                 No FS
 Safari 9 iOS 9               TLSv1.2   AES256-GCM-SHA384                 No FS
 Safari 9 OS X 10.11          TLSv1.2   AES256-GCM-SHA384                 No FS
 Safari 10 OS X 10.12         TLSv1.2   AES256-GCM-SHA384                 No FS
 Safari 12.1 (iOS 12.2)       TLSv1.2   AES256-GCM-SHA384                 No FS
 Safari 13.0 (macOS 10.14.6)  TLSv1.2   AES256-GCM-SHA384                 No FS
 Apple ATS 9 iOS 9            No connection
 Java 6u45                    No connection
 Java 7u25                    No connection
 Java 8u161                   TLSv1.2   AES256-GCM-SHA384                 No FS
 Java 11.0.2 (OpenJDK)        TLSv1.2   AES256-GCM-SHA384                 No FS
 Java 12.0.1 (OpenJDK)        TLSv1.2   AES256-GCM-SHA384                 No FS
 OpenSSL 1.0.2e               TLSv1.2   AES256-GCM-SHA384                 No FS
 OpenSSL 1.1.0l (Debian)      TLSv1.2   AES256-GCM-SHA384                 No FS
 OpenSSL 1.1.1d (Debian)      TLSv1.2   AES256-GCM-SHA384                 No FS
 Thunderbird (68.3)           TLSv1.2   AES256-SHA                        No FS

 Rating (experimental)

 Rating specs (not complete)  SSL Labs's 'SSL Server Rating Guide' (version 2009q from 2020-01-30)
 Specification documentation  https://github.com/ssllabs/research/wiki/SSL-Server-Rating-Guide
 Protocol Support (weighted)  0 (0)
 Key Exchange     (weighted)  0 (0)
 Cipher Strength  (weighted)  0 (0)
 Final Score                  0
 Overall Grade                T
 Grade cap reasons            Grade capped to T. Uses SHA1 algorithm
                              Grade capped to T. Issues with the chain of trust (chain incomplete)
                              Grade capped to M. Domain name mismatch
                              Grade capped to B. Forward Secrecy (FS) is not supported
                              Grade capped to A. HSTS is not offered

 Done 2023-12-12 12:25:50 [  73s] -->> <IP_ADDRESS>:443 (<IP_ADDRESS>) <<--

Also, is it safe to assume, that since Tapo has upgraded their connection to the H200 from port 80 to 443 (with certificate), they might just roll that to their other wifi devices (bulbs, plugs, etc.)? In that case maybe the connection should always try :443 first and if that fails to try :80 in order to make the integration future-proof? Or maybe when we are at the configuration of a new device we can choose the protocol if the former method causes delays.

Hi All,
I'm running HAos on VMware on Windows as my Linux knowledge is non-existent.  How can I edit the connection port?  I managed to find this list of files, but no connector.py

Thanks

my Linux knowledge is non-existent.

But you can read English right ? ... Read the "thread" , from top to bottom, then i think/hope you get a picture of where we're "standing" right now.

my Linux knowledge is non-existent.

But you can read English right ? ... Read the "thread" , from top to bottom, then i think/hope you get a picture of where we're "standing" right now.

I can read English thanks, but I'd like to try changing the port as it seems some people have had some success.

changing the port as it seems some people have had some success.

Do you have any references to these "succes" ?

I too can be free for a remote session to test on my H200

I'm also having trouble integrating the H200 hub. I would like to integrate my window contacts (T110) into HA... Will there be a timely solution to the problem?

I need a volunteer to schedule a remote call or give me access to a device to try it

I volunteer, I have the same problem and the device

Write me on email

@  petretiandrea
Not sure You are aware of it, or whether you are testing with others above, but this is the latest outcome of " main.py " with the client-changes you provided.
Running TapoController v2.12.2 and plugp100 v4.0.1
➜  tapo python main.py
Traceback (most recent call last):
  File "/homeassistant/custom_components/tapo/main.py", line 26, in <module>
    loop.run_until_complete(main())
  File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/homeassistant/custom_components/tapo/main.py", line 17, in main
    await client.initialize()
          ^^^^^^^^^^^^^^^^^
AttributeError: 'TapoClient' object has no attribute 'initialize'
➜  tapo

Actually been like this the latest couple of updates of both

FYI ... H200 just got another "security" Update
And below is the latest exceptions, trying to add the hub ...slightly different ... just thought i wanted to post this, just in casei it's a change/update that affect this issue
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 980, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1085, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1069, in create_connection
sock = await self._connect_sock(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 973, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 628, in sock_connect
return await fut
^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 668, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
TimeoutError: [Errno 110] Connect call failed ('<IP_ADDRESS>', 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 192, in _get_first_data_from_api
(await tapo_client.get_device_info())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 92, in get_device_info
return await self.execute_raw_request(get_info_request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 77, in execute_raw_request
await self._initialize_protocol_if_needed()
File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 71, in _initialize_protocol_if_needed
await self._guess_protocol()
File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 221, in _guess_protocol
response = await self.get_component_negotiation()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 81, in get_component_negotiation
return (await self.execute_raw_request(TapoRequest.component_negotiation())).map(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 78, in execute_raw_request
return (await self._protocol.send_request(request)).map(lambda x: x.result)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 41, in send_request
response = await self._send_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 61, in _send_request
await self._login_with_version(self._credential)
File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 80, in _login_with_version
session_or_error = await self._passthrough.handshake(self._url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/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.11/site-packages/plugp100/common/utils/http_client.py", line 18, in async_make_post
async with self.session.post(
File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1141, in __aenter__
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 536, in _request
conn = await self._connector.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 540, in connect
proto = await self._create_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 901, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1209, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1178, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 988, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host <IP_ADDRESS>:80 ssl:default [Connect call failed ('<IP_ADDRESS>', 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 119, in async_step_user
device_data = await self._get_first_data_from_api(tapo_client)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tapo/config_flow.py", line 199, in _get_first_data_from_api
raise CannotConnect from error
custom_components.tapo.errors.CannotConnect

BR

another H200 logs and observation on the current code.
text  error  warn  system  array  login

                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tapo/config_flow.py", line 199, in _get_first_data_from_api
    raise CannotConnect from error
custom_components.tapo.errors.CannotConnect
2023-12-26 18:29:42.002 WARNING (MainThread) [plugp100.api.tapo_client] Default protocol not working, fallback to KLAP ;)
2023-12-26 18:30:17.026 WARNING (MainThread) [plugp100.api.tapo_client] Default protocol not working, fallback to KLAP ;)
2023-12-26 18:50:21.248 ERROR (MainThread) [custom_components.tapo.config_flow] Failed to setup cannot connect
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1085, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1069, in create_connection
    sock = await self._connect_sock(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 973, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 628, in sock_connect
    return await fut
           ^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 668, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
TimeoutError: [Errno 110] Connect call failed ('<IP_ADDRESS>', 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 192, in _get_first_data_from_api
    (await tapo_client.get_device_info())
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 92, in get_device_info
    return await self.execute_raw_request(get_info_request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 77, in execute_raw_request
    await self._initialize_protocol_if_needed()
  File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 71, in _initialize_protocol_if_needed
    await self._guess_protocol()
  File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 221, in _guess_protocol
    response = await self.get_component_negotiation()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 81, in get_component_negotiation
    return (await self.execute_raw_request(TapoRequest.component_negotiation())).map(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 78, in execute_raw_request
    return (await self._protocol.send_request(request)).map(lambda x: x.result)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 41, in send_request
    response = await self._send_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 61, in _send_request
    await self._login_with_version(self._credential)
  File "/usr/local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 80, in _login_with_version
    session_or_error = await self._passthrough.handshake(self._url)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/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.11/site-packages/plugp100/common/utils/http_client.py", line 18, in async_make_post
    async with self.session.post(
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1187, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 574, in _request
    conn = await self._connector.connect(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 544, in connect
    proto = await self._create_connection(req, traces, timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 911, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1235, in _create_direct_connection
    raise last_exc
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1204, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1000, in _wrap_create_connection
    raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host <IP_ADDRESS>:80 ssl:default [Connect call failed ('<IP_ADDRESS>', 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 119, in async_step_user
    device_data = await self._get_first_data_from_api(tapo_client)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tapo/config_flow.py", line 199, in _get_first_data_from_api
    raise CannotConnect from error
custom_components.tapo.errors.CannotConnect

it appears that H200 is just responding via port 443
openssl - https/443
$ openssl.exe s_client -connect <IP_ADDRESS>:443 -tls1_2
CONNECTED(00000160)
Can't use SSL_get_servername
depth=0 C = US, ST = CA, O = TPRI, CN = TPRI-DEVICE
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 C = US, ST = CA, O = TPRI, CN = TPRI-DEVICE
verify error:num=21:unable to verify the first certificate
verify return:1
depth=0 C = US, ST = CA, O = TPRI, CN = TPRI-DEVICE
verify return:1
---
Certificate chain
 0 s:C = US, ST = CA, O = TPRI, CN = TPRI-DEVICE
   i:C = US, ST = CA, O = TPRI, CN = TPRI-CA
---
Server certificate
-----BEGIN CERTIFICATE-----
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-----END CERTIFICATE-----
subject=C = US, ST = CA, O = TPRI, CN = TPRI-DEVICE

issuer=C = US, ST = CA, O = TPRI, CN = TPRI-CA

---
No client certificate CA names sent
---
SSL handshake has read 705 bytes and written 384 bytes
Verification error: unable to verify the first certificate
---
New, TLSv1.2, Cipher is AES256-GCM-SHA384
Server public key is 1024 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : AES256-GCM-SHA384
    Session-ID: 3FD3FFBCA0ED1E334F035FBA47EC381EFECBE149B83DC1F65BF3201FF345F8A1
    Session-ID-ctx:
    Master-Key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time:<PHONE_NUMBER>
    Timeout   : 7200 (sec)
    Verify return code: 21 (unable to verify the first certificate)
    Extended master secret: yes
---
HTTP/1.1 200 OK
Connection: keep-alive
Content-Type: application/json
Cache-Control: no-cache
Expires: 0
Transfer-Encoding: chunked

2
{}
0

closed

openssl - http/80
$ openssl.exe s_client -connect <IP_ADDRESS>:80 -tls1_2
20708:error:0200274C:system library:connect:reason(1868):../openssl-1.1.1u/crypto/bio/b_sock2.c:110:
20708:error:2008A067:BIO routines:BIO_connect:connect error:../openssl-1.1.1u/crypto/bio/b_sock2.c:111:
connect:errno=0

curl - https/443
$ curl https://<IP_ADDRESS>/api/v1/device
curl: (60) schannel: SEC_E_UNTRUSTED_ROOT (0x80090325) - The certificate chain was issued by an authority that is not trusted.
More details here: https://curl.se/docs/sslcerts.html

$ curl -k https://<IP_ADDRESS>/api/v1/device
{}

curl - http/80
$ curl -k http://<IP_ADDRESS>/api/v1/device
curl: (28) Failed to connect to <IP_ADDRESS> port 80 after 21034 ms: Couldn't connect to server

port connectivity test - https/443
PS C:\> Test-NetConnection <IP_ADDRESS> -Port 443
RemoteAddress    : <IP_ADDRESS>
RemotePort       : 443
TcpTestSucceeded : True

port connectivity test - http/80
PS C:\> Test-NetConnection <IP_ADDRESS> -Port 443
RemoteAddress    : <IP_ADDRESS>
RemotePort       : 80
TcpTestSucceeded : False

i would second on what @tvpetersen mentioned about tls1.2.
using this test code, it is does attempt to connect using https but on the older sslv3 protocol.
import asyncio
import os

from plugp100.api.hub.hub_device import HubDevice
from plugp100.api.light_effect_preset import LightEffectPreset
from plugp100.api.tapo_client import TapoClient
from plugp100.common.credentials import AuthCredential

async def main():
    # create generic tapo api
    username = os.getenv("USERNAME", "<email>")
    password = os.getenv("PASSWORD", "<password>")

    credentials = AuthCredential(username, password)
    # client = TapoClient(credentials, "<IP_ADDRESS>")
    client = TapoClient.create(credentials, "<IP_ADDRESS>", 443, True)

    print(await client.get_device_info())
    # print(await client.get_child_device_list())
    # print(await client.get_child_device_component_list())

if __name__ == "__main__":
    loop = asyncio.new_event_loop()
    loop.run_until_complete(main())
    loop.run_until_complete(asyncio.sleep(0.1))
    loop.close()

error:
vscode ➜ /workspaces/home-assistant-tapo-p100 (main) $ python /tmp/main.py
Traceback (most recent call last):
  File "/home/vscode/.local/lib/python3.11/site-packages/aiohttp/connector.py", line 980, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)  # type: ignore[return-value]  # noqa
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1112, in create_connection
    transport, protocol = await self._create_connection_transport(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1145, in _create_connection_transport
    await waiter
  File "/usr/local/lib/python3.11/asyncio/sslproto.py", line 575, in _on_handshake_complete
    raise handshake_exc
  File "/usr/local/lib/python3.11/asyncio/sslproto.py", line 557, in _do_handshake
    self._sslobj.do_handshake()
  File "/usr/local/lib/python3.11/ssl.py", line 979, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1006)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/tmp/main.py", line 26, in <module>
    loop.run_until_complete(main())
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/tmp/main.py", line 19, in main
    print(await client.get_device_info())
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vscode/.local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 92, in get_device_info
    return await self.execute_raw_request(get_info_request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vscode/.local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 77, in execute_raw_request
    await self._initialize_protocol_if_needed()
  File "/home/vscode/.local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 71, in _initialize_protocol_if_needed
    await self._guess_protocol()
  File "/home/vscode/.local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 221, in _guess_protocol
    response = await self.get_component_negotiation()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vscode/.local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 81, in get_component_negotiation
    return (await self.execute_raw_request(TapoRequest.component_negotiation())).map(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vscode/.local/lib/python3.11/site-packages/plugp100/api/tapo_client.py", line 78, in execute_raw_request
    return (await self._protocol.send_request(request)).map(lambda x: x.result)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vscode/.local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 41, in send_request
    response = await self._send_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vscode/.local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 61, in _send_request
    await self._login_with_version(self._credential)
  File "/home/vscode/.local/lib/python3.11/site-packages/plugp100/protocol/passthrough_protocol.py", line 80, in _login_with_version
    session_or_error = await self._passthrough.handshake(self._url)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vscode/.local/lib/python3.11/site-packages/plugp100/protocol/securepassthrough_transport.py", line 70, in handshake
    response = await self._http.async_make_post(url, json=request_body)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vscode/.local/lib/python3.11/site-packages/plugp100/common/utils/http_client.py", line 18, in async_make_post
    async with self.session.post(
  File "/home/vscode/.local/lib/python3.11/site-packages/aiohttp/client.py", line 1141, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/home/vscode/.local/lib/python3.11/site-packages/aiohttp/client.py", line 536, in _request
    conn = await self._connector.connect(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vscode/.local/lib/python3.11/site-packages/aiohttp/connector.py", line 540, in connect
    proto = await self._create_connection(req, traces, timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vscode/.local/lib/python3.11/site-packages/aiohttp/connector.py", line 901, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vscode/.local/lib/python3.11/site-packages/aiohttp/connector.py", line 1209, in _create_direct_connection
    raise last_exc
  File "/home/vscode/.local/lib/python3.11/site-packages/aiohttp/connector.py", line 1178, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vscode/.local/lib/python3.11/site-packages/aiohttp/connector.py", line 984, in _wrap_create_connection
    raise ClientConnectorSSLError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorSSLError: Cannot connect to host <IP_ADDRESS>:443 ssl:default [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1006)]
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f74e519dc10>

i think we just need to update the code to explicitly use tls1.2. i tried but i can't figure out it yet :)

I've updated on this. H200 use a different protocol, the one used for tapo cameras. My library actually doens't support this protocol, but I'm working to add it

Thanks Andrea, I really appreciate your efforts on this 😊

Yeah, i did suspect it was a "Major" rewrite/re-thinking task you was facing
Wish You a prosperous New-Year !

You can intergrate the H200 into Home Assistant via smartthings

@jakeycrx Could you please elaborate on this?

@Yury-Zakharov Add the H200 devices to smartthings, then integrate them into HA via the smartthings integration

Kindly asking if there is any progress on this?

Would definitely still appreciate support for H200.

Release 2.14.0 did not fix the issue.

Release 3.0 did not fix the issue neither.

H200 is still in developmente

Tapo Camera Control can connect to H200 but shows only the cameras connected to it. I think it can be tweaked to show all the child devices, right?

H200 is still in developmente

Is there already a release date?

Don't know if this will help, but Tapo H200 has a new version (1.30) that adds matter  support, I personally don't have a matter dongle/hub to test it with home-assistant though. I'm unsure if this will affect the ssl implementation that you're planning/creating.

The issue persists.

Is there any plan to sort out this?


How to change nameing of services to switch between robot and simulation

Hello,
I want to call some services provided by franka_control e.g. set_EE_frame
For demonstration I exended the cartesian_impedance_example_controller here. So I want to run the controller in the simulation as well as on the robot.
However running on the robot (roslaunch franka_example_controllers cartesian_impedance_example_controller.launch ...), the node franka_control provides the service of course to /franka_control/set_EE_frame.  Running the gazebo simulation (roslaunch franka_gazebo panda.launch ...), franka_hw_sim provides the service on /set_EE_frame.
So the standard way to face this issue in ROS is to use the remap-tag in the roslaunch file to redirect the services.
However I did not find a way for to pass this to controller_manager/spawner.
My workaround currently is to define a param called operation_type I read from the controller, and depending on it I call either the one or the other service name. I think, that's a bad solution as the controller should not care about it is simulated or not.
This is connected to #241, where it is also recomended to call either the one or the other.

Sure you can. Have you tried using a namespace?
<?xml version="1.0"?>
<launch>

  <include file="$(find gazebo_ros)/launch/empty_world.launch"/>

  <group ns="franka_control">
    <include file="$(find franka_gazebo)/launch/panda.launch">
      <arg name="gazebo" value="false" />
      <!-- all other your args you want to set here -->
    </include>
  </group>

</launch>

Then you should see every topic, service & action within that namespace similar to the real robot:
$ rosservice list /franka_control | grep -E "set_(EE|K|load)"
/franka_control/set_EE_frame
/franka_control/set_K_frame
/franka_control/set_load

Does this help you?

Hey, thanks for the quick help, it actually changes the name. However this seems to break some things in the panda.launch file.
I will try to find a way..

What exactly break?

However gazebo is not working and the controller as well, there is no obvious errormessages in the log, but I guess some services and topics are now on the wrong namespace.

I think, we need to put the name into the urdf. But maybe also have a look, how the setups with two robots solve this problem. Because there you want the services advertise for each robot.

It's a general thing also on how does naming works in the ROS world.
So should these services live in:
/<robot_arm_name>/franka_control/set_load or rather directly in /<robot_arm_name>/set_load
In contrast the examples here with two arms are that there is one controller and one combined_ros_control node.
However what if I want to have two seperate ros_control_node nodes running and two times the same controller on them. How's the naming than, and best would consistent between simulation and the real robot.

That definitly helps.
For perspective: From what I think, and know about ROS and nameing it would be good to have a scheme, which is interchangeable between simulation and "reality".
So as a proposal for a naming scheme for a single robot arm.
/<arm_id>/franka_control
/<arm_id>/controller_manager
/<arm_id>/controller_spawner
/<arm_id>/joint_state_publisher
/<arm_id>/robot_state_publisher
/<arm_id>/<controller_name>

However for that we would need to tinker also around with the examples in franka_example_controllers.  But didn't got it quite right jet.

Hi @peetCreative,
you definitely have a point regarding our naming and namespaces in general. However this is a relatively breaking change for users which we have to discuss internally. Your original problem how to match simulation & real robot naming is solved, right? Can we close this issue then?


Processing Problem near Innsbruck

There is a very big green area:

Hi Manfred,
it seems to be gone now: https://osm-austria-building-coverage.thomaskonrad.at/map/?boundary_id=70101#12/47.2862/11.3789
Seems like somebody marked a whole region with building=yes.
Thanks for the feedback, closing this now.
Thomas


[Question] How to use Material.PlatformConfiguration.ChangeStatusBarColor(Color color)

Hi folks,
Could somebody help me to find the correct spot for the method call XF.Material.PlatformConfiguration.ChangeStatusBarColor(Color color) using lib version 1.2.3? I could not find it in the documentation.
I tried in Forms / App.xaml:
        public App()
        {
            InitializeComponent();

            XF.Material.Forms.Material.Init(this, "Material.Configuration");
            XF.Material.Forms.Material.PlatformConfiguration.ChangeStatusBarColor(Color.Red);

            MainPage = new MainPage();
        }

and also in the AppDelegate.cs:
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();
            XF.Material.iOS.Material.Init();
            XF.Material.Forms.Material.PlatformConfiguration.ChangeStatusBarColor(Color.Red);

            LoadApplication(new App());

            return base.FinishedLaunching(app, options);
        }

Nevertheless, I still see the the primary variant color.
Tested on iOS.
Thanks for your help.
Should I better ask on Stackoverflow or something else in the future?

Perfect. I used it in my MainPage.cs, but now I used in my subclass of NavigationPage and it works as nice as possible. Thanks!