fuatakgun / eufy_security

Home Assistant integration to manage Eufy Security devices as cameras, home base stations, doorbells, motion and contact sensors.
926 stars 77 forks source link

Unable to use Supervised integration, message "Host/Port is wrong" #1201

Open couzin2000 opened 1 month ago

couzin2000 commented 1 month ago

bropat/eufy-security-client is installed through HACS, follwing THIS video: https://www.youtube.com/watch?v=NY79GxJilO0&t=19s All info is included as required. At the Integration installation of Eufy Security, the prompt requests: Enter ip address and port of Eufy Security Web Socket Instance" Host IP Address (eg 192.168.178.22) Port (eg 3000)

I have left default info as required. Yet error message "Host/Port is wrong" keeps appearing.

From the phone app of my T8200 wired 2K doorbell (the only Eufy device I own which is functional on my iPhone 12), I do not have the ability to change the port, nor can I view which port is being used.

Pinging the internal (static) address of the doorbell functions correctly, all pings answered within 25ms.

To reproduce

Steps to reproduce the behavior:

  1. Go to 'Settings > Devices & services > Integrations > +Add integration'
  2. Click on 'Searchbar' and type in "Eufy", select "Eufy Security"
  3. At the "Eufy Security: Setup" prompt, leave the default host ip 127.0.0.1 and default port 3000 for Supervised integration
  4. See error message "Host/Port is wrong."

Expected behavior

  1. See message "Success! Created configuration for 127.0.0.1" and "We found the following devices" with and entity named "Doorbell" which I can choose. I am unable to get to this page.

Additional information

Go to Settings -> System -> Repairs -> Click on 3 dots (...) -> System Information and get Version and Installation Type to below fields;

Hardware Information;

Logger: custom_components.eufy_security.config_flow Source: custom_components/eufy_security/config_flow.py:127 integration: Eufy Security (documentation, issues) First occurred: 00:29:46 (1 occurrences) Last logged: 00:29:46

eufy_security Exception in login : Connection to add-on was broken. please reload the integration! - traceback: Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1073, in _wrap_create_connection sock = await aiohappyeyeballs.start_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 104, in start_connection raise first_exception File "/usr/local/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 81, in start_connection sock = await _connect_sock( ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 166, in _connect_sock await loop.sock_connect(sock, address) File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 641, in sock_connect return await fut ^^^^^^^^^ File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 681, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') ConnectionRefusedError: [Errno 111] Connect call failed ('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/eufy_security_api/web_socket_client.py", line 42, in connect self.socket = await self.session.ws_connect(f"ws://{self.host}:{self.port}", heartbeat=10, compress=9) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 931, in _ws_connect resp = await self.request( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 657, in _request conn = await self._connector.connect( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 564, in connect proto = await self._create_connection(req, traces, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 975, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1350, in _create_direct_connection raise last_exc File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1319, in _create_direct_connection transp, proto = await self._wrap_create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1088, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:3000 ssl:default [Connect call failed ('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 123, in _test_credentials await api_client.ws_connect() File "/config/custom_components/eufy_security/eufy_security_api/api_client.py", line 66, 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 WebSocketConnectionException("Connection to add-on was broken. please reload the integration!") from exc custom_components.eufy_security.eufy_security_api.exceptions.WebSocketConnectionException: Connection to add-on was broken. please reload the integration!


- Logs from Eufy Security Add-on (either from Add-ons page of Home Assistant or Docker output):

s6-rc: info: service legacy-cont-init: stopping s6-rc: info: service legacy-cont-init successfully stopped s6-rc: info: service fix-attrs: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started jq: error: syntax error, unexpected ';', expecting '}' (Unix shell quoting issues?) at , line 10: stationIPAddresses: { $T8200N0021280DD3; }
jq: 1 compile error s6-rc: info: service legacy-services: stopping s6-rc: info: service legacy-services successfully stopped s6-rc: info: service legacy-cont-init: stopping s6-rc: info: service legacy-cont-init successfully stopped s6-rc: info: service fix-attrs: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started jq: error: syntax error, unexpected ';', expecting '}' (Unix shell quoting issues?) at , line 10: stationIPAddresses: { $T8200N0021280DD3; }
jq: 1 compile error s6-rc: info: service legacy-services: stopping s6-rc: info: service legacy-services successfully stopped s6-rc: info: service legacy-cont-init: stopping s6-rc: info: service legacy-cont-init successfully stopped s6-rc: info: service fix-attrs: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started jq: error: syntax error, unexpected ';', expecting '}' (Unix shell quoting issues?) at , line 10: stationIPAddresses: { $T8200N0021280DD3; }
jq: 1 compile error s6-rc: info: service legacy-services: stopping s6-rc: info: service legacy-services successfully stopped s6-rc: info: service legacy-cont-init: stopping s6-rc: info: service legacy-cont-init successfully stopped s6-rc: info: service fix-attrs: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started jq: error: syntax error, unexpected ';', expecting '}' (Unix shell quoting issues?) at , line 10: stationIPAddresses: { $T8200N0021280DD3; }
jq: 1 compile error s6-rc: info: service legacy-services: stopping s6-rc: info: service legacy-services successfully stopped s6-rc: info: service legacy-cont-init: stopping s6-rc: info: service legacy-cont-init successfully stopped s6-rc: info: service fix-attrs: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started jq: error: syntax error, unexpected ';', expecting '}' (Unix shell quoting issues?) at , line 10: stationIPAddresses: { $T8200N0021280DD3; }
jq: 1 compile error s6-rc: info: service legacy-services: stopping s6-rc: info: service legacy-services successfully stopped s6-rc: info: service legacy-cont-init: stopping s6-rc: info: service legacy-cont-init successfully stopped s6-rc: info: service fix-attrs: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped



- Would you share your device with me in case further debugging required? (Yes/No): No
burakgon commented 1 month ago

Same here with latest version

Bankaifan commented 1 month ago

Same for me

dmeents commented 1 month ago

Same for me as well, any fixes yet?

dmeents commented 1 month ago

Same for me as well, any fixes yet?

In case some one else comes across this, it was a silly mistake on my part. I forgot to install and setup the eufy-security-ws add-on. :facepalm: