Closed ahamster13 closed 3 years ago
PS: just updated your entry and removed password section just to be sure.
Ok, so i have tried this with 2 different sd cards and fresh HA install. I still get the same issue and wondering if there is something wrong with the code or files? Or docker?
I have tried uninstalling Node.js and chnaging from Latest LTS Version: 14.17.3 to Latest Current Version: 16.5.0
I found this command docker ps --quiet --all | xargs docker inspect --format '{{ .Id }}: ReadonlyRootfs={{ .HostConfig.ReadonlyRootfs }}'
All files show within eufy-security-ws show this: 6d762b1ada03519e679445833c0801e806dbe1b729c5173dbee8392031feadaa: ReadonlyRootfs=false Indicating there are False which means the container’s root filesystem is writeable https://docs.datadoghq.com/security_platform/default_rules/cis-docker-1.2.0-5.12/
can you try like this?
docker run -it -e USERNAME=ssa90899@eoopy.com -e PASSWORD=PUTYOURPASSWORDHERE -p 3000:3000 bropat/eufy-security-ws :latest
Great.
I had SSHed into HA and run this and get the following, so looks like it is working.
2021-07-17 03:07:21.320 INFO Eufy Security server listening on port 3000 2021-07-17 03:07:23.148 INFO Switching to another API_BASE (https://security-app.eufylife.com/v1) and get new token. 2021-07-17 03:07:29.376 INFO Connected to station T8010P1320192143 on host 192.168.50.250 and port 27492 2021-07-17 03:07:31.547 INFO Push notification connection successfully established
Via Hacs, i had added to custom repository from here. I've then run added the integration Eufy Security and it pops up with the Enter IP address and port of web socket. I leave these as the set defaults (192.168.178.119, 3000), It thinks for a minute then but get a message Host/Port is wrong? If i try 192.168.50.250, 3000. It automatically comes up with Host/Port is wrong?
I ran docker ps and noticed the following. b97380ddb1b1 bropat/eufy-security-ws:latest "docker-entrypoint.s…" 12 minutes ago Up 12 minutes 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp optimistic_mclaren
I tried again to install the integration and selection 0.0.0.0, 3000 and it connected? Weird but good yeah?
So that ip 0.0.0.0 is the ip of your running docker container. That ip is exposed so like HA can connect to it. If you went with the npm install of bropat/eufy-security-ws, you would use ip 127.0.0.1 (assuming HA is installed on the same device) or the ip of that device.
Hey all.
Working through this i realised i needed to delete the older nonslepper integration. So i added the repo from fuatakgun. :) Now i get the popup for IP address and not sure what i should be doing here...?
I originally had the homebase2 connected via an old hub, but it changes the IP address :(. I have now switched it to 2.4Gz WIFI. I have got the IP address from about device.
When i add the integration i type in the local ip address it doesn't accept and defaults to 192.168.178.119?
If i try to rerun docker, i get this: ➜ eufy-security-ws git:(master) docker run -it -e USERNAME=ssa90899@eoopy.com -e PASSWORD=*** -v "$(pwd)"/data:/data -p 3000:3000 bropat/eufy-security-ws :latest docker: Error response from daemon: error while creating mount source path '/root/eufy-security-ws/data': mkdir /root/eufy-security-ws: read-only file system.
Also noticed this from log: Log Details (ERROR) This error originated from a custom integration. Logger: custom_components.eufy_security.config_flow Source: custom_components/eufy_security/config_flow.py:69 Integration: Eufy Security (documentation, issues) First occurred: 11:31:11 AM (4 occurrences) Last logged: 11:45:58 AM
eufy_security Exception in login : Cannot connect to host 192.168.50.250:3000 ssl:default [Connect call failed ('192.168.50.250', 3000)] - traceback: Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 969, in _wrap_create_connection return await self._loop.create_connection(*args, *kwargs) # type: ignore # noqa File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1056, in create_connection raise exceptions[0] File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection sock = await self._connect_sock( File "/usr/local/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock await self.sock_connect(sock, address) File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect return await fut File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 537, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.50.250', 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 64, in _test_credentials await eufy_ws.set_ws() File "/config/custom_components/eufy_security/websocket.py", line 40, in set_ws self.ws: aiohttp.ClientWebSocketResponse = await self.session.ws_connect( File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 754, in _ws_connect resp = await self.request( File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 520, in _request conn = await self._connector.connect( File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 535, in connect proto = await self._create_connection(req, traces, timeout) File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 892, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1051, in _create_direct_connection raise last_exc File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1020, in _create_direct_connection transp, proto = await self._wrap_create_connection( File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 975, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 192.168.50.250:3000 ssl:default [Connect call failed ('192.168.50.250', 3000)] eufy_security Exception in login : Cannot connect to host 192.168.178.119:3000 ssl:default [Connect call failed ('192.168.178.119', 3000)] - traceback: Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 969, in _wrap_create_connection return await self._loop.create_connection(args, **kwargs) # type: ignore # noqa File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1056, in create_connection raise exceptions[0] File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection sock = await self._connect_sock( File "/usr/local/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock await self.sock_connect(sock, address) File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect return await fut File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 537, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') TimeoutError: [Errno 110] Connect call failed ('192.168.178.119', 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 64, in _test_credentials await eufy_ws.set_ws() File "/config/custom_components/eufy_security/websocket.py", line 40, in set_ws self.ws: aiohttp.ClientWebSocketResponse = await self.session.ws_connect( File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 754, in _ws_connect resp = await self.request( File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 520, in _request conn = await self._connector.connect( File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 535, in connect proto = await self._create_connection(req, traces, timeout) File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 892, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1051, in _create_direct_connection raise last_exc File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1020, in _create_direct_connection transp, proto = await self._wrap_create_connection( File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 975, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 192.168.178.119:3000 ssl:default [Connect call failed ('192.168.178.119', 3000)]