@camstack/addon-provider-wyze 0.2.94 → 0.2.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +249 -27
- package/dist/addon.mjs +249 -27
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -31,7 +31,7 @@ let net = require("net");
|
|
|
31
31
|
net = __toESM(net, 1);
|
|
32
32
|
let node_child_process = require("node:child_process");
|
|
33
33
|
let node_tls = require("node:tls");
|
|
34
|
-
//#region ../types/dist/event-category-
|
|
34
|
+
//#region ../types/dist/event-category-DAXzJeTX.mjs
|
|
35
35
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
36
36
|
EventCategory["SystemBoot"] = "system.boot";
|
|
37
37
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -623,7 +623,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
623
623
|
* issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
|
|
624
624
|
*/
|
|
625
625
|
EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
|
|
626
|
-
EventCategory["FrigateLiveEvent"] = "frigate.live-event";
|
|
627
626
|
EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
|
|
628
627
|
/**
|
|
629
628
|
* Stream-broker health watchdog. Per-broker (deviceId/profile) emission.
|
|
@@ -12657,7 +12656,7 @@ DeviceType.Camera;
|
|
|
12657
12656
|
var SourceInfoSchema = object({
|
|
12658
12657
|
/** Live dispatch key — mutable when the source system allows rename. */
|
|
12659
12658
|
id: string(),
|
|
12660
|
-
/** Source system tag — e.g. 'homeassistant' | 'reolink' | '
|
|
12659
|
+
/** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
|
|
12661
12660
|
system: string(),
|
|
12662
12661
|
/** Immutable upstream identifier when available (HA `unique_id`, … ).
|
|
12663
12662
|
* Used to detect rename when `id` changes. */
|
|
@@ -12670,7 +12669,7 @@ var SourceInfoSchema = object({
|
|
|
12670
12669
|
/**
|
|
12671
12670
|
* Build the synthetic SourceInfo every existing provider falls back to
|
|
12672
12671
|
* when no upstream value has been persisted. Keeps non-migrated providers
|
|
12673
|
-
* (Reolink / Hikvision / ONVIF /
|
|
12672
|
+
* (Reolink / Hikvision / ONVIF / RTSP) functional without code
|
|
12674
12673
|
* changes — `id` reuses the CamStack stableId, `system` reuses the addon
|
|
12675
12674
|
* id. Real upstream identity replaces this once a provider migrates and
|
|
12676
12675
|
* calls `updateSourceInfo()` with concrete values.
|
|
@@ -13349,7 +13348,7 @@ var deviceProviderCapability = {
|
|
|
13349
13348
|
* - `device-management.router.ts` (deleted in Phase 2)
|
|
13350
13349
|
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
13351
13350
|
*
|
|
13352
|
-
* All device provider addons (rtsp, onvif,
|
|
13351
|
+
* All device provider addons (rtsp, onvif, …) are hub-local: they may
|
|
13353
13352
|
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
13354
13353
|
* - No nodeId routing needed — this is a pure hub singleton.
|
|
13355
13354
|
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
@@ -17397,7 +17396,7 @@ var NcRuleInputSchema = object({
|
|
|
17397
17396
|
* The measured seven-person arrival on device 590 spans 110 s with every
|
|
17398
17397
|
* internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
|
|
17399
17398
|
* idle cutoff holds it as one and ends it when the arrival actually ends.
|
|
17400
|
-
* 30 is
|
|
17399
|
+
* 30 s is a widely shipped value for the same decision.
|
|
17401
17400
|
*
|
|
17402
17401
|
* ### What it replaces
|
|
17403
17402
|
*
|
|
@@ -19479,6 +19478,13 @@ var ZoneCrossingSchema = object({
|
|
|
19479
19478
|
/** Zone display name at crossing time (falls back to the id). */
|
|
19480
19479
|
zoneName: string().optional()
|
|
19481
19480
|
});
|
|
19481
|
+
/** One zone a box was stamped with, and how much of the BOX fell inside it. */
|
|
19482
|
+
var ZoneOverlapSchema = object({
|
|
19483
|
+
zoneId: string(),
|
|
19484
|
+
zoneName: string().optional(),
|
|
19485
|
+
/** Percentage of the BOX area inside the zone, 0–100. */
|
|
19486
|
+
overlapPct: number()
|
|
19487
|
+
});
|
|
19482
19488
|
var ObjectEventSchema = object({
|
|
19483
19489
|
...BaseEventFields,
|
|
19484
19490
|
kind: literal("object"),
|
|
@@ -19503,6 +19509,35 @@ var ObjectEventSchema = object({
|
|
|
19503
19509
|
bbox: BoundingBoxSchema.optional(),
|
|
19504
19510
|
/** Heavy JSON — omitted in slim projection. */
|
|
19505
19511
|
zones: array(string()).readonly().optional(),
|
|
19512
|
+
/**
|
|
19513
|
+
* How far inside each stamped zone the box actually was, as a percentage of
|
|
19514
|
+
* the BOX area.
|
|
19515
|
+
*
|
|
19516
|
+
* Membership alone cannot express "at least a third of it inside", which is
|
|
19517
|
+
* the bar an operator argues with — and the number already existed: the
|
|
19518
|
+
* engine computed it, the pipeline logged it, and then discarded it. It
|
|
19519
|
+
* matters most on the events that carry no track, where a rule has nothing
|
|
19520
|
+
* else to judge by.
|
|
19521
|
+
*/
|
|
19522
|
+
zoneOverlaps: array(ZoneOverlapSchema).readonly().optional(),
|
|
19523
|
+
/**
|
|
19524
|
+
* Present when this event describes a detection the TRACKER refused, so it
|
|
19525
|
+
* has no track and never will.
|
|
19526
|
+
*
|
|
19527
|
+
* A zone-scoped immediate rule asks "is there an animal in the flowerbed
|
|
19528
|
+
* NOW?"; tracking answers a different question ("is this the same subject as
|
|
19529
|
+
* before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
|
|
19530
|
+
* dog at 0.7729, 100% inside a watched zone, was refused three times in six
|
|
19531
|
+
* seconds with three different candidate ids — seven analysed frames in the
|
|
19532
|
+
* window, the subject in a handful of them, metres apart — and produced no
|
|
19533
|
+
* event at all.
|
|
19534
|
+
*
|
|
19535
|
+
* It is NAMED rather than merely implied by a missing `trackId`: an event
|
|
19536
|
+
* with no track and no reason is indistinguishable from a track whose media
|
|
19537
|
+
* went missing, and a consumer that asks this one for a best shot or a
|
|
19538
|
+
* history is asking for something that never existed.
|
|
19539
|
+
*/
|
|
19540
|
+
spawnRefused: string().optional(),
|
|
19506
19541
|
/** Omitted in slim projection. */
|
|
19507
19542
|
state: TrackStateSchema.optional(),
|
|
19508
19543
|
/**
|
|
@@ -19929,7 +19964,17 @@ var EventDensityBucketSchema = object({
|
|
|
19929
19964
|
bucketStart: number(),
|
|
19930
19965
|
motion: number().int(),
|
|
19931
19966
|
object: number().int(),
|
|
19932
|
-
audio: number().int()
|
|
19967
|
+
audio: number().int(),
|
|
19968
|
+
/**
|
|
19969
|
+
* Energy-weighted mean dBFS of the audio events in this bucket — the LEVEL,
|
|
19970
|
+
* as opposed to `audio`, which is their COUNT (D431).
|
|
19971
|
+
*
|
|
19972
|
+
* ABSENT when the bucket holds no audio event. Absence means "nothing was
|
|
19973
|
+
* measured", which is not the same claim as silence, and a lane that cannot
|
|
19974
|
+
* tell them apart paints a quiet hour at full scale — which is exactly what
|
|
19975
|
+
* the count-on-a-level-meter did.
|
|
19976
|
+
*/
|
|
19977
|
+
audioDbfs: number().optional()
|
|
19933
19978
|
});
|
|
19934
19979
|
/**
|
|
19935
19980
|
* One camera's row in a `getEventDensityBatch` answer.
|
|
@@ -20576,6 +20621,60 @@ var NativeCropResultSchema = object({
|
|
|
20576
20621
|
*/
|
|
20577
20622
|
tier: _enum(["native", "ram-fullframe"]).optional()
|
|
20578
20623
|
});
|
|
20624
|
+
/**
|
|
20625
|
+
* What a PARKED frame is for — the `kind` half of the `(deviceId, trackId,
|
|
20626
|
+
* kind)` key ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
|
|
20627
|
+
*
|
|
20628
|
+
* - `keyFrame` — the track's clean best FULL frame at native width (capped by
|
|
20629
|
+
* the caller's `maxWidth`). What `keyFrame` + `keyFrameSmall` are written
|
|
20630
|
+
* from, and what the detail plane's full-frame rung cuts from.
|
|
20631
|
+
* - `thumbnail` — the best-shot subject slab: the caller's 16:9 central-square
|
|
20632
|
+
* window, cut by the runner at uncapped native resolution.
|
|
20633
|
+
*
|
|
20634
|
+
* The runner never interprets `trackId`; it is an opaque key the hub owns.
|
|
20635
|
+
*/
|
|
20636
|
+
var ParkedFrameKindSchema = _enum(["keyFrame", "thumbnail"]);
|
|
20637
|
+
/**
|
|
20638
|
+
* Why a park did NOT happen. Every one is logged on the runner with
|
|
20639
|
+
* `tags: { deviceId }` and the handle's measured age, because a handle already
|
|
20640
|
+
* gone at park time IS the defect the 150–500 ms window exists to prevent —
|
|
20641
|
+
* never a reason to retry in a loop.
|
|
20642
|
+
*
|
|
20643
|
+
* - `handle-gone` — the native surface no longer resolves this handle (never
|
|
20644
|
+
* registered, past the lease bound, or the worker released it). `detail`
|
|
20645
|
+
* carries the runner's own miss reason.
|
|
20646
|
+
* - `encode-failed` — pixels resolved and the JPEG encode threw.
|
|
20647
|
+
*/
|
|
20648
|
+
var ParkRefusalSchema = _enum(["handle-gone", "encode-failed"]);
|
|
20649
|
+
/** Answer to `parkTrackFrame` — a discriminated union, so "not parked" always names why. */
|
|
20650
|
+
var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
|
|
20651
|
+
parked: literal(true),
|
|
20652
|
+
/** The node holding the parcel — what a later retrieval must be pinned to. */
|
|
20653
|
+
nodeId: string(),
|
|
20654
|
+
width: number().int().positive(),
|
|
20655
|
+
height: number().int().positive(),
|
|
20656
|
+
/** JPEG bytes the parcel costs on the node. */
|
|
20657
|
+
bytes: number().int().nonnegative(),
|
|
20658
|
+
/** Whether this park replaced a parcel already held for the key. */
|
|
20659
|
+
replaced: boolean()
|
|
20660
|
+
}), object({
|
|
20661
|
+
parked: literal(false),
|
|
20662
|
+
nodeId: string(),
|
|
20663
|
+
reason: ParkRefusalSchema,
|
|
20664
|
+
/** Age of the handle at the park, on the runner's clock; null if unknown. */
|
|
20665
|
+
handleAgeMs: number().nullable(),
|
|
20666
|
+
detail: string().optional()
|
|
20667
|
+
})]);
|
|
20668
|
+
/** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
|
|
20669
|
+
var ParkedTrackFrameSchema = object({
|
|
20670
|
+
jpeg: string(),
|
|
20671
|
+
width: number().int().positive(),
|
|
20672
|
+
height: number().int().positive(),
|
|
20673
|
+
/** The frame instant the parcel shows (the caller's clock, echoed back). */
|
|
20674
|
+
timestamp: number(),
|
|
20675
|
+
/** When the node stored it (the node's clock). */
|
|
20676
|
+
parkedAt: number()
|
|
20677
|
+
});
|
|
20579
20678
|
/** Parent detection context passed to `runDetailSubtree` — the crop's
|
|
20580
20679
|
* originating detection, in FRAME-space coordinates. Reuses
|
|
20581
20680
|
* `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
|
|
@@ -20965,7 +21064,7 @@ var RunnerCameraConfigSchema = object({
|
|
|
20965
21064
|
* - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
|
|
20966
21065
|
* analyzer providers) running on decoded frames in this runner.
|
|
20967
21066
|
* - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
|
|
20968
|
-
* analytics
|
|
21067
|
+
* analytics). The provider emits ProviderMotion
|
|
20969
21068
|
* events; the orchestrator forwards to `reportMotion`.
|
|
20970
21069
|
*/
|
|
20971
21070
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
@@ -21207,7 +21306,26 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
21207
21306
|
className: string(),
|
|
21208
21307
|
/** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
|
|
21209
21308
|
sourceDeviceId: number()
|
|
21210
|
-
}), RunStatelessStepResultSchema, { kind: "mutation" })
|
|
21309
|
+
}), RunStatelessStepResultSchema, { kind: "mutation" }), method(object({
|
|
21310
|
+
deviceId: number(),
|
|
21311
|
+
/** Opaque to the runner — the hub's track id. */
|
|
21312
|
+
trackId: string(),
|
|
21313
|
+
kind: ParkedFrameKindSchema,
|
|
21314
|
+
handle: FrameHandleSchema,
|
|
21315
|
+
/** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
|
|
21316
|
+
bbox: NativeCropBboxSchema,
|
|
21317
|
+
/** Width cap for a full-frame park (the `keyFrame` native cap). */
|
|
21318
|
+
maxWidth: number().int().positive().optional(),
|
|
21319
|
+
/** The frame instant (caller's clock) — orders parks for one key. */
|
|
21320
|
+
timestamp: number()
|
|
21321
|
+
}), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
|
|
21322
|
+
deviceId: number(),
|
|
21323
|
+
trackId: string(),
|
|
21324
|
+
kind: ParkedFrameKindSchema
|
|
21325
|
+
}), ParkedTrackFrameSchema.nullable()), method(object({
|
|
21326
|
+
deviceId: number(),
|
|
21327
|
+
trackId: string()
|
|
21328
|
+
}), object({ released: number().int().nonnegative() }), { kind: "mutation" });
|
|
21211
21329
|
var CameraPipelineConfigSchema = object({
|
|
21212
21330
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
21213
21331
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -24381,8 +24499,8 @@ onStatusChanged: { data: object({
|
|
|
24381
24499
|
/**
|
|
24382
24500
|
* Runtime-state slice — every provider that registers this cap
|
|
24383
24501
|
* stores the same shape under `device.runtimeState[battery]`.
|
|
24384
|
-
* Cross-provider uniformity: a Reolink Argus, a
|
|
24385
|
-
*
|
|
24502
|
+
* Cross-provider uniformity: a Reolink Argus, a sensor proxy,
|
|
24503
|
+
* an ONVIF battery cam all read/write the same keys.
|
|
24386
24504
|
* Consumers (BatteryBadge, snapshot wrapper sleep gate) read once
|
|
24387
24505
|
* via `device.runtimeState.getCapState('battery')` regardless of
|
|
24388
24506
|
* the underlying driver.
|
|
@@ -24515,7 +24633,7 @@ DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _v
|
|
|
24515
24633
|
*
|
|
24516
24634
|
* Implementations:
|
|
24517
24635
|
* - Each camera-providing addon registers this cap natively per
|
|
24518
|
-
* device (Reolink, Hikvision, RTSP,
|
|
24636
|
+
* device (Reolink, Hikvision, RTSP, ONVIF self).
|
|
24519
24637
|
* - Returns a snapshot from the persisted device config blob — no
|
|
24520
24638
|
* extra round-trip to the camera, no probing.
|
|
24521
24639
|
* - The cap is admin-only (`auth: 'admin'`) — credentials must not
|
|
@@ -26615,7 +26733,7 @@ var AvailableIntegrationTypeSchema = object({
|
|
|
26615
26733
|
* Which integration-marker cap the addon declared, so the wizard can
|
|
26616
26734
|
* branch on CAP — never on addon name. `device-adoption` integrations
|
|
26617
26735
|
* (Home Assistant, …) route through the broker step (Approach A);
|
|
26618
|
-
* `device-provider` integrations (Reolink/
|
|
26736
|
+
* `device-provider` integrations (Reolink/ONVIF) keep the
|
|
26619
26737
|
* legacy config → discovery flow.
|
|
26620
26738
|
*/
|
|
26621
26739
|
kind: _enum(["device-adoption", "device-provider"]),
|
|
@@ -29983,7 +30101,23 @@ var RecordingRangeSchema = object({
|
|
|
29983
30101
|
});
|
|
29984
30102
|
var RecordingAvailabilitySchema = object({
|
|
29985
30103
|
deviceId: number(),
|
|
29986
|
-
ranges: array(RecordingRangeSchema)
|
|
30104
|
+
ranges: array(RecordingRangeSchema),
|
|
30105
|
+
/**
|
|
30106
|
+
* Every profile this camera has footage in — not only the one `ranges`
|
|
30107
|
+
* describes (D433).
|
|
30108
|
+
*
|
|
30109
|
+
* `ranges` answers for ONE profile by design: the timeline is a single bar,
|
|
30110
|
+
* and enumerating all of them triples the directory reads for a bar that
|
|
30111
|
+
* would look identical. But the answer used to say nothing about that, so a
|
|
30112
|
+
* caller asking "what can I export?" read the single preferred profile as
|
|
30113
|
+
* the only one that exists — on this deployment every camera records `high`
|
|
30114
|
+
* AND `low`, the low tree holding 14 GB for camera 615 alone, and the export
|
|
30115
|
+
* UI could not see it.
|
|
30116
|
+
*
|
|
30117
|
+
* Cheap: it is the same shallow directory read the profile CHOICE already
|
|
30118
|
+
* makes. Ask for a specific profile's ranges with the `profile` input.
|
|
30119
|
+
*/
|
|
30120
|
+
profilesWithFootage: array(string())
|
|
29987
30121
|
});
|
|
29988
30122
|
var RecordingDaysSchema = object({
|
|
29989
30123
|
deviceId: number(),
|
|
@@ -30009,7 +30143,11 @@ var RecordingDaysSchema = object({
|
|
|
30009
30143
|
var RecordingAvailabilityForDeviceSchema = object({
|
|
30010
30144
|
deviceId: number(),
|
|
30011
30145
|
read: _enum(["read", "unreadable"]),
|
|
30012
|
-
ranges: array(RecordingRangeSchema).readonly()
|
|
30146
|
+
ranges: array(RecordingRangeSchema).readonly(),
|
|
30147
|
+
/** Same field, same meaning, as the singular answer (D433). A row that
|
|
30148
|
+
* dropped it would tell a grid caller the archive holds one profile.
|
|
30149
|
+
* Empty on an `'unreadable'` row: nobody looked. */
|
|
30150
|
+
profilesWithFootage: array(string()).readonly()
|
|
30013
30151
|
});
|
|
30014
30152
|
/**
|
|
30015
30153
|
* One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
|
|
@@ -30039,13 +30177,31 @@ var RecordingManifestSchema = object({
|
|
|
30039
30177
|
*/
|
|
30040
30178
|
playbackEndpoints: array(string())
|
|
30041
30179
|
});
|
|
30042
|
-
/**
|
|
30043
|
-
*
|
|
30180
|
+
/**
|
|
30181
|
+
* Recording storage usage for one camera — what the ARCHIVE holds for it,
|
|
30182
|
+
* across every profile and every resolvable location on this node.
|
|
30183
|
+
*
|
|
30184
|
+
* ## Archive vs residency, which is the whole point of this shape (D418)
|
|
30185
|
+
*
|
|
30186
|
+
* `usedBytes` / `oldestMs` / `segments` are the durable hour ledger's numbers:
|
|
30187
|
+
* the same quantity `RecordingLocationUsage.usedBytes` reports for the volume
|
|
30188
|
+
* this camera writes to, so the two can be added up and compared.
|
|
30189
|
+
*
|
|
30190
|
+
* They were not always. Until D418 this row came from the recorder's in-RAM
|
|
30191
|
+
* `RecordingIndex`, which since D287 holds only the live tail plus the hours
|
|
30192
|
+
* somebody hydrated — so a hub with 1.9 TB and 3.3 days of footage reported
|
|
30193
|
+
* 60.5 GB and "oldest: three hours ago" on the same page as the volume row
|
|
30194
|
+
* that said otherwise, and two people read it as retention eating recent
|
|
30195
|
+
* footage. Residency is still reported, under `residentBytes` /
|
|
30196
|
+
* `residentOldestMs`, which answer a different question and say so.
|
|
30197
|
+
*/
|
|
30044
30198
|
var RecordingDeviceUsageSchema = object({
|
|
30045
30199
|
deviceId: number(),
|
|
30200
|
+
/** Bytes the ARCHIVE holds for this camera on this node's resolvable
|
|
30201
|
+
* recordings locations. */
|
|
30046
30202
|
usedBytes: number(),
|
|
30047
30203
|
/**
|
|
30048
|
-
* Start of this camera's OLDEST
|
|
30204
|
+
* Start of this camera's OLDEST ARCHIVED segment, across every profile and
|
|
30049
30205
|
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
30050
30206
|
* only honest answer to "is retention actually holding?" per camera.
|
|
30051
30207
|
*
|
|
@@ -30055,7 +30211,24 @@ var RecordingDeviceUsageSchema = object({
|
|
|
30055
30211
|
* (types) and the addon ship on different trains, and the addon is usually
|
|
30056
30212
|
* the later of the two.
|
|
30057
30213
|
*/
|
|
30058
|
-
oldestMs: number().nullable().optional()
|
|
30214
|
+
oldestMs: number().nullable().optional(),
|
|
30215
|
+
/** Segments the archive holds for this camera — the "M" beside `usedBytes`.
|
|
30216
|
+
* OPTIONAL for the same train-skew reason as `oldestMs`. */
|
|
30217
|
+
segments: number().optional(),
|
|
30218
|
+
/**
|
|
30219
|
+
* RESIDENCY, not the archive: bytes the recorder process currently holds in
|
|
30220
|
+
* its RAM index — the live tail plus the hours a reader hydrated.
|
|
30221
|
+
*
|
|
30222
|
+
* It answers "what can be served without touching the disk", never "how much
|
|
30223
|
+
* footage this camera has". A UI that renders it must label it as such, and
|
|
30224
|
+
* must never total it as storage. OPTIONAL: a recorder predating D418 omits
|
|
30225
|
+
* it, and so does a node whose ledger could not answer.
|
|
30226
|
+
*/
|
|
30227
|
+
residentBytes: number().optional(),
|
|
30228
|
+
/** The residency counterpart of `oldestMs` — the oldest segment currently in
|
|
30229
|
+
* RAM, which on a healthy recorder is minutes ago and means nothing about
|
|
30230
|
+
* retention. `null` = nothing resident. */
|
|
30231
|
+
residentOldestMs: number().nullable().optional()
|
|
30059
30232
|
});
|
|
30060
30233
|
/** Recording storage usage + capacity for one storage location. */
|
|
30061
30234
|
var RecordingLocationUsageSchema = object({
|
|
@@ -30093,6 +30266,17 @@ var RecordingStorageUsageSchema = object({
|
|
|
30093
30266
|
totalUsedBytes: number(),
|
|
30094
30267
|
devices: array(RecordingDeviceUsageSchema),
|
|
30095
30268
|
/**
|
|
30269
|
+
* WHERE `devices[]` came from, so an empty table is never mistaken for empty
|
|
30270
|
+
* disks (D418).
|
|
30271
|
+
*
|
|
30272
|
+
* `archive` = the durable hour ledger answered. `unavailable` = this node
|
|
30273
|
+
* declared no ledger and the recorder REFUSED rather than answering the
|
|
30274
|
+
* question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
|
|
30275
|
+
* zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
|
|
30276
|
+
* and its rows are residency.
|
|
30277
|
+
*/
|
|
30278
|
+
devicesRead: _enum(["archive", "unavailable"]).optional(),
|
|
30279
|
+
/**
|
|
30096
30280
|
* Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
|
|
30097
30281
|
* of the payload without it: the hub serves this method through a BAKED
|
|
30098
30282
|
* router, so a hub whose framework train predates a change to this array
|
|
@@ -30253,7 +30437,14 @@ var ReadWindowBytesResultSchema = discriminatedUnion("kind", [object({
|
|
|
30253
30437
|
method(object({
|
|
30254
30438
|
deviceId: number(),
|
|
30255
30439
|
fromMs: number(),
|
|
30256
|
-
toMs: number()
|
|
30440
|
+
toMs: number(),
|
|
30441
|
+
/**
|
|
30442
|
+
* Answer for THIS profile instead of the preferred one (D433). Absent
|
|
30443
|
+
* keeps the timeline's behaviour — one bar, one profile, one set of
|
|
30444
|
+
* reads. `profilesWithFootage` on the answer says what may be asked
|
|
30445
|
+
* for.
|
|
30446
|
+
*/
|
|
30447
|
+
profile: string().optional()
|
|
30257
30448
|
}), RecordingAvailabilitySchema, {
|
|
30258
30449
|
kind: "query",
|
|
30259
30450
|
auth: "protected"
|
|
@@ -33972,7 +34163,7 @@ function toDeviceSummary(device, addonId) {
|
|
|
33972
34163
|
};
|
|
33973
34164
|
}
|
|
33974
34165
|
/**
|
|
33975
|
-
* Base class for device-provider addons (rtsp, onvif
|
|
34166
|
+
* Base class for device-provider addons (rtsp, onvif).
|
|
33976
34167
|
*
|
|
33977
34168
|
* Provides default implementations for the common device-provider cap
|
|
33978
34169
|
* methods (`start`, `stop`, `getStatus`, `getDevices`, `supportsDiscovery`,
|
|
@@ -38628,6 +38819,24 @@ Object.freeze({
|
|
|
38628
38819
|
addonId: null,
|
|
38629
38820
|
access: "view"
|
|
38630
38821
|
},
|
|
38822
|
+
"pipelineRunner.getParkedTrackFrame": {
|
|
38823
|
+
capName: "pipeline-runner",
|
|
38824
|
+
capScope: "system",
|
|
38825
|
+
addonId: null,
|
|
38826
|
+
access: "view"
|
|
38827
|
+
},
|
|
38828
|
+
"pipelineRunner.parkTrackFrame": {
|
|
38829
|
+
capName: "pipeline-runner",
|
|
38830
|
+
capScope: "system",
|
|
38831
|
+
addonId: null,
|
|
38832
|
+
access: "create"
|
|
38833
|
+
},
|
|
38834
|
+
"pipelineRunner.releaseParkedTrackFrames": {
|
|
38835
|
+
capName: "pipeline-runner",
|
|
38836
|
+
capScope: "system",
|
|
38837
|
+
addonId: null,
|
|
38838
|
+
access: "create"
|
|
38839
|
+
},
|
|
38631
38840
|
"pipelineRunner.reportMotion": {
|
|
38632
38841
|
capName: "pipeline-runner",
|
|
38633
38842
|
capScope: "system",
|
|
@@ -41905,6 +42114,21 @@ Object.freeze({
|
|
|
41905
42114
|
form: "single",
|
|
41906
42115
|
optional: false
|
|
41907
42116
|
}],
|
|
42117
|
+
"pipelineRunner.getParkedTrackFrame": [{
|
|
42118
|
+
name: "deviceId",
|
|
42119
|
+
form: "single",
|
|
42120
|
+
optional: false
|
|
42121
|
+
}],
|
|
42122
|
+
"pipelineRunner.parkTrackFrame": [{
|
|
42123
|
+
name: "deviceId",
|
|
42124
|
+
form: "single",
|
|
42125
|
+
optional: false
|
|
42126
|
+
}],
|
|
42127
|
+
"pipelineRunner.releaseParkedTrackFrames": [{
|
|
42128
|
+
name: "deviceId",
|
|
42129
|
+
form: "single",
|
|
42130
|
+
optional: false
|
|
42131
|
+
}],
|
|
41908
42132
|
"pipelineRunner.reportMotion": [{
|
|
41909
42133
|
name: "deviceId",
|
|
41910
42134
|
form: "single",
|
|
@@ -42596,7 +42820,7 @@ var PreviewTextField = string().max(200);
|
|
|
42596
42820
|
* Whether the notification's preview is a STILL or a short animation.
|
|
42597
42821
|
*
|
|
42598
42822
|
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
42599
|
-
* rule)"* —
|
|
42823
|
+
* rule)"* — the other rules already offer an animated preview, and a ten-hour
|
|
42600
42824
|
* night reads better as three seconds of motion than as one frame of it. Both
|
|
42601
42825
|
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
42602
42826
|
* simply applies it to a dozen frames sampled across the render and assembles
|
|
@@ -46344,8 +46568,7 @@ var WYZE_BITRATE = {
|
|
|
46344
46568
|
* `discoverDevices()` enumerates the Wyze cloud's camera list and the
|
|
46345
46569
|
* operator adopts a candidate (every P2P parameter auto-populated from
|
|
46346
46570
|
* the cloud blob). This manual form is the fallback for adding a camera
|
|
46347
|
-
* by its P2P parameters directly
|
|
46348
|
-
* `getCreateDeviceSettings`). The parameters come from the Wyze cloud
|
|
46571
|
+
* by its P2P parameters directly. The parameters come from the Wyze cloud
|
|
46349
46572
|
* (`mac`, `p2pId`/uid, `enr`, local `ip`, `productModel`), not a LAN scan.
|
|
46350
46573
|
*/
|
|
46351
46574
|
function buildCreationFormSchema() {
|
|
@@ -46847,8 +47070,7 @@ function buildWyzeAdoptionProvider(deps) {
|
|
|
46847
47070
|
/**
|
|
46848
47071
|
* Decode a raw Annex-B keyframe (H264 or H265) into a single JPEG via
|
|
46849
47072
|
* ffmpeg. The Wyze lib's `grabKeyframe()` yields raw Annex-B IDR bytes;
|
|
46850
|
-
* we pipe them through ffmpeg's image2 muxer to get a JPEG
|
|
46851
|
-
* scrypted-wyze-native's `takePicture`.
|
|
47073
|
+
* we pipe them through ffmpeg's image2 muxer to get a JPEG.
|
|
46852
47074
|
*
|
|
46853
47075
|
* Pure module: takes a `spawn`-like factory so the ffmpeg invocation is
|
|
46854
47076
|
* unit-testable and the addon can inject a resolved binary path.
|
|
@@ -46943,7 +47165,7 @@ async function keyframeToJpeg(annexB, opts) {
|
|
|
46943
47165
|
* fires `onServerClose`; we evict the cache so the next `ensure()`
|
|
46944
47166
|
* re-dials a fresh server.
|
|
46945
47167
|
* - idle teardown: on the last client disconnect, schedule an explicit
|
|
46946
|
-
* `close()` after a grace window
|
|
47168
|
+
* `close()` after a grace window.
|
|
46947
47169
|
*/
|
|
46948
47170
|
/** A console-shaped logger adapter the lib expects (`.log`/`.error`/…). */
|
|
46949
47171
|
function libLogger(logger) {
|
package/dist/addon.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { getCACertificates, setDefaultCACertificates } from "node:tls";
|
|
|
10
10
|
//#region \0rolldown/runtime.js
|
|
11
11
|
var __require$1 = /* @__PURE__ */ createRequire(import.meta.url);
|
|
12
12
|
//#endregion
|
|
13
|
-
//#region ../types/dist/event-category-
|
|
13
|
+
//#region ../types/dist/event-category-DAXzJeTX.mjs
|
|
14
14
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
15
15
|
EventCategory["SystemBoot"] = "system.boot";
|
|
16
16
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -602,7 +602,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
602
602
|
* issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
|
|
603
603
|
*/
|
|
604
604
|
EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
|
|
605
|
-
EventCategory["FrigateLiveEvent"] = "frigate.live-event";
|
|
606
605
|
EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
|
|
607
606
|
/**
|
|
608
607
|
* Stream-broker health watchdog. Per-broker (deviceId/profile) emission.
|
|
@@ -12636,7 +12635,7 @@ DeviceType.Camera;
|
|
|
12636
12635
|
var SourceInfoSchema = object({
|
|
12637
12636
|
/** Live dispatch key — mutable when the source system allows rename. */
|
|
12638
12637
|
id: string(),
|
|
12639
|
-
/** Source system tag — e.g. 'homeassistant' | 'reolink' | '
|
|
12638
|
+
/** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
|
|
12640
12639
|
system: string(),
|
|
12641
12640
|
/** Immutable upstream identifier when available (HA `unique_id`, … ).
|
|
12642
12641
|
* Used to detect rename when `id` changes. */
|
|
@@ -12649,7 +12648,7 @@ var SourceInfoSchema = object({
|
|
|
12649
12648
|
/**
|
|
12650
12649
|
* Build the synthetic SourceInfo every existing provider falls back to
|
|
12651
12650
|
* when no upstream value has been persisted. Keeps non-migrated providers
|
|
12652
|
-
* (Reolink / Hikvision / ONVIF /
|
|
12651
|
+
* (Reolink / Hikvision / ONVIF / RTSP) functional without code
|
|
12653
12652
|
* changes — `id` reuses the CamStack stableId, `system` reuses the addon
|
|
12654
12653
|
* id. Real upstream identity replaces this once a provider migrates and
|
|
12655
12654
|
* calls `updateSourceInfo()` with concrete values.
|
|
@@ -13328,7 +13327,7 @@ var deviceProviderCapability = {
|
|
|
13328
13327
|
* - `device-management.router.ts` (deleted in Phase 2)
|
|
13329
13328
|
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
13330
13329
|
*
|
|
13331
|
-
* All device provider addons (rtsp, onvif,
|
|
13330
|
+
* All device provider addons (rtsp, onvif, …) are hub-local: they may
|
|
13332
13331
|
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
13333
13332
|
* - No nodeId routing needed — this is a pure hub singleton.
|
|
13334
13333
|
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
@@ -17376,7 +17375,7 @@ var NcRuleInputSchema = object({
|
|
|
17376
17375
|
* The measured seven-person arrival on device 590 spans 110 s with every
|
|
17377
17376
|
* internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
|
|
17378
17377
|
* idle cutoff holds it as one and ends it when the arrival actually ends.
|
|
17379
|
-
* 30 is
|
|
17378
|
+
* 30 s is a widely shipped value for the same decision.
|
|
17380
17379
|
*
|
|
17381
17380
|
* ### What it replaces
|
|
17382
17381
|
*
|
|
@@ -19458,6 +19457,13 @@ var ZoneCrossingSchema = object({
|
|
|
19458
19457
|
/** Zone display name at crossing time (falls back to the id). */
|
|
19459
19458
|
zoneName: string().optional()
|
|
19460
19459
|
});
|
|
19460
|
+
/** One zone a box was stamped with, and how much of the BOX fell inside it. */
|
|
19461
|
+
var ZoneOverlapSchema = object({
|
|
19462
|
+
zoneId: string(),
|
|
19463
|
+
zoneName: string().optional(),
|
|
19464
|
+
/** Percentage of the BOX area inside the zone, 0–100. */
|
|
19465
|
+
overlapPct: number()
|
|
19466
|
+
});
|
|
19461
19467
|
var ObjectEventSchema = object({
|
|
19462
19468
|
...BaseEventFields,
|
|
19463
19469
|
kind: literal("object"),
|
|
@@ -19482,6 +19488,35 @@ var ObjectEventSchema = object({
|
|
|
19482
19488
|
bbox: BoundingBoxSchema.optional(),
|
|
19483
19489
|
/** Heavy JSON — omitted in slim projection. */
|
|
19484
19490
|
zones: array(string()).readonly().optional(),
|
|
19491
|
+
/**
|
|
19492
|
+
* How far inside each stamped zone the box actually was, as a percentage of
|
|
19493
|
+
* the BOX area.
|
|
19494
|
+
*
|
|
19495
|
+
* Membership alone cannot express "at least a third of it inside", which is
|
|
19496
|
+
* the bar an operator argues with — and the number already existed: the
|
|
19497
|
+
* engine computed it, the pipeline logged it, and then discarded it. It
|
|
19498
|
+
* matters most on the events that carry no track, where a rule has nothing
|
|
19499
|
+
* else to judge by.
|
|
19500
|
+
*/
|
|
19501
|
+
zoneOverlaps: array(ZoneOverlapSchema).readonly().optional(),
|
|
19502
|
+
/**
|
|
19503
|
+
* Present when this event describes a detection the TRACKER refused, so it
|
|
19504
|
+
* has no track and never will.
|
|
19505
|
+
*
|
|
19506
|
+
* A zone-scoped immediate rule asks "is there an animal in the flowerbed
|
|
19507
|
+
* NOW?"; tracking answers a different question ("is this the same subject as
|
|
19508
|
+
* before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
|
|
19509
|
+
* dog at 0.7729, 100% inside a watched zone, was refused three times in six
|
|
19510
|
+
* seconds with three different candidate ids — seven analysed frames in the
|
|
19511
|
+
* window, the subject in a handful of them, metres apart — and produced no
|
|
19512
|
+
* event at all.
|
|
19513
|
+
*
|
|
19514
|
+
* It is NAMED rather than merely implied by a missing `trackId`: an event
|
|
19515
|
+
* with no track and no reason is indistinguishable from a track whose media
|
|
19516
|
+
* went missing, and a consumer that asks this one for a best shot or a
|
|
19517
|
+
* history is asking for something that never existed.
|
|
19518
|
+
*/
|
|
19519
|
+
spawnRefused: string().optional(),
|
|
19485
19520
|
/** Omitted in slim projection. */
|
|
19486
19521
|
state: TrackStateSchema.optional(),
|
|
19487
19522
|
/**
|
|
@@ -19908,7 +19943,17 @@ var EventDensityBucketSchema = object({
|
|
|
19908
19943
|
bucketStart: number(),
|
|
19909
19944
|
motion: number().int(),
|
|
19910
19945
|
object: number().int(),
|
|
19911
|
-
audio: number().int()
|
|
19946
|
+
audio: number().int(),
|
|
19947
|
+
/**
|
|
19948
|
+
* Energy-weighted mean dBFS of the audio events in this bucket — the LEVEL,
|
|
19949
|
+
* as opposed to `audio`, which is their COUNT (D431).
|
|
19950
|
+
*
|
|
19951
|
+
* ABSENT when the bucket holds no audio event. Absence means "nothing was
|
|
19952
|
+
* measured", which is not the same claim as silence, and a lane that cannot
|
|
19953
|
+
* tell them apart paints a quiet hour at full scale — which is exactly what
|
|
19954
|
+
* the count-on-a-level-meter did.
|
|
19955
|
+
*/
|
|
19956
|
+
audioDbfs: number().optional()
|
|
19912
19957
|
});
|
|
19913
19958
|
/**
|
|
19914
19959
|
* One camera's row in a `getEventDensityBatch` answer.
|
|
@@ -20555,6 +20600,60 @@ var NativeCropResultSchema = object({
|
|
|
20555
20600
|
*/
|
|
20556
20601
|
tier: _enum(["native", "ram-fullframe"]).optional()
|
|
20557
20602
|
});
|
|
20603
|
+
/**
|
|
20604
|
+
* What a PARKED frame is for — the `kind` half of the `(deviceId, trackId,
|
|
20605
|
+
* kind)` key ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
|
|
20606
|
+
*
|
|
20607
|
+
* - `keyFrame` — the track's clean best FULL frame at native width (capped by
|
|
20608
|
+
* the caller's `maxWidth`). What `keyFrame` + `keyFrameSmall` are written
|
|
20609
|
+
* from, and what the detail plane's full-frame rung cuts from.
|
|
20610
|
+
* - `thumbnail` — the best-shot subject slab: the caller's 16:9 central-square
|
|
20611
|
+
* window, cut by the runner at uncapped native resolution.
|
|
20612
|
+
*
|
|
20613
|
+
* The runner never interprets `trackId`; it is an opaque key the hub owns.
|
|
20614
|
+
*/
|
|
20615
|
+
var ParkedFrameKindSchema = _enum(["keyFrame", "thumbnail"]);
|
|
20616
|
+
/**
|
|
20617
|
+
* Why a park did NOT happen. Every one is logged on the runner with
|
|
20618
|
+
* `tags: { deviceId }` and the handle's measured age, because a handle already
|
|
20619
|
+
* gone at park time IS the defect the 150–500 ms window exists to prevent —
|
|
20620
|
+
* never a reason to retry in a loop.
|
|
20621
|
+
*
|
|
20622
|
+
* - `handle-gone` — the native surface no longer resolves this handle (never
|
|
20623
|
+
* registered, past the lease bound, or the worker released it). `detail`
|
|
20624
|
+
* carries the runner's own miss reason.
|
|
20625
|
+
* - `encode-failed` — pixels resolved and the JPEG encode threw.
|
|
20626
|
+
*/
|
|
20627
|
+
var ParkRefusalSchema = _enum(["handle-gone", "encode-failed"]);
|
|
20628
|
+
/** Answer to `parkTrackFrame` — a discriminated union, so "not parked" always names why. */
|
|
20629
|
+
var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
|
|
20630
|
+
parked: literal(true),
|
|
20631
|
+
/** The node holding the parcel — what a later retrieval must be pinned to. */
|
|
20632
|
+
nodeId: string(),
|
|
20633
|
+
width: number().int().positive(),
|
|
20634
|
+
height: number().int().positive(),
|
|
20635
|
+
/** JPEG bytes the parcel costs on the node. */
|
|
20636
|
+
bytes: number().int().nonnegative(),
|
|
20637
|
+
/** Whether this park replaced a parcel already held for the key. */
|
|
20638
|
+
replaced: boolean()
|
|
20639
|
+
}), object({
|
|
20640
|
+
parked: literal(false),
|
|
20641
|
+
nodeId: string(),
|
|
20642
|
+
reason: ParkRefusalSchema,
|
|
20643
|
+
/** Age of the handle at the park, on the runner's clock; null if unknown. */
|
|
20644
|
+
handleAgeMs: number().nullable(),
|
|
20645
|
+
detail: string().optional()
|
|
20646
|
+
})]);
|
|
20647
|
+
/** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
|
|
20648
|
+
var ParkedTrackFrameSchema = object({
|
|
20649
|
+
jpeg: string(),
|
|
20650
|
+
width: number().int().positive(),
|
|
20651
|
+
height: number().int().positive(),
|
|
20652
|
+
/** The frame instant the parcel shows (the caller's clock, echoed back). */
|
|
20653
|
+
timestamp: number(),
|
|
20654
|
+
/** When the node stored it (the node's clock). */
|
|
20655
|
+
parkedAt: number()
|
|
20656
|
+
});
|
|
20558
20657
|
/** Parent detection context passed to `runDetailSubtree` — the crop's
|
|
20559
20658
|
* originating detection, in FRAME-space coordinates. Reuses
|
|
20560
20659
|
* `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
|
|
@@ -20944,7 +21043,7 @@ var RunnerCameraConfigSchema = object({
|
|
|
20944
21043
|
* - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
|
|
20945
21044
|
* analyzer providers) running on decoded frames in this runner.
|
|
20946
21045
|
* - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
|
|
20947
|
-
* analytics
|
|
21046
|
+
* analytics). The provider emits ProviderMotion
|
|
20948
21047
|
* events; the orchestrator forwards to `reportMotion`.
|
|
20949
21048
|
*/
|
|
20950
21049
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
@@ -21186,7 +21285,26 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
21186
21285
|
className: string(),
|
|
21187
21286
|
/** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
|
|
21188
21287
|
sourceDeviceId: number()
|
|
21189
|
-
}), RunStatelessStepResultSchema, { kind: "mutation" })
|
|
21288
|
+
}), RunStatelessStepResultSchema, { kind: "mutation" }), method(object({
|
|
21289
|
+
deviceId: number(),
|
|
21290
|
+
/** Opaque to the runner — the hub's track id. */
|
|
21291
|
+
trackId: string(),
|
|
21292
|
+
kind: ParkedFrameKindSchema,
|
|
21293
|
+
handle: FrameHandleSchema,
|
|
21294
|
+
/** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
|
|
21295
|
+
bbox: NativeCropBboxSchema,
|
|
21296
|
+
/** Width cap for a full-frame park (the `keyFrame` native cap). */
|
|
21297
|
+
maxWidth: number().int().positive().optional(),
|
|
21298
|
+
/** The frame instant (caller's clock) — orders parks for one key. */
|
|
21299
|
+
timestamp: number()
|
|
21300
|
+
}), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
|
|
21301
|
+
deviceId: number(),
|
|
21302
|
+
trackId: string(),
|
|
21303
|
+
kind: ParkedFrameKindSchema
|
|
21304
|
+
}), ParkedTrackFrameSchema.nullable()), method(object({
|
|
21305
|
+
deviceId: number(),
|
|
21306
|
+
trackId: string()
|
|
21307
|
+
}), object({ released: number().int().nonnegative() }), { kind: "mutation" });
|
|
21190
21308
|
var CameraPipelineConfigSchema = object({
|
|
21191
21309
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
21192
21310
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -24360,8 +24478,8 @@ onStatusChanged: { data: object({
|
|
|
24360
24478
|
/**
|
|
24361
24479
|
* Runtime-state slice — every provider that registers this cap
|
|
24362
24480
|
* stores the same shape under `device.runtimeState[battery]`.
|
|
24363
|
-
* Cross-provider uniformity: a Reolink Argus, a
|
|
24364
|
-
*
|
|
24481
|
+
* Cross-provider uniformity: a Reolink Argus, a sensor proxy,
|
|
24482
|
+
* an ONVIF battery cam all read/write the same keys.
|
|
24365
24483
|
* Consumers (BatteryBadge, snapshot wrapper sleep gate) read once
|
|
24366
24484
|
* via `device.runtimeState.getCapState('battery')` regardless of
|
|
24367
24485
|
* the underlying driver.
|
|
@@ -24494,7 +24612,7 @@ DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _v
|
|
|
24494
24612
|
*
|
|
24495
24613
|
* Implementations:
|
|
24496
24614
|
* - Each camera-providing addon registers this cap natively per
|
|
24497
|
-
* device (Reolink, Hikvision, RTSP,
|
|
24615
|
+
* device (Reolink, Hikvision, RTSP, ONVIF self).
|
|
24498
24616
|
* - Returns a snapshot from the persisted device config blob — no
|
|
24499
24617
|
* extra round-trip to the camera, no probing.
|
|
24500
24618
|
* - The cap is admin-only (`auth: 'admin'`) — credentials must not
|
|
@@ -26594,7 +26712,7 @@ var AvailableIntegrationTypeSchema = object({
|
|
|
26594
26712
|
* Which integration-marker cap the addon declared, so the wizard can
|
|
26595
26713
|
* branch on CAP — never on addon name. `device-adoption` integrations
|
|
26596
26714
|
* (Home Assistant, …) route through the broker step (Approach A);
|
|
26597
|
-
* `device-provider` integrations (Reolink/
|
|
26715
|
+
* `device-provider` integrations (Reolink/ONVIF) keep the
|
|
26598
26716
|
* legacy config → discovery flow.
|
|
26599
26717
|
*/
|
|
26600
26718
|
kind: _enum(["device-adoption", "device-provider"]),
|
|
@@ -29962,7 +30080,23 @@ var RecordingRangeSchema = object({
|
|
|
29962
30080
|
});
|
|
29963
30081
|
var RecordingAvailabilitySchema = object({
|
|
29964
30082
|
deviceId: number(),
|
|
29965
|
-
ranges: array(RecordingRangeSchema)
|
|
30083
|
+
ranges: array(RecordingRangeSchema),
|
|
30084
|
+
/**
|
|
30085
|
+
* Every profile this camera has footage in — not only the one `ranges`
|
|
30086
|
+
* describes (D433).
|
|
30087
|
+
*
|
|
30088
|
+
* `ranges` answers for ONE profile by design: the timeline is a single bar,
|
|
30089
|
+
* and enumerating all of them triples the directory reads for a bar that
|
|
30090
|
+
* would look identical. But the answer used to say nothing about that, so a
|
|
30091
|
+
* caller asking "what can I export?" read the single preferred profile as
|
|
30092
|
+
* the only one that exists — on this deployment every camera records `high`
|
|
30093
|
+
* AND `low`, the low tree holding 14 GB for camera 615 alone, and the export
|
|
30094
|
+
* UI could not see it.
|
|
30095
|
+
*
|
|
30096
|
+
* Cheap: it is the same shallow directory read the profile CHOICE already
|
|
30097
|
+
* makes. Ask for a specific profile's ranges with the `profile` input.
|
|
30098
|
+
*/
|
|
30099
|
+
profilesWithFootage: array(string())
|
|
29966
30100
|
});
|
|
29967
30101
|
var RecordingDaysSchema = object({
|
|
29968
30102
|
deviceId: number(),
|
|
@@ -29988,7 +30122,11 @@ var RecordingDaysSchema = object({
|
|
|
29988
30122
|
var RecordingAvailabilityForDeviceSchema = object({
|
|
29989
30123
|
deviceId: number(),
|
|
29990
30124
|
read: _enum(["read", "unreadable"]),
|
|
29991
|
-
ranges: array(RecordingRangeSchema).readonly()
|
|
30125
|
+
ranges: array(RecordingRangeSchema).readonly(),
|
|
30126
|
+
/** Same field, same meaning, as the singular answer (D433). A row that
|
|
30127
|
+
* dropped it would tell a grid caller the archive holds one profile.
|
|
30128
|
+
* Empty on an `'unreadable'` row: nobody looked. */
|
|
30129
|
+
profilesWithFootage: array(string()).readonly()
|
|
29992
30130
|
});
|
|
29993
30131
|
/**
|
|
29994
30132
|
* One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
|
|
@@ -30018,13 +30156,31 @@ var RecordingManifestSchema = object({
|
|
|
30018
30156
|
*/
|
|
30019
30157
|
playbackEndpoints: array(string())
|
|
30020
30158
|
});
|
|
30021
|
-
/**
|
|
30022
|
-
*
|
|
30159
|
+
/**
|
|
30160
|
+
* Recording storage usage for one camera — what the ARCHIVE holds for it,
|
|
30161
|
+
* across every profile and every resolvable location on this node.
|
|
30162
|
+
*
|
|
30163
|
+
* ## Archive vs residency, which is the whole point of this shape (D418)
|
|
30164
|
+
*
|
|
30165
|
+
* `usedBytes` / `oldestMs` / `segments` are the durable hour ledger's numbers:
|
|
30166
|
+
* the same quantity `RecordingLocationUsage.usedBytes` reports for the volume
|
|
30167
|
+
* this camera writes to, so the two can be added up and compared.
|
|
30168
|
+
*
|
|
30169
|
+
* They were not always. Until D418 this row came from the recorder's in-RAM
|
|
30170
|
+
* `RecordingIndex`, which since D287 holds only the live tail plus the hours
|
|
30171
|
+
* somebody hydrated — so a hub with 1.9 TB and 3.3 days of footage reported
|
|
30172
|
+
* 60.5 GB and "oldest: three hours ago" on the same page as the volume row
|
|
30173
|
+
* that said otherwise, and two people read it as retention eating recent
|
|
30174
|
+
* footage. Residency is still reported, under `residentBytes` /
|
|
30175
|
+
* `residentOldestMs`, which answer a different question and say so.
|
|
30176
|
+
*/
|
|
30023
30177
|
var RecordingDeviceUsageSchema = object({
|
|
30024
30178
|
deviceId: number(),
|
|
30179
|
+
/** Bytes the ARCHIVE holds for this camera on this node's resolvable
|
|
30180
|
+
* recordings locations. */
|
|
30025
30181
|
usedBytes: number(),
|
|
30026
30182
|
/**
|
|
30027
|
-
* Start of this camera's OLDEST
|
|
30183
|
+
* Start of this camera's OLDEST ARCHIVED segment, across every profile and
|
|
30028
30184
|
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
30029
30185
|
* only honest answer to "is retention actually holding?" per camera.
|
|
30030
30186
|
*
|
|
@@ -30034,7 +30190,24 @@ var RecordingDeviceUsageSchema = object({
|
|
|
30034
30190
|
* (types) and the addon ship on different trains, and the addon is usually
|
|
30035
30191
|
* the later of the two.
|
|
30036
30192
|
*/
|
|
30037
|
-
oldestMs: number().nullable().optional()
|
|
30193
|
+
oldestMs: number().nullable().optional(),
|
|
30194
|
+
/** Segments the archive holds for this camera — the "M" beside `usedBytes`.
|
|
30195
|
+
* OPTIONAL for the same train-skew reason as `oldestMs`. */
|
|
30196
|
+
segments: number().optional(),
|
|
30197
|
+
/**
|
|
30198
|
+
* RESIDENCY, not the archive: bytes the recorder process currently holds in
|
|
30199
|
+
* its RAM index — the live tail plus the hours a reader hydrated.
|
|
30200
|
+
*
|
|
30201
|
+
* It answers "what can be served without touching the disk", never "how much
|
|
30202
|
+
* footage this camera has". A UI that renders it must label it as such, and
|
|
30203
|
+
* must never total it as storage. OPTIONAL: a recorder predating D418 omits
|
|
30204
|
+
* it, and so does a node whose ledger could not answer.
|
|
30205
|
+
*/
|
|
30206
|
+
residentBytes: number().optional(),
|
|
30207
|
+
/** The residency counterpart of `oldestMs` — the oldest segment currently in
|
|
30208
|
+
* RAM, which on a healthy recorder is minutes ago and means nothing about
|
|
30209
|
+
* retention. `null` = nothing resident. */
|
|
30210
|
+
residentOldestMs: number().nullable().optional()
|
|
30038
30211
|
});
|
|
30039
30212
|
/** Recording storage usage + capacity for one storage location. */
|
|
30040
30213
|
var RecordingLocationUsageSchema = object({
|
|
@@ -30072,6 +30245,17 @@ var RecordingStorageUsageSchema = object({
|
|
|
30072
30245
|
totalUsedBytes: number(),
|
|
30073
30246
|
devices: array(RecordingDeviceUsageSchema),
|
|
30074
30247
|
/**
|
|
30248
|
+
* WHERE `devices[]` came from, so an empty table is never mistaken for empty
|
|
30249
|
+
* disks (D418).
|
|
30250
|
+
*
|
|
30251
|
+
* `archive` = the durable hour ledger answered. `unavailable` = this node
|
|
30252
|
+
* declared no ledger and the recorder REFUSED rather than answering the
|
|
30253
|
+
* question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
|
|
30254
|
+
* zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
|
|
30255
|
+
* and its rows are residency.
|
|
30256
|
+
*/
|
|
30257
|
+
devicesRead: _enum(["archive", "unavailable"]).optional(),
|
|
30258
|
+
/**
|
|
30075
30259
|
* Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
|
|
30076
30260
|
* of the payload without it: the hub serves this method through a BAKED
|
|
30077
30261
|
* router, so a hub whose framework train predates a change to this array
|
|
@@ -30232,7 +30416,14 @@ var ReadWindowBytesResultSchema = discriminatedUnion("kind", [object({
|
|
|
30232
30416
|
method(object({
|
|
30233
30417
|
deviceId: number(),
|
|
30234
30418
|
fromMs: number(),
|
|
30235
|
-
toMs: number()
|
|
30419
|
+
toMs: number(),
|
|
30420
|
+
/**
|
|
30421
|
+
* Answer for THIS profile instead of the preferred one (D433). Absent
|
|
30422
|
+
* keeps the timeline's behaviour — one bar, one profile, one set of
|
|
30423
|
+
* reads. `profilesWithFootage` on the answer says what may be asked
|
|
30424
|
+
* for.
|
|
30425
|
+
*/
|
|
30426
|
+
profile: string().optional()
|
|
30236
30427
|
}), RecordingAvailabilitySchema, {
|
|
30237
30428
|
kind: "query",
|
|
30238
30429
|
auth: "protected"
|
|
@@ -33951,7 +34142,7 @@ function toDeviceSummary(device, addonId) {
|
|
|
33951
34142
|
};
|
|
33952
34143
|
}
|
|
33953
34144
|
/**
|
|
33954
|
-
* Base class for device-provider addons (rtsp, onvif
|
|
34145
|
+
* Base class for device-provider addons (rtsp, onvif).
|
|
33955
34146
|
*
|
|
33956
34147
|
* Provides default implementations for the common device-provider cap
|
|
33957
34148
|
* methods (`start`, `stop`, `getStatus`, `getDevices`, `supportsDiscovery`,
|
|
@@ -38607,6 +38798,24 @@ Object.freeze({
|
|
|
38607
38798
|
addonId: null,
|
|
38608
38799
|
access: "view"
|
|
38609
38800
|
},
|
|
38801
|
+
"pipelineRunner.getParkedTrackFrame": {
|
|
38802
|
+
capName: "pipeline-runner",
|
|
38803
|
+
capScope: "system",
|
|
38804
|
+
addonId: null,
|
|
38805
|
+
access: "view"
|
|
38806
|
+
},
|
|
38807
|
+
"pipelineRunner.parkTrackFrame": {
|
|
38808
|
+
capName: "pipeline-runner",
|
|
38809
|
+
capScope: "system",
|
|
38810
|
+
addonId: null,
|
|
38811
|
+
access: "create"
|
|
38812
|
+
},
|
|
38813
|
+
"pipelineRunner.releaseParkedTrackFrames": {
|
|
38814
|
+
capName: "pipeline-runner",
|
|
38815
|
+
capScope: "system",
|
|
38816
|
+
addonId: null,
|
|
38817
|
+
access: "create"
|
|
38818
|
+
},
|
|
38610
38819
|
"pipelineRunner.reportMotion": {
|
|
38611
38820
|
capName: "pipeline-runner",
|
|
38612
38821
|
capScope: "system",
|
|
@@ -41884,6 +42093,21 @@ Object.freeze({
|
|
|
41884
42093
|
form: "single",
|
|
41885
42094
|
optional: false
|
|
41886
42095
|
}],
|
|
42096
|
+
"pipelineRunner.getParkedTrackFrame": [{
|
|
42097
|
+
name: "deviceId",
|
|
42098
|
+
form: "single",
|
|
42099
|
+
optional: false
|
|
42100
|
+
}],
|
|
42101
|
+
"pipelineRunner.parkTrackFrame": [{
|
|
42102
|
+
name: "deviceId",
|
|
42103
|
+
form: "single",
|
|
42104
|
+
optional: false
|
|
42105
|
+
}],
|
|
42106
|
+
"pipelineRunner.releaseParkedTrackFrames": [{
|
|
42107
|
+
name: "deviceId",
|
|
42108
|
+
form: "single",
|
|
42109
|
+
optional: false
|
|
42110
|
+
}],
|
|
41887
42111
|
"pipelineRunner.reportMotion": [{
|
|
41888
42112
|
name: "deviceId",
|
|
41889
42113
|
form: "single",
|
|
@@ -42575,7 +42799,7 @@ var PreviewTextField = string().max(200);
|
|
|
42575
42799
|
* Whether the notification's preview is a STILL or a short animation.
|
|
42576
42800
|
*
|
|
42577
42801
|
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
42578
|
-
* rule)"* —
|
|
42802
|
+
* rule)"* — the other rules already offer an animated preview, and a ten-hour
|
|
42579
42803
|
* night reads better as three seconds of motion than as one frame of it. Both
|
|
42580
42804
|
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
42581
42805
|
* simply applies it to a dozen frames sampled across the render and assembles
|
|
@@ -46323,8 +46547,7 @@ var WYZE_BITRATE = {
|
|
|
46323
46547
|
* `discoverDevices()` enumerates the Wyze cloud's camera list and the
|
|
46324
46548
|
* operator adopts a candidate (every P2P parameter auto-populated from
|
|
46325
46549
|
* the cloud blob). This manual form is the fallback for adding a camera
|
|
46326
|
-
* by its P2P parameters directly
|
|
46327
|
-
* `getCreateDeviceSettings`). The parameters come from the Wyze cloud
|
|
46550
|
+
* by its P2P parameters directly. The parameters come from the Wyze cloud
|
|
46328
46551
|
* (`mac`, `p2pId`/uid, `enr`, local `ip`, `productModel`), not a LAN scan.
|
|
46329
46552
|
*/
|
|
46330
46553
|
function buildCreationFormSchema() {
|
|
@@ -46826,8 +47049,7 @@ function buildWyzeAdoptionProvider(deps) {
|
|
|
46826
47049
|
/**
|
|
46827
47050
|
* Decode a raw Annex-B keyframe (H264 or H265) into a single JPEG via
|
|
46828
47051
|
* ffmpeg. The Wyze lib's `grabKeyframe()` yields raw Annex-B IDR bytes;
|
|
46829
|
-
* we pipe them through ffmpeg's image2 muxer to get a JPEG
|
|
46830
|
-
* scrypted-wyze-native's `takePicture`.
|
|
47052
|
+
* we pipe them through ffmpeg's image2 muxer to get a JPEG.
|
|
46831
47053
|
*
|
|
46832
47054
|
* Pure module: takes a `spawn`-like factory so the ffmpeg invocation is
|
|
46833
47055
|
* unit-testable and the addon can inject a resolved binary path.
|
|
@@ -46922,7 +47144,7 @@ async function keyframeToJpeg(annexB, opts) {
|
|
|
46922
47144
|
* fires `onServerClose`; we evict the cache so the next `ensure()`
|
|
46923
47145
|
* re-dials a fresh server.
|
|
46924
47146
|
* - idle teardown: on the last client disconnect, schedule an explicit
|
|
46925
|
-
* `close()` after a grace window
|
|
47147
|
+
* `close()` after a grace window.
|
|
46926
47148
|
*/
|
|
46927
47149
|
/** A console-shaped logger adapter the lib expects (`.log`/`.error`/…). */
|
|
46928
47150
|
function libLogger(logger) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-wyze",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.97",
|
|
4
4
|
"description": "Wyze camera device-provider addon for CamStack — wraps the @apocaliss92/wyze-bridge-js P2P/DTLS client, feeding the stream-broker via the pull-rfc4571 lazy-publish path (a structural twin of addon-provider-reolink)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|