Describe the bug
I have duckdns external address with secure address. I can't get the integration to setup using 127.0.0.1, localhost, nor my actual IP address.
To reproduce
Steps to reproduce the behavior:
- Go to Eufy Security: Setup after installing integration
- Default 127.0.0.1 fails with Host/Port is wrong. Same with trying localhost and 192.168.1.xxx actual IP address.
Expected behavior
Can't get beyond install error.
Additional information
Go to Settings -> System -> Repairs -> Click on 3 dots (...) -> System Information and get Version and Installation Type to below fields;
- Home Assistant Installation Type (OS - Supvervised - Core): Supervised core-2023.2.5
- Home Assistant Core Version:
- Eufy Security Add-on Version: 6.2.0
- Eufy Security Integration Version:
Hardware Information; RPI 4
Log:
eufy_security Exception in login : - traceback: Traceback (most recent call last): File "/config/custom_components/eufy_security/eufy_security_api/web_socket_client.py", line 42, in connect self.socket = await self.session.ws_connect(f"ws://{self.host}:{self.port}", autoclose=False, autoping=True, heartbeat=60) File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 792, in _ws_connect raise WSServerHandshakeError( aiohttp.client_exceptions.WSServerHandshakeError: 200, message='Invalid response status', url=URL('ws://127.0.0.1:3000') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/config/custom_components/eufy_security/config_flow.py", line 113, in _test_credentials await api_client.ws_connect() File "/config/custom_components/eufy_security/eufy_security_api/api_client.py", line 67, in ws_connect await self._client.connect() File "/config/custom_components/eufy_security/eufy_security_api/web_socket_client.py", line 44, in connect raise WebSocketConnectionError() from exc custom_components.eufy_security.eufy_security_api.exceptions.WebSocketConnectionError
eufy_security Exception in login : - traceback: Traceback (most recent call last): File "/config/custom_components/eufy_security/eufy_security_api/web_socket_client.py", line 42, in connect self.socket = await self.session.ws_connect(f"ws://{self.host}:{self.port}", autoclose=False, autoping=True, heartbeat=60) File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 776, in _ws_connect resp = await self.request( File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 559, in _request await resp.start(conn) File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 898, in start message, payload = await protocol.read() # type: ignore[union-attr] File "/usr/local/lib/python3.10/site-packages/aiohttp/streams.py", line 616, in read await self._waiter aiohttp.client_exceptions.ServerDisconnectedError: Server disconnected The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/config/custom_components/eufy_security/config_flow.py", line 113, in _test_credentials await api_client.ws_connect() File "/config/custom_components/eufy_security/eufy_security_api/api_client.py", line 67, in ws_connect await self._client.connect() File "/config/custom_components/eufy_security/eufy_security_api/web_socket_client.py", line 44, in connect raise WebSocketConnectionError() from exc custom_components.eufy_security.eufy_security_api.exceptions.WebSocketConnectionError
eufy_security Exception in login : - traceback: Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1154, in _create_direct_connection hosts = await asyncio.shield(host_resolved) File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 880, in _resolve_host addrs = await self._resolver.resolve(host, port, family=self._family) File "/usr/local/lib/python3.10/site-packages/aiohttp/resolver.py", line 33, in resolve infos = await self._loop.getaddrinfo( File "/usr/local/lib/python3.10/asyncio/base_events.py", line 860, in getaddrinfo return await self.run_in_executor( File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/usr/local/lib/python3.10/socket.py", line 955, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name does not resolve The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/config/custom_components/eufy_security/eufy_security_api/web_socket_client.py", line 42, in connect self.socket = await self.session.ws_connect(f"ws://{self.host}:{self.port}", autoclose=False, autoping=True, heartbeat=60) File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 776, in _ws_connect resp = await self.request( File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 535, in _request conn = await self._connector.connect( File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 542, in connect proto = await self._create_connection(req, traces, timeout) File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 907, in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1166, in _create_direct_connection raise ClientConnectorError(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host https:80 ssl:default [Name does not resolve] The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/config/custom_components/eufy_security/config_flow.py", line 113, in _test_credentials await api_client.ws_connect() File "/config/custom_components/eufy_security/eufy_security_api/api_client.py", line 67, in ws_connect await self._client.connect() File "/config/custom_components/eufy_security/eufy_security_api/web_socket_client.py", line 44, in connect raise WebSocketConnectionError() from exc custom_components.eufy_security.eufy_security_api.exceptions.WebSocketConnectionError
eufy_security Exception in login : - traceback: Traceback (most recent call last): File "/config/custom_components/eufy_security/eufy_security_api/web_socket_client.py", line 42, in connect self.socket = await self.session.ws_connect(f"ws://{self.host}:{self.port}", autoclose=False, autoping=True, heartbeat=60) File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 792, in _ws_connect raise WSServerHandshakeError( aiohttp.client_exceptions.WSServerHandshakeError: 200, message='Invalid response status', url=URL('ws://localhost:3000') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/config/custom_components/eufy_security/config_flow.py", line 113, in _test_credentials await api_client.ws_connect() File "/config/custom_components/eufy_security/eufy_security_api/api_client.py", line 67, in ws_connect await self._client.connect() File "/config/custom_components/eufy_security/eufy_security_api/web_socket_client.py", line 44, in connect raise WebSocketConnectionError() from exc custom_components.eufy_security.eufy_security_api.exceptions.WebSocketConnectionError
Describe the bug
I have duckdns external address with secure address. I can't get the integration to setup using 127.0.0.1, localhost, nor my actual IP address.
To reproduce
Steps to reproduce the behavior:
Expected behavior
Can't get beyond install error.
Additional information
Go to Settings -> System -> Repairs -> Click on 3 dots (...) -> System Information and get Version and Installation Type to below fields;
Hardware Information; RPI 4
Log:
eufy_security Exception in login : - traceback: Traceback (most recent call last): File "/config/custom_components/eufy_security/eufy_security_api/web_socket_client.py", line 42, in connect self.socket = await self.session.ws_connect(f"ws://{self.host}:{self.port}", autoclose=False, autoping=True, heartbeat=60) File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 792, in _ws_connect raise WSServerHandshakeError( aiohttp.client_exceptions.WSServerHandshakeError: 200, message='Invalid response status', url=URL('ws://127.0.0.1:3000') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/config/custom_components/eufy_security/config_flow.py", line 113, in _test_credentials await api_client.ws_connect() File "/config/custom_components/eufy_security/eufy_security_api/api_client.py", line 67, in ws_connect await self._client.connect() File "/config/custom_components/eufy_security/eufy_security_api/web_socket_client.py", line 44, in connect raise WebSocketConnectionError() from exc custom_components.eufy_security.eufy_security_api.exceptions.WebSocketConnectionError
eufy_security Exception in login : - traceback: Traceback (most recent call last): File "/config/custom_components/eufy_security/eufy_security_api/web_socket_client.py", line 42, in connect self.socket = await self.session.ws_connect(f"ws://{self.host}:{self.port}", autoclose=False, autoping=True, heartbeat=60) File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 776, in _ws_connect resp = await self.request( File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 559, in _request await resp.start(conn) File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 898, in start message, payload = await protocol.read() # type: ignore[union-attr] File "/usr/local/lib/python3.10/site-packages/aiohttp/streams.py", line 616, in read await self._waiter aiohttp.client_exceptions.ServerDisconnectedError: Server disconnected The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/config/custom_components/eufy_security/config_flow.py", line 113, in _test_credentials await api_client.ws_connect() File "/config/custom_components/eufy_security/eufy_security_api/api_client.py", line 67, in ws_connect await self._client.connect() File "/config/custom_components/eufy_security/eufy_security_api/web_socket_client.py", line 44, in connect raise WebSocketConnectionError() from exc custom_components.eufy_security.eufy_security_api.exceptions.WebSocketConnectionError
eufy_security Exception in login : - traceback: Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1154, in _create_direct_connection hosts = await asyncio.shield(host_resolved) File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 880, in _resolve_host addrs = await self._resolver.resolve(host, port, family=self._family) File "/usr/local/lib/python3.10/site-packages/aiohttp/resolver.py", line 33, in resolve infos = await self._loop.getaddrinfo( File "/usr/local/lib/python3.10/asyncio/base_events.py", line 860, in getaddrinfo return await self.run_in_executor( File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/usr/local/lib/python3.10/socket.py", line 955, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name does not resolve The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/config/custom_components/eufy_security/eufy_security_api/web_socket_client.py", line 42, in connect self.socket = await self.session.ws_connect(f"ws://{self.host}:{self.port}", autoclose=False, autoping=True, heartbeat=60) File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 776, in _ws_connect resp = await self.request( File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 535, in _request conn = await self._connector.connect( File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 542, in connect proto = await self._create_connection(req, traces, timeout) File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 907, in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1166, in _create_direct_connection raise ClientConnectorError(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host https:80 ssl:default [Name does not resolve] The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/config/custom_components/eufy_security/config_flow.py", line 113, in _test_credentials await api_client.ws_connect() File "/config/custom_components/eufy_security/eufy_security_api/api_client.py", line 67, in ws_connect await self._client.connect() File "/config/custom_components/eufy_security/eufy_security_api/web_socket_client.py", line 44, in connect raise WebSocketConnectionError() from exc custom_components.eufy_security.eufy_security_api.exceptions.WebSocketConnectionError
eufy_security Exception in login : - traceback: Traceback (most recent call last): File "/config/custom_components/eufy_security/eufy_security_api/web_socket_client.py", line 42, in connect self.socket = await self.session.ws_connect(f"ws://{self.host}:{self.port}", autoclose=False, autoping=True, heartbeat=60) File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 792, in _ws_connect raise WSServerHandshakeError( aiohttp.client_exceptions.WSServerHandshakeError: 200, message='Invalid response status', url=URL('ws://localhost:3000') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/config/custom_components/eufy_security/config_flow.py", line 113, in _test_credentials await api_client.ws_connect() File "/config/custom_components/eufy_security/eufy_security_api/api_client.py", line 67, in ws_connect await self._client.connect() File "/config/custom_components/eufy_security/eufy_security_api/web_socket_client.py", line 44, in connect raise WebSocketConnectionError() from exc custom_components.eufy_security.eufy_security_api.exceptions.WebSocketConnectionError