@camstack/addon-provider-dreo 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
|
@@ -5396,7 +5396,7 @@ var ZodIssueCode = {
|
|
|
5396
5396
|
var ZodFirstPartyTypeKind;
|
|
5397
5397
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5398
5398
|
//#endregion
|
|
5399
|
-
//#region ../types/dist/sleep-
|
|
5399
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
5400
5400
|
/**
|
|
5401
5401
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5402
5402
|
* window to float samples (D455).
|
|
@@ -11598,6 +11598,21 @@ var streamSignalsCapability = {
|
|
|
11598
11598
|
mode: "singleton",
|
|
11599
11599
|
deviceTypes: Object.values(DeviceType),
|
|
11600
11600
|
runtimeState: StreamSignalsStatusSchema,
|
|
11601
|
+
/**
|
|
11602
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
11603
|
+
*
|
|
11604
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
11605
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
11606
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
11607
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
11608
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
11609
|
+
* class the camera really detected stayed missing for the life of the row
|
|
11610
|
+
* because the fix could not reach it.
|
|
11611
|
+
*
|
|
11612
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11613
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11614
|
+
*/
|
|
11615
|
+
durability: "session",
|
|
11601
11616
|
methods: {
|
|
11602
11617
|
/**
|
|
11603
11618
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -18229,6 +18244,48 @@ var NcAlarmConfigSchema = object({
|
|
|
18229
18244
|
settings: NcAlarmSettingsSchema,
|
|
18230
18245
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
18231
18246
|
});
|
|
18247
|
+
/**
|
|
18248
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
18249
|
+
*
|
|
18250
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
18251
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
18252
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
18253
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
18254
|
+
* a different thing from never having been told, and only the envelope
|
|
18255
|
+
* (`rulesLoaded`) can tell those apart.
|
|
18256
|
+
*/
|
|
18257
|
+
var NcClipRetentionAskSchema = object({
|
|
18258
|
+
/**
|
|
18259
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
18260
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
18261
|
+
* asking everywhere.
|
|
18262
|
+
*/
|
|
18263
|
+
deviceId: number().int().nonnegative().optional(),
|
|
18264
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
18265
|
+
* needs nothing produces no ask at all. */
|
|
18266
|
+
seconds: number().min(0).max(60),
|
|
18267
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
18268
|
+
* assigned, which is what the cut defaults to. */
|
|
18269
|
+
profile: CamProfileSchema.optional(),
|
|
18270
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
18271
|
+
ruleId: string(),
|
|
18272
|
+
ruleName: string(),
|
|
18273
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
18274
|
+
reason: _enum(["window", "occupancy"])
|
|
18275
|
+
});
|
|
18276
|
+
/**
|
|
18277
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
18278
|
+
*
|
|
18279
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
18280
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
18281
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
18282
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
18283
|
+
* footage this mechanism exists to keep.
|
|
18284
|
+
*/
|
|
18285
|
+
var NcClipRetentionPlanSchema = object({
|
|
18286
|
+
rulesLoaded: boolean(),
|
|
18287
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18288
|
+
});
|
|
18232
18289
|
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 }), {
|
|
18233
18290
|
kind: "mutation",
|
|
18234
18291
|
auth: "admin",
|
|
@@ -18249,7 +18306,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18249
18306
|
}), object({ success: literal(true) }), {
|
|
18250
18307
|
kind: "mutation",
|
|
18251
18308
|
auth: "admin"
|
|
18252
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18309
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18253
18310
|
deviceId: number().int(),
|
|
18254
18311
|
muted: boolean()
|
|
18255
18312
|
}), object({ success: literal(true) }), {
|
|
@@ -20823,6 +20880,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
20823
20880
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
20824
20881
|
framesMatched: number().int()
|
|
20825
20882
|
})).readonly() });
|
|
20883
|
+
/**
|
|
20884
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
20885
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
20886
|
+
* is an alias of this, not a second list.
|
|
20887
|
+
*/
|
|
20888
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
20889
|
+
"motion",
|
|
20890
|
+
"audio-dbfs",
|
|
20891
|
+
"battery",
|
|
20892
|
+
"occupancy"
|
|
20893
|
+
]);
|
|
20894
|
+
/**
|
|
20895
|
+
* One closed 5-minute bucket of a long-term series.
|
|
20896
|
+
*
|
|
20897
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
20898
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
20899
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
20900
|
+
* different claim from zero and the reason this is a sparse series.
|
|
20901
|
+
*/
|
|
20902
|
+
var LtsBucketSchema = object({
|
|
20903
|
+
scope: string(),
|
|
20904
|
+
bucketStart: number().int(),
|
|
20905
|
+
samples: number().int().nonnegative(),
|
|
20906
|
+
sum: number(),
|
|
20907
|
+
min: number(),
|
|
20908
|
+
max: number()
|
|
20909
|
+
});
|
|
20826
20910
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
20827
20911
|
deviceId: number(),
|
|
20828
20912
|
trackId: string()
|
|
@@ -20869,6 +20953,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20869
20953
|
kinds: array(string()).optional(),
|
|
20870
20954
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
20871
20955
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
20956
|
+
deviceId: number(),
|
|
20957
|
+
series: AnalyticsLtsSeriesSchema,
|
|
20958
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
20959
|
+
scope: string().optional(),
|
|
20960
|
+
from: number(),
|
|
20961
|
+
to: number(),
|
|
20962
|
+
limit: number().int().positive().optional()
|
|
20963
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
20872
20964
|
deviceId: number(),
|
|
20873
20965
|
since: number(),
|
|
20874
20966
|
until: number(),
|
|
@@ -21487,6 +21579,14 @@ var MotionSourceEnum = _enum([
|
|
|
21487
21579
|
*/
|
|
21488
21580
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
21489
21581
|
/**
|
|
21582
|
+
* Which root detectors a camera runs. Deliberately the SAME vocabulary
|
|
21583
|
+
* post-analysis already tags every detection with (`DetectionSource`) rather
|
|
21584
|
+
* than a second spelling of the same two ideas — the value an operator picks
|
|
21585
|
+
* here is the value that comes back on the track, the overlay and the debug
|
|
21586
|
+
* row.
|
|
21587
|
+
*/
|
|
21588
|
+
var DetectionSourcesSchema = array(DetectionSourceSchema);
|
|
21589
|
+
/**
|
|
21490
21590
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
21491
21591
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
21492
21592
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -21637,6 +21737,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
21637
21737
|
* events; the orchestrator forwards to `reportMotion`.
|
|
21638
21738
|
*/
|
|
21639
21739
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
21740
|
+
/**
|
|
21741
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
21742
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
21743
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
21744
|
+
*
|
|
21745
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
21746
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
21747
|
+
* here. Its boxes reach post-analysis on the same
|
|
21748
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
21749
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
21750
|
+
* subtree (face / plate / embedding).
|
|
21751
|
+
*
|
|
21752
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
21753
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
21754
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
21755
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
21756
|
+
*
|
|
21757
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
21758
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
21759
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
21760
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
21761
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
21762
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
21763
|
+
*
|
|
21764
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
21765
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
21766
|
+
* default.
|
|
21767
|
+
*/
|
|
21768
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
21640
21769
|
pipelineEnabled: boolean().default(true),
|
|
21641
21770
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
21642
21771
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -21818,7 +21947,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
21818
21947
|
queueDepth: number(),
|
|
21819
21948
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
21820
21949
|
});
|
|
21950
|
+
/**
|
|
21951
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
21952
|
+
*
|
|
21953
|
+
* One instance per node. Receives camera assignments from
|
|
21954
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
21955
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
21956
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
21957
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
21958
|
+
* the bus.
|
|
21959
|
+
*
|
|
21960
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
21961
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
21962
|
+
* makes assignment decisions itself.
|
|
21963
|
+
*/
|
|
21964
|
+
/**
|
|
21965
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
21966
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
21967
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
21968
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
21969
|
+
*/
|
|
21970
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
21971
|
+
"not-attached",
|
|
21972
|
+
"battery-asleep",
|
|
21973
|
+
"not-watching",
|
|
21974
|
+
"already-bursting"
|
|
21975
|
+
]);
|
|
21821
21976
|
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({
|
|
21977
|
+
deviceId: number(),
|
|
21978
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
21979
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
21980
|
+
frames: number().int().positive().optional(),
|
|
21981
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
21982
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
21983
|
+
reason: string()
|
|
21984
|
+
}), object({
|
|
21985
|
+
started: boolean(),
|
|
21986
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
21987
|
+
}), {
|
|
21988
|
+
auth: "admin",
|
|
21989
|
+
kind: "mutation"
|
|
21990
|
+
}), method(object({
|
|
21822
21991
|
handle: FrameHandleSchema,
|
|
21823
21992
|
bbox: NativeCropBboxSchema,
|
|
21824
21993
|
maxWidth: number().int().positive().optional(),
|
|
@@ -28656,11 +28825,46 @@ var NativeObjectDetectionStatusSchema = object({
|
|
|
28656
28825
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28657
28826
|
/**
|
|
28658
28827
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
28659
|
-
*
|
|
28660
|
-
*
|
|
28828
|
+
*
|
|
28829
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
28830
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
28831
|
+
* other detection choice is made. `geometry` on
|
|
28832
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
28833
|
+
* choice would buy this particular camera.
|
|
28661
28834
|
*/
|
|
28662
28835
|
enabled: boolean()
|
|
28663
28836
|
});
|
|
28837
|
+
/**
|
|
28838
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
28839
|
+
*
|
|
28840
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
28841
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
28842
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
28843
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
28844
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
28845
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
28846
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
28847
|
+
* something is in front of it, and its stream is already being pulled.
|
|
28848
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
28849
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
28850
|
+
* tracker as motion and no further.
|
|
28851
|
+
*
|
|
28852
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
28853
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
28854
|
+
* derived form is only as honest as `getOptions`).
|
|
28855
|
+
*/
|
|
28856
|
+
var NativeObjectGeometryEnum = _enum([
|
|
28857
|
+
"boxed",
|
|
28858
|
+
"while-streaming",
|
|
28859
|
+
"flag-only"
|
|
28860
|
+
]);
|
|
28861
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
28862
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
28863
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28864
|
+
/** What a detection from this camera carries. */
|
|
28865
|
+
geometry: NativeObjectGeometryEnum
|
|
28866
|
+
});
|
|
28867
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
28664
28868
|
var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
|
|
28665
28869
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
28666
28870
|
lastFetchedAt: number() });
|
|
@@ -28670,13 +28874,23 @@ var nativeObjectDetectionCapability = {
|
|
|
28670
28874
|
deviceNative: true,
|
|
28671
28875
|
mode: "singleton",
|
|
28672
28876
|
deviceTypes: [DeviceType.Camera],
|
|
28673
|
-
methods: {
|
|
28674
|
-
deviceId: number(),
|
|
28675
|
-
|
|
28676
|
-
|
|
28677
|
-
|
|
28678
|
-
|
|
28679
|
-
|
|
28877
|
+
methods: {
|
|
28878
|
+
getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
|
|
28879
|
+
setSettings: method(object({
|
|
28880
|
+
deviceId: number(),
|
|
28881
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
28882
|
+
}), _void(), {
|
|
28883
|
+
kind: "mutation",
|
|
28884
|
+
auth: "admin"
|
|
28885
|
+
}),
|
|
28886
|
+
setEnabled: method(object({
|
|
28887
|
+
deviceId: number(),
|
|
28888
|
+
enabled: boolean()
|
|
28889
|
+
}), _void(), {
|
|
28890
|
+
kind: "mutation",
|
|
28891
|
+
auth: "admin"
|
|
28892
|
+
})
|
|
28893
|
+
},
|
|
28680
28894
|
events: { onDetected: { data: object({
|
|
28681
28895
|
deviceId: number(),
|
|
28682
28896
|
detection: NativeDetectionSchema
|
|
@@ -33524,7 +33738,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
33524
33738
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
33525
33739
|
totalObjects: number().int().nonnegative(),
|
|
33526
33740
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
33527
|
-
byClass: record(string(), number().int().nonnegative())
|
|
33741
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
33742
|
+
/**
|
|
33743
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
33744
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
33745
|
+
*
|
|
33746
|
+
* The operator's question about a scene has two halves and they answer
|
|
33747
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
33748
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
33749
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
33750
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
33751
|
+
*
|
|
33752
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
33753
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
33754
|
+
*
|
|
33755
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
33756
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
33757
|
+
* parked objects here" about a camera whose lot is full.
|
|
33758
|
+
*/
|
|
33759
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
33760
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
33761
|
+
* same absence rule. */
|
|
33762
|
+
transientObjects: number().int().nonnegative().optional()
|
|
33528
33763
|
});
|
|
33529
33764
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
33530
33765
|
zoneId: string(),
|
|
@@ -33647,6 +33882,23 @@ var HistoryPointSchema = object({
|
|
|
33647
33882
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
33648
33883
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
33649
33884
|
* combinatorial coverage the operator UI requested.
|
|
33885
|
+
*
|
|
33886
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
33887
|
+
*
|
|
33888
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
33889
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
33890
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
33891
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
33892
|
+
* horizon rather than to answer a question.
|
|
33893
|
+
*
|
|
33894
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
33895
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
33896
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
33897
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
33898
|
+
* function the writer uses, so the two cannot drift.
|
|
33899
|
+
*
|
|
33900
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
33901
|
+
* it. Do not add a fourth caller.
|
|
33650
33902
|
*/
|
|
33651
33903
|
var zoneAnalyticsCapability = {
|
|
33652
33904
|
name: "zone-analytics",
|
|
@@ -38046,12 +38298,24 @@ Object.freeze({
|
|
|
38046
38298
|
addonId: null,
|
|
38047
38299
|
access: "create"
|
|
38048
38300
|
},
|
|
38301
|
+
"nativeObjectDetection.getOptions": {
|
|
38302
|
+
capName: "native-object-detection",
|
|
38303
|
+
capScope: "device",
|
|
38304
|
+
addonId: null,
|
|
38305
|
+
access: "view"
|
|
38306
|
+
},
|
|
38049
38307
|
"nativeObjectDetection.setEnabled": {
|
|
38050
38308
|
capName: "native-object-detection",
|
|
38051
38309
|
capScope: "device",
|
|
38052
38310
|
addonId: null,
|
|
38053
38311
|
access: "create"
|
|
38054
38312
|
},
|
|
38313
|
+
"nativeObjectDetection.setSettings": {
|
|
38314
|
+
capName: "native-object-detection",
|
|
38315
|
+
capScope: "device",
|
|
38316
|
+
addonId: null,
|
|
38317
|
+
access: "create"
|
|
38318
|
+
},
|
|
38055
38319
|
"navigation.getFeatures": {
|
|
38056
38320
|
capName: "navigation",
|
|
38057
38321
|
capScope: "device",
|
|
@@ -38316,6 +38580,12 @@ Object.freeze({
|
|
|
38316
38580
|
addonId: null,
|
|
38317
38581
|
access: "view"
|
|
38318
38582
|
},
|
|
38583
|
+
"notificationRules.getClipRetentionAsks": {
|
|
38584
|
+
capName: "notification-rules",
|
|
38585
|
+
capScope: "system",
|
|
38586
|
+
addonId: null,
|
|
38587
|
+
access: "view"
|
|
38588
|
+
},
|
|
38319
38589
|
"notificationRules.getConditionCatalog": {
|
|
38320
38590
|
capName: "notification-rules",
|
|
38321
38591
|
capScope: "system",
|
|
@@ -38826,6 +39096,12 @@ Object.freeze({
|
|
|
38826
39096
|
addonId: null,
|
|
38827
39097
|
access: "create"
|
|
38828
39098
|
},
|
|
39099
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
39100
|
+
capName: "pipeline-analytics",
|
|
39101
|
+
capScope: "device",
|
|
39102
|
+
addonId: null,
|
|
39103
|
+
access: "view"
|
|
39104
|
+
},
|
|
38829
39105
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
38830
39106
|
capName: "pipeline-analytics",
|
|
38831
39107
|
capScope: "device",
|
|
@@ -39498,6 +39774,12 @@ Object.freeze({
|
|
|
39498
39774
|
addonId: null,
|
|
39499
39775
|
access: "create"
|
|
39500
39776
|
},
|
|
39777
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
39778
|
+
capName: "pipeline-runner",
|
|
39779
|
+
capScope: "system",
|
|
39780
|
+
addonId: null,
|
|
39781
|
+
access: "create"
|
|
39782
|
+
},
|
|
39501
39783
|
"pipelineRunner.runDetailSubtree": {
|
|
39502
39784
|
capName: "pipeline-runner",
|
|
39503
39785
|
capScope: "system",
|
|
@@ -42278,11 +42560,21 @@ Object.freeze({
|
|
|
42278
42560
|
form: "single",
|
|
42279
42561
|
optional: false
|
|
42280
42562
|
}],
|
|
42563
|
+
"nativeObjectDetection.getOptions": [{
|
|
42564
|
+
name: "deviceId",
|
|
42565
|
+
form: "single",
|
|
42566
|
+
optional: false
|
|
42567
|
+
}],
|
|
42281
42568
|
"nativeObjectDetection.setEnabled": [{
|
|
42282
42569
|
name: "deviceId",
|
|
42283
42570
|
form: "single",
|
|
42284
42571
|
optional: false
|
|
42285
42572
|
}],
|
|
42573
|
+
"nativeObjectDetection.setSettings": [{
|
|
42574
|
+
name: "deviceId",
|
|
42575
|
+
form: "single",
|
|
42576
|
+
optional: false
|
|
42577
|
+
}],
|
|
42286
42578
|
"navigation.getFeatures": [{
|
|
42287
42579
|
name: "deviceId",
|
|
42288
42580
|
form: "single",
|
|
@@ -42632,6 +42924,11 @@ Object.freeze({
|
|
|
42632
42924
|
form: "single",
|
|
42633
42925
|
optional: false
|
|
42634
42926
|
}],
|
|
42927
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
42928
|
+
name: "deviceId",
|
|
42929
|
+
form: "single",
|
|
42930
|
+
optional: false
|
|
42931
|
+
}],
|
|
42635
42932
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
42636
42933
|
name: "deviceId",
|
|
42637
42934
|
form: "single",
|
|
@@ -42822,6 +43119,11 @@ Object.freeze({
|
|
|
42822
43119
|
form: "single",
|
|
42823
43120
|
optional: false
|
|
42824
43121
|
}],
|
|
43122
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
43123
|
+
name: "deviceId",
|
|
43124
|
+
form: "single",
|
|
43125
|
+
optional: false
|
|
43126
|
+
}],
|
|
42825
43127
|
"pipelineRunner.runDetailSubtree": [{
|
|
42826
43128
|
name: "deviceId",
|
|
42827
43129
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -5397,7 +5397,7 @@ var ZodIssueCode = {
|
|
|
5397
5397
|
var ZodFirstPartyTypeKind;
|
|
5398
5398
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5399
5399
|
//#endregion
|
|
5400
|
-
//#region ../types/dist/sleep-
|
|
5400
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
5401
5401
|
/**
|
|
5402
5402
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5403
5403
|
* window to float samples (D455).
|
|
@@ -11599,6 +11599,21 @@ var streamSignalsCapability = {
|
|
|
11599
11599
|
mode: "singleton",
|
|
11600
11600
|
deviceTypes: Object.values(DeviceType),
|
|
11601
11601
|
runtimeState: StreamSignalsStatusSchema,
|
|
11602
|
+
/**
|
|
11603
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
11604
|
+
*
|
|
11605
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
11606
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
11607
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
11608
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
11609
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
11610
|
+
* class the camera really detected stayed missing for the life of the row
|
|
11611
|
+
* because the fix could not reach it.
|
|
11612
|
+
*
|
|
11613
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11614
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11615
|
+
*/
|
|
11616
|
+
durability: "session",
|
|
11602
11617
|
methods: {
|
|
11603
11618
|
/**
|
|
11604
11619
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -18230,6 +18245,48 @@ var NcAlarmConfigSchema = object({
|
|
|
18230
18245
|
settings: NcAlarmSettingsSchema,
|
|
18231
18246
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
18232
18247
|
});
|
|
18248
|
+
/**
|
|
18249
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
18250
|
+
*
|
|
18251
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
18252
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
18253
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
18254
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
18255
|
+
* a different thing from never having been told, and only the envelope
|
|
18256
|
+
* (`rulesLoaded`) can tell those apart.
|
|
18257
|
+
*/
|
|
18258
|
+
var NcClipRetentionAskSchema = object({
|
|
18259
|
+
/**
|
|
18260
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
18261
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
18262
|
+
* asking everywhere.
|
|
18263
|
+
*/
|
|
18264
|
+
deviceId: number().int().nonnegative().optional(),
|
|
18265
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
18266
|
+
* needs nothing produces no ask at all. */
|
|
18267
|
+
seconds: number().min(0).max(60),
|
|
18268
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
18269
|
+
* assigned, which is what the cut defaults to. */
|
|
18270
|
+
profile: CamProfileSchema.optional(),
|
|
18271
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
18272
|
+
ruleId: string(),
|
|
18273
|
+
ruleName: string(),
|
|
18274
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
18275
|
+
reason: _enum(["window", "occupancy"])
|
|
18276
|
+
});
|
|
18277
|
+
/**
|
|
18278
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
18279
|
+
*
|
|
18280
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
18281
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
18282
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
18283
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
18284
|
+
* footage this mechanism exists to keep.
|
|
18285
|
+
*/
|
|
18286
|
+
var NcClipRetentionPlanSchema = object({
|
|
18287
|
+
rulesLoaded: boolean(),
|
|
18288
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18289
|
+
});
|
|
18233
18290
|
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 }), {
|
|
18234
18291
|
kind: "mutation",
|
|
18235
18292
|
auth: "admin",
|
|
@@ -18250,7 +18307,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18250
18307
|
}), object({ success: literal(true) }), {
|
|
18251
18308
|
kind: "mutation",
|
|
18252
18309
|
auth: "admin"
|
|
18253
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18310
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18254
18311
|
deviceId: number().int(),
|
|
18255
18312
|
muted: boolean()
|
|
18256
18313
|
}), object({ success: literal(true) }), {
|
|
@@ -20824,6 +20881,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
20824
20881
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
20825
20882
|
framesMatched: number().int()
|
|
20826
20883
|
})).readonly() });
|
|
20884
|
+
/**
|
|
20885
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
20886
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
20887
|
+
* is an alias of this, not a second list.
|
|
20888
|
+
*/
|
|
20889
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
20890
|
+
"motion",
|
|
20891
|
+
"audio-dbfs",
|
|
20892
|
+
"battery",
|
|
20893
|
+
"occupancy"
|
|
20894
|
+
]);
|
|
20895
|
+
/**
|
|
20896
|
+
* One closed 5-minute bucket of a long-term series.
|
|
20897
|
+
*
|
|
20898
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
20899
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
20900
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
20901
|
+
* different claim from zero and the reason this is a sparse series.
|
|
20902
|
+
*/
|
|
20903
|
+
var LtsBucketSchema = object({
|
|
20904
|
+
scope: string(),
|
|
20905
|
+
bucketStart: number().int(),
|
|
20906
|
+
samples: number().int().nonnegative(),
|
|
20907
|
+
sum: number(),
|
|
20908
|
+
min: number(),
|
|
20909
|
+
max: number()
|
|
20910
|
+
});
|
|
20827
20911
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
20828
20912
|
deviceId: number(),
|
|
20829
20913
|
trackId: string()
|
|
@@ -20870,6 +20954,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20870
20954
|
kinds: array(string()).optional(),
|
|
20871
20955
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
20872
20956
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
20957
|
+
deviceId: number(),
|
|
20958
|
+
series: AnalyticsLtsSeriesSchema,
|
|
20959
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
20960
|
+
scope: string().optional(),
|
|
20961
|
+
from: number(),
|
|
20962
|
+
to: number(),
|
|
20963
|
+
limit: number().int().positive().optional()
|
|
20964
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
20873
20965
|
deviceId: number(),
|
|
20874
20966
|
since: number(),
|
|
20875
20967
|
until: number(),
|
|
@@ -21488,6 +21580,14 @@ var MotionSourceEnum = _enum([
|
|
|
21488
21580
|
*/
|
|
21489
21581
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
21490
21582
|
/**
|
|
21583
|
+
* Which root detectors a camera runs. Deliberately the SAME vocabulary
|
|
21584
|
+
* post-analysis already tags every detection with (`DetectionSource`) rather
|
|
21585
|
+
* than a second spelling of the same two ideas — the value an operator picks
|
|
21586
|
+
* here is the value that comes back on the track, the overlay and the debug
|
|
21587
|
+
* row.
|
|
21588
|
+
*/
|
|
21589
|
+
var DetectionSourcesSchema = array(DetectionSourceSchema);
|
|
21590
|
+
/**
|
|
21491
21591
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
21492
21592
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
21493
21593
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -21638,6 +21738,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
21638
21738
|
* events; the orchestrator forwards to `reportMotion`.
|
|
21639
21739
|
*/
|
|
21640
21740
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
21741
|
+
/**
|
|
21742
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
21743
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
21744
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
21745
|
+
*
|
|
21746
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
21747
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
21748
|
+
* here. Its boxes reach post-analysis on the same
|
|
21749
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
21750
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
21751
|
+
* subtree (face / plate / embedding).
|
|
21752
|
+
*
|
|
21753
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
21754
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
21755
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
21756
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
21757
|
+
*
|
|
21758
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
21759
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
21760
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
21761
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
21762
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
21763
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
21764
|
+
*
|
|
21765
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
21766
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
21767
|
+
* default.
|
|
21768
|
+
*/
|
|
21769
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
21641
21770
|
pipelineEnabled: boolean().default(true),
|
|
21642
21771
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
21643
21772
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -21819,7 +21948,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
21819
21948
|
queueDepth: number(),
|
|
21820
21949
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
21821
21950
|
});
|
|
21951
|
+
/**
|
|
21952
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
21953
|
+
*
|
|
21954
|
+
* One instance per node. Receives camera assignments from
|
|
21955
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
21956
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
21957
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
21958
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
21959
|
+
* the bus.
|
|
21960
|
+
*
|
|
21961
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
21962
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
21963
|
+
* makes assignment decisions itself.
|
|
21964
|
+
*/
|
|
21965
|
+
/**
|
|
21966
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
21967
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
21968
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
21969
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
21970
|
+
*/
|
|
21971
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
21972
|
+
"not-attached",
|
|
21973
|
+
"battery-asleep",
|
|
21974
|
+
"not-watching",
|
|
21975
|
+
"already-bursting"
|
|
21976
|
+
]);
|
|
21822
21977
|
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({
|
|
21978
|
+
deviceId: number(),
|
|
21979
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
21980
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
21981
|
+
frames: number().int().positive().optional(),
|
|
21982
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
21983
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
21984
|
+
reason: string()
|
|
21985
|
+
}), object({
|
|
21986
|
+
started: boolean(),
|
|
21987
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
21988
|
+
}), {
|
|
21989
|
+
auth: "admin",
|
|
21990
|
+
kind: "mutation"
|
|
21991
|
+
}), method(object({
|
|
21823
21992
|
handle: FrameHandleSchema,
|
|
21824
21993
|
bbox: NativeCropBboxSchema,
|
|
21825
21994
|
maxWidth: number().int().positive().optional(),
|
|
@@ -28657,11 +28826,46 @@ var NativeObjectDetectionStatusSchema = object({
|
|
|
28657
28826
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28658
28827
|
/**
|
|
28659
28828
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
28660
|
-
*
|
|
28661
|
-
*
|
|
28829
|
+
*
|
|
28830
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
28831
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
28832
|
+
* other detection choice is made. `geometry` on
|
|
28833
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
28834
|
+
* choice would buy this particular camera.
|
|
28662
28835
|
*/
|
|
28663
28836
|
enabled: boolean()
|
|
28664
28837
|
});
|
|
28838
|
+
/**
|
|
28839
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
28840
|
+
*
|
|
28841
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
28842
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
28843
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
28844
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
28845
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
28846
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
28847
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
28848
|
+
* something is in front of it, and its stream is already being pulled.
|
|
28849
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
28850
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
28851
|
+
* tracker as motion and no further.
|
|
28852
|
+
*
|
|
28853
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
28854
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
28855
|
+
* derived form is only as honest as `getOptions`).
|
|
28856
|
+
*/
|
|
28857
|
+
var NativeObjectGeometryEnum = _enum([
|
|
28858
|
+
"boxed",
|
|
28859
|
+
"while-streaming",
|
|
28860
|
+
"flag-only"
|
|
28861
|
+
]);
|
|
28862
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
28863
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
28864
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28865
|
+
/** What a detection from this camera carries. */
|
|
28866
|
+
geometry: NativeObjectGeometryEnum
|
|
28867
|
+
});
|
|
28868
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
28665
28869
|
var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
|
|
28666
28870
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
28667
28871
|
lastFetchedAt: number() });
|
|
@@ -28671,13 +28875,23 @@ var nativeObjectDetectionCapability = {
|
|
|
28671
28875
|
deviceNative: true,
|
|
28672
28876
|
mode: "singleton",
|
|
28673
28877
|
deviceTypes: [DeviceType.Camera],
|
|
28674
|
-
methods: {
|
|
28675
|
-
deviceId: number(),
|
|
28676
|
-
|
|
28677
|
-
|
|
28678
|
-
|
|
28679
|
-
|
|
28680
|
-
|
|
28878
|
+
methods: {
|
|
28879
|
+
getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
|
|
28880
|
+
setSettings: method(object({
|
|
28881
|
+
deviceId: number(),
|
|
28882
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
28883
|
+
}), _void(), {
|
|
28884
|
+
kind: "mutation",
|
|
28885
|
+
auth: "admin"
|
|
28886
|
+
}),
|
|
28887
|
+
setEnabled: method(object({
|
|
28888
|
+
deviceId: number(),
|
|
28889
|
+
enabled: boolean()
|
|
28890
|
+
}), _void(), {
|
|
28891
|
+
kind: "mutation",
|
|
28892
|
+
auth: "admin"
|
|
28893
|
+
})
|
|
28894
|
+
},
|
|
28681
28895
|
events: { onDetected: { data: object({
|
|
28682
28896
|
deviceId: number(),
|
|
28683
28897
|
detection: NativeDetectionSchema
|
|
@@ -33525,7 +33739,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
33525
33739
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
33526
33740
|
totalObjects: number().int().nonnegative(),
|
|
33527
33741
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
33528
|
-
byClass: record(string(), number().int().nonnegative())
|
|
33742
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
33743
|
+
/**
|
|
33744
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
33745
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
33746
|
+
*
|
|
33747
|
+
* The operator's question about a scene has two halves and they answer
|
|
33748
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
33749
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
33750
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
33751
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
33752
|
+
*
|
|
33753
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
33754
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
33755
|
+
*
|
|
33756
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
33757
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
33758
|
+
* parked objects here" about a camera whose lot is full.
|
|
33759
|
+
*/
|
|
33760
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
33761
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
33762
|
+
* same absence rule. */
|
|
33763
|
+
transientObjects: number().int().nonnegative().optional()
|
|
33529
33764
|
});
|
|
33530
33765
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
33531
33766
|
zoneId: string(),
|
|
@@ -33648,6 +33883,23 @@ var HistoryPointSchema = object({
|
|
|
33648
33883
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
33649
33884
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
33650
33885
|
* combinatorial coverage the operator UI requested.
|
|
33886
|
+
*
|
|
33887
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
33888
|
+
*
|
|
33889
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
33890
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
33891
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
33892
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
33893
|
+
* horizon rather than to answer a question.
|
|
33894
|
+
*
|
|
33895
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
33896
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
33897
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
33898
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
33899
|
+
* function the writer uses, so the two cannot drift.
|
|
33900
|
+
*
|
|
33901
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
33902
|
+
* it. Do not add a fourth caller.
|
|
33651
33903
|
*/
|
|
33652
33904
|
var zoneAnalyticsCapability = {
|
|
33653
33905
|
name: "zone-analytics",
|
|
@@ -38047,12 +38299,24 @@ Object.freeze({
|
|
|
38047
38299
|
addonId: null,
|
|
38048
38300
|
access: "create"
|
|
38049
38301
|
},
|
|
38302
|
+
"nativeObjectDetection.getOptions": {
|
|
38303
|
+
capName: "native-object-detection",
|
|
38304
|
+
capScope: "device",
|
|
38305
|
+
addonId: null,
|
|
38306
|
+
access: "view"
|
|
38307
|
+
},
|
|
38050
38308
|
"nativeObjectDetection.setEnabled": {
|
|
38051
38309
|
capName: "native-object-detection",
|
|
38052
38310
|
capScope: "device",
|
|
38053
38311
|
addonId: null,
|
|
38054
38312
|
access: "create"
|
|
38055
38313
|
},
|
|
38314
|
+
"nativeObjectDetection.setSettings": {
|
|
38315
|
+
capName: "native-object-detection",
|
|
38316
|
+
capScope: "device",
|
|
38317
|
+
addonId: null,
|
|
38318
|
+
access: "create"
|
|
38319
|
+
},
|
|
38056
38320
|
"navigation.getFeatures": {
|
|
38057
38321
|
capName: "navigation",
|
|
38058
38322
|
capScope: "device",
|
|
@@ -38317,6 +38581,12 @@ Object.freeze({
|
|
|
38317
38581
|
addonId: null,
|
|
38318
38582
|
access: "view"
|
|
38319
38583
|
},
|
|
38584
|
+
"notificationRules.getClipRetentionAsks": {
|
|
38585
|
+
capName: "notification-rules",
|
|
38586
|
+
capScope: "system",
|
|
38587
|
+
addonId: null,
|
|
38588
|
+
access: "view"
|
|
38589
|
+
},
|
|
38320
38590
|
"notificationRules.getConditionCatalog": {
|
|
38321
38591
|
capName: "notification-rules",
|
|
38322
38592
|
capScope: "system",
|
|
@@ -38827,6 +39097,12 @@ Object.freeze({
|
|
|
38827
39097
|
addonId: null,
|
|
38828
39098
|
access: "create"
|
|
38829
39099
|
},
|
|
39100
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
39101
|
+
capName: "pipeline-analytics",
|
|
39102
|
+
capScope: "device",
|
|
39103
|
+
addonId: null,
|
|
39104
|
+
access: "view"
|
|
39105
|
+
},
|
|
38830
39106
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
38831
39107
|
capName: "pipeline-analytics",
|
|
38832
39108
|
capScope: "device",
|
|
@@ -39499,6 +39775,12 @@ Object.freeze({
|
|
|
39499
39775
|
addonId: null,
|
|
39500
39776
|
access: "create"
|
|
39501
39777
|
},
|
|
39778
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
39779
|
+
capName: "pipeline-runner",
|
|
39780
|
+
capScope: "system",
|
|
39781
|
+
addonId: null,
|
|
39782
|
+
access: "create"
|
|
39783
|
+
},
|
|
39502
39784
|
"pipelineRunner.runDetailSubtree": {
|
|
39503
39785
|
capName: "pipeline-runner",
|
|
39504
39786
|
capScope: "system",
|
|
@@ -42279,11 +42561,21 @@ Object.freeze({
|
|
|
42279
42561
|
form: "single",
|
|
42280
42562
|
optional: false
|
|
42281
42563
|
}],
|
|
42564
|
+
"nativeObjectDetection.getOptions": [{
|
|
42565
|
+
name: "deviceId",
|
|
42566
|
+
form: "single",
|
|
42567
|
+
optional: false
|
|
42568
|
+
}],
|
|
42282
42569
|
"nativeObjectDetection.setEnabled": [{
|
|
42283
42570
|
name: "deviceId",
|
|
42284
42571
|
form: "single",
|
|
42285
42572
|
optional: false
|
|
42286
42573
|
}],
|
|
42574
|
+
"nativeObjectDetection.setSettings": [{
|
|
42575
|
+
name: "deviceId",
|
|
42576
|
+
form: "single",
|
|
42577
|
+
optional: false
|
|
42578
|
+
}],
|
|
42287
42579
|
"navigation.getFeatures": [{
|
|
42288
42580
|
name: "deviceId",
|
|
42289
42581
|
form: "single",
|
|
@@ -42633,6 +42925,11 @@ Object.freeze({
|
|
|
42633
42925
|
form: "single",
|
|
42634
42926
|
optional: false
|
|
42635
42927
|
}],
|
|
42928
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
42929
|
+
name: "deviceId",
|
|
42930
|
+
form: "single",
|
|
42931
|
+
optional: false
|
|
42932
|
+
}],
|
|
42636
42933
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
42637
42934
|
name: "deviceId",
|
|
42638
42935
|
form: "single",
|
|
@@ -42823,6 +43120,11 @@ Object.freeze({
|
|
|
42823
43120
|
form: "single",
|
|
42824
43121
|
optional: false
|
|
42825
43122
|
}],
|
|
43123
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
43124
|
+
name: "deviceId",
|
|
43125
|
+
form: "single",
|
|
43126
|
+
optional: false
|
|
43127
|
+
}],
|
|
42826
43128
|
"pipelineRunner.runDetailSubtree": [{
|
|
42827
43129
|
name: "deviceId",
|
|
42828
43130
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-dreo",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.103",
|
|
4
4
|
"description": "Dreo smart-device (fan / air-circulator / purifier / heater / humidifier) device-provider addon for CamStack — wraps the @apocaliss92/nodedreo Dreo cloud client (REST + WebSocket)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"dev": "vite build --watch",
|
|
72
72
|
"typecheck": "tsc --noEmit",
|
|
73
73
|
"test": "vitest run",
|
|
74
|
-
"publish": "npm publish --access public"
|
|
74
|
+
"publish:npm": "npm publish --access public"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@apocaliss92/nodedreo": "file:./vendor/apocaliss92-nodedreo-0.1.0.tgz",
|