neolink 0.6.2 moves for amount/32 s per command and queues them, so the page sends the next step only after the previous reply; in/out are todo!() upstream. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8.8 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 :9001 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:9001", 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 - Networks:
cameras(frigate API :5000) andedge(ntfy:80)
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/ - Only
TZ. frigate-notify posts tohttp://ntfy:80topiccamerasoveredge; ntfy's anonymous user has read-write on unlisted topics, so no token is needed
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).
Addendum (2026-10-08): pan/tilt control page
Frigate's PTZ UI needs ONVIF, which the E1 lacks. Neolink exposes PTZ over MQTT, so:
browser cam.ginnoir.com/ptz/ (static page, Authentik-gated)
├─ video: go2rtc <video-stream> → wss://cam.ginnoir.com/live/mse/api/ws?src=e1 (Frigate)
└─ MQTT over wss://cam.ginnoir.com/mqtt → mosquitto:8083 (websockets)
│
neolink (now `mqtt-rtsp`) ◄── mosquitto:1883 ────┘ topics neolink/e1/control/ptz[/preset]
mosquittoeclipse-mosquitto:2.0.22, pinned, on thecameras+edgenetworks.per_listener_settings true.- :1883 (neolink): password auth, user
neolink. - :8083 (websockets, browser via Caddy): anonymous, but the ACL restricts anonymous
clients to:
- publish:
neolink/e1/control/ptz,neolink/e1/control/ptz/preset,neolink/e1/query/ptz/preset - read:
neolink/e1/status,neolink/e1/status/ptz,neolink/status(notstatus/#: preview flood) - not
neolink/config, which echoes the camera password and can rewrite the live config.
- publish:
- Authentik forward_auth on the
/mqttpath is the browser-side gate.
- neolink
- Command →
mqtt-rtsp. - Preview, motion, and light MQTT features are disabled (preview would push a base64 JPEG every 2 s).
- Command →
- Page
stacks/cameras/ptz/(index.html+ vendoredmqtt.min.js5.15.2 + go2rtc 1.9.10video-rtc.js/video-stream.js). Seeded to/config/caddy/site/cam-ptz/, which Caddy serves as/srv/cam-ptz.- Arrow pad (press-and-hold sends repeated moves), zoom in/out, a speed slider, a preset
list (from
/query/ptz/preset), and "save current as preset".
- Caddy (inside the existing
cam.ginnoir.comforward_auth route):handle_path /ptz/*→ file_serverhandle /mqtt→reverse_proxy mosquitto:8083- everything else → frigate
- Verify:
- A
mosquitto_pubofleftfrom inside the network visibly pans the camera. - The page loads, video plays, and the arrows move the camera.
- An anonymous subscribe to
neolink/configis denied.
- A