@camstack/addon-provider-velux 0.2.102 → 0.2.103
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 +314 -12
- package/dist/addon.mjs +314 -12
- package/package.json +2 -2
package/dist/addon.js
CHANGED
|
@@ -5360,7 +5360,7 @@ var ZodIssueCode = {
|
|
|
5360
5360
|
var ZodFirstPartyTypeKind;
|
|
5361
5361
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5362
5362
|
//#endregion
|
|
5363
|
-
//#region ../types/dist/sleep-
|
|
5363
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
5364
5364
|
/**
|
|
5365
5365
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5366
5366
|
* window to float samples (D455).
|
|
@@ -11562,6 +11562,21 @@ var streamSignalsCapability = {
|
|
|
11562
11562
|
mode: "singleton",
|
|
11563
11563
|
deviceTypes: Object.values(DeviceType),
|
|
11564
11564
|
runtimeState: StreamSignalsStatusSchema,
|
|
11565
|
+
/**
|
|
11566
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
11567
|
+
*
|
|
11568
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
11569
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
11570
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
11571
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
11572
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
11573
|
+
* class the camera really detected stayed missing for the life of the row
|
|
11574
|
+
* because the fix could not reach it.
|
|
11575
|
+
*
|
|
11576
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11577
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11578
|
+
*/
|
|
11579
|
+
durability: "session",
|
|
11565
11580
|
methods: {
|
|
11566
11581
|
/**
|
|
11567
11582
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -18176,6 +18191,48 @@ var NcAlarmConfigSchema = object({
|
|
|
18176
18191
|
settings: NcAlarmSettingsSchema,
|
|
18177
18192
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
18178
18193
|
});
|
|
18194
|
+
/**
|
|
18195
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
18196
|
+
*
|
|
18197
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
18198
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
18199
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
18200
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
18201
|
+
* a different thing from never having been told, and only the envelope
|
|
18202
|
+
* (`rulesLoaded`) can tell those apart.
|
|
18203
|
+
*/
|
|
18204
|
+
var NcClipRetentionAskSchema = object({
|
|
18205
|
+
/**
|
|
18206
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
18207
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
18208
|
+
* asking everywhere.
|
|
18209
|
+
*/
|
|
18210
|
+
deviceId: number().int().nonnegative().optional(),
|
|
18211
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
18212
|
+
* needs nothing produces no ask at all. */
|
|
18213
|
+
seconds: number().min(0).max(60),
|
|
18214
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
18215
|
+
* assigned, which is what the cut defaults to. */
|
|
18216
|
+
profile: CamProfileSchema.optional(),
|
|
18217
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
18218
|
+
ruleId: string(),
|
|
18219
|
+
ruleName: string(),
|
|
18220
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
18221
|
+
reason: _enum(["window", "occupancy"])
|
|
18222
|
+
});
|
|
18223
|
+
/**
|
|
18224
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
18225
|
+
*
|
|
18226
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
18227
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
18228
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
18229
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
18230
|
+
* footage this mechanism exists to keep.
|
|
18231
|
+
*/
|
|
18232
|
+
var NcClipRetentionPlanSchema = object({
|
|
18233
|
+
rulesLoaded: boolean(),
|
|
18234
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18235
|
+
});
|
|
18179
18236
|
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 }), {
|
|
18180
18237
|
kind: "mutation",
|
|
18181
18238
|
auth: "admin",
|
|
@@ -18196,7 +18253,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18196
18253
|
}), object({ success: literal(true) }), {
|
|
18197
18254
|
kind: "mutation",
|
|
18198
18255
|
auth: "admin"
|
|
18199
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18256
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18200
18257
|
deviceId: number().int(),
|
|
18201
18258
|
muted: boolean()
|
|
18202
18259
|
}), object({ success: literal(true) }), {
|
|
@@ -20770,6 +20827,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
20770
20827
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
20771
20828
|
framesMatched: number().int()
|
|
20772
20829
|
})).readonly() });
|
|
20830
|
+
/**
|
|
20831
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
20832
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
20833
|
+
* is an alias of this, not a second list.
|
|
20834
|
+
*/
|
|
20835
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
20836
|
+
"motion",
|
|
20837
|
+
"audio-dbfs",
|
|
20838
|
+
"battery",
|
|
20839
|
+
"occupancy"
|
|
20840
|
+
]);
|
|
20841
|
+
/**
|
|
20842
|
+
* One closed 5-minute bucket of a long-term series.
|
|
20843
|
+
*
|
|
20844
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
20845
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
20846
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
20847
|
+
* different claim from zero and the reason this is a sparse series.
|
|
20848
|
+
*/
|
|
20849
|
+
var LtsBucketSchema = object({
|
|
20850
|
+
scope: string(),
|
|
20851
|
+
bucketStart: number().int(),
|
|
20852
|
+
samples: number().int().nonnegative(),
|
|
20853
|
+
sum: number(),
|
|
20854
|
+
min: number(),
|
|
20855
|
+
max: number()
|
|
20856
|
+
});
|
|
20773
20857
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
20774
20858
|
deviceId: number(),
|
|
20775
20859
|
trackId: string()
|
|
@@ -20816,6 +20900,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20816
20900
|
kinds: array(string()).optional(),
|
|
20817
20901
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
20818
20902
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
20903
|
+
deviceId: number(),
|
|
20904
|
+
series: AnalyticsLtsSeriesSchema,
|
|
20905
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
20906
|
+
scope: string().optional(),
|
|
20907
|
+
from: number(),
|
|
20908
|
+
to: number(),
|
|
20909
|
+
limit: number().int().positive().optional()
|
|
20910
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
20819
20911
|
deviceId: number(),
|
|
20820
20912
|
since: number(),
|
|
20821
20913
|
until: number(),
|
|
@@ -21434,6 +21526,14 @@ var MotionSourceEnum = _enum([
|
|
|
21434
21526
|
*/
|
|
21435
21527
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
21436
21528
|
/**
|
|
21529
|
+
* Which root detectors a camera runs. Deliberately the SAME vocabulary
|
|
21530
|
+
* post-analysis already tags every detection with (`DetectionSource`) rather
|
|
21531
|
+
* than a second spelling of the same two ideas — the value an operator picks
|
|
21532
|
+
* here is the value that comes back on the track, the overlay and the debug
|
|
21533
|
+
* row.
|
|
21534
|
+
*/
|
|
21535
|
+
var DetectionSourcesSchema = array(DetectionSourceSchema);
|
|
21536
|
+
/**
|
|
21437
21537
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
21438
21538
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
21439
21539
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -21584,6 +21684,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
21584
21684
|
* events; the orchestrator forwards to `reportMotion`.
|
|
21585
21685
|
*/
|
|
21586
21686
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
21687
|
+
/**
|
|
21688
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
21689
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
21690
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
21691
|
+
*
|
|
21692
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
21693
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
21694
|
+
* here. Its boxes reach post-analysis on the same
|
|
21695
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
21696
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
21697
|
+
* subtree (face / plate / embedding).
|
|
21698
|
+
*
|
|
21699
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
21700
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
21701
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
21702
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
21703
|
+
*
|
|
21704
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
21705
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
21706
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
21707
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
21708
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
21709
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
21710
|
+
*
|
|
21711
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
21712
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
21713
|
+
* default.
|
|
21714
|
+
*/
|
|
21715
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
21587
21716
|
pipelineEnabled: boolean().default(true),
|
|
21588
21717
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
21589
21718
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -21765,7 +21894,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
21765
21894
|
queueDepth: number(),
|
|
21766
21895
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
21767
21896
|
});
|
|
21897
|
+
/**
|
|
21898
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
21899
|
+
*
|
|
21900
|
+
* One instance per node. Receives camera assignments from
|
|
21901
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
21902
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
21903
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
21904
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
21905
|
+
* the bus.
|
|
21906
|
+
*
|
|
21907
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
21908
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
21909
|
+
* makes assignment decisions itself.
|
|
21910
|
+
*/
|
|
21911
|
+
/**
|
|
21912
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
21913
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
21914
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
21915
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
21916
|
+
*/
|
|
21917
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
21918
|
+
"not-attached",
|
|
21919
|
+
"battery-asleep",
|
|
21920
|
+
"not-watching",
|
|
21921
|
+
"already-bursting"
|
|
21922
|
+
]);
|
|
21768
21923
|
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({
|
|
21924
|
+
deviceId: number(),
|
|
21925
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
21926
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
21927
|
+
frames: number().int().positive().optional(),
|
|
21928
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
21929
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
21930
|
+
reason: string()
|
|
21931
|
+
}), object({
|
|
21932
|
+
started: boolean(),
|
|
21933
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
21934
|
+
}), {
|
|
21935
|
+
auth: "admin",
|
|
21936
|
+
kind: "mutation"
|
|
21937
|
+
}), method(object({
|
|
21769
21938
|
handle: FrameHandleSchema,
|
|
21770
21939
|
bbox: NativeCropBboxSchema,
|
|
21771
21940
|
maxWidth: number().int().positive().optional(),
|
|
@@ -28595,11 +28764,46 @@ var NativeObjectDetectionStatusSchema = object({
|
|
|
28595
28764
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28596
28765
|
/**
|
|
28597
28766
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
28598
|
-
*
|
|
28599
|
-
*
|
|
28767
|
+
*
|
|
28768
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
28769
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
28770
|
+
* other detection choice is made. `geometry` on
|
|
28771
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
28772
|
+
* choice would buy this particular camera.
|
|
28600
28773
|
*/
|
|
28601
28774
|
enabled: boolean()
|
|
28602
28775
|
});
|
|
28776
|
+
/**
|
|
28777
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
28778
|
+
*
|
|
28779
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
28780
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
28781
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
28782
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
28783
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
28784
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
28785
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
28786
|
+
* something is in front of it, and its stream is already being pulled.
|
|
28787
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
28788
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
28789
|
+
* tracker as motion and no further.
|
|
28790
|
+
*
|
|
28791
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
28792
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
28793
|
+
* derived form is only as honest as `getOptions`).
|
|
28794
|
+
*/
|
|
28795
|
+
var NativeObjectGeometryEnum = _enum([
|
|
28796
|
+
"boxed",
|
|
28797
|
+
"while-streaming",
|
|
28798
|
+
"flag-only"
|
|
28799
|
+
]);
|
|
28800
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
28801
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
28802
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28803
|
+
/** What a detection from this camera carries. */
|
|
28804
|
+
geometry: NativeObjectGeometryEnum
|
|
28805
|
+
});
|
|
28806
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
28603
28807
|
var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
|
|
28604
28808
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
28605
28809
|
lastFetchedAt: number() });
|
|
@@ -28609,13 +28813,23 @@ var nativeObjectDetectionCapability = {
|
|
|
28609
28813
|
deviceNative: true,
|
|
28610
28814
|
mode: "singleton",
|
|
28611
28815
|
deviceTypes: [DeviceType.Camera],
|
|
28612
|
-
methods: {
|
|
28613
|
-
deviceId: number(),
|
|
28614
|
-
|
|
28615
|
-
|
|
28616
|
-
|
|
28617
|
-
|
|
28618
|
-
|
|
28816
|
+
methods: {
|
|
28817
|
+
getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
|
|
28818
|
+
setSettings: method(object({
|
|
28819
|
+
deviceId: number(),
|
|
28820
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
28821
|
+
}), _void(), {
|
|
28822
|
+
kind: "mutation",
|
|
28823
|
+
auth: "admin"
|
|
28824
|
+
}),
|
|
28825
|
+
setEnabled: method(object({
|
|
28826
|
+
deviceId: number(),
|
|
28827
|
+
enabled: boolean()
|
|
28828
|
+
}), _void(), {
|
|
28829
|
+
kind: "mutation",
|
|
28830
|
+
auth: "admin"
|
|
28831
|
+
})
|
|
28832
|
+
},
|
|
28619
28833
|
events: { onDetected: { data: object({
|
|
28620
28834
|
deviceId: number(),
|
|
28621
28835
|
detection: NativeDetectionSchema
|
|
@@ -33463,7 +33677,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
33463
33677
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
33464
33678
|
totalObjects: number().int().nonnegative(),
|
|
33465
33679
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
33466
|
-
byClass: record(string(), number().int().nonnegative())
|
|
33680
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
33681
|
+
/**
|
|
33682
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
33683
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
33684
|
+
*
|
|
33685
|
+
* The operator's question about a scene has two halves and they answer
|
|
33686
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
33687
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
33688
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
33689
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
33690
|
+
*
|
|
33691
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
33692
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
33693
|
+
*
|
|
33694
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
33695
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
33696
|
+
* parked objects here" about a camera whose lot is full.
|
|
33697
|
+
*/
|
|
33698
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
33699
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
33700
|
+
* same absence rule. */
|
|
33701
|
+
transientObjects: number().int().nonnegative().optional()
|
|
33467
33702
|
});
|
|
33468
33703
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
33469
33704
|
zoneId: string(),
|
|
@@ -33586,6 +33821,23 @@ var HistoryPointSchema = object({
|
|
|
33586
33821
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
33587
33822
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
33588
33823
|
* combinatorial coverage the operator UI requested.
|
|
33824
|
+
*
|
|
33825
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
33826
|
+
*
|
|
33827
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
33828
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
33829
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
33830
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
33831
|
+
* horizon rather than to answer a question.
|
|
33832
|
+
*
|
|
33833
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
33834
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
33835
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
33836
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
33837
|
+
* function the writer uses, so the two cannot drift.
|
|
33838
|
+
*
|
|
33839
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
33840
|
+
* it. Do not add a fourth caller.
|
|
33589
33841
|
*/
|
|
33590
33842
|
var zoneAnalyticsCapability = {
|
|
33591
33843
|
name: "zone-analytics",
|
|
@@ -37985,12 +38237,24 @@ Object.freeze({
|
|
|
37985
38237
|
addonId: null,
|
|
37986
38238
|
access: "create"
|
|
37987
38239
|
},
|
|
38240
|
+
"nativeObjectDetection.getOptions": {
|
|
38241
|
+
capName: "native-object-detection",
|
|
38242
|
+
capScope: "device",
|
|
38243
|
+
addonId: null,
|
|
38244
|
+
access: "view"
|
|
38245
|
+
},
|
|
37988
38246
|
"nativeObjectDetection.setEnabled": {
|
|
37989
38247
|
capName: "native-object-detection",
|
|
37990
38248
|
capScope: "device",
|
|
37991
38249
|
addonId: null,
|
|
37992
38250
|
access: "create"
|
|
37993
38251
|
},
|
|
38252
|
+
"nativeObjectDetection.setSettings": {
|
|
38253
|
+
capName: "native-object-detection",
|
|
38254
|
+
capScope: "device",
|
|
38255
|
+
addonId: null,
|
|
38256
|
+
access: "create"
|
|
38257
|
+
},
|
|
37994
38258
|
"navigation.getFeatures": {
|
|
37995
38259
|
capName: "navigation",
|
|
37996
38260
|
capScope: "device",
|
|
@@ -38255,6 +38519,12 @@ Object.freeze({
|
|
|
38255
38519
|
addonId: null,
|
|
38256
38520
|
access: "view"
|
|
38257
38521
|
},
|
|
38522
|
+
"notificationRules.getClipRetentionAsks": {
|
|
38523
|
+
capName: "notification-rules",
|
|
38524
|
+
capScope: "system",
|
|
38525
|
+
addonId: null,
|
|
38526
|
+
access: "view"
|
|
38527
|
+
},
|
|
38258
38528
|
"notificationRules.getConditionCatalog": {
|
|
38259
38529
|
capName: "notification-rules",
|
|
38260
38530
|
capScope: "system",
|
|
@@ -38765,6 +39035,12 @@ Object.freeze({
|
|
|
38765
39035
|
addonId: null,
|
|
38766
39036
|
access: "create"
|
|
38767
39037
|
},
|
|
39038
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
39039
|
+
capName: "pipeline-analytics",
|
|
39040
|
+
capScope: "device",
|
|
39041
|
+
addonId: null,
|
|
39042
|
+
access: "view"
|
|
39043
|
+
},
|
|
38768
39044
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
38769
39045
|
capName: "pipeline-analytics",
|
|
38770
39046
|
capScope: "device",
|
|
@@ -39437,6 +39713,12 @@ Object.freeze({
|
|
|
39437
39713
|
addonId: null,
|
|
39438
39714
|
access: "create"
|
|
39439
39715
|
},
|
|
39716
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
39717
|
+
capName: "pipeline-runner",
|
|
39718
|
+
capScope: "system",
|
|
39719
|
+
addonId: null,
|
|
39720
|
+
access: "create"
|
|
39721
|
+
},
|
|
39440
39722
|
"pipelineRunner.runDetailSubtree": {
|
|
39441
39723
|
capName: "pipeline-runner",
|
|
39442
39724
|
capScope: "system",
|
|
@@ -42217,11 +42499,21 @@ Object.freeze({
|
|
|
42217
42499
|
form: "single",
|
|
42218
42500
|
optional: false
|
|
42219
42501
|
}],
|
|
42502
|
+
"nativeObjectDetection.getOptions": [{
|
|
42503
|
+
name: "deviceId",
|
|
42504
|
+
form: "single",
|
|
42505
|
+
optional: false
|
|
42506
|
+
}],
|
|
42220
42507
|
"nativeObjectDetection.setEnabled": [{
|
|
42221
42508
|
name: "deviceId",
|
|
42222
42509
|
form: "single",
|
|
42223
42510
|
optional: false
|
|
42224
42511
|
}],
|
|
42512
|
+
"nativeObjectDetection.setSettings": [{
|
|
42513
|
+
name: "deviceId",
|
|
42514
|
+
form: "single",
|
|
42515
|
+
optional: false
|
|
42516
|
+
}],
|
|
42225
42517
|
"navigation.getFeatures": [{
|
|
42226
42518
|
name: "deviceId",
|
|
42227
42519
|
form: "single",
|
|
@@ -42571,6 +42863,11 @@ Object.freeze({
|
|
|
42571
42863
|
form: "single",
|
|
42572
42864
|
optional: false
|
|
42573
42865
|
}],
|
|
42866
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
42867
|
+
name: "deviceId",
|
|
42868
|
+
form: "single",
|
|
42869
|
+
optional: false
|
|
42870
|
+
}],
|
|
42574
42871
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
42575
42872
|
name: "deviceId",
|
|
42576
42873
|
form: "single",
|
|
@@ -42761,6 +43058,11 @@ Object.freeze({
|
|
|
42761
43058
|
form: "single",
|
|
42762
43059
|
optional: false
|
|
42763
43060
|
}],
|
|
43061
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
43062
|
+
name: "deviceId",
|
|
43063
|
+
form: "single",
|
|
43064
|
+
optional: false
|
|
43065
|
+
}],
|
|
42764
43066
|
"pipelineRunner.runDetailSubtree": [{
|
|
42765
43067
|
name: "deviceId",
|
|
42766
43068
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -5359,7 +5359,7 @@ var ZodIssueCode = {
|
|
|
5359
5359
|
var ZodFirstPartyTypeKind;
|
|
5360
5360
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5361
5361
|
//#endregion
|
|
5362
|
-
//#region ../types/dist/sleep-
|
|
5362
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
5363
5363
|
/**
|
|
5364
5364
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5365
5365
|
* window to float samples (D455).
|
|
@@ -11561,6 +11561,21 @@ var streamSignalsCapability = {
|
|
|
11561
11561
|
mode: "singleton",
|
|
11562
11562
|
deviceTypes: Object.values(DeviceType),
|
|
11563
11563
|
runtimeState: StreamSignalsStatusSchema,
|
|
11564
|
+
/**
|
|
11565
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
11566
|
+
*
|
|
11567
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
11568
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
11569
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
11570
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
11571
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
11572
|
+
* class the camera really detected stayed missing for the life of the row
|
|
11573
|
+
* because the fix could not reach it.
|
|
11574
|
+
*
|
|
11575
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11576
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11577
|
+
*/
|
|
11578
|
+
durability: "session",
|
|
11564
11579
|
methods: {
|
|
11565
11580
|
/**
|
|
11566
11581
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -18175,6 +18190,48 @@ var NcAlarmConfigSchema = object({
|
|
|
18175
18190
|
settings: NcAlarmSettingsSchema,
|
|
18176
18191
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
18177
18192
|
});
|
|
18193
|
+
/**
|
|
18194
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
18195
|
+
*
|
|
18196
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
18197
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
18198
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
18199
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
18200
|
+
* a different thing from never having been told, and only the envelope
|
|
18201
|
+
* (`rulesLoaded`) can tell those apart.
|
|
18202
|
+
*/
|
|
18203
|
+
var NcClipRetentionAskSchema = object({
|
|
18204
|
+
/**
|
|
18205
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
18206
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
18207
|
+
* asking everywhere.
|
|
18208
|
+
*/
|
|
18209
|
+
deviceId: number().int().nonnegative().optional(),
|
|
18210
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
18211
|
+
* needs nothing produces no ask at all. */
|
|
18212
|
+
seconds: number().min(0).max(60),
|
|
18213
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
18214
|
+
* assigned, which is what the cut defaults to. */
|
|
18215
|
+
profile: CamProfileSchema.optional(),
|
|
18216
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
18217
|
+
ruleId: string(),
|
|
18218
|
+
ruleName: string(),
|
|
18219
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
18220
|
+
reason: _enum(["window", "occupancy"])
|
|
18221
|
+
});
|
|
18222
|
+
/**
|
|
18223
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
18224
|
+
*
|
|
18225
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
18226
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
18227
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
18228
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
18229
|
+
* footage this mechanism exists to keep.
|
|
18230
|
+
*/
|
|
18231
|
+
var NcClipRetentionPlanSchema = object({
|
|
18232
|
+
rulesLoaded: boolean(),
|
|
18233
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18234
|
+
});
|
|
18178
18235
|
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 }), {
|
|
18179
18236
|
kind: "mutation",
|
|
18180
18237
|
auth: "admin",
|
|
@@ -18195,7 +18252,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18195
18252
|
}), object({ success: literal(true) }), {
|
|
18196
18253
|
kind: "mutation",
|
|
18197
18254
|
auth: "admin"
|
|
18198
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18255
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18199
18256
|
deviceId: number().int(),
|
|
18200
18257
|
muted: boolean()
|
|
18201
18258
|
}), object({ success: literal(true) }), {
|
|
@@ -20769,6 +20826,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
20769
20826
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
20770
20827
|
framesMatched: number().int()
|
|
20771
20828
|
})).readonly() });
|
|
20829
|
+
/**
|
|
20830
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
20831
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
20832
|
+
* is an alias of this, not a second list.
|
|
20833
|
+
*/
|
|
20834
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
20835
|
+
"motion",
|
|
20836
|
+
"audio-dbfs",
|
|
20837
|
+
"battery",
|
|
20838
|
+
"occupancy"
|
|
20839
|
+
]);
|
|
20840
|
+
/**
|
|
20841
|
+
* One closed 5-minute bucket of a long-term series.
|
|
20842
|
+
*
|
|
20843
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
20844
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
20845
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
20846
|
+
* different claim from zero and the reason this is a sparse series.
|
|
20847
|
+
*/
|
|
20848
|
+
var LtsBucketSchema = object({
|
|
20849
|
+
scope: string(),
|
|
20850
|
+
bucketStart: number().int(),
|
|
20851
|
+
samples: number().int().nonnegative(),
|
|
20852
|
+
sum: number(),
|
|
20853
|
+
min: number(),
|
|
20854
|
+
max: number()
|
|
20855
|
+
});
|
|
20772
20856
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
20773
20857
|
deviceId: number(),
|
|
20774
20858
|
trackId: string()
|
|
@@ -20815,6 +20899,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20815
20899
|
kinds: array(string()).optional(),
|
|
20816
20900
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
20817
20901
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
20902
|
+
deviceId: number(),
|
|
20903
|
+
series: AnalyticsLtsSeriesSchema,
|
|
20904
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
20905
|
+
scope: string().optional(),
|
|
20906
|
+
from: number(),
|
|
20907
|
+
to: number(),
|
|
20908
|
+
limit: number().int().positive().optional()
|
|
20909
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
20818
20910
|
deviceId: number(),
|
|
20819
20911
|
since: number(),
|
|
20820
20912
|
until: number(),
|
|
@@ -21433,6 +21525,14 @@ var MotionSourceEnum = _enum([
|
|
|
21433
21525
|
*/
|
|
21434
21526
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
21435
21527
|
/**
|
|
21528
|
+
* Which root detectors a camera runs. Deliberately the SAME vocabulary
|
|
21529
|
+
* post-analysis already tags every detection with (`DetectionSource`) rather
|
|
21530
|
+
* than a second spelling of the same two ideas — the value an operator picks
|
|
21531
|
+
* here is the value that comes back on the track, the overlay and the debug
|
|
21532
|
+
* row.
|
|
21533
|
+
*/
|
|
21534
|
+
var DetectionSourcesSchema = array(DetectionSourceSchema);
|
|
21535
|
+
/**
|
|
21436
21536
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
21437
21537
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
21438
21538
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -21583,6 +21683,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
21583
21683
|
* events; the orchestrator forwards to `reportMotion`.
|
|
21584
21684
|
*/
|
|
21585
21685
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
21686
|
+
/**
|
|
21687
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
21688
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
21689
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
21690
|
+
*
|
|
21691
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
21692
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
21693
|
+
* here. Its boxes reach post-analysis on the same
|
|
21694
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
21695
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
21696
|
+
* subtree (face / plate / embedding).
|
|
21697
|
+
*
|
|
21698
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
21699
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
21700
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
21701
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
21702
|
+
*
|
|
21703
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
21704
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
21705
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
21706
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
21707
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
21708
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
21709
|
+
*
|
|
21710
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
21711
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
21712
|
+
* default.
|
|
21713
|
+
*/
|
|
21714
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
21586
21715
|
pipelineEnabled: boolean().default(true),
|
|
21587
21716
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
21588
21717
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -21764,7 +21893,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
21764
21893
|
queueDepth: number(),
|
|
21765
21894
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
21766
21895
|
});
|
|
21896
|
+
/**
|
|
21897
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
21898
|
+
*
|
|
21899
|
+
* One instance per node. Receives camera assignments from
|
|
21900
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
21901
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
21902
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
21903
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
21904
|
+
* the bus.
|
|
21905
|
+
*
|
|
21906
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
21907
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
21908
|
+
* makes assignment decisions itself.
|
|
21909
|
+
*/
|
|
21910
|
+
/**
|
|
21911
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
21912
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
21913
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
21914
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
21915
|
+
*/
|
|
21916
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
21917
|
+
"not-attached",
|
|
21918
|
+
"battery-asleep",
|
|
21919
|
+
"not-watching",
|
|
21920
|
+
"already-bursting"
|
|
21921
|
+
]);
|
|
21767
21922
|
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({
|
|
21923
|
+
deviceId: number(),
|
|
21924
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
21925
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
21926
|
+
frames: number().int().positive().optional(),
|
|
21927
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
21928
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
21929
|
+
reason: string()
|
|
21930
|
+
}), object({
|
|
21931
|
+
started: boolean(),
|
|
21932
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
21933
|
+
}), {
|
|
21934
|
+
auth: "admin",
|
|
21935
|
+
kind: "mutation"
|
|
21936
|
+
}), method(object({
|
|
21768
21937
|
handle: FrameHandleSchema,
|
|
21769
21938
|
bbox: NativeCropBboxSchema,
|
|
21770
21939
|
maxWidth: number().int().positive().optional(),
|
|
@@ -28594,11 +28763,46 @@ var NativeObjectDetectionStatusSchema = object({
|
|
|
28594
28763
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28595
28764
|
/**
|
|
28596
28765
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
28597
|
-
*
|
|
28598
|
-
*
|
|
28766
|
+
*
|
|
28767
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
28768
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
28769
|
+
* other detection choice is made. `geometry` on
|
|
28770
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
28771
|
+
* choice would buy this particular camera.
|
|
28599
28772
|
*/
|
|
28600
28773
|
enabled: boolean()
|
|
28601
28774
|
});
|
|
28775
|
+
/**
|
|
28776
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
28777
|
+
*
|
|
28778
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
28779
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
28780
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
28781
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
28782
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
28783
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
28784
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
28785
|
+
* something is in front of it, and its stream is already being pulled.
|
|
28786
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
28787
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
28788
|
+
* tracker as motion and no further.
|
|
28789
|
+
*
|
|
28790
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
28791
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
28792
|
+
* derived form is only as honest as `getOptions`).
|
|
28793
|
+
*/
|
|
28794
|
+
var NativeObjectGeometryEnum = _enum([
|
|
28795
|
+
"boxed",
|
|
28796
|
+
"while-streaming",
|
|
28797
|
+
"flag-only"
|
|
28798
|
+
]);
|
|
28799
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
28800
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
28801
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28802
|
+
/** What a detection from this camera carries. */
|
|
28803
|
+
geometry: NativeObjectGeometryEnum
|
|
28804
|
+
});
|
|
28805
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
28602
28806
|
var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
|
|
28603
28807
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
28604
28808
|
lastFetchedAt: number() });
|
|
@@ -28608,13 +28812,23 @@ var nativeObjectDetectionCapability = {
|
|
|
28608
28812
|
deviceNative: true,
|
|
28609
28813
|
mode: "singleton",
|
|
28610
28814
|
deviceTypes: [DeviceType.Camera],
|
|
28611
|
-
methods: {
|
|
28612
|
-
deviceId: number(),
|
|
28613
|
-
|
|
28614
|
-
|
|
28615
|
-
|
|
28616
|
-
|
|
28617
|
-
|
|
28815
|
+
methods: {
|
|
28816
|
+
getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
|
|
28817
|
+
setSettings: method(object({
|
|
28818
|
+
deviceId: number(),
|
|
28819
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
28820
|
+
}), _void(), {
|
|
28821
|
+
kind: "mutation",
|
|
28822
|
+
auth: "admin"
|
|
28823
|
+
}),
|
|
28824
|
+
setEnabled: method(object({
|
|
28825
|
+
deviceId: number(),
|
|
28826
|
+
enabled: boolean()
|
|
28827
|
+
}), _void(), {
|
|
28828
|
+
kind: "mutation",
|
|
28829
|
+
auth: "admin"
|
|
28830
|
+
})
|
|
28831
|
+
},
|
|
28618
28832
|
events: { onDetected: { data: object({
|
|
28619
28833
|
deviceId: number(),
|
|
28620
28834
|
detection: NativeDetectionSchema
|
|
@@ -33462,7 +33676,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
33462
33676
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
33463
33677
|
totalObjects: number().int().nonnegative(),
|
|
33464
33678
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
33465
|
-
byClass: record(string(), number().int().nonnegative())
|
|
33679
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
33680
|
+
/**
|
|
33681
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
33682
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
33683
|
+
*
|
|
33684
|
+
* The operator's question about a scene has two halves and they answer
|
|
33685
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
33686
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
33687
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
33688
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
33689
|
+
*
|
|
33690
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
33691
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
33692
|
+
*
|
|
33693
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
33694
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
33695
|
+
* parked objects here" about a camera whose lot is full.
|
|
33696
|
+
*/
|
|
33697
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
33698
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
33699
|
+
* same absence rule. */
|
|
33700
|
+
transientObjects: number().int().nonnegative().optional()
|
|
33466
33701
|
});
|
|
33467
33702
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
33468
33703
|
zoneId: string(),
|
|
@@ -33585,6 +33820,23 @@ var HistoryPointSchema = object({
|
|
|
33585
33820
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
33586
33821
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
33587
33822
|
* combinatorial coverage the operator UI requested.
|
|
33823
|
+
*
|
|
33824
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
33825
|
+
*
|
|
33826
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
33827
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
33828
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
33829
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
33830
|
+
* horizon rather than to answer a question.
|
|
33831
|
+
*
|
|
33832
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
33833
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
33834
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
33835
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
33836
|
+
* function the writer uses, so the two cannot drift.
|
|
33837
|
+
*
|
|
33838
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
33839
|
+
* it. Do not add a fourth caller.
|
|
33588
33840
|
*/
|
|
33589
33841
|
var zoneAnalyticsCapability = {
|
|
33590
33842
|
name: "zone-analytics",
|
|
@@ -37984,12 +38236,24 @@ Object.freeze({
|
|
|
37984
38236
|
addonId: null,
|
|
37985
38237
|
access: "create"
|
|
37986
38238
|
},
|
|
38239
|
+
"nativeObjectDetection.getOptions": {
|
|
38240
|
+
capName: "native-object-detection",
|
|
38241
|
+
capScope: "device",
|
|
38242
|
+
addonId: null,
|
|
38243
|
+
access: "view"
|
|
38244
|
+
},
|
|
37987
38245
|
"nativeObjectDetection.setEnabled": {
|
|
37988
38246
|
capName: "native-object-detection",
|
|
37989
38247
|
capScope: "device",
|
|
37990
38248
|
addonId: null,
|
|
37991
38249
|
access: "create"
|
|
37992
38250
|
},
|
|
38251
|
+
"nativeObjectDetection.setSettings": {
|
|
38252
|
+
capName: "native-object-detection",
|
|
38253
|
+
capScope: "device",
|
|
38254
|
+
addonId: null,
|
|
38255
|
+
access: "create"
|
|
38256
|
+
},
|
|
37993
38257
|
"navigation.getFeatures": {
|
|
37994
38258
|
capName: "navigation",
|
|
37995
38259
|
capScope: "device",
|
|
@@ -38254,6 +38518,12 @@ Object.freeze({
|
|
|
38254
38518
|
addonId: null,
|
|
38255
38519
|
access: "view"
|
|
38256
38520
|
},
|
|
38521
|
+
"notificationRules.getClipRetentionAsks": {
|
|
38522
|
+
capName: "notification-rules",
|
|
38523
|
+
capScope: "system",
|
|
38524
|
+
addonId: null,
|
|
38525
|
+
access: "view"
|
|
38526
|
+
},
|
|
38257
38527
|
"notificationRules.getConditionCatalog": {
|
|
38258
38528
|
capName: "notification-rules",
|
|
38259
38529
|
capScope: "system",
|
|
@@ -38764,6 +39034,12 @@ Object.freeze({
|
|
|
38764
39034
|
addonId: null,
|
|
38765
39035
|
access: "create"
|
|
38766
39036
|
},
|
|
39037
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
39038
|
+
capName: "pipeline-analytics",
|
|
39039
|
+
capScope: "device",
|
|
39040
|
+
addonId: null,
|
|
39041
|
+
access: "view"
|
|
39042
|
+
},
|
|
38767
39043
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
38768
39044
|
capName: "pipeline-analytics",
|
|
38769
39045
|
capScope: "device",
|
|
@@ -39436,6 +39712,12 @@ Object.freeze({
|
|
|
39436
39712
|
addonId: null,
|
|
39437
39713
|
access: "create"
|
|
39438
39714
|
},
|
|
39715
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
39716
|
+
capName: "pipeline-runner",
|
|
39717
|
+
capScope: "system",
|
|
39718
|
+
addonId: null,
|
|
39719
|
+
access: "create"
|
|
39720
|
+
},
|
|
39439
39721
|
"pipelineRunner.runDetailSubtree": {
|
|
39440
39722
|
capName: "pipeline-runner",
|
|
39441
39723
|
capScope: "system",
|
|
@@ -42216,11 +42498,21 @@ Object.freeze({
|
|
|
42216
42498
|
form: "single",
|
|
42217
42499
|
optional: false
|
|
42218
42500
|
}],
|
|
42501
|
+
"nativeObjectDetection.getOptions": [{
|
|
42502
|
+
name: "deviceId",
|
|
42503
|
+
form: "single",
|
|
42504
|
+
optional: false
|
|
42505
|
+
}],
|
|
42219
42506
|
"nativeObjectDetection.setEnabled": [{
|
|
42220
42507
|
name: "deviceId",
|
|
42221
42508
|
form: "single",
|
|
42222
42509
|
optional: false
|
|
42223
42510
|
}],
|
|
42511
|
+
"nativeObjectDetection.setSettings": [{
|
|
42512
|
+
name: "deviceId",
|
|
42513
|
+
form: "single",
|
|
42514
|
+
optional: false
|
|
42515
|
+
}],
|
|
42224
42516
|
"navigation.getFeatures": [{
|
|
42225
42517
|
name: "deviceId",
|
|
42226
42518
|
form: "single",
|
|
@@ -42570,6 +42862,11 @@ Object.freeze({
|
|
|
42570
42862
|
form: "single",
|
|
42571
42863
|
optional: false
|
|
42572
42864
|
}],
|
|
42865
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
42866
|
+
name: "deviceId",
|
|
42867
|
+
form: "single",
|
|
42868
|
+
optional: false
|
|
42869
|
+
}],
|
|
42573
42870
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
42574
42871
|
name: "deviceId",
|
|
42575
42872
|
form: "single",
|
|
@@ -42760,6 +43057,11 @@ Object.freeze({
|
|
|
42760
43057
|
form: "single",
|
|
42761
43058
|
optional: false
|
|
42762
43059
|
}],
|
|
43060
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
43061
|
+
name: "deviceId",
|
|
43062
|
+
form: "single",
|
|
43063
|
+
optional: false
|
|
43064
|
+
}],
|
|
42763
43065
|
"pipelineRunner.runDetailSubtree": [{
|
|
42764
43066
|
name: "deviceId",
|
|
42765
43067
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-velux",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.103",
|
|
4
4
|
"description": "Velux KLF-200 device-provider addon for CamStack — local-gateway window + shutter covers (positional, no tilt)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"dev": "vite build --watch",
|
|
63
63
|
"typecheck": "tsc --noEmit",
|
|
64
64
|
"test": "vitest run",
|
|
65
|
-
"publish": "npm publish --access public"
|
|
65
|
+
"publish:npm": "npm publish --access public"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@camstack/types": "*",
|