6.7 KiB
6.7 KiB
Reolink E1 → Frigate on valhalla (live view + detection snapshots)
Date: 2026-10-08 Status: Approved design, pending implementation plan
Goal
Watch a Reolink E1 (indoor pan/tilt, WiFi, plug-in power) live from a browser, and keep a snapshot whenever a person or pet is detected, with an ntfy push. Continuous recording is explicitly out of scope.
Decisions
| Decision | Choice | Why |
|---|---|---|
| NVR software | Frigate | Object detection + snapshots + built-in go2rtc live view in one container |
| Detector | OpenVINO on CPU | One 640×360 sub-stream at 5 fps is negligible on the R730XD Xeons. Keeps the camera off the P100, which llama-swap fills with hot-swapped models and whose CDI device breaks after every reboot (nvidia-modeset, see jellyfin/llama-swap exit 255) |
| Recording | Off (record.enabled: false) |
User wants live view + snapshots only |
| Tracked objects | person, dog, cat |
Person + pet snapshots |
| Snapshot retention | 30 days | Small files; no redundancy needed |
| Notifications | frigate-notify sidecar → ntfy |
Polls Frigate's API, so no MQTT broker needed |
| Access | cam.ginnoir.com, internal_only + Authentik forward_auth (Pattern B) |
Frigate has no OIDC. Remote access goes over the tailnet |
| Image versions | Frigate + frigate-notify pinned, com.centurylabs.watchtower.enable=false |
Frigate config schema breaks between minor releases |
Architecture
Reolink E1 (WiFi, 192.168.1.99) — Baichuan :9000 ONLY (no RTSP/RTMP/HTTP/ONVIF)
│
▼
neolink (Baichuan → RTSP bridge, serves rtsp://neolink:8554/e1/{mainStream,subStream})
│ mainStream ──► go2rtc (inside frigate) ──► browser MSE via Caddy
│ subStream ──► frigate detect (OpenVINO CPU)
▼
frigate ──snapshots──► /storage1/labdata/frigate/
▲
│ HTTP API (cameras net)
frigate-notify ──► https://ntfy.ginnoir.com/<topic> (snapshot attached)
The original E1 has no RTSP. A port probe from valhalla on 2026-10-08 found only 9000 open (80/443/554/1935/8000 closed), and the app's Server Settings shows only the media port. Neolink speaks Reolink's proprietary Baichuan protocol on :9000 and re-serves the streams as RTSP. It is the only camera client. go2rtc re-streams neolink, so the E1 sees one Baichuan session no matter how many viewers there are.
Components
stacks/cameras/docker-compose.yml (new Portainer git stack)
neolinkquantumentangledandy/neolink:<pinned>(the maintained fork)- Config at
/config/neolink/neolink.toml: camerae1,address = "192.168.1.99:9000", username/password,stream = "both" - Network:
camerasonly. The RTSP output is unauthenticated, but only frigate can reach it
frigateghcr.io/blakeblackshear/frigate:<pinned stable>(non-GPU image; OpenVINO CPU is built in)env_file: stack.env,shm_size: 256mb, tmpfs/tmp/cache(1 GB)- Binds:
/config/frigate:/config(config.yml + frigate.db)/storage1/labdata/frigate:/media/frigate(snapshots)
- Networks:
edge(Caddy) andcameras(private, for frigate-notify) - No published ports. The UI (8971) is reached only through Caddy
frigate-notifyghcr.io/0x2142/frigate-notify:<pinned>env_file: stack.env- Config at
/config/frigate-notify/config.yml - Network:
cameras, plus egress to reach ntfy's public URL (same pattern as vigilant)
stacks/cameras/stack.env
Var names are exactly what the containers read:
- Camera credentials do not go here. Neolink's TOML has no env substitution, so they
live in
stacks/cameras/neolink/neolink.toml(secrets are versioned in the private repo by policy), which is seeded to/config/neolink/ - frigate-notify ntfy settings: server
https://ntfy.ginnoir.com, topic, and an ntfy access token (ntfy hasNTFY_ENABLE_LOGIN=true)
Frigate config.yml
- Canonical copy at
stacks/cameras/frigate/config.yml, seeded once to/config/frigate/config.ymlon the host - The bind must be absolute
/config, because the Portainer checkout doesn't materialize sibling repo files - Contents:
auth.enabled: falseproxy.header_map.user: x-authentik-usernamedetectors: ov: {type: openvino, device: CPU}with the bundled SSDLite modelgo2rtc.streams.e1=rtsp://neolink:8554/e1/mainStream,e1_sub=rtsp://neolink:8554/e1/subStreamcameras.e1:- Detect role on
rtsp://127.0.0.1:8554/e1_sub, 640×360 at 5 fps record.enabled: falsesnapshots: {enabled: true, retain: {default: 30}, bounding_box: true}objects.track: [person, dog, cat]live.stream_name: e1
- Detect role on
Caddyfile
cam.ginnoir.com {
import internal_only
route {
import authentik_outpost
handle {
import authentik_forward_auth
reverse_proxy frigate:8971
}
}
}
Authentik
- Proxy provider + application
cam(forward-auth, single application), bound to the embedded outpost, following the existing Pattern B services
Camera-side prerequisites (manual, ginnoir)
Enable RTSP: not available on the E1. Neolink replaces it.- Camera credentials: admin account (provided 2026-10-08).
- DHCP static reservation in OPNsense for 192.168.1.99 (confirm it is a reservation, not just the current lease).
- Keep the Reolink app free of other viewers during testing. The E1 allows few simultaneous Baichuan sessions.
- Make sure the E1 is on a 2.4 GHz SSID with decent signal. WiFi drops show up as Frigate "no frames" warnings.
Error handling / operations
- Camera offline: Frigate retries ffmpeg on its own. An Uptime Kuma monitor on Frigate's
/api/versioncovers the container, and frigate-notify can alert on camera-offline. - Recovering from /storage1 unmount:
storage1-guard.servicealready blocks guests without a real/storage1, so snapshots won't land on the empty virtiofs mountpoint. - Upgrades: bump pinned tags manually after reading Frigate's release notes for config migrations.
Verification
neolinklogs show a login toe1and both streams available.- The
frigatecontainer stays healthy. Its logs show thee1ande1_substreams connected and the OpenVINO detector loaded on CPU. https://cam.ginnoir.comredirects to Authentik on the LAN. After login it shows a smooth live view (MSE).- Walking in front of the camera creates a
personevent with a snapshot under/storage1/labdata/frigate/clips/, and an ntfy push with the image arrives. - Frigate's system page shows detector inference time and CPU use in a sane range.
- An Uptime Kuma monitor exists and is green.
scripts/gen-bookmarks.ps1regenerated, and the Portainer stack registered with empty UI env vars (scripts/check-portainer-stack-env.ps1).