Import UniFi Protect live views + optional auto-resync

views ls/dump/import copy a Protect live view (cameras + grid) into a
layout; grid inferred from slot count (asymmetric presets TBD, see
views dump). Imported layouts link back via protect_view.

Daemon re-syncs the active linked view every view_refresh_seconds (0=
off), so Protect-side edits appear on the wall. Needs the controller
password at runtime; off by default keeps the wall credential-free.

Shared viewmap package used by CLI and daemon.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Levi Woodard
2026-07-02 07:13:51 -05:00
parent 9da5ace150
commit 291d37ec83
8 changed files with 420 additions and 3 deletions

View File

@@ -78,3 +78,9 @@ layouts:
# slots: [Front Door, Driveway, Back Yard, Garage, "", "", "", "", ""]
active_layout: quad
# Re-sync the active layout from its linked UniFi Protect live view every N
# seconds (0 = off). Layouts created by `views import` carry a `protect_view:`
# and are re-synced when this is set. Requires the controller password at
# runtime (export RTSP_STREAMER_PASSWORD for the daemon).
view_refresh_seconds: 0