src.nth.io/

summaryrefslogtreecommitdiff
path: root/.gitignore
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2026-06-14 10:53:37 -0500
committerLuke Hoersten <[email protected]>2026-06-14 10:53:37 -0500
commit52f4105aa059b9d7310d80cfb86abe844f7be05a (patch)
tree9c1dc09da9b77ec75334c0772d2179487b1f1f71 /.gitignore
parent334455c8ab793e2303e5e3669fa6deba179412be (diff)
Path B: per-viewport Scrypted devices with UI-driven settings
Convert the Scripts-plugin script from a hardcoded BINDINGS constant into a DeviceProvider + DeviceCreator + HttpRequestHandler. Each viewport is now a child Scrypted device under the parent script with its own Settings page; operators add, edit, and delete viewports entirely through the Scrypted UI. Parent (ScryptedViewportProvider): - DeviceProvider: getDevice(nativeId) instantiates a Viewport, attaches its camera event listener, and posts /config. releaseDevice tears down stream + listener + child storage entry. - DeviceCreator: "+ Add Device" on the parent's page shows a small form (name / host / camera picker filtered to Camera interfaces / orientation choice). createDevice() pre-populates the child's storage via deviceManager.getDeviceStorage(nativeId) and registers it under the parent. - Tracks known child nativeIds in its own storage as a JSON array so it can eagerly instantiate every child on plugin start (each registration + camera subscription happens at load time, not lazily). - 5-min re-register loop catches devices that rebooted or got new DHCP leases. - HttpRequestHandler routes POST <base>/state on the parent's endpoint; body {viewport, state} is matched against child names. Honors the spec race rules: every callback cancels any prior stream + safety timer for that viewport before applying the new state, and a /frame 409 stops the stream without echoing sleep back. - Global tuning (frame_interval_ms) lives on the parent's Settings. Child (Viewport): - Settings: host (string), camera (type=device with deviceFilter for the Camera interface — the UX win), orientation (choices), idle timeout, brightness. All persisted via this.storage. - putSetting fires onBindingChanged() on the parent so re-register + re-subscribe happen immediately when any field changes. scrypted/README.md rewritten for the UI-driven flow — install + add device + edit + remove + global tuning + smoke test — no more "edit BINDINGS and re-save." scrypted/package.json + tsconfig.json: optional `npm install` so editors can resolve @scrypted/sdk types. Nothing here ships — install remains "paste into Scripts plugin." node_modules ignored.
Diffstat (limited to '.gitignore')
-rw-r--r--.gitignore4
1 files changed, 4 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index cb13780..0dcf175 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,10 @@ dependencies.lock
managed_components/
/.cache/
+# Scrypted-side script: optional local type-checking
+scrypted/node_modules/
+scrypted/package-lock.json
+
# Emacs lock files
.#*
\#*\#