bropat / eufy-security-ws

Small server wrapper around eufy-security-client library to access it via a WebSocket.
MIT License
176 stars 26 forks source link

[Bug]: Eufy Client no longer working, failing to get device list #352

Closed mariomaz87 closed 3 weeks ago

mariomaz87 commented 3 weeks ago

Version

1.8.0

Node version

v20.11.1

Operating System type

Docker

Operating system version

Raspberry OS 12

Describe the bug

Since today the Eufy client is not working as expected, it was working fine previously. I noticed the issue because my cameras were no longer working in Home Assistant, and checking the log of the Eufy client docker I see some errors, starting with this message:

Container started
SECURITY WARNING: Reverting CVE-2023-46809: Marvin attack on PKCS#1 padding
2024-08-17 21:15:40.693 INFO    eufy-security-ws    Eufy Security server listening on host 0.0.0.0, port 3003
2024-08-17 21:15:42.116 ERROR   eufy-security-ws:eufy-security-client   [http] [HTTPApi.getDeviceList] Device list - Generic Error {
  error: {
    cause: HTTPError [EufyApiError]: 403 POST https://security-app-eu.eufylife.com/v2/house/device_list
    <html>
    <head><title>403 Forbidden</title></head>
    <body>
    <center><h1>403 Forbidden</h1></center>
    </body>
    </html>

        at Request.<anonymous> (file:///usr/src/app/node_modules/got/dist/source/as-promise/index.js:86:42)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
      input: undefined,
      code: 'ERR_NON_2XX_3XX_RESPONSE',

To reproduce

Start the container

Screenshots & Logfiles

No response

Additional context

My Docker compose file is:

services:
  EufyServer:

    cap_drop:
      - "AUDIT_CONTROL"
      - "BLOCK_SUSPEND"
      - "DAC_READ_SEARCH"
      - "IPC_LOCK"
      - "IPC_OWNER"
      - "LEASE"
      - "LINUX_IMMUTABLE"
      - "MAC_ADMIN"
      - "MAC_OVERRIDE"
      - "NET_ADMIN"
      - "NET_BROADCAST"
      - "SYSLOG"
      - "SYS_ADMIN"
      - "SYS_BOOT"
      - "SYS_MODULE"
      - "SYS_NICE"
      - "SYS_PACCT"
      - "SYS_PTRACE"
      - "SYS_RAWIO"
      - "SYS_RESOURCE"
      - "SYS_TIME"
      - "SYS_TTY_CONFIG"
      - "WAKE_ALARM"

    command:
      - "/usr/src/app/run.sh"

    container_name: "EufyServer"

    entrypoint:
      - "docker-entrypoint.sh"

    environment:
      - "USERNAME=username"
      - "PASSWORD=password"
      - "COUNTRY=IT"
      - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
      - "NODE_VERSION=18.18.2"
      - "YARN_VERSION=1.22.19"
      - "PORT=3003"

    expose:
      - "3000/tcp"

    hostname: "rasp"

    image: "bropat/eufy-security-ws:latest"

    ipc: "private"

    logging:
      driver: "json-file"
      options: {}

    network_mode: "host"

    restart: "unless-stopped"

    volumes:
      - "/home/mario/eufyws:/data"

    working_dir: "/usr/src/app"
    cpus: 0.5

version: "3.6"
bropat commented 3 weeks ago

Everything works as expected on my side.

mariomaz87 commented 3 weeks ago

Ok, after further testing, it’s related to my local network. I can’t even access the iOS app using Wi-Fi, but it works with cellular connectivity. I’ll investigate and trying to reboot the router. Thanks!

mariomaz87 commented 3 weeks ago

If others have the same issue: the problem was not related to this client, but to the Homebridge Eufy Plugin. 4.x versions. If you have the new version, I don't know why, Eufy "bans" your IP. After disabling the plugin, everything else works as expected.