@camstack/addon-provider-homematic 1.2.91 → 1.2.94
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 +246 -22
- package/dist/addon.mjs +246 -22
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -8,7 +8,7 @@ let http = require("http");
|
|
|
8
8
|
let crypto$1 = require("crypto");
|
|
9
9
|
let fs_promises = require("fs/promises");
|
|
10
10
|
let path = require("path");
|
|
11
|
-
//#region ../types/dist/event-category-
|
|
11
|
+
//#region ../types/dist/event-category-DAXzJeTX.mjs
|
|
12
12
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
13
13
|
EventCategory["SystemBoot"] = "system.boot";
|
|
14
14
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -600,7 +600,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
600
600
|
* issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
|
|
601
601
|
*/
|
|
602
602
|
EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
|
|
603
|
-
EventCategory["FrigateLiveEvent"] = "frigate.live-event";
|
|
604
603
|
EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
|
|
605
604
|
/**
|
|
606
605
|
* Stream-broker health watchdog. Per-broker (deviceId/profile) emission.
|
|
@@ -12683,7 +12682,7 @@ DeviceType.Camera;
|
|
|
12683
12682
|
var SourceInfoSchema = object({
|
|
12684
12683
|
/** Live dispatch key — mutable when the source system allows rename. */
|
|
12685
12684
|
id: string(),
|
|
12686
|
-
/** Source system tag — e.g. 'homeassistant' | 'reolink' | '
|
|
12685
|
+
/** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
|
|
12687
12686
|
system: string(),
|
|
12688
12687
|
/** Immutable upstream identifier when available (HA `unique_id`, … ).
|
|
12689
12688
|
* Used to detect rename when `id` changes. */
|
|
@@ -12696,7 +12695,7 @@ var SourceInfoSchema = object({
|
|
|
12696
12695
|
/**
|
|
12697
12696
|
* Build the synthetic SourceInfo every existing provider falls back to
|
|
12698
12697
|
* when no upstream value has been persisted. Keeps non-migrated providers
|
|
12699
|
-
* (Reolink / Hikvision / ONVIF /
|
|
12698
|
+
* (Reolink / Hikvision / ONVIF / RTSP) functional without code
|
|
12700
12699
|
* changes — `id` reuses the CamStack stableId, `system` reuses the addon
|
|
12701
12700
|
* id. Real upstream identity replaces this once a provider migrates and
|
|
12702
12701
|
* calls `updateSourceInfo()` with concrete values.
|
|
@@ -13375,7 +13374,7 @@ var deviceProviderCapability = {
|
|
|
13375
13374
|
* - `device-management.router.ts` (deleted in Phase 2)
|
|
13376
13375
|
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
13377
13376
|
*
|
|
13378
|
-
* All device provider addons (rtsp, onvif,
|
|
13377
|
+
* All device provider addons (rtsp, onvif, …) are hub-local: they may
|
|
13379
13378
|
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
13380
13379
|
* - No nodeId routing needed — this is a pure hub singleton.
|
|
13381
13380
|
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
@@ -17423,7 +17422,7 @@ var NcRuleInputSchema = object({
|
|
|
17423
17422
|
* The measured seven-person arrival on device 590 spans 110 s with every
|
|
17424
17423
|
* internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
|
|
17425
17424
|
* idle cutoff holds it as one and ends it when the arrival actually ends.
|
|
17426
|
-
* 30 is
|
|
17425
|
+
* 30 s is a widely shipped value for the same decision.
|
|
17427
17426
|
*
|
|
17428
17427
|
* ### What it replaces
|
|
17429
17428
|
*
|
|
@@ -19505,6 +19504,13 @@ var ZoneCrossingSchema = object({
|
|
|
19505
19504
|
/** Zone display name at crossing time (falls back to the id). */
|
|
19506
19505
|
zoneName: string().optional()
|
|
19507
19506
|
});
|
|
19507
|
+
/** One zone a box was stamped with, and how much of the BOX fell inside it. */
|
|
19508
|
+
var ZoneOverlapSchema = object({
|
|
19509
|
+
zoneId: string(),
|
|
19510
|
+
zoneName: string().optional(),
|
|
19511
|
+
/** Percentage of the BOX area inside the zone, 0–100. */
|
|
19512
|
+
overlapPct: number()
|
|
19513
|
+
});
|
|
19508
19514
|
var ObjectEventSchema = object({
|
|
19509
19515
|
...BaseEventFields,
|
|
19510
19516
|
kind: literal("object"),
|
|
@@ -19529,6 +19535,35 @@ var ObjectEventSchema = object({
|
|
|
19529
19535
|
bbox: BoundingBoxSchema.optional(),
|
|
19530
19536
|
/** Heavy JSON — omitted in slim projection. */
|
|
19531
19537
|
zones: array(string()).readonly().optional(),
|
|
19538
|
+
/**
|
|
19539
|
+
* How far inside each stamped zone the box actually was, as a percentage of
|
|
19540
|
+
* the BOX area.
|
|
19541
|
+
*
|
|
19542
|
+
* Membership alone cannot express "at least a third of it inside", which is
|
|
19543
|
+
* the bar an operator argues with — and the number already existed: the
|
|
19544
|
+
* engine computed it, the pipeline logged it, and then discarded it. It
|
|
19545
|
+
* matters most on the events that carry no track, where a rule has nothing
|
|
19546
|
+
* else to judge by.
|
|
19547
|
+
*/
|
|
19548
|
+
zoneOverlaps: array(ZoneOverlapSchema).readonly().optional(),
|
|
19549
|
+
/**
|
|
19550
|
+
* Present when this event describes a detection the TRACKER refused, so it
|
|
19551
|
+
* has no track and never will.
|
|
19552
|
+
*
|
|
19553
|
+
* A zone-scoped immediate rule asks "is there an animal in the flowerbed
|
|
19554
|
+
* NOW?"; tracking answers a different question ("is this the same subject as
|
|
19555
|
+
* before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
|
|
19556
|
+
* dog at 0.7729, 100% inside a watched zone, was refused three times in six
|
|
19557
|
+
* seconds with three different candidate ids — seven analysed frames in the
|
|
19558
|
+
* window, the subject in a handful of them, metres apart — and produced no
|
|
19559
|
+
* event at all.
|
|
19560
|
+
*
|
|
19561
|
+
* It is NAMED rather than merely implied by a missing `trackId`: an event
|
|
19562
|
+
* with no track and no reason is indistinguishable from a track whose media
|
|
19563
|
+
* went missing, and a consumer that asks this one for a best shot or a
|
|
19564
|
+
* history is asking for something that never existed.
|
|
19565
|
+
*/
|
|
19566
|
+
spawnRefused: string().optional(),
|
|
19532
19567
|
/** Omitted in slim projection. */
|
|
19533
19568
|
state: TrackStateSchema.optional(),
|
|
19534
19569
|
/**
|
|
@@ -19955,7 +19990,17 @@ var EventDensityBucketSchema = object({
|
|
|
19955
19990
|
bucketStart: number(),
|
|
19956
19991
|
motion: number().int(),
|
|
19957
19992
|
object: number().int(),
|
|
19958
|
-
audio: number().int()
|
|
19993
|
+
audio: number().int(),
|
|
19994
|
+
/**
|
|
19995
|
+
* Energy-weighted mean dBFS of the audio events in this bucket — the LEVEL,
|
|
19996
|
+
* as opposed to `audio`, which is their COUNT (D431).
|
|
19997
|
+
*
|
|
19998
|
+
* ABSENT when the bucket holds no audio event. Absence means "nothing was
|
|
19999
|
+
* measured", which is not the same claim as silence, and a lane that cannot
|
|
20000
|
+
* tell them apart paints a quiet hour at full scale — which is exactly what
|
|
20001
|
+
* the count-on-a-level-meter did.
|
|
20002
|
+
*/
|
|
20003
|
+
audioDbfs: number().optional()
|
|
19959
20004
|
});
|
|
19960
20005
|
/**
|
|
19961
20006
|
* One camera's row in a `getEventDensityBatch` answer.
|
|
@@ -20602,6 +20647,60 @@ var NativeCropResultSchema = object({
|
|
|
20602
20647
|
*/
|
|
20603
20648
|
tier: _enum(["native", "ram-fullframe"]).optional()
|
|
20604
20649
|
});
|
|
20650
|
+
/**
|
|
20651
|
+
* What a PARKED frame is for — the `kind` half of the `(deviceId, trackId,
|
|
20652
|
+
* kind)` key ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
|
|
20653
|
+
*
|
|
20654
|
+
* - `keyFrame` — the track's clean best FULL frame at native width (capped by
|
|
20655
|
+
* the caller's `maxWidth`). What `keyFrame` + `keyFrameSmall` are written
|
|
20656
|
+
* from, and what the detail plane's full-frame rung cuts from.
|
|
20657
|
+
* - `thumbnail` — the best-shot subject slab: the caller's 16:9 central-square
|
|
20658
|
+
* window, cut by the runner at uncapped native resolution.
|
|
20659
|
+
*
|
|
20660
|
+
* The runner never interprets `trackId`; it is an opaque key the hub owns.
|
|
20661
|
+
*/
|
|
20662
|
+
var ParkedFrameKindSchema = _enum(["keyFrame", "thumbnail"]);
|
|
20663
|
+
/**
|
|
20664
|
+
* Why a park did NOT happen. Every one is logged on the runner with
|
|
20665
|
+
* `tags: { deviceId }` and the handle's measured age, because a handle already
|
|
20666
|
+
* gone at park time IS the defect the 150–500 ms window exists to prevent —
|
|
20667
|
+
* never a reason to retry in a loop.
|
|
20668
|
+
*
|
|
20669
|
+
* - `handle-gone` — the native surface no longer resolves this handle (never
|
|
20670
|
+
* registered, past the lease bound, or the worker released it). `detail`
|
|
20671
|
+
* carries the runner's own miss reason.
|
|
20672
|
+
* - `encode-failed` — pixels resolved and the JPEG encode threw.
|
|
20673
|
+
*/
|
|
20674
|
+
var ParkRefusalSchema = _enum(["handle-gone", "encode-failed"]);
|
|
20675
|
+
/** Answer to `parkTrackFrame` — a discriminated union, so "not parked" always names why. */
|
|
20676
|
+
var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
|
|
20677
|
+
parked: literal(true),
|
|
20678
|
+
/** The node holding the parcel — what a later retrieval must be pinned to. */
|
|
20679
|
+
nodeId: string(),
|
|
20680
|
+
width: number().int().positive(),
|
|
20681
|
+
height: number().int().positive(),
|
|
20682
|
+
/** JPEG bytes the parcel costs on the node. */
|
|
20683
|
+
bytes: number().int().nonnegative(),
|
|
20684
|
+
/** Whether this park replaced a parcel already held for the key. */
|
|
20685
|
+
replaced: boolean()
|
|
20686
|
+
}), object({
|
|
20687
|
+
parked: literal(false),
|
|
20688
|
+
nodeId: string(),
|
|
20689
|
+
reason: ParkRefusalSchema,
|
|
20690
|
+
/** Age of the handle at the park, on the runner's clock; null if unknown. */
|
|
20691
|
+
handleAgeMs: number().nullable(),
|
|
20692
|
+
detail: string().optional()
|
|
20693
|
+
})]);
|
|
20694
|
+
/** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
|
|
20695
|
+
var ParkedTrackFrameSchema = object({
|
|
20696
|
+
jpeg: string(),
|
|
20697
|
+
width: number().int().positive(),
|
|
20698
|
+
height: number().int().positive(),
|
|
20699
|
+
/** The frame instant the parcel shows (the caller's clock, echoed back). */
|
|
20700
|
+
timestamp: number(),
|
|
20701
|
+
/** When the node stored it (the node's clock). */
|
|
20702
|
+
parkedAt: number()
|
|
20703
|
+
});
|
|
20605
20704
|
/** Parent detection context passed to `runDetailSubtree` — the crop's
|
|
20606
20705
|
* originating detection, in FRAME-space coordinates. Reuses
|
|
20607
20706
|
* `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
|
|
@@ -20991,7 +21090,7 @@ var RunnerCameraConfigSchema = object({
|
|
|
20991
21090
|
* - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
|
|
20992
21091
|
* analyzer providers) running on decoded frames in this runner.
|
|
20993
21092
|
* - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
|
|
20994
|
-
* analytics
|
|
21093
|
+
* analytics). The provider emits ProviderMotion
|
|
20995
21094
|
* events; the orchestrator forwards to `reportMotion`.
|
|
20996
21095
|
*/
|
|
20997
21096
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
@@ -21233,7 +21332,26 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
21233
21332
|
className: string(),
|
|
21234
21333
|
/** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
|
|
21235
21334
|
sourceDeviceId: number()
|
|
21236
|
-
}), RunStatelessStepResultSchema, { kind: "mutation" })
|
|
21335
|
+
}), RunStatelessStepResultSchema, { kind: "mutation" }), method(object({
|
|
21336
|
+
deviceId: number(),
|
|
21337
|
+
/** Opaque to the runner — the hub's track id. */
|
|
21338
|
+
trackId: string(),
|
|
21339
|
+
kind: ParkedFrameKindSchema,
|
|
21340
|
+
handle: FrameHandleSchema,
|
|
21341
|
+
/** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
|
|
21342
|
+
bbox: NativeCropBboxSchema,
|
|
21343
|
+
/** Width cap for a full-frame park (the `keyFrame` native cap). */
|
|
21344
|
+
maxWidth: number().int().positive().optional(),
|
|
21345
|
+
/** The frame instant (caller's clock) — orders parks for one key. */
|
|
21346
|
+
timestamp: number()
|
|
21347
|
+
}), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
|
|
21348
|
+
deviceId: number(),
|
|
21349
|
+
trackId: string(),
|
|
21350
|
+
kind: ParkedFrameKindSchema
|
|
21351
|
+
}), ParkedTrackFrameSchema.nullable()), method(object({
|
|
21352
|
+
deviceId: number(),
|
|
21353
|
+
trackId: string()
|
|
21354
|
+
}), object({ released: number().int().nonnegative() }), { kind: "mutation" });
|
|
21237
21355
|
var CameraPipelineConfigSchema = object({
|
|
21238
21356
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
21239
21357
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -24303,8 +24421,8 @@ onStatusChanged: { data: object({
|
|
|
24303
24421
|
/**
|
|
24304
24422
|
* Runtime-state slice — every provider that registers this cap
|
|
24305
24423
|
* stores the same shape under `device.runtimeState[battery]`.
|
|
24306
|
-
* Cross-provider uniformity: a Reolink Argus, a
|
|
24307
|
-
*
|
|
24424
|
+
* Cross-provider uniformity: a Reolink Argus, a sensor proxy,
|
|
24425
|
+
* an ONVIF battery cam all read/write the same keys.
|
|
24308
24426
|
* Consumers (BatteryBadge, snapshot wrapper sleep gate) read once
|
|
24309
24427
|
* via `device.runtimeState.getCapState('battery')` regardless of
|
|
24310
24428
|
* the underlying driver.
|
|
@@ -24437,7 +24555,7 @@ DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _v
|
|
|
24437
24555
|
*
|
|
24438
24556
|
* Implementations:
|
|
24439
24557
|
* - Each camera-providing addon registers this cap natively per
|
|
24440
|
-
* device (Reolink, Hikvision, RTSP,
|
|
24558
|
+
* device (Reolink, Hikvision, RTSP, ONVIF self).
|
|
24441
24559
|
* - Returns a snapshot from the persisted device config blob — no
|
|
24442
24560
|
* extra round-trip to the camera, no probing.
|
|
24443
24561
|
* - The cap is admin-only (`auth: 'admin'`) — credentials must not
|
|
@@ -26529,7 +26647,7 @@ var AvailableIntegrationTypeSchema = object({
|
|
|
26529
26647
|
* Which integration-marker cap the addon declared, so the wizard can
|
|
26530
26648
|
* branch on CAP — never on addon name. `device-adoption` integrations
|
|
26531
26649
|
* (Home Assistant, …) route through the broker step (Approach A);
|
|
26532
|
-
* `device-provider` integrations (Reolink/
|
|
26650
|
+
* `device-provider` integrations (Reolink/ONVIF) keep the
|
|
26533
26651
|
* legacy config → discovery flow.
|
|
26534
26652
|
*/
|
|
26535
26653
|
kind: _enum(["device-adoption", "device-provider"]),
|
|
@@ -29897,7 +30015,23 @@ var RecordingRangeSchema = object({
|
|
|
29897
30015
|
});
|
|
29898
30016
|
var RecordingAvailabilitySchema = object({
|
|
29899
30017
|
deviceId: number(),
|
|
29900
|
-
ranges: array(RecordingRangeSchema)
|
|
30018
|
+
ranges: array(RecordingRangeSchema),
|
|
30019
|
+
/**
|
|
30020
|
+
* Every profile this camera has footage in — not only the one `ranges`
|
|
30021
|
+
* describes (D433).
|
|
30022
|
+
*
|
|
30023
|
+
* `ranges` answers for ONE profile by design: the timeline is a single bar,
|
|
30024
|
+
* and enumerating all of them triples the directory reads for a bar that
|
|
30025
|
+
* would look identical. But the answer used to say nothing about that, so a
|
|
30026
|
+
* caller asking "what can I export?" read the single preferred profile as
|
|
30027
|
+
* the only one that exists — on this deployment every camera records `high`
|
|
30028
|
+
* AND `low`, the low tree holding 14 GB for camera 615 alone, and the export
|
|
30029
|
+
* UI could not see it.
|
|
30030
|
+
*
|
|
30031
|
+
* Cheap: it is the same shallow directory read the profile CHOICE already
|
|
30032
|
+
* makes. Ask for a specific profile's ranges with the `profile` input.
|
|
30033
|
+
*/
|
|
30034
|
+
profilesWithFootage: array(string())
|
|
29901
30035
|
});
|
|
29902
30036
|
var RecordingDaysSchema = object({
|
|
29903
30037
|
deviceId: number(),
|
|
@@ -29923,7 +30057,11 @@ var RecordingDaysSchema = object({
|
|
|
29923
30057
|
var RecordingAvailabilityForDeviceSchema = object({
|
|
29924
30058
|
deviceId: number(),
|
|
29925
30059
|
read: _enum(["read", "unreadable"]),
|
|
29926
|
-
ranges: array(RecordingRangeSchema).readonly()
|
|
30060
|
+
ranges: array(RecordingRangeSchema).readonly(),
|
|
30061
|
+
/** Same field, same meaning, as the singular answer (D433). A row that
|
|
30062
|
+
* dropped it would tell a grid caller the archive holds one profile.
|
|
30063
|
+
* Empty on an `'unreadable'` row: nobody looked. */
|
|
30064
|
+
profilesWithFootage: array(string()).readonly()
|
|
29927
30065
|
});
|
|
29928
30066
|
/**
|
|
29929
30067
|
* One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
|
|
@@ -29953,13 +30091,31 @@ var RecordingManifestSchema = object({
|
|
|
29953
30091
|
*/
|
|
29954
30092
|
playbackEndpoints: array(string())
|
|
29955
30093
|
});
|
|
29956
|
-
/**
|
|
29957
|
-
*
|
|
30094
|
+
/**
|
|
30095
|
+
* Recording storage usage for one camera — what the ARCHIVE holds for it,
|
|
30096
|
+
* across every profile and every resolvable location on this node.
|
|
30097
|
+
*
|
|
30098
|
+
* ## Archive vs residency, which is the whole point of this shape (D418)
|
|
30099
|
+
*
|
|
30100
|
+
* `usedBytes` / `oldestMs` / `segments` are the durable hour ledger's numbers:
|
|
30101
|
+
* the same quantity `RecordingLocationUsage.usedBytes` reports for the volume
|
|
30102
|
+
* this camera writes to, so the two can be added up and compared.
|
|
30103
|
+
*
|
|
30104
|
+
* They were not always. Until D418 this row came from the recorder's in-RAM
|
|
30105
|
+
* `RecordingIndex`, which since D287 holds only the live tail plus the hours
|
|
30106
|
+
* somebody hydrated — so a hub with 1.9 TB and 3.3 days of footage reported
|
|
30107
|
+
* 60.5 GB and "oldest: three hours ago" on the same page as the volume row
|
|
30108
|
+
* that said otherwise, and two people read it as retention eating recent
|
|
30109
|
+
* footage. Residency is still reported, under `residentBytes` /
|
|
30110
|
+
* `residentOldestMs`, which answer a different question and say so.
|
|
30111
|
+
*/
|
|
29958
30112
|
var RecordingDeviceUsageSchema = object({
|
|
29959
30113
|
deviceId: number(),
|
|
30114
|
+
/** Bytes the ARCHIVE holds for this camera on this node's resolvable
|
|
30115
|
+
* recordings locations. */
|
|
29960
30116
|
usedBytes: number(),
|
|
29961
30117
|
/**
|
|
29962
|
-
* Start of this camera's OLDEST
|
|
30118
|
+
* Start of this camera's OLDEST ARCHIVED segment, across every profile and
|
|
29963
30119
|
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
29964
30120
|
* only honest answer to "is retention actually holding?" per camera.
|
|
29965
30121
|
*
|
|
@@ -29969,7 +30125,24 @@ var RecordingDeviceUsageSchema = object({
|
|
|
29969
30125
|
* (types) and the addon ship on different trains, and the addon is usually
|
|
29970
30126
|
* the later of the two.
|
|
29971
30127
|
*/
|
|
29972
|
-
oldestMs: number().nullable().optional()
|
|
30128
|
+
oldestMs: number().nullable().optional(),
|
|
30129
|
+
/** Segments the archive holds for this camera — the "M" beside `usedBytes`.
|
|
30130
|
+
* OPTIONAL for the same train-skew reason as `oldestMs`. */
|
|
30131
|
+
segments: number().optional(),
|
|
30132
|
+
/**
|
|
30133
|
+
* RESIDENCY, not the archive: bytes the recorder process currently holds in
|
|
30134
|
+
* its RAM index — the live tail plus the hours a reader hydrated.
|
|
30135
|
+
*
|
|
30136
|
+
* It answers "what can be served without touching the disk", never "how much
|
|
30137
|
+
* footage this camera has". A UI that renders it must label it as such, and
|
|
30138
|
+
* must never total it as storage. OPTIONAL: a recorder predating D418 omits
|
|
30139
|
+
* it, and so does a node whose ledger could not answer.
|
|
30140
|
+
*/
|
|
30141
|
+
residentBytes: number().optional(),
|
|
30142
|
+
/** The residency counterpart of `oldestMs` — the oldest segment currently in
|
|
30143
|
+
* RAM, which on a healthy recorder is minutes ago and means nothing about
|
|
30144
|
+
* retention. `null` = nothing resident. */
|
|
30145
|
+
residentOldestMs: number().nullable().optional()
|
|
29973
30146
|
});
|
|
29974
30147
|
/** Recording storage usage + capacity for one storage location. */
|
|
29975
30148
|
var RecordingLocationUsageSchema = object({
|
|
@@ -30007,6 +30180,17 @@ var RecordingStorageUsageSchema = object({
|
|
|
30007
30180
|
totalUsedBytes: number(),
|
|
30008
30181
|
devices: array(RecordingDeviceUsageSchema),
|
|
30009
30182
|
/**
|
|
30183
|
+
* WHERE `devices[]` came from, so an empty table is never mistaken for empty
|
|
30184
|
+
* disks (D418).
|
|
30185
|
+
*
|
|
30186
|
+
* `archive` = the durable hour ledger answered. `unavailable` = this node
|
|
30187
|
+
* declared no ledger and the recorder REFUSED rather than answering the
|
|
30188
|
+
* question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
|
|
30189
|
+
* zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
|
|
30190
|
+
* and its rows are residency.
|
|
30191
|
+
*/
|
|
30192
|
+
devicesRead: _enum(["archive", "unavailable"]).optional(),
|
|
30193
|
+
/**
|
|
30010
30194
|
* Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
|
|
30011
30195
|
* of the payload without it: the hub serves this method through a BAKED
|
|
30012
30196
|
* router, so a hub whose framework train predates a change to this array
|
|
@@ -30167,7 +30351,14 @@ var ReadWindowBytesResultSchema = discriminatedUnion("kind", [object({
|
|
|
30167
30351
|
method(object({
|
|
30168
30352
|
deviceId: number(),
|
|
30169
30353
|
fromMs: number(),
|
|
30170
|
-
toMs: number()
|
|
30354
|
+
toMs: number(),
|
|
30355
|
+
/**
|
|
30356
|
+
* Answer for THIS profile instead of the preferred one (D433). Absent
|
|
30357
|
+
* keeps the timeline's behaviour — one bar, one profile, one set of
|
|
30358
|
+
* reads. `profilesWithFootage` on the answer says what may be asked
|
|
30359
|
+
* for.
|
|
30360
|
+
*/
|
|
30361
|
+
profile: string().optional()
|
|
30171
30362
|
}), RecordingAvailabilitySchema, {
|
|
30172
30363
|
kind: "query",
|
|
30173
30364
|
auth: "protected"
|
|
@@ -33886,7 +34077,7 @@ function toDeviceSummary(device, addonId) {
|
|
|
33886
34077
|
};
|
|
33887
34078
|
}
|
|
33888
34079
|
/**
|
|
33889
|
-
* Base class for device-provider addons (rtsp, onvif
|
|
34080
|
+
* Base class for device-provider addons (rtsp, onvif).
|
|
33890
34081
|
*
|
|
33891
34082
|
* Provides default implementations for the common device-provider cap
|
|
33892
34083
|
* methods (`start`, `stop`, `getStatus`, `getDevices`, `supportsDiscovery`,
|
|
@@ -38542,6 +38733,24 @@ Object.freeze({
|
|
|
38542
38733
|
addonId: null,
|
|
38543
38734
|
access: "view"
|
|
38544
38735
|
},
|
|
38736
|
+
"pipelineRunner.getParkedTrackFrame": {
|
|
38737
|
+
capName: "pipeline-runner",
|
|
38738
|
+
capScope: "system",
|
|
38739
|
+
addonId: null,
|
|
38740
|
+
access: "view"
|
|
38741
|
+
},
|
|
38742
|
+
"pipelineRunner.parkTrackFrame": {
|
|
38743
|
+
capName: "pipeline-runner",
|
|
38744
|
+
capScope: "system",
|
|
38745
|
+
addonId: null,
|
|
38746
|
+
access: "create"
|
|
38747
|
+
},
|
|
38748
|
+
"pipelineRunner.releaseParkedTrackFrames": {
|
|
38749
|
+
capName: "pipeline-runner",
|
|
38750
|
+
capScope: "system",
|
|
38751
|
+
addonId: null,
|
|
38752
|
+
access: "create"
|
|
38753
|
+
},
|
|
38545
38754
|
"pipelineRunner.reportMotion": {
|
|
38546
38755
|
capName: "pipeline-runner",
|
|
38547
38756
|
capScope: "system",
|
|
@@ -41819,6 +42028,21 @@ Object.freeze({
|
|
|
41819
42028
|
form: "single",
|
|
41820
42029
|
optional: false
|
|
41821
42030
|
}],
|
|
42031
|
+
"pipelineRunner.getParkedTrackFrame": [{
|
|
42032
|
+
name: "deviceId",
|
|
42033
|
+
form: "single",
|
|
42034
|
+
optional: false
|
|
42035
|
+
}],
|
|
42036
|
+
"pipelineRunner.parkTrackFrame": [{
|
|
42037
|
+
name: "deviceId",
|
|
42038
|
+
form: "single",
|
|
42039
|
+
optional: false
|
|
42040
|
+
}],
|
|
42041
|
+
"pipelineRunner.releaseParkedTrackFrames": [{
|
|
42042
|
+
name: "deviceId",
|
|
42043
|
+
form: "single",
|
|
42044
|
+
optional: false
|
|
42045
|
+
}],
|
|
41822
42046
|
"pipelineRunner.reportMotion": [{
|
|
41823
42047
|
name: "deviceId",
|
|
41824
42048
|
form: "single",
|
|
@@ -42510,7 +42734,7 @@ var PreviewTextField = string().max(200);
|
|
|
42510
42734
|
* Whether the notification's preview is a STILL or a short animation.
|
|
42511
42735
|
*
|
|
42512
42736
|
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
42513
|
-
* rule)"* —
|
|
42737
|
+
* rule)"* — the other rules already offer an animated preview, and a ten-hour
|
|
42514
42738
|
* night reads better as three seconds of motion than as one frame of it. Both
|
|
42515
42739
|
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
42516
42740
|
* simply applies it to a dozen frames sampled across the render and assembles
|
package/dist/addon.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { join } from "path";
|
|
|
9
9
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
10
10
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
11
11
|
//#endregion
|
|
12
|
-
//#region ../types/dist/event-category-
|
|
12
|
+
//#region ../types/dist/event-category-DAXzJeTX.mjs
|
|
13
13
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
14
14
|
EventCategory["SystemBoot"] = "system.boot";
|
|
15
15
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -601,7 +601,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
601
601
|
* issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
|
|
602
602
|
*/
|
|
603
603
|
EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
|
|
604
|
-
EventCategory["FrigateLiveEvent"] = "frigate.live-event";
|
|
605
604
|
EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
|
|
606
605
|
/**
|
|
607
606
|
* Stream-broker health watchdog. Per-broker (deviceId/profile) emission.
|
|
@@ -12684,7 +12683,7 @@ DeviceType.Camera;
|
|
|
12684
12683
|
var SourceInfoSchema = object({
|
|
12685
12684
|
/** Live dispatch key — mutable when the source system allows rename. */
|
|
12686
12685
|
id: string(),
|
|
12687
|
-
/** Source system tag — e.g. 'homeassistant' | 'reolink' | '
|
|
12686
|
+
/** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
|
|
12688
12687
|
system: string(),
|
|
12689
12688
|
/** Immutable upstream identifier when available (HA `unique_id`, … ).
|
|
12690
12689
|
* Used to detect rename when `id` changes. */
|
|
@@ -12697,7 +12696,7 @@ var SourceInfoSchema = object({
|
|
|
12697
12696
|
/**
|
|
12698
12697
|
* Build the synthetic SourceInfo every existing provider falls back to
|
|
12699
12698
|
* when no upstream value has been persisted. Keeps non-migrated providers
|
|
12700
|
-
* (Reolink / Hikvision / ONVIF /
|
|
12699
|
+
* (Reolink / Hikvision / ONVIF / RTSP) functional without code
|
|
12701
12700
|
* changes — `id` reuses the CamStack stableId, `system` reuses the addon
|
|
12702
12701
|
* id. Real upstream identity replaces this once a provider migrates and
|
|
12703
12702
|
* calls `updateSourceInfo()` with concrete values.
|
|
@@ -13376,7 +13375,7 @@ var deviceProviderCapability = {
|
|
|
13376
13375
|
* - `device-management.router.ts` (deleted in Phase 2)
|
|
13377
13376
|
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
13378
13377
|
*
|
|
13379
|
-
* All device provider addons (rtsp, onvif,
|
|
13378
|
+
* All device provider addons (rtsp, onvif, …) are hub-local: they may
|
|
13380
13379
|
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
13381
13380
|
* - No nodeId routing needed — this is a pure hub singleton.
|
|
13382
13381
|
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
@@ -17424,7 +17423,7 @@ var NcRuleInputSchema = object({
|
|
|
17424
17423
|
* The measured seven-person arrival on device 590 spans 110 s with every
|
|
17425
17424
|
* internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
|
|
17426
17425
|
* idle cutoff holds it as one and ends it when the arrival actually ends.
|
|
17427
|
-
* 30 is
|
|
17426
|
+
* 30 s is a widely shipped value for the same decision.
|
|
17428
17427
|
*
|
|
17429
17428
|
* ### What it replaces
|
|
17430
17429
|
*
|
|
@@ -19506,6 +19505,13 @@ var ZoneCrossingSchema = object({
|
|
|
19506
19505
|
/** Zone display name at crossing time (falls back to the id). */
|
|
19507
19506
|
zoneName: string().optional()
|
|
19508
19507
|
});
|
|
19508
|
+
/** One zone a box was stamped with, and how much of the BOX fell inside it. */
|
|
19509
|
+
var ZoneOverlapSchema = object({
|
|
19510
|
+
zoneId: string(),
|
|
19511
|
+
zoneName: string().optional(),
|
|
19512
|
+
/** Percentage of the BOX area inside the zone, 0–100. */
|
|
19513
|
+
overlapPct: number()
|
|
19514
|
+
});
|
|
19509
19515
|
var ObjectEventSchema = object({
|
|
19510
19516
|
...BaseEventFields,
|
|
19511
19517
|
kind: literal("object"),
|
|
@@ -19530,6 +19536,35 @@ var ObjectEventSchema = object({
|
|
|
19530
19536
|
bbox: BoundingBoxSchema.optional(),
|
|
19531
19537
|
/** Heavy JSON — omitted in slim projection. */
|
|
19532
19538
|
zones: array(string()).readonly().optional(),
|
|
19539
|
+
/**
|
|
19540
|
+
* How far inside each stamped zone the box actually was, as a percentage of
|
|
19541
|
+
* the BOX area.
|
|
19542
|
+
*
|
|
19543
|
+
* Membership alone cannot express "at least a third of it inside", which is
|
|
19544
|
+
* the bar an operator argues with — and the number already existed: the
|
|
19545
|
+
* engine computed it, the pipeline logged it, and then discarded it. It
|
|
19546
|
+
* matters most on the events that carry no track, where a rule has nothing
|
|
19547
|
+
* else to judge by.
|
|
19548
|
+
*/
|
|
19549
|
+
zoneOverlaps: array(ZoneOverlapSchema).readonly().optional(),
|
|
19550
|
+
/**
|
|
19551
|
+
* Present when this event describes a detection the TRACKER refused, so it
|
|
19552
|
+
* has no track and never will.
|
|
19553
|
+
*
|
|
19554
|
+
* A zone-scoped immediate rule asks "is there an animal in the flowerbed
|
|
19555
|
+
* NOW?"; tracking answers a different question ("is this the same subject as
|
|
19556
|
+
* before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
|
|
19557
|
+
* dog at 0.7729, 100% inside a watched zone, was refused three times in six
|
|
19558
|
+
* seconds with three different candidate ids — seven analysed frames in the
|
|
19559
|
+
* window, the subject in a handful of them, metres apart — and produced no
|
|
19560
|
+
* event at all.
|
|
19561
|
+
*
|
|
19562
|
+
* It is NAMED rather than merely implied by a missing `trackId`: an event
|
|
19563
|
+
* with no track and no reason is indistinguishable from a track whose media
|
|
19564
|
+
* went missing, and a consumer that asks this one for a best shot or a
|
|
19565
|
+
* history is asking for something that never existed.
|
|
19566
|
+
*/
|
|
19567
|
+
spawnRefused: string().optional(),
|
|
19533
19568
|
/** Omitted in slim projection. */
|
|
19534
19569
|
state: TrackStateSchema.optional(),
|
|
19535
19570
|
/**
|
|
@@ -19956,7 +19991,17 @@ var EventDensityBucketSchema = object({
|
|
|
19956
19991
|
bucketStart: number(),
|
|
19957
19992
|
motion: number().int(),
|
|
19958
19993
|
object: number().int(),
|
|
19959
|
-
audio: number().int()
|
|
19994
|
+
audio: number().int(),
|
|
19995
|
+
/**
|
|
19996
|
+
* Energy-weighted mean dBFS of the audio events in this bucket — the LEVEL,
|
|
19997
|
+
* as opposed to `audio`, which is their COUNT (D431).
|
|
19998
|
+
*
|
|
19999
|
+
* ABSENT when the bucket holds no audio event. Absence means "nothing was
|
|
20000
|
+
* measured", which is not the same claim as silence, and a lane that cannot
|
|
20001
|
+
* tell them apart paints a quiet hour at full scale — which is exactly what
|
|
20002
|
+
* the count-on-a-level-meter did.
|
|
20003
|
+
*/
|
|
20004
|
+
audioDbfs: number().optional()
|
|
19960
20005
|
});
|
|
19961
20006
|
/**
|
|
19962
20007
|
* One camera's row in a `getEventDensityBatch` answer.
|
|
@@ -20603,6 +20648,60 @@ var NativeCropResultSchema = object({
|
|
|
20603
20648
|
*/
|
|
20604
20649
|
tier: _enum(["native", "ram-fullframe"]).optional()
|
|
20605
20650
|
});
|
|
20651
|
+
/**
|
|
20652
|
+
* What a PARKED frame is for — the `kind` half of the `(deviceId, trackId,
|
|
20653
|
+
* kind)` key ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
|
|
20654
|
+
*
|
|
20655
|
+
* - `keyFrame` — the track's clean best FULL frame at native width (capped by
|
|
20656
|
+
* the caller's `maxWidth`). What `keyFrame` + `keyFrameSmall` are written
|
|
20657
|
+
* from, and what the detail plane's full-frame rung cuts from.
|
|
20658
|
+
* - `thumbnail` — the best-shot subject slab: the caller's 16:9 central-square
|
|
20659
|
+
* window, cut by the runner at uncapped native resolution.
|
|
20660
|
+
*
|
|
20661
|
+
* The runner never interprets `trackId`; it is an opaque key the hub owns.
|
|
20662
|
+
*/
|
|
20663
|
+
var ParkedFrameKindSchema = _enum(["keyFrame", "thumbnail"]);
|
|
20664
|
+
/**
|
|
20665
|
+
* Why a park did NOT happen. Every one is logged on the runner with
|
|
20666
|
+
* `tags: { deviceId }` and the handle's measured age, because a handle already
|
|
20667
|
+
* gone at park time IS the defect the 150–500 ms window exists to prevent —
|
|
20668
|
+
* never a reason to retry in a loop.
|
|
20669
|
+
*
|
|
20670
|
+
* - `handle-gone` — the native surface no longer resolves this handle (never
|
|
20671
|
+
* registered, past the lease bound, or the worker released it). `detail`
|
|
20672
|
+
* carries the runner's own miss reason.
|
|
20673
|
+
* - `encode-failed` — pixels resolved and the JPEG encode threw.
|
|
20674
|
+
*/
|
|
20675
|
+
var ParkRefusalSchema = _enum(["handle-gone", "encode-failed"]);
|
|
20676
|
+
/** Answer to `parkTrackFrame` — a discriminated union, so "not parked" always names why. */
|
|
20677
|
+
var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
|
|
20678
|
+
parked: literal(true),
|
|
20679
|
+
/** The node holding the parcel — what a later retrieval must be pinned to. */
|
|
20680
|
+
nodeId: string(),
|
|
20681
|
+
width: number().int().positive(),
|
|
20682
|
+
height: number().int().positive(),
|
|
20683
|
+
/** JPEG bytes the parcel costs on the node. */
|
|
20684
|
+
bytes: number().int().nonnegative(),
|
|
20685
|
+
/** Whether this park replaced a parcel already held for the key. */
|
|
20686
|
+
replaced: boolean()
|
|
20687
|
+
}), object({
|
|
20688
|
+
parked: literal(false),
|
|
20689
|
+
nodeId: string(),
|
|
20690
|
+
reason: ParkRefusalSchema,
|
|
20691
|
+
/** Age of the handle at the park, on the runner's clock; null if unknown. */
|
|
20692
|
+
handleAgeMs: number().nullable(),
|
|
20693
|
+
detail: string().optional()
|
|
20694
|
+
})]);
|
|
20695
|
+
/** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
|
|
20696
|
+
var ParkedTrackFrameSchema = object({
|
|
20697
|
+
jpeg: string(),
|
|
20698
|
+
width: number().int().positive(),
|
|
20699
|
+
height: number().int().positive(),
|
|
20700
|
+
/** The frame instant the parcel shows (the caller's clock, echoed back). */
|
|
20701
|
+
timestamp: number(),
|
|
20702
|
+
/** When the node stored it (the node's clock). */
|
|
20703
|
+
parkedAt: number()
|
|
20704
|
+
});
|
|
20606
20705
|
/** Parent detection context passed to `runDetailSubtree` — the crop's
|
|
20607
20706
|
* originating detection, in FRAME-space coordinates. Reuses
|
|
20608
20707
|
* `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
|
|
@@ -20992,7 +21091,7 @@ var RunnerCameraConfigSchema = object({
|
|
|
20992
21091
|
* - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
|
|
20993
21092
|
* analyzer providers) running on decoded frames in this runner.
|
|
20994
21093
|
* - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
|
|
20995
|
-
* analytics
|
|
21094
|
+
* analytics). The provider emits ProviderMotion
|
|
20996
21095
|
* events; the orchestrator forwards to `reportMotion`.
|
|
20997
21096
|
*/
|
|
20998
21097
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
@@ -21234,7 +21333,26 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
21234
21333
|
className: string(),
|
|
21235
21334
|
/** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
|
|
21236
21335
|
sourceDeviceId: number()
|
|
21237
|
-
}), RunStatelessStepResultSchema, { kind: "mutation" })
|
|
21336
|
+
}), RunStatelessStepResultSchema, { kind: "mutation" }), method(object({
|
|
21337
|
+
deviceId: number(),
|
|
21338
|
+
/** Opaque to the runner — the hub's track id. */
|
|
21339
|
+
trackId: string(),
|
|
21340
|
+
kind: ParkedFrameKindSchema,
|
|
21341
|
+
handle: FrameHandleSchema,
|
|
21342
|
+
/** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
|
|
21343
|
+
bbox: NativeCropBboxSchema,
|
|
21344
|
+
/** Width cap for a full-frame park (the `keyFrame` native cap). */
|
|
21345
|
+
maxWidth: number().int().positive().optional(),
|
|
21346
|
+
/** The frame instant (caller's clock) — orders parks for one key. */
|
|
21347
|
+
timestamp: number()
|
|
21348
|
+
}), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
|
|
21349
|
+
deviceId: number(),
|
|
21350
|
+
trackId: string(),
|
|
21351
|
+
kind: ParkedFrameKindSchema
|
|
21352
|
+
}), ParkedTrackFrameSchema.nullable()), method(object({
|
|
21353
|
+
deviceId: number(),
|
|
21354
|
+
trackId: string()
|
|
21355
|
+
}), object({ released: number().int().nonnegative() }), { kind: "mutation" });
|
|
21238
21356
|
var CameraPipelineConfigSchema = object({
|
|
21239
21357
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
21240
21358
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -24304,8 +24422,8 @@ onStatusChanged: { data: object({
|
|
|
24304
24422
|
/**
|
|
24305
24423
|
* Runtime-state slice — every provider that registers this cap
|
|
24306
24424
|
* stores the same shape under `device.runtimeState[battery]`.
|
|
24307
|
-
* Cross-provider uniformity: a Reolink Argus, a
|
|
24308
|
-
*
|
|
24425
|
+
* Cross-provider uniformity: a Reolink Argus, a sensor proxy,
|
|
24426
|
+
* an ONVIF battery cam all read/write the same keys.
|
|
24309
24427
|
* Consumers (BatteryBadge, snapshot wrapper sleep gate) read once
|
|
24310
24428
|
* via `device.runtimeState.getCapState('battery')` regardless of
|
|
24311
24429
|
* the underlying driver.
|
|
@@ -24438,7 +24556,7 @@ DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _v
|
|
|
24438
24556
|
*
|
|
24439
24557
|
* Implementations:
|
|
24440
24558
|
* - Each camera-providing addon registers this cap natively per
|
|
24441
|
-
* device (Reolink, Hikvision, RTSP,
|
|
24559
|
+
* device (Reolink, Hikvision, RTSP, ONVIF self).
|
|
24442
24560
|
* - Returns a snapshot from the persisted device config blob — no
|
|
24443
24561
|
* extra round-trip to the camera, no probing.
|
|
24444
24562
|
* - The cap is admin-only (`auth: 'admin'`) — credentials must not
|
|
@@ -26530,7 +26648,7 @@ var AvailableIntegrationTypeSchema = object({
|
|
|
26530
26648
|
* Which integration-marker cap the addon declared, so the wizard can
|
|
26531
26649
|
* branch on CAP — never on addon name. `device-adoption` integrations
|
|
26532
26650
|
* (Home Assistant, …) route through the broker step (Approach A);
|
|
26533
|
-
* `device-provider` integrations (Reolink/
|
|
26651
|
+
* `device-provider` integrations (Reolink/ONVIF) keep the
|
|
26534
26652
|
* legacy config → discovery flow.
|
|
26535
26653
|
*/
|
|
26536
26654
|
kind: _enum(["device-adoption", "device-provider"]),
|
|
@@ -29898,7 +30016,23 @@ var RecordingRangeSchema = object({
|
|
|
29898
30016
|
});
|
|
29899
30017
|
var RecordingAvailabilitySchema = object({
|
|
29900
30018
|
deviceId: number(),
|
|
29901
|
-
ranges: array(RecordingRangeSchema)
|
|
30019
|
+
ranges: array(RecordingRangeSchema),
|
|
30020
|
+
/**
|
|
30021
|
+
* Every profile this camera has footage in — not only the one `ranges`
|
|
30022
|
+
* describes (D433).
|
|
30023
|
+
*
|
|
30024
|
+
* `ranges` answers for ONE profile by design: the timeline is a single bar,
|
|
30025
|
+
* and enumerating all of them triples the directory reads for a bar that
|
|
30026
|
+
* would look identical. But the answer used to say nothing about that, so a
|
|
30027
|
+
* caller asking "what can I export?" read the single preferred profile as
|
|
30028
|
+
* the only one that exists — on this deployment every camera records `high`
|
|
30029
|
+
* AND `low`, the low tree holding 14 GB for camera 615 alone, and the export
|
|
30030
|
+
* UI could not see it.
|
|
30031
|
+
*
|
|
30032
|
+
* Cheap: it is the same shallow directory read the profile CHOICE already
|
|
30033
|
+
* makes. Ask for a specific profile's ranges with the `profile` input.
|
|
30034
|
+
*/
|
|
30035
|
+
profilesWithFootage: array(string())
|
|
29902
30036
|
});
|
|
29903
30037
|
var RecordingDaysSchema = object({
|
|
29904
30038
|
deviceId: number(),
|
|
@@ -29924,7 +30058,11 @@ var RecordingDaysSchema = object({
|
|
|
29924
30058
|
var RecordingAvailabilityForDeviceSchema = object({
|
|
29925
30059
|
deviceId: number(),
|
|
29926
30060
|
read: _enum(["read", "unreadable"]),
|
|
29927
|
-
ranges: array(RecordingRangeSchema).readonly()
|
|
30061
|
+
ranges: array(RecordingRangeSchema).readonly(),
|
|
30062
|
+
/** Same field, same meaning, as the singular answer (D433). A row that
|
|
30063
|
+
* dropped it would tell a grid caller the archive holds one profile.
|
|
30064
|
+
* Empty on an `'unreadable'` row: nobody looked. */
|
|
30065
|
+
profilesWithFootage: array(string()).readonly()
|
|
29928
30066
|
});
|
|
29929
30067
|
/**
|
|
29930
30068
|
* One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
|
|
@@ -29954,13 +30092,31 @@ var RecordingManifestSchema = object({
|
|
|
29954
30092
|
*/
|
|
29955
30093
|
playbackEndpoints: array(string())
|
|
29956
30094
|
});
|
|
29957
|
-
/**
|
|
29958
|
-
*
|
|
30095
|
+
/**
|
|
30096
|
+
* Recording storage usage for one camera — what the ARCHIVE holds for it,
|
|
30097
|
+
* across every profile and every resolvable location on this node.
|
|
30098
|
+
*
|
|
30099
|
+
* ## Archive vs residency, which is the whole point of this shape (D418)
|
|
30100
|
+
*
|
|
30101
|
+
* `usedBytes` / `oldestMs` / `segments` are the durable hour ledger's numbers:
|
|
30102
|
+
* the same quantity `RecordingLocationUsage.usedBytes` reports for the volume
|
|
30103
|
+
* this camera writes to, so the two can be added up and compared.
|
|
30104
|
+
*
|
|
30105
|
+
* They were not always. Until D418 this row came from the recorder's in-RAM
|
|
30106
|
+
* `RecordingIndex`, which since D287 holds only the live tail plus the hours
|
|
30107
|
+
* somebody hydrated — so a hub with 1.9 TB and 3.3 days of footage reported
|
|
30108
|
+
* 60.5 GB and "oldest: three hours ago" on the same page as the volume row
|
|
30109
|
+
* that said otherwise, and two people read it as retention eating recent
|
|
30110
|
+
* footage. Residency is still reported, under `residentBytes` /
|
|
30111
|
+
* `residentOldestMs`, which answer a different question and say so.
|
|
30112
|
+
*/
|
|
29959
30113
|
var RecordingDeviceUsageSchema = object({
|
|
29960
30114
|
deviceId: number(),
|
|
30115
|
+
/** Bytes the ARCHIVE holds for this camera on this node's resolvable
|
|
30116
|
+
* recordings locations. */
|
|
29961
30117
|
usedBytes: number(),
|
|
29962
30118
|
/**
|
|
29963
|
-
* Start of this camera's OLDEST
|
|
30119
|
+
* Start of this camera's OLDEST ARCHIVED segment, across every profile and
|
|
29964
30120
|
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
29965
30121
|
* only honest answer to "is retention actually holding?" per camera.
|
|
29966
30122
|
*
|
|
@@ -29970,7 +30126,24 @@ var RecordingDeviceUsageSchema = object({
|
|
|
29970
30126
|
* (types) and the addon ship on different trains, and the addon is usually
|
|
29971
30127
|
* the later of the two.
|
|
29972
30128
|
*/
|
|
29973
|
-
oldestMs: number().nullable().optional()
|
|
30129
|
+
oldestMs: number().nullable().optional(),
|
|
30130
|
+
/** Segments the archive holds for this camera — the "M" beside `usedBytes`.
|
|
30131
|
+
* OPTIONAL for the same train-skew reason as `oldestMs`. */
|
|
30132
|
+
segments: number().optional(),
|
|
30133
|
+
/**
|
|
30134
|
+
* RESIDENCY, not the archive: bytes the recorder process currently holds in
|
|
30135
|
+
* its RAM index — the live tail plus the hours a reader hydrated.
|
|
30136
|
+
*
|
|
30137
|
+
* It answers "what can be served without touching the disk", never "how much
|
|
30138
|
+
* footage this camera has". A UI that renders it must label it as such, and
|
|
30139
|
+
* must never total it as storage. OPTIONAL: a recorder predating D418 omits
|
|
30140
|
+
* it, and so does a node whose ledger could not answer.
|
|
30141
|
+
*/
|
|
30142
|
+
residentBytes: number().optional(),
|
|
30143
|
+
/** The residency counterpart of `oldestMs` — the oldest segment currently in
|
|
30144
|
+
* RAM, which on a healthy recorder is minutes ago and means nothing about
|
|
30145
|
+
* retention. `null` = nothing resident. */
|
|
30146
|
+
residentOldestMs: number().nullable().optional()
|
|
29974
30147
|
});
|
|
29975
30148
|
/** Recording storage usage + capacity for one storage location. */
|
|
29976
30149
|
var RecordingLocationUsageSchema = object({
|
|
@@ -30008,6 +30181,17 @@ var RecordingStorageUsageSchema = object({
|
|
|
30008
30181
|
totalUsedBytes: number(),
|
|
30009
30182
|
devices: array(RecordingDeviceUsageSchema),
|
|
30010
30183
|
/**
|
|
30184
|
+
* WHERE `devices[]` came from, so an empty table is never mistaken for empty
|
|
30185
|
+
* disks (D418).
|
|
30186
|
+
*
|
|
30187
|
+
* `archive` = the durable hour ledger answered. `unavailable` = this node
|
|
30188
|
+
* declared no ledger and the recorder REFUSED rather than answering the
|
|
30189
|
+
* question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
|
|
30190
|
+
* zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
|
|
30191
|
+
* and its rows are residency.
|
|
30192
|
+
*/
|
|
30193
|
+
devicesRead: _enum(["archive", "unavailable"]).optional(),
|
|
30194
|
+
/**
|
|
30011
30195
|
* Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
|
|
30012
30196
|
* of the payload without it: the hub serves this method through a BAKED
|
|
30013
30197
|
* router, so a hub whose framework train predates a change to this array
|
|
@@ -30168,7 +30352,14 @@ var ReadWindowBytesResultSchema = discriminatedUnion("kind", [object({
|
|
|
30168
30352
|
method(object({
|
|
30169
30353
|
deviceId: number(),
|
|
30170
30354
|
fromMs: number(),
|
|
30171
|
-
toMs: number()
|
|
30355
|
+
toMs: number(),
|
|
30356
|
+
/**
|
|
30357
|
+
* Answer for THIS profile instead of the preferred one (D433). Absent
|
|
30358
|
+
* keeps the timeline's behaviour — one bar, one profile, one set of
|
|
30359
|
+
* reads. `profilesWithFootage` on the answer says what may be asked
|
|
30360
|
+
* for.
|
|
30361
|
+
*/
|
|
30362
|
+
profile: string().optional()
|
|
30172
30363
|
}), RecordingAvailabilitySchema, {
|
|
30173
30364
|
kind: "query",
|
|
30174
30365
|
auth: "protected"
|
|
@@ -33887,7 +34078,7 @@ function toDeviceSummary(device, addonId) {
|
|
|
33887
34078
|
};
|
|
33888
34079
|
}
|
|
33889
34080
|
/**
|
|
33890
|
-
* Base class for device-provider addons (rtsp, onvif
|
|
34081
|
+
* Base class for device-provider addons (rtsp, onvif).
|
|
33891
34082
|
*
|
|
33892
34083
|
* Provides default implementations for the common device-provider cap
|
|
33893
34084
|
* methods (`start`, `stop`, `getStatus`, `getDevices`, `supportsDiscovery`,
|
|
@@ -38543,6 +38734,24 @@ Object.freeze({
|
|
|
38543
38734
|
addonId: null,
|
|
38544
38735
|
access: "view"
|
|
38545
38736
|
},
|
|
38737
|
+
"pipelineRunner.getParkedTrackFrame": {
|
|
38738
|
+
capName: "pipeline-runner",
|
|
38739
|
+
capScope: "system",
|
|
38740
|
+
addonId: null,
|
|
38741
|
+
access: "view"
|
|
38742
|
+
},
|
|
38743
|
+
"pipelineRunner.parkTrackFrame": {
|
|
38744
|
+
capName: "pipeline-runner",
|
|
38745
|
+
capScope: "system",
|
|
38746
|
+
addonId: null,
|
|
38747
|
+
access: "create"
|
|
38748
|
+
},
|
|
38749
|
+
"pipelineRunner.releaseParkedTrackFrames": {
|
|
38750
|
+
capName: "pipeline-runner",
|
|
38751
|
+
capScope: "system",
|
|
38752
|
+
addonId: null,
|
|
38753
|
+
access: "create"
|
|
38754
|
+
},
|
|
38546
38755
|
"pipelineRunner.reportMotion": {
|
|
38547
38756
|
capName: "pipeline-runner",
|
|
38548
38757
|
capScope: "system",
|
|
@@ -41820,6 +42029,21 @@ Object.freeze({
|
|
|
41820
42029
|
form: "single",
|
|
41821
42030
|
optional: false
|
|
41822
42031
|
}],
|
|
42032
|
+
"pipelineRunner.getParkedTrackFrame": [{
|
|
42033
|
+
name: "deviceId",
|
|
42034
|
+
form: "single",
|
|
42035
|
+
optional: false
|
|
42036
|
+
}],
|
|
42037
|
+
"pipelineRunner.parkTrackFrame": [{
|
|
42038
|
+
name: "deviceId",
|
|
42039
|
+
form: "single",
|
|
42040
|
+
optional: false
|
|
42041
|
+
}],
|
|
42042
|
+
"pipelineRunner.releaseParkedTrackFrames": [{
|
|
42043
|
+
name: "deviceId",
|
|
42044
|
+
form: "single",
|
|
42045
|
+
optional: false
|
|
42046
|
+
}],
|
|
41823
42047
|
"pipelineRunner.reportMotion": [{
|
|
41824
42048
|
name: "deviceId",
|
|
41825
42049
|
form: "single",
|
|
@@ -42511,7 +42735,7 @@ var PreviewTextField = string().max(200);
|
|
|
42511
42735
|
* Whether the notification's preview is a STILL or a short animation.
|
|
42512
42736
|
*
|
|
42513
42737
|
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
42514
|
-
* rule)"* —
|
|
42738
|
+
* rule)"* — the other rules already offer an animated preview, and a ten-hour
|
|
42515
42739
|
* night reads better as three seconds of motion than as one frame of it. Both
|
|
42516
42740
|
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
42517
42741
|
* simply applies it to a dozen frames sampled across the render and assembles
|
package/package.json
CHANGED