eufy-sdk-bridge

eufy-sdk-bridge

Docker app from Tursko's Repository

Overview

Eufy SDK Bridge (mega-yfue) is a container that exposes the `eufy-sdk` to the frontend of your choice. It was released alongside mega-yfue's SDK and Home Assistant addon as part of their Home Assistant integration. It ships with go2rtc bundled, so live camera video is available over RTSP, WebRTC, MSE, or HLS with nothing else to install. Note: This is a brand new SDK, built to replace eufy-security-ws. Container tags: `:latest` and `:dev`. Default ports: - 3000 (TCP): bridge control (WebSocket API, video feed, snapshots). Clients connect to this port. - 1984 (TCP): go2rtc API and web UI, useful for testing streams. - 8554 (TCP): go2rtc RTSP. Clients pull live video from this port. - 8555 (TCP and UDP): go2rtc WebRTC. Network modes: - Host (default, recommended): all four ports bind directly on your server. Change the control port with Bridge Port; Host Port and the go2rtc port fields are ignored. Make sure nothing else on the server already uses 1984, 8554, or 8555. - Bridge: choose the control port with Host Port. If you change Bridge Port, also change Host Port's container port to match; otherwise leave Bridge Port at 3000. Keep the RTSP Port mapping at 8554 or live video will fail with "connection refused". The go2rtc UI/API port can be remapped freely. The WebRTC ports should stay at 8555, and are only needed if you use the bridge's go2rtc for WebRTC directly.

ha-eufy-sdk-bridge

CI node license

The host-facing daemon: one process that logs into eufy once and exposes the eufy-sdk to a frontend — Home Assistant, a web UI, anything. Ships as a multi-arch Docker image with go2rtc bundled, so live camera video is available as RTSP / WebRTC / MSE / HLS with nothing else to install.

WS    :3000/ws             control, state, events     ← the frontend talks to this
HTTP  :3000/stream/<sn>    live video (Annex-B)       ← go2rtc pulls this
HTTP  :3000/snapshot/<sn>  a JPEG still
HTTP  :3000/clip/<sn>      the latest detection's recording, as an mp4 (HomeBase 2)
HTTP  :3000/healthz        which cameras are streaming

Video is deliberately not on the WebSocket: the WS hands back a URL, and connecting to that URL is what starts the camera — disconnecting is what stops it. There is no "stream is running" flag to drift out of sync.

Run it

Pull the published image and run it (bundles the SDK + go2rtc):

docker run -d --name eufy-bridge --network host \
  -e EUFY_EMAIL='you@example.com' -e EUFY_PASSWORD='…' -e EUFY_COUNTRY='GB' \
  -v /opt/eufy-bridge-data:/app/data \
  ghcr.io/mega-yfue/ha-eufy-sdk-bridge:latest

or with Compose (cp .env.example .env first): docker compose up -d.

Full deploy guide (alongside Home Assistant, config reference, first-run 2FA/captcha): docs/docker-compose.md · WS protocol: docs/ws-protocol.md · Troubleshooting: docs/troubleshooting.md

Where it fits

Repo Role
eufy-sdk the HA-agnostic library
ha-eufy-sdk-bridge this — WS + HTTP + go2rtc daemon (Docker)
ha-eufy-sdk-addon Home Assistant add-on wrapper
ha-eufy-sdk the HACS integration (front door)

Status: working — WS control + auth-over-WS (2FA/captcha), device listing, snapshots, and go2rtc streaming. Optional Anker Solix support (power stations / smart meter / Solarbank, a separate account) via SOLIX_EMAIL / SOLIX_PASSWORD — see docs/ws-protocol.md (solix.*). Published image: ghcr.io/mega-yfue/ha-eufy-sdk-bridge (multi-arch: amd64 · arm64). Publishing a GitHub Release builds and pushes the versioned + :latest tags automatically (.github/workflows/publish-ghcr.yml); the same build runs locally via scripts/publish-multiarch.sh. A merge to the dev branch publishes a rolling :dev tag for testing.

Contributing

Contributions are welcome — please branch from dev and open your PR against dev (not main). See CONTRIBUTING.md for the branch model, CI checks, and how releases are cut.

Develop

The bridge is ESM (no build step) and depends on the SDK as a normal npm package (@mega-yfue/eufy-sdk) — npm install pulls it from the registry, no sibling checkout needed.

npm install
npm test          # node --test
npm run lint      # prettier --check .   (npm run format to fix)

Every PR into main or dev runs the CI gate (.github/workflows/ci.yml): npm ci → lint → compile (node --check on each .mjs) → test. main is the public release line; dev is the development line (rolling :dev image).

Categories

Related apps

Explore more like this

Explore all

Details

Repository
ghcr.io/mega-yfue/ha-eufy-sdk-bridge:latest
Last Updated2026-11-03
First Seen2026-09-19

Runtime arguments

Network
host
Shell
sh
Privileged
false

Template configuration

Host PortPorttcp

Host port mapped to the bridge's control port (container port 3000). Only used with Bridge networking; ignored in Host mode, where Bridge Port sets the port instead.

Target
3000
Default
3000
Value
3000
Bridge PortVariable

Port the bridge listens on for control, video, and snapshots. In Host mode, this is the port clients connect to. In Bridge mode, it must match the Host Port's container port (3000 by default), so it's simplest to leave it at 3000 and change Host Port instead.

Target
BRIDGE_PORT
Default
3000
Value
3000
RTSP PortPorttcp

go2rtc RTSP. Clients pull live video from this port. Only used with Bridge networking. Keep the host port at 8554, since clients connect to 8554.

Target
8554
Default
8554
Value
8554
go2rtc UI/API PortPorttcp

go2rtc web UI and API, useful for testing streams. Only used with Bridge networking. The host port can be changed freely.

Target
1984
Default
1984
Value
1984
WebRTC Port (TCP)Porttcp

go2rtc WebRTC over TCP. Only used with Bridge networking, and only needed if you use the bridge's go2rtc for WebRTC directly. Keep the host port at 8555; WebRTC breaks if it is remapped.

Target
8555
Default
8555
Value
8555
WebRTC Port (UDP)Portudp

go2rtc WebRTC over UDP. Only used with Bridge networking, and only needed if you use the bridge's go2rtc for WebRTC directly. Keep the host port at 8555; WebRTC breaks if it is remapped.

Target
8555
Default
8555
Value
8555
Host PathPathrw

The path where the configuration file will be stored.

Target
/app/data
Default
/mnt/user/appdata/eufy-sdk-bridge
Value
/mnt/user/appdata/eufy-sdk-bridge
EUFY_EMAILVariable

Eufy Account Email

EUFY_PASSWORDVariable

Eufy Account Password

EUFY_COUNTRYVariable

Country code (default: US)

Default
US
Value
US
STREAM_IDLE_MSVariable

Auto-off a camera's live stream after this many `ms` with no detection event (motion/person/…). Helps save battery. Default is 300000ms (5 min).

Default
300000
Value
300000
RTSP_IDLE_OFF_MSVariable

Turn the device's native RTSP publish (rtspStream) OFF on a BATTERY camera left idle. Default is 300000ms (5 min).

Default
300000
Value
300000