@camstack/addon-provider-homematic 1.2.103 → 1.2.105
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 +355 -14
- package/dist/addon.mjs +355 -14
- package/package.json +2 -2
package/dist/addon.js
CHANGED
|
@@ -5369,7 +5369,7 @@ var ZodIssueCode = {
|
|
|
5369
5369
|
var ZodFirstPartyTypeKind;
|
|
5370
5370
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5371
5371
|
//#endregion
|
|
5372
|
-
//#region ../types/dist/sleep-
|
|
5372
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
5373
5373
|
/**
|
|
5374
5374
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5375
5375
|
* window to float samples (D455).
|
|
@@ -11620,6 +11620,21 @@ var streamSignalsCapability = {
|
|
|
11620
11620
|
mode: "singleton",
|
|
11621
11621
|
deviceTypes: Object.values(DeviceType),
|
|
11622
11622
|
runtimeState: StreamSignalsStatusSchema,
|
|
11623
|
+
/**
|
|
11624
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
11625
|
+
*
|
|
11626
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
11627
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
11628
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
11629
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
11630
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
11631
|
+
* class the camera really detected stayed missing for the life of the row
|
|
11632
|
+
* because the fix could not reach it.
|
|
11633
|
+
*
|
|
11634
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11635
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11636
|
+
*/
|
|
11637
|
+
durability: "session",
|
|
11623
11638
|
methods: {
|
|
11624
11639
|
/**
|
|
11625
11640
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -18251,6 +18266,48 @@ var NcAlarmConfigSchema = object({
|
|
|
18251
18266
|
settings: NcAlarmSettingsSchema,
|
|
18252
18267
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
18253
18268
|
});
|
|
18269
|
+
/**
|
|
18270
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
18271
|
+
*
|
|
18272
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
18273
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
18274
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
18275
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
18276
|
+
* a different thing from never having been told, and only the envelope
|
|
18277
|
+
* (`rulesLoaded`) can tell those apart.
|
|
18278
|
+
*/
|
|
18279
|
+
var NcClipRetentionAskSchema = object({
|
|
18280
|
+
/**
|
|
18281
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
18282
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
18283
|
+
* asking everywhere.
|
|
18284
|
+
*/
|
|
18285
|
+
deviceId: number().int().nonnegative().optional(),
|
|
18286
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
18287
|
+
* needs nothing produces no ask at all. */
|
|
18288
|
+
seconds: number().min(0).max(60),
|
|
18289
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
18290
|
+
* assigned, which is what the cut defaults to. */
|
|
18291
|
+
profile: CamProfileSchema.optional(),
|
|
18292
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
18293
|
+
ruleId: string(),
|
|
18294
|
+
ruleName: string(),
|
|
18295
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
18296
|
+
reason: _enum(["window", "occupancy"])
|
|
18297
|
+
});
|
|
18298
|
+
/**
|
|
18299
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
18300
|
+
*
|
|
18301
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
18302
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
18303
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
18304
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
18305
|
+
* footage this mechanism exists to keep.
|
|
18306
|
+
*/
|
|
18307
|
+
var NcClipRetentionPlanSchema = object({
|
|
18308
|
+
rulesLoaded: boolean(),
|
|
18309
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18310
|
+
});
|
|
18254
18311
|
method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), method(object({ ruleId: string() }), object({ rule: NcRuleSchema.nullable() }), { auth: "admin" }), method(object({ rule: NcRuleInputSchema }), object({ rule: NcRuleSchema }), {
|
|
18255
18312
|
kind: "mutation",
|
|
18256
18313
|
auth: "admin",
|
|
@@ -18271,7 +18328,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18271
18328
|
}), object({ success: literal(true) }), {
|
|
18272
18329
|
kind: "mutation",
|
|
18273
18330
|
auth: "admin"
|
|
18274
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18331
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18275
18332
|
deviceId: number().int(),
|
|
18276
18333
|
muted: boolean()
|
|
18277
18334
|
}), object({ success: literal(true) }), {
|
|
@@ -19456,13 +19513,26 @@ var TrackAudioLabelSchema = object({
|
|
|
19456
19513
|
* - `audio` — an audio event on the camera itself that was anomalous for
|
|
19457
19514
|
* THAT camera, loud, and heard while nothing visual was happening (D62).
|
|
19458
19515
|
*
|
|
19516
|
+
* - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
|
|
19517
|
+
* that frame's pixel space. A real root detector and a SPATIAL one: its
|
|
19518
|
+
* boxes are the same kind of fact `pipeline`'s are, produced by a different
|
|
19519
|
+
* detector.
|
|
19520
|
+
*
|
|
19521
|
+
* `onboard` was missing here while `DetectionSourceSchema` already had it, so
|
|
19522
|
+
* a persisted onboard track failed `safeParse` on read and came back with NO
|
|
19523
|
+
* source at all — which `isSpatialTrack` then admitted by accident, through the
|
|
19524
|
+
* `undefined` arm rather than by anybody's decision, and which `excludeSources`
|
|
19525
|
+
* could not name.
|
|
19526
|
+
*
|
|
19459
19527
|
* The spatial subsystems (tracker association, occupancy count, re-id /
|
|
19460
19528
|
* embedding, resurrection) MUST skip every synthetic source. Test for that
|
|
19461
|
-
* with `isSpatialTrack`, which allow-lists
|
|
19462
|
-
* check silently readmits every source added after it was
|
|
19529
|
+
* with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
|
|
19530
|
+
* `!== 'sensor'` check silently readmits every source added after it was
|
|
19531
|
+
* written.
|
|
19463
19532
|
*/
|
|
19464
19533
|
var TrackSourceSchema = _enum([
|
|
19465
19534
|
"pipeline",
|
|
19535
|
+
"onboard",
|
|
19466
19536
|
"sensor",
|
|
19467
19537
|
"audio"
|
|
19468
19538
|
]);
|
|
@@ -20845,6 +20915,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
20845
20915
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
20846
20916
|
framesMatched: number().int()
|
|
20847
20917
|
})).readonly() });
|
|
20918
|
+
/**
|
|
20919
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
20920
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
20921
|
+
* is an alias of this, not a second list.
|
|
20922
|
+
*/
|
|
20923
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
20924
|
+
"motion",
|
|
20925
|
+
"audio-dbfs",
|
|
20926
|
+
"battery",
|
|
20927
|
+
"occupancy"
|
|
20928
|
+
]);
|
|
20929
|
+
/**
|
|
20930
|
+
* One closed 5-minute bucket of a long-term series.
|
|
20931
|
+
*
|
|
20932
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
20933
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
20934
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
20935
|
+
* different claim from zero and the reason this is a sparse series.
|
|
20936
|
+
*/
|
|
20937
|
+
var LtsBucketSchema = object({
|
|
20938
|
+
scope: string(),
|
|
20939
|
+
bucketStart: number().int(),
|
|
20940
|
+
samples: number().int().nonnegative(),
|
|
20941
|
+
sum: number(),
|
|
20942
|
+
min: number(),
|
|
20943
|
+
max: number()
|
|
20944
|
+
});
|
|
20848
20945
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
20849
20946
|
deviceId: number(),
|
|
20850
20947
|
trackId: string()
|
|
@@ -20891,6 +20988,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20891
20988
|
kinds: array(string()).optional(),
|
|
20892
20989
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
20893
20990
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
20991
|
+
deviceId: number(),
|
|
20992
|
+
series: AnalyticsLtsSeriesSchema,
|
|
20993
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
20994
|
+
scope: string().optional(),
|
|
20995
|
+
from: number(),
|
|
20996
|
+
to: number(),
|
|
20997
|
+
limit: number().int().positive().optional()
|
|
20998
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
20894
20999
|
deviceId: number(),
|
|
20895
21000
|
since: number(),
|
|
20896
21001
|
until: number(),
|
|
@@ -21509,6 +21614,40 @@ var MotionSourceEnum = _enum([
|
|
|
21509
21614
|
*/
|
|
21510
21615
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
21511
21616
|
/**
|
|
21617
|
+
* Which root detector a camera runs — EXACTLY ONE.
|
|
21618
|
+
*
|
|
21619
|
+
* Deliberately the SAME vocabulary post-analysis already tags every detection
|
|
21620
|
+
* with (`DetectionSource`) rather than a second spelling of the same two
|
|
21621
|
+
* ideas: the value an operator picks here is the value that comes back on the
|
|
21622
|
+
* track, the overlay and the debug row.
|
|
21623
|
+
*
|
|
21624
|
+
* ## Why one, and why it is still an array
|
|
21625
|
+
*
|
|
21626
|
+
* Two roots on one camera is a capability nobody asked for and the operator has
|
|
21627
|
+
* since ruled out. It was never free: both planes feed the SAME per-device
|
|
21628
|
+
* stationary registry, both can promote the same parked object, and the two
|
|
21629
|
+
* detectors disagree about the same box by construction — which is the
|
|
21630
|
+
* disagreement D505 had to arbitrate. Removing the case removes the arbitration.
|
|
21631
|
+
*
|
|
21632
|
+
* The ARRAY shape survives because the stored settings and the attach payload
|
|
21633
|
+
* already speak it on every camera of every fleet, and a cap input that
|
|
21634
|
+
* suddenly refuses a stored value makes the camera un-attachable — a fail-closed
|
|
21635
|
+
* in the one direction that costs an operator their cameras. So the wire stays
|
|
21636
|
+
* tolerant and the TYPE is exact: a longer list is truncated to its first
|
|
21637
|
+
* element rather than refused, and `max(1)` is what every consumer can then
|
|
21638
|
+
* rely on.
|
|
21639
|
+
*
|
|
21640
|
+
* AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
|
|
21641
|
+
* a camera an operator left with no root detector — and `planDetectionSources`
|
|
21642
|
+
* has always said so: inventing a root for them is how a default acts without
|
|
21643
|
+
* anybody choosing it. Tightening this to `length(1)` broke that, and the
|
|
21644
|
+
* suite caught it.
|
|
21645
|
+
*
|
|
21646
|
+
* Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
|
|
21647
|
+
* `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
|
|
21648
|
+
*/
|
|
21649
|
+
var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
|
|
21650
|
+
/**
|
|
21512
21651
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
21513
21652
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
21514
21653
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -21659,6 +21798,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
21659
21798
|
* events; the orchestrator forwards to `reportMotion`.
|
|
21660
21799
|
*/
|
|
21661
21800
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
21801
|
+
/**
|
|
21802
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
21803
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
21804
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
21805
|
+
*
|
|
21806
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
21807
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
21808
|
+
* here. Its boxes reach post-analysis on the same
|
|
21809
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
21810
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
21811
|
+
* subtree (face / plate / embedding).
|
|
21812
|
+
*
|
|
21813
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
21814
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
21815
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
21816
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
21817
|
+
*
|
|
21818
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
21819
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
21820
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
21821
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
21822
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
21823
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
21824
|
+
*
|
|
21825
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
21826
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
21827
|
+
* default.
|
|
21828
|
+
*/
|
|
21829
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
21662
21830
|
pipelineEnabled: boolean().default(true),
|
|
21663
21831
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
21664
21832
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -21840,7 +22008,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
21840
22008
|
queueDepth: number(),
|
|
21841
22009
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
21842
22010
|
});
|
|
22011
|
+
/**
|
|
22012
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
22013
|
+
*
|
|
22014
|
+
* One instance per node. Receives camera assignments from
|
|
22015
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
22016
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
22017
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
22018
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
22019
|
+
* the bus.
|
|
22020
|
+
*
|
|
22021
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
22022
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
22023
|
+
* makes assignment decisions itself.
|
|
22024
|
+
*/
|
|
22025
|
+
/**
|
|
22026
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
22027
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
22028
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
22029
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
22030
|
+
*/
|
|
22031
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
22032
|
+
"not-attached",
|
|
22033
|
+
"battery-asleep",
|
|
22034
|
+
"not-watching",
|
|
22035
|
+
"already-bursting"
|
|
22036
|
+
]);
|
|
21843
22037
|
method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly()), method(object({
|
|
22038
|
+
deviceId: number(),
|
|
22039
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
22040
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
22041
|
+
frames: number().int().positive().optional(),
|
|
22042
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
22043
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
22044
|
+
reason: string()
|
|
22045
|
+
}), object({
|
|
22046
|
+
started: boolean(),
|
|
22047
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
22048
|
+
}), {
|
|
22049
|
+
auth: "admin",
|
|
22050
|
+
kind: "mutation"
|
|
22051
|
+
}), method(object({
|
|
21844
22052
|
handle: FrameHandleSchema,
|
|
21845
22053
|
bbox: NativeCropBboxSchema,
|
|
21846
22054
|
maxWidth: number().int().positive().optional(),
|
|
@@ -28670,11 +28878,46 @@ var NativeObjectDetectionStatusSchema = object({
|
|
|
28670
28878
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28671
28879
|
/**
|
|
28672
28880
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
28673
|
-
*
|
|
28674
|
-
*
|
|
28881
|
+
*
|
|
28882
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
28883
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
28884
|
+
* other detection choice is made. `geometry` on
|
|
28885
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
28886
|
+
* choice would buy this particular camera.
|
|
28675
28887
|
*/
|
|
28676
28888
|
enabled: boolean()
|
|
28677
28889
|
});
|
|
28890
|
+
/**
|
|
28891
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
28892
|
+
*
|
|
28893
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
28894
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
28895
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
28896
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
28897
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
28898
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
28899
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
28900
|
+
* something is in front of it, and its stream is already being pulled.
|
|
28901
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
28902
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
28903
|
+
* tracker as motion and no further.
|
|
28904
|
+
*
|
|
28905
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
28906
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
28907
|
+
* derived form is only as honest as `getOptions`).
|
|
28908
|
+
*/
|
|
28909
|
+
var NativeObjectGeometryEnum = _enum([
|
|
28910
|
+
"boxed",
|
|
28911
|
+
"while-streaming",
|
|
28912
|
+
"flag-only"
|
|
28913
|
+
]);
|
|
28914
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
28915
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
28916
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28917
|
+
/** What a detection from this camera carries. */
|
|
28918
|
+
geometry: NativeObjectGeometryEnum
|
|
28919
|
+
});
|
|
28920
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
28678
28921
|
var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
|
|
28679
28922
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
28680
28923
|
lastFetchedAt: number() });
|
|
@@ -28684,13 +28927,23 @@ var nativeObjectDetectionCapability = {
|
|
|
28684
28927
|
deviceNative: true,
|
|
28685
28928
|
mode: "singleton",
|
|
28686
28929
|
deviceTypes: [DeviceType.Camera],
|
|
28687
|
-
methods: {
|
|
28688
|
-
deviceId: number(),
|
|
28689
|
-
|
|
28690
|
-
|
|
28691
|
-
|
|
28692
|
-
|
|
28693
|
-
|
|
28930
|
+
methods: {
|
|
28931
|
+
getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
|
|
28932
|
+
setSettings: method(object({
|
|
28933
|
+
deviceId: number(),
|
|
28934
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
28935
|
+
}), _void(), {
|
|
28936
|
+
kind: "mutation",
|
|
28937
|
+
auth: "admin"
|
|
28938
|
+
}),
|
|
28939
|
+
setEnabled: method(object({
|
|
28940
|
+
deviceId: number(),
|
|
28941
|
+
enabled: boolean()
|
|
28942
|
+
}), _void(), {
|
|
28943
|
+
kind: "mutation",
|
|
28944
|
+
auth: "admin"
|
|
28945
|
+
})
|
|
28946
|
+
},
|
|
28694
28947
|
events: { onDetected: { data: object({
|
|
28695
28948
|
deviceId: number(),
|
|
28696
28949
|
detection: NativeDetectionSchema
|
|
@@ -33538,7 +33791,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
33538
33791
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
33539
33792
|
totalObjects: number().int().nonnegative(),
|
|
33540
33793
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
33541
|
-
byClass: record(string(), number().int().nonnegative())
|
|
33794
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
33795
|
+
/**
|
|
33796
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
33797
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
33798
|
+
*
|
|
33799
|
+
* The operator's question about a scene has two halves and they answer
|
|
33800
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
33801
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
33802
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
33803
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
33804
|
+
*
|
|
33805
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
33806
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
33807
|
+
*
|
|
33808
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
33809
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
33810
|
+
* parked objects here" about a camera whose lot is full.
|
|
33811
|
+
*/
|
|
33812
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
33813
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
33814
|
+
* same absence rule. */
|
|
33815
|
+
transientObjects: number().int().nonnegative().optional()
|
|
33542
33816
|
});
|
|
33543
33817
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
33544
33818
|
zoneId: string(),
|
|
@@ -33661,6 +33935,23 @@ var HistoryPointSchema = object({
|
|
|
33661
33935
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
33662
33936
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
33663
33937
|
* combinatorial coverage the operator UI requested.
|
|
33938
|
+
*
|
|
33939
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
33940
|
+
*
|
|
33941
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
33942
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
33943
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
33944
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
33945
|
+
* horizon rather than to answer a question.
|
|
33946
|
+
*
|
|
33947
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
33948
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
33949
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
33950
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
33951
|
+
* function the writer uses, so the two cannot drift.
|
|
33952
|
+
*
|
|
33953
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
33954
|
+
* it. Do not add a fourth caller.
|
|
33664
33955
|
*/
|
|
33665
33956
|
var zoneAnalyticsCapability = {
|
|
33666
33957
|
name: "zone-analytics",
|
|
@@ -38060,12 +38351,24 @@ Object.freeze({
|
|
|
38060
38351
|
addonId: null,
|
|
38061
38352
|
access: "create"
|
|
38062
38353
|
},
|
|
38354
|
+
"nativeObjectDetection.getOptions": {
|
|
38355
|
+
capName: "native-object-detection",
|
|
38356
|
+
capScope: "device",
|
|
38357
|
+
addonId: null,
|
|
38358
|
+
access: "view"
|
|
38359
|
+
},
|
|
38063
38360
|
"nativeObjectDetection.setEnabled": {
|
|
38064
38361
|
capName: "native-object-detection",
|
|
38065
38362
|
capScope: "device",
|
|
38066
38363
|
addonId: null,
|
|
38067
38364
|
access: "create"
|
|
38068
38365
|
},
|
|
38366
|
+
"nativeObjectDetection.setSettings": {
|
|
38367
|
+
capName: "native-object-detection",
|
|
38368
|
+
capScope: "device",
|
|
38369
|
+
addonId: null,
|
|
38370
|
+
access: "create"
|
|
38371
|
+
},
|
|
38069
38372
|
"navigation.getFeatures": {
|
|
38070
38373
|
capName: "navigation",
|
|
38071
38374
|
capScope: "device",
|
|
@@ -38330,6 +38633,12 @@ Object.freeze({
|
|
|
38330
38633
|
addonId: null,
|
|
38331
38634
|
access: "view"
|
|
38332
38635
|
},
|
|
38636
|
+
"notificationRules.getClipRetentionAsks": {
|
|
38637
|
+
capName: "notification-rules",
|
|
38638
|
+
capScope: "system",
|
|
38639
|
+
addonId: null,
|
|
38640
|
+
access: "view"
|
|
38641
|
+
},
|
|
38333
38642
|
"notificationRules.getConditionCatalog": {
|
|
38334
38643
|
capName: "notification-rules",
|
|
38335
38644
|
capScope: "system",
|
|
@@ -38840,6 +39149,12 @@ Object.freeze({
|
|
|
38840
39149
|
addonId: null,
|
|
38841
39150
|
access: "create"
|
|
38842
39151
|
},
|
|
39152
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
39153
|
+
capName: "pipeline-analytics",
|
|
39154
|
+
capScope: "device",
|
|
39155
|
+
addonId: null,
|
|
39156
|
+
access: "view"
|
|
39157
|
+
},
|
|
38843
39158
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
38844
39159
|
capName: "pipeline-analytics",
|
|
38845
39160
|
capScope: "device",
|
|
@@ -39512,6 +39827,12 @@ Object.freeze({
|
|
|
39512
39827
|
addonId: null,
|
|
39513
39828
|
access: "create"
|
|
39514
39829
|
},
|
|
39830
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
39831
|
+
capName: "pipeline-runner",
|
|
39832
|
+
capScope: "system",
|
|
39833
|
+
addonId: null,
|
|
39834
|
+
access: "create"
|
|
39835
|
+
},
|
|
39515
39836
|
"pipelineRunner.runDetailSubtree": {
|
|
39516
39837
|
capName: "pipeline-runner",
|
|
39517
39838
|
capScope: "system",
|
|
@@ -42292,11 +42613,21 @@ Object.freeze({
|
|
|
42292
42613
|
form: "single",
|
|
42293
42614
|
optional: false
|
|
42294
42615
|
}],
|
|
42616
|
+
"nativeObjectDetection.getOptions": [{
|
|
42617
|
+
name: "deviceId",
|
|
42618
|
+
form: "single",
|
|
42619
|
+
optional: false
|
|
42620
|
+
}],
|
|
42295
42621
|
"nativeObjectDetection.setEnabled": [{
|
|
42296
42622
|
name: "deviceId",
|
|
42297
42623
|
form: "single",
|
|
42298
42624
|
optional: false
|
|
42299
42625
|
}],
|
|
42626
|
+
"nativeObjectDetection.setSettings": [{
|
|
42627
|
+
name: "deviceId",
|
|
42628
|
+
form: "single",
|
|
42629
|
+
optional: false
|
|
42630
|
+
}],
|
|
42300
42631
|
"navigation.getFeatures": [{
|
|
42301
42632
|
name: "deviceId",
|
|
42302
42633
|
form: "single",
|
|
@@ -42646,6 +42977,11 @@ Object.freeze({
|
|
|
42646
42977
|
form: "single",
|
|
42647
42978
|
optional: false
|
|
42648
42979
|
}],
|
|
42980
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
42981
|
+
name: "deviceId",
|
|
42982
|
+
form: "single",
|
|
42983
|
+
optional: false
|
|
42984
|
+
}],
|
|
42649
42985
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
42650
42986
|
name: "deviceId",
|
|
42651
42987
|
form: "single",
|
|
@@ -42836,6 +43172,11 @@ Object.freeze({
|
|
|
42836
43172
|
form: "single",
|
|
42837
43173
|
optional: false
|
|
42838
43174
|
}],
|
|
43175
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
43176
|
+
name: "deviceId",
|
|
43177
|
+
form: "single",
|
|
43178
|
+
optional: false
|
|
43179
|
+
}],
|
|
42839
43180
|
"pipelineRunner.runDetailSubtree": [{
|
|
42840
43181
|
name: "deviceId",
|
|
42841
43182
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -5370,7 +5370,7 @@ var ZodIssueCode = {
|
|
|
5370
5370
|
var ZodFirstPartyTypeKind;
|
|
5371
5371
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5372
5372
|
//#endregion
|
|
5373
|
-
//#region ../types/dist/sleep-
|
|
5373
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
5374
5374
|
/**
|
|
5375
5375
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5376
5376
|
* window to float samples (D455).
|
|
@@ -11621,6 +11621,21 @@ var streamSignalsCapability = {
|
|
|
11621
11621
|
mode: "singleton",
|
|
11622
11622
|
deviceTypes: Object.values(DeviceType),
|
|
11623
11623
|
runtimeState: StreamSignalsStatusSchema,
|
|
11624
|
+
/**
|
|
11625
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
11626
|
+
*
|
|
11627
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
11628
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
11629
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
11630
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
11631
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
11632
|
+
* class the camera really detected stayed missing for the life of the row
|
|
11633
|
+
* because the fix could not reach it.
|
|
11634
|
+
*
|
|
11635
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11636
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11637
|
+
*/
|
|
11638
|
+
durability: "session",
|
|
11624
11639
|
methods: {
|
|
11625
11640
|
/**
|
|
11626
11641
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -18252,6 +18267,48 @@ var NcAlarmConfigSchema = object({
|
|
|
18252
18267
|
settings: NcAlarmSettingsSchema,
|
|
18253
18268
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
18254
18269
|
});
|
|
18270
|
+
/**
|
|
18271
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
18272
|
+
*
|
|
18273
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
18274
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
18275
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
18276
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
18277
|
+
* a different thing from never having been told, and only the envelope
|
|
18278
|
+
* (`rulesLoaded`) can tell those apart.
|
|
18279
|
+
*/
|
|
18280
|
+
var NcClipRetentionAskSchema = object({
|
|
18281
|
+
/**
|
|
18282
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
18283
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
18284
|
+
* asking everywhere.
|
|
18285
|
+
*/
|
|
18286
|
+
deviceId: number().int().nonnegative().optional(),
|
|
18287
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
18288
|
+
* needs nothing produces no ask at all. */
|
|
18289
|
+
seconds: number().min(0).max(60),
|
|
18290
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
18291
|
+
* assigned, which is what the cut defaults to. */
|
|
18292
|
+
profile: CamProfileSchema.optional(),
|
|
18293
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
18294
|
+
ruleId: string(),
|
|
18295
|
+
ruleName: string(),
|
|
18296
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
18297
|
+
reason: _enum(["window", "occupancy"])
|
|
18298
|
+
});
|
|
18299
|
+
/**
|
|
18300
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
18301
|
+
*
|
|
18302
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
18303
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
18304
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
18305
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
18306
|
+
* footage this mechanism exists to keep.
|
|
18307
|
+
*/
|
|
18308
|
+
var NcClipRetentionPlanSchema = object({
|
|
18309
|
+
rulesLoaded: boolean(),
|
|
18310
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18311
|
+
});
|
|
18255
18312
|
method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), method(object({ ruleId: string() }), object({ rule: NcRuleSchema.nullable() }), { auth: "admin" }), method(object({ rule: NcRuleInputSchema }), object({ rule: NcRuleSchema }), {
|
|
18256
18313
|
kind: "mutation",
|
|
18257
18314
|
auth: "admin",
|
|
@@ -18272,7 +18329,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18272
18329
|
}), object({ success: literal(true) }), {
|
|
18273
18330
|
kind: "mutation",
|
|
18274
18331
|
auth: "admin"
|
|
18275
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18332
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18276
18333
|
deviceId: number().int(),
|
|
18277
18334
|
muted: boolean()
|
|
18278
18335
|
}), object({ success: literal(true) }), {
|
|
@@ -19457,13 +19514,26 @@ var TrackAudioLabelSchema = object({
|
|
|
19457
19514
|
* - `audio` — an audio event on the camera itself that was anomalous for
|
|
19458
19515
|
* THAT camera, loud, and heard while nothing visual was happening (D62).
|
|
19459
19516
|
*
|
|
19517
|
+
* - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
|
|
19518
|
+
* that frame's pixel space. A real root detector and a SPATIAL one: its
|
|
19519
|
+
* boxes are the same kind of fact `pipeline`'s are, produced by a different
|
|
19520
|
+
* detector.
|
|
19521
|
+
*
|
|
19522
|
+
* `onboard` was missing here while `DetectionSourceSchema` already had it, so
|
|
19523
|
+
* a persisted onboard track failed `safeParse` on read and came back with NO
|
|
19524
|
+
* source at all — which `isSpatialTrack` then admitted by accident, through the
|
|
19525
|
+
* `undefined` arm rather than by anybody's decision, and which `excludeSources`
|
|
19526
|
+
* could not name.
|
|
19527
|
+
*
|
|
19460
19528
|
* The spatial subsystems (tracker association, occupancy count, re-id /
|
|
19461
19529
|
* embedding, resurrection) MUST skip every synthetic source. Test for that
|
|
19462
|
-
* with `isSpatialTrack`, which allow-lists
|
|
19463
|
-
* check silently readmits every source added after it was
|
|
19530
|
+
* with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
|
|
19531
|
+
* `!== 'sensor'` check silently readmits every source added after it was
|
|
19532
|
+
* written.
|
|
19464
19533
|
*/
|
|
19465
19534
|
var TrackSourceSchema = _enum([
|
|
19466
19535
|
"pipeline",
|
|
19536
|
+
"onboard",
|
|
19467
19537
|
"sensor",
|
|
19468
19538
|
"audio"
|
|
19469
19539
|
]);
|
|
@@ -20846,6 +20916,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
20846
20916
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
20847
20917
|
framesMatched: number().int()
|
|
20848
20918
|
})).readonly() });
|
|
20919
|
+
/**
|
|
20920
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
20921
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
20922
|
+
* is an alias of this, not a second list.
|
|
20923
|
+
*/
|
|
20924
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
20925
|
+
"motion",
|
|
20926
|
+
"audio-dbfs",
|
|
20927
|
+
"battery",
|
|
20928
|
+
"occupancy"
|
|
20929
|
+
]);
|
|
20930
|
+
/**
|
|
20931
|
+
* One closed 5-minute bucket of a long-term series.
|
|
20932
|
+
*
|
|
20933
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
20934
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
20935
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
20936
|
+
* different claim from zero and the reason this is a sparse series.
|
|
20937
|
+
*/
|
|
20938
|
+
var LtsBucketSchema = object({
|
|
20939
|
+
scope: string(),
|
|
20940
|
+
bucketStart: number().int(),
|
|
20941
|
+
samples: number().int().nonnegative(),
|
|
20942
|
+
sum: number(),
|
|
20943
|
+
min: number(),
|
|
20944
|
+
max: number()
|
|
20945
|
+
});
|
|
20849
20946
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
20850
20947
|
deviceId: number(),
|
|
20851
20948
|
trackId: string()
|
|
@@ -20892,6 +20989,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20892
20989
|
kinds: array(string()).optional(),
|
|
20893
20990
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
20894
20991
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
20992
|
+
deviceId: number(),
|
|
20993
|
+
series: AnalyticsLtsSeriesSchema,
|
|
20994
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
20995
|
+
scope: string().optional(),
|
|
20996
|
+
from: number(),
|
|
20997
|
+
to: number(),
|
|
20998
|
+
limit: number().int().positive().optional()
|
|
20999
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
20895
21000
|
deviceId: number(),
|
|
20896
21001
|
since: number(),
|
|
20897
21002
|
until: number(),
|
|
@@ -21510,6 +21615,40 @@ var MotionSourceEnum = _enum([
|
|
|
21510
21615
|
*/
|
|
21511
21616
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
21512
21617
|
/**
|
|
21618
|
+
* Which root detector a camera runs — EXACTLY ONE.
|
|
21619
|
+
*
|
|
21620
|
+
* Deliberately the SAME vocabulary post-analysis already tags every detection
|
|
21621
|
+
* with (`DetectionSource`) rather than a second spelling of the same two
|
|
21622
|
+
* ideas: the value an operator picks here is the value that comes back on the
|
|
21623
|
+
* track, the overlay and the debug row.
|
|
21624
|
+
*
|
|
21625
|
+
* ## Why one, and why it is still an array
|
|
21626
|
+
*
|
|
21627
|
+
* Two roots on one camera is a capability nobody asked for and the operator has
|
|
21628
|
+
* since ruled out. It was never free: both planes feed the SAME per-device
|
|
21629
|
+
* stationary registry, both can promote the same parked object, and the two
|
|
21630
|
+
* detectors disagree about the same box by construction — which is the
|
|
21631
|
+
* disagreement D505 had to arbitrate. Removing the case removes the arbitration.
|
|
21632
|
+
*
|
|
21633
|
+
* The ARRAY shape survives because the stored settings and the attach payload
|
|
21634
|
+
* already speak it on every camera of every fleet, and a cap input that
|
|
21635
|
+
* suddenly refuses a stored value makes the camera un-attachable — a fail-closed
|
|
21636
|
+
* in the one direction that costs an operator their cameras. So the wire stays
|
|
21637
|
+
* tolerant and the TYPE is exact: a longer list is truncated to its first
|
|
21638
|
+
* element rather than refused, and `max(1)` is what every consumer can then
|
|
21639
|
+
* rely on.
|
|
21640
|
+
*
|
|
21641
|
+
* AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
|
|
21642
|
+
* a camera an operator left with no root detector — and `planDetectionSources`
|
|
21643
|
+
* has always said so: inventing a root for them is how a default acts without
|
|
21644
|
+
* anybody choosing it. Tightening this to `length(1)` broke that, and the
|
|
21645
|
+
* suite caught it.
|
|
21646
|
+
*
|
|
21647
|
+
* Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
|
|
21648
|
+
* `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
|
|
21649
|
+
*/
|
|
21650
|
+
var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
|
|
21651
|
+
/**
|
|
21513
21652
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
21514
21653
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
21515
21654
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -21660,6 +21799,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
21660
21799
|
* events; the orchestrator forwards to `reportMotion`.
|
|
21661
21800
|
*/
|
|
21662
21801
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
21802
|
+
/**
|
|
21803
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
21804
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
21805
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
21806
|
+
*
|
|
21807
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
21808
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
21809
|
+
* here. Its boxes reach post-analysis on the same
|
|
21810
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
21811
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
21812
|
+
* subtree (face / plate / embedding).
|
|
21813
|
+
*
|
|
21814
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
21815
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
21816
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
21817
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
21818
|
+
*
|
|
21819
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
21820
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
21821
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
21822
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
21823
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
21824
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
21825
|
+
*
|
|
21826
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
21827
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
21828
|
+
* default.
|
|
21829
|
+
*/
|
|
21830
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
21663
21831
|
pipelineEnabled: boolean().default(true),
|
|
21664
21832
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
21665
21833
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -21841,7 +22009,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
21841
22009
|
queueDepth: number(),
|
|
21842
22010
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
21843
22011
|
});
|
|
22012
|
+
/**
|
|
22013
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
22014
|
+
*
|
|
22015
|
+
* One instance per node. Receives camera assignments from
|
|
22016
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
22017
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
22018
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
22019
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
22020
|
+
* the bus.
|
|
22021
|
+
*
|
|
22022
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
22023
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
22024
|
+
* makes assignment decisions itself.
|
|
22025
|
+
*/
|
|
22026
|
+
/**
|
|
22027
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
22028
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
22029
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
22030
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
22031
|
+
*/
|
|
22032
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
22033
|
+
"not-attached",
|
|
22034
|
+
"battery-asleep",
|
|
22035
|
+
"not-watching",
|
|
22036
|
+
"already-bursting"
|
|
22037
|
+
]);
|
|
21844
22038
|
method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly()), method(object({
|
|
22039
|
+
deviceId: number(),
|
|
22040
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
22041
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
22042
|
+
frames: number().int().positive().optional(),
|
|
22043
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
22044
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
22045
|
+
reason: string()
|
|
22046
|
+
}), object({
|
|
22047
|
+
started: boolean(),
|
|
22048
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
22049
|
+
}), {
|
|
22050
|
+
auth: "admin",
|
|
22051
|
+
kind: "mutation"
|
|
22052
|
+
}), method(object({
|
|
21845
22053
|
handle: FrameHandleSchema,
|
|
21846
22054
|
bbox: NativeCropBboxSchema,
|
|
21847
22055
|
maxWidth: number().int().positive().optional(),
|
|
@@ -28671,11 +28879,46 @@ var NativeObjectDetectionStatusSchema = object({
|
|
|
28671
28879
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28672
28880
|
/**
|
|
28673
28881
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
28674
|
-
*
|
|
28675
|
-
*
|
|
28882
|
+
*
|
|
28883
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
28884
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
28885
|
+
* other detection choice is made. `geometry` on
|
|
28886
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
28887
|
+
* choice would buy this particular camera.
|
|
28676
28888
|
*/
|
|
28677
28889
|
enabled: boolean()
|
|
28678
28890
|
});
|
|
28891
|
+
/**
|
|
28892
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
28893
|
+
*
|
|
28894
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
28895
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
28896
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
28897
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
28898
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
28899
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
28900
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
28901
|
+
* something is in front of it, and its stream is already being pulled.
|
|
28902
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
28903
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
28904
|
+
* tracker as motion and no further.
|
|
28905
|
+
*
|
|
28906
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
28907
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
28908
|
+
* derived form is only as honest as `getOptions`).
|
|
28909
|
+
*/
|
|
28910
|
+
var NativeObjectGeometryEnum = _enum([
|
|
28911
|
+
"boxed",
|
|
28912
|
+
"while-streaming",
|
|
28913
|
+
"flag-only"
|
|
28914
|
+
]);
|
|
28915
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
28916
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
28917
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28918
|
+
/** What a detection from this camera carries. */
|
|
28919
|
+
geometry: NativeObjectGeometryEnum
|
|
28920
|
+
});
|
|
28921
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
28679
28922
|
var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
|
|
28680
28923
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
28681
28924
|
lastFetchedAt: number() });
|
|
@@ -28685,13 +28928,23 @@ var nativeObjectDetectionCapability = {
|
|
|
28685
28928
|
deviceNative: true,
|
|
28686
28929
|
mode: "singleton",
|
|
28687
28930
|
deviceTypes: [DeviceType.Camera],
|
|
28688
|
-
methods: {
|
|
28689
|
-
deviceId: number(),
|
|
28690
|
-
|
|
28691
|
-
|
|
28692
|
-
|
|
28693
|
-
|
|
28694
|
-
|
|
28931
|
+
methods: {
|
|
28932
|
+
getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
|
|
28933
|
+
setSettings: method(object({
|
|
28934
|
+
deviceId: number(),
|
|
28935
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
28936
|
+
}), _void(), {
|
|
28937
|
+
kind: "mutation",
|
|
28938
|
+
auth: "admin"
|
|
28939
|
+
}),
|
|
28940
|
+
setEnabled: method(object({
|
|
28941
|
+
deviceId: number(),
|
|
28942
|
+
enabled: boolean()
|
|
28943
|
+
}), _void(), {
|
|
28944
|
+
kind: "mutation",
|
|
28945
|
+
auth: "admin"
|
|
28946
|
+
})
|
|
28947
|
+
},
|
|
28695
28948
|
events: { onDetected: { data: object({
|
|
28696
28949
|
deviceId: number(),
|
|
28697
28950
|
detection: NativeDetectionSchema
|
|
@@ -33539,7 +33792,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
33539
33792
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
33540
33793
|
totalObjects: number().int().nonnegative(),
|
|
33541
33794
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
33542
|
-
byClass: record(string(), number().int().nonnegative())
|
|
33795
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
33796
|
+
/**
|
|
33797
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
33798
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
33799
|
+
*
|
|
33800
|
+
* The operator's question about a scene has two halves and they answer
|
|
33801
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
33802
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
33803
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
33804
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
33805
|
+
*
|
|
33806
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
33807
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
33808
|
+
*
|
|
33809
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
33810
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
33811
|
+
* parked objects here" about a camera whose lot is full.
|
|
33812
|
+
*/
|
|
33813
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
33814
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
33815
|
+
* same absence rule. */
|
|
33816
|
+
transientObjects: number().int().nonnegative().optional()
|
|
33543
33817
|
});
|
|
33544
33818
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
33545
33819
|
zoneId: string(),
|
|
@@ -33662,6 +33936,23 @@ var HistoryPointSchema = object({
|
|
|
33662
33936
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
33663
33937
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
33664
33938
|
* combinatorial coverage the operator UI requested.
|
|
33939
|
+
*
|
|
33940
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
33941
|
+
*
|
|
33942
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
33943
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
33944
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
33945
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
33946
|
+
* horizon rather than to answer a question.
|
|
33947
|
+
*
|
|
33948
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
33949
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
33950
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
33951
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
33952
|
+
* function the writer uses, so the two cannot drift.
|
|
33953
|
+
*
|
|
33954
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
33955
|
+
* it. Do not add a fourth caller.
|
|
33665
33956
|
*/
|
|
33666
33957
|
var zoneAnalyticsCapability = {
|
|
33667
33958
|
name: "zone-analytics",
|
|
@@ -38061,12 +38352,24 @@ Object.freeze({
|
|
|
38061
38352
|
addonId: null,
|
|
38062
38353
|
access: "create"
|
|
38063
38354
|
},
|
|
38355
|
+
"nativeObjectDetection.getOptions": {
|
|
38356
|
+
capName: "native-object-detection",
|
|
38357
|
+
capScope: "device",
|
|
38358
|
+
addonId: null,
|
|
38359
|
+
access: "view"
|
|
38360
|
+
},
|
|
38064
38361
|
"nativeObjectDetection.setEnabled": {
|
|
38065
38362
|
capName: "native-object-detection",
|
|
38066
38363
|
capScope: "device",
|
|
38067
38364
|
addonId: null,
|
|
38068
38365
|
access: "create"
|
|
38069
38366
|
},
|
|
38367
|
+
"nativeObjectDetection.setSettings": {
|
|
38368
|
+
capName: "native-object-detection",
|
|
38369
|
+
capScope: "device",
|
|
38370
|
+
addonId: null,
|
|
38371
|
+
access: "create"
|
|
38372
|
+
},
|
|
38070
38373
|
"navigation.getFeatures": {
|
|
38071
38374
|
capName: "navigation",
|
|
38072
38375
|
capScope: "device",
|
|
@@ -38331,6 +38634,12 @@ Object.freeze({
|
|
|
38331
38634
|
addonId: null,
|
|
38332
38635
|
access: "view"
|
|
38333
38636
|
},
|
|
38637
|
+
"notificationRules.getClipRetentionAsks": {
|
|
38638
|
+
capName: "notification-rules",
|
|
38639
|
+
capScope: "system",
|
|
38640
|
+
addonId: null,
|
|
38641
|
+
access: "view"
|
|
38642
|
+
},
|
|
38334
38643
|
"notificationRules.getConditionCatalog": {
|
|
38335
38644
|
capName: "notification-rules",
|
|
38336
38645
|
capScope: "system",
|
|
@@ -38841,6 +39150,12 @@ Object.freeze({
|
|
|
38841
39150
|
addonId: null,
|
|
38842
39151
|
access: "create"
|
|
38843
39152
|
},
|
|
39153
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
39154
|
+
capName: "pipeline-analytics",
|
|
39155
|
+
capScope: "device",
|
|
39156
|
+
addonId: null,
|
|
39157
|
+
access: "view"
|
|
39158
|
+
},
|
|
38844
39159
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
38845
39160
|
capName: "pipeline-analytics",
|
|
38846
39161
|
capScope: "device",
|
|
@@ -39513,6 +39828,12 @@ Object.freeze({
|
|
|
39513
39828
|
addonId: null,
|
|
39514
39829
|
access: "create"
|
|
39515
39830
|
},
|
|
39831
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
39832
|
+
capName: "pipeline-runner",
|
|
39833
|
+
capScope: "system",
|
|
39834
|
+
addonId: null,
|
|
39835
|
+
access: "create"
|
|
39836
|
+
},
|
|
39516
39837
|
"pipelineRunner.runDetailSubtree": {
|
|
39517
39838
|
capName: "pipeline-runner",
|
|
39518
39839
|
capScope: "system",
|
|
@@ -42293,11 +42614,21 @@ Object.freeze({
|
|
|
42293
42614
|
form: "single",
|
|
42294
42615
|
optional: false
|
|
42295
42616
|
}],
|
|
42617
|
+
"nativeObjectDetection.getOptions": [{
|
|
42618
|
+
name: "deviceId",
|
|
42619
|
+
form: "single",
|
|
42620
|
+
optional: false
|
|
42621
|
+
}],
|
|
42296
42622
|
"nativeObjectDetection.setEnabled": [{
|
|
42297
42623
|
name: "deviceId",
|
|
42298
42624
|
form: "single",
|
|
42299
42625
|
optional: false
|
|
42300
42626
|
}],
|
|
42627
|
+
"nativeObjectDetection.setSettings": [{
|
|
42628
|
+
name: "deviceId",
|
|
42629
|
+
form: "single",
|
|
42630
|
+
optional: false
|
|
42631
|
+
}],
|
|
42301
42632
|
"navigation.getFeatures": [{
|
|
42302
42633
|
name: "deviceId",
|
|
42303
42634
|
form: "single",
|
|
@@ -42647,6 +42978,11 @@ Object.freeze({
|
|
|
42647
42978
|
form: "single",
|
|
42648
42979
|
optional: false
|
|
42649
42980
|
}],
|
|
42981
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
42982
|
+
name: "deviceId",
|
|
42983
|
+
form: "single",
|
|
42984
|
+
optional: false
|
|
42985
|
+
}],
|
|
42650
42986
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
42651
42987
|
name: "deviceId",
|
|
42652
42988
|
form: "single",
|
|
@@ -42837,6 +43173,11 @@ Object.freeze({
|
|
|
42837
43173
|
form: "single",
|
|
42838
43174
|
optional: false
|
|
42839
43175
|
}],
|
|
43176
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
43177
|
+
name: "deviceId",
|
|
43178
|
+
form: "single",
|
|
43179
|
+
optional: false
|
|
43180
|
+
}],
|
|
42840
43181
|
"pipelineRunner.runDetailSubtree": [{
|
|
42841
43182
|
name: "deviceId",
|
|
42842
43183
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-homematic",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.105",
|
|
4
4
|
"description": "Homematic / HomematicIP (CCU3 / RaspberryMatic) device-provider addon for CamStack — wraps the nodehomematic library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"dev": "vite build --watch",
|
|
69
69
|
"typecheck": "tsc --noEmit",
|
|
70
70
|
"test": "vitest run",
|
|
71
|
-
"publish": "npm publish --access public"
|
|
71
|
+
"publish:npm": "npm publish --access public"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"nodehomematic": "^0.4.1"
|