feat(cameras): pan/tilt page — mosquitto + neolink mqtt-rtsp + cam.ginnoir.com/ptz
Deploy Caddyfile to valhalla / deploy (push) Failing after 10s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ginnoirandClaude Opus 5.5 committed 2026-10-08 01:57:35 -05:00
1 parent d6a331465e
commit b78a8d51ad
10 files changed
+1014 -1

No files matched your search

@@ -149,3 +149,48 @@ cam.ginnoir.com {
5. An Uptime Kuma monitor exists and is green.
6. `scripts/gen-bookmarks.ps1` regenerated, 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]
```
- **`mosquitto`**
- `eclipse-mosquitto:2.0.22`, pinned, on the `cameras` + `edge` networks.
- `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/status`
- **not** `neolink/config`, which echoes the camera password and can rewrite the live
config.
- Authentik forward_auth on the `/mqtt` path 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).
- **Page**
- `stacks/cameras/ptz/` (`index.html` + vendored `mqtt.min.js` 5.15.2 + go2rtc 1.9.10
`video-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.com` forward_auth route):
- `handle_path /ptz/*` → file_server
- `handle /mqtt` → `reverse_proxy mosquitto:8083`
- everything else → frigate
- **Verify:**
- A `mosquitto_pub` of `left` from inside the network visibly pans the camera.
- The page loads, video plays, and the arrows move the camera.
- An anonymous subscribe to `neolink/config` is denied.