From a2813d3dc23ec9456d91f40d0b9ff275187dc7aa Mon Sep 17 00:00:00 2001 From: ginnoir Date: Thu, 8 Oct 2026 01:20:59 -0500 Subject: [PATCH] feat(cameras): neolink + frigate + frigate-notify stack for the Reolink E1 Co-Authored-By: Claude Opus 5.5 --- .../2026-10-08-reolink-camera-frigate.md | 4 +- ...026-10-08-reolink-camera-frigate-design.md | 4 +- stacks/cameras/docker-compose.yml | 63 ++++++++++++++++++ stacks/cameras/frigate-notify/config.yml | 27 ++++++++ stacks/cameras/frigate/config.yml | 65 +++++++++++++++++++ stacks/cameras/neolink/neolink.toml | 10 +++ stacks/cameras/stack.env | 1 + 7 files changed, 170 insertions(+), 4 deletions(-) create mode 100644 stacks/cameras/docker-compose.yml create mode 100644 stacks/cameras/frigate-notify/config.yml create mode 100644 stacks/cameras/frigate/config.yml create mode 100644 stacks/cameras/neolink/neolink.toml create mode 100644 stacks/cameras/stack.env diff --git a/docs/superpowers/plans/2026-10-08-reolink-camera-frigate.md b/docs/superpowers/plans/2026-10-08-reolink-camera-frigate.md index 06d7f7f..0b1835a 100644 --- a/docs/superpowers/plans/2026-10-08-reolink-camera-frigate.md +++ b/docs/superpowers/plans/2026-10-08-reolink-camera-frigate.md @@ -75,7 +75,7 @@ bind = "0.0.0.0" name = "e1" username = "admin" password = "" -address = "192.168.1.99:9000" +address = "192.168.1.99:9001" stream = "both" EOF ``` @@ -199,7 +199,7 @@ bind = "0.0.0.0" name = "e1" username = "admin" password = "" -address = "192.168.1.99:9000" +address = "192.168.1.99:9001" stream = "both" ``` diff --git a/docs/superpowers/specs/2026-10-08-reolink-camera-frigate-design.md b/docs/superpowers/specs/2026-10-08-reolink-camera-frigate-design.md index c13fd91..72322d9 100644 --- a/docs/superpowers/specs/2026-10-08-reolink-camera-frigate-design.md +++ b/docs/superpowers/specs/2026-10-08-reolink-camera-frigate-design.md @@ -25,7 +25,7 @@ explicitly **out of scope**. ## Architecture ``` -Reolink E1 (WiFi, 192.168.1.99) — Baichuan :9000 ONLY (no RTSP/RTMP/HTTP/ONVIF) +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}) @@ -50,7 +50,7 @@ Baichuan session no matter how many viewers there are. - **`neolink`** - `quantumentangledandy/neolink:` (the maintained fork) - - Config at `/config/neolink/neolink.toml`: camera `e1`, `address = "192.168.1.99:9000"`, + - Config at `/config/neolink/neolink.toml`: camera `e1`, `address = "192.168.1.99:9001"`, username/password, `stream = "both"` - Network: `cameras` only. The RTSP output is unauthenticated, but only frigate can reach it - **`frigate`** diff --git a/stacks/cameras/docker-compose.yml b/stacks/cameras/docker-compose.yml new file mode 100644 index 0000000..5d98a83 --- /dev/null +++ b/stacks/cameras/docker-compose.yml @@ -0,0 +1,63 @@ +# cameras stack — Reolink E1 live view + detection snapshots. +# +# The E1 (192.168.1.99) has NO RTSP/RTMP/ONVIF: only Reolink's Baichuan protocol on its +# media port (9001 — set in the Reolink app; neolink breaks if it changes). neolink logs +# in over Baichuan and re-serves rtsp://neolink:8554/e1/{main,sub}Stream on the private +# cameras net (unauthenticated, so it is never on edge). frigate's built-in go2rtc is the +# only neolink client; the browser gets MSE through Caddy (cam.ginnoir.com). +# +# Recording is OFF — snapshots only (/storage1/labdata/frigate). Detection is OpenVINO on +# CPU, deliberately not the P100 (llama-swap owns its VRAM; CDI breaks after reboots). +# +# Configs are host-managed at /config// (Portainer's checkout won't materialize a +# relative repo-file bind). The copies under stacks/cameras/*/ are canonical; on change, +# copy them to valhalla (see homelab-apply). All images pinned out of Watchtower: +# frigate's config schema breaks between minor releases. +services: + neolink: + image: quantumentangledandy/neolink:v0.6.2 + container_name: neolink + restart: unless-stopped + labels: + - "com.centurylabs.watchtower.enable=false" + env_file: stack.env + networks: [cameras] + volumes: + - /config/neolink/neolink.toml:/etc/neolink.toml:ro + + frigate: + image: ghcr.io/blakeblackshear/frigate:0.17.2 + container_name: frigate + restart: unless-stopped + labels: + - "com.centurylabs.watchtower.enable=false" + env_file: stack.env + shm_size: "256mb" + depends_on: [neolink] + networks: [edge, cameras] + volumes: + - /config/frigate:/config + - /storage1/labdata/frigate:/media/frigate + - type: tmpfs + target: /tmp/cache + tmpfs: + size: 1000000000 + + frigate-notify: + image: ghcr.io/0x2142/frigate-notify:v0.5.4 + container_name: frigate-notify + restart: unless-stopped + labels: + - "com.centurylabs.watchtower.enable=false" + env_file: stack.env + depends_on: [frigate] + # cameras -> frigate:5000 API; edge -> ntfy:80 + networks: [cameras, edge] + volumes: + - /config/frigate-notify/config.yml:/app/config.yml:ro + +networks: + edge: + external: true + cameras: + name: cameras diff --git a/stacks/cameras/frigate-notify/config.yml b/stacks/cameras/frigate-notify/config.yml new file mode 100644 index 0000000..64e8ad2 --- /dev/null +++ b/stacks/cameras/frigate-notify/config.yml @@ -0,0 +1,27 @@ +# Seeded to /config/frigate-notify/config.yml on valhalla. frigate-notify v0.5.4. +frigate: + server: http://frigate:5000 + public_url: https://cam.ginnoir.com + startup_check: + attempts: 10 + interval: 30 + webapi: + enabled: true + interval: 30 + mqtt: + enabled: false + +alerts: + general: + title: E1 + snap_bbox: true + notify_once: true + labels: + allow: [person, dog, cat] + ntfy: + enabled: true + server: http://ntfy:80 + topic: cameras + +monitor: + enabled: false diff --git a/stacks/cameras/frigate/config.yml b/stacks/cameras/frigate/config.yml new file mode 100644 index 0000000..7f7a108 --- /dev/null +++ b/stacks/cameras/frigate/config.yml @@ -0,0 +1,65 @@ +# Seeded to /config/frigate/config.yml on valhalla. Frigate 0.17.2 schema. +# Caddy terminates TLS + Authentik forward_auth in front of :8971. +# E1 via neolink: main 2560x1440@30 h264, sub 640x360@20 h264 (probed 2026-10-08). +mqtt: + enabled: false + +tls: + enabled: false + +auth: + enabled: false + +proxy: + separator: "|" + header_map: + user: x-authentik-username + default_role: admin + +detectors: + ov: + type: openvino + device: CPU + +model: + width: 300 + height: 300 + input_tensor: nhwc + input_pixel_format: bgr + path: /openvino-model/ssdlite_mobilenet_v2.xml + labelmap_path: /openvino-model/coco_91cl_bkgr.txt + +go2rtc: + streams: + e1: + - rtsp://neolink:8554/e1/mainStream + e1_sub: + - rtsp://neolink:8554/e1/subStream + +record: + enabled: false + +snapshots: + enabled: true + bounding_box: true + retain: + default: 30 + +objects: + track: [person, dog, cat] + +cameras: + e1: + ffmpeg: + inputs: + - path: rtsp://127.0.0.1:8554/e1_sub + input_args: preset-rtsp-restream + roles: [detect] + detect: + width: 640 + height: 360 + fps: 5 + live: + streams: + Main: e1 + Sub: e1_sub diff --git a/stacks/cameras/neolink/neolink.toml b/stacks/cameras/neolink/neolink.toml new file mode 100644 index 0000000..1e74bfe --- /dev/null +++ b/stacks/cameras/neolink/neolink.toml @@ -0,0 +1,10 @@ +# Seeded to /config/neolink/neolink.toml on valhalla. Secrets versioned by policy. +# E1 media port is 9001 (Reolink app → Network → Advanced → Server Settings). +bind = "0.0.0.0" + +[[cameras]] +name = "e1" +username = "admin" +password = "GRUNT-pin-echo-control" +address = "192.168.1.99:9001" +stream = "both" diff --git a/stacks/cameras/stack.env b/stacks/cameras/stack.env new file mode 100644 index 0000000..2e5580c --- /dev/null +++ b/stacks/cameras/stack.env @@ -0,0 +1 @@ +TZ=America/Chicago