@camstack/addon-provider-unifi 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(),
|
|
@@ -28612,11 +28781,46 @@ var NativeObjectDetectionStatusSchema = object({
|
|
|
28612
28781
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28613
28782
|
/**
|
|
28614
28783
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
28615
|
-
*
|
|
28616
|
-
*
|
|
28784
|
+
*
|
|
28785
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
28786
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
28787
|
+
* other detection choice is made. `geometry` on
|
|
28788
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
28789
|
+
* choice would buy this particular camera.
|
|
28617
28790
|
*/
|
|
28618
28791
|
enabled: boolean()
|
|
28619
28792
|
});
|
|
28793
|
+
/**
|
|
28794
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
28795
|
+
*
|
|
28796
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
28797
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
28798
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
28799
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
28800
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
28801
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
28802
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
28803
|
+
* something is in front of it, and its stream is already being pulled.
|
|
28804
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
28805
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
28806
|
+
* tracker as motion and no further.
|
|
28807
|
+
*
|
|
28808
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
28809
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
28810
|
+
* derived form is only as honest as `getOptions`).
|
|
28811
|
+
*/
|
|
28812
|
+
var NativeObjectGeometryEnum = _enum([
|
|
28813
|
+
"boxed",
|
|
28814
|
+
"while-streaming",
|
|
28815
|
+
"flag-only"
|
|
28816
|
+
]);
|
|
28817
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
28818
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
28819
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28820
|
+
/** What a detection from this camera carries. */
|
|
28821
|
+
geometry: NativeObjectGeometryEnum
|
|
28822
|
+
});
|
|
28823
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
28620
28824
|
var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
|
|
28621
28825
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
28622
28826
|
lastFetchedAt: number() });
|
|
@@ -28626,13 +28830,23 @@ var nativeObjectDetectionCapability = {
|
|
|
28626
28830
|
deviceNative: true,
|
|
28627
28831
|
mode: "singleton",
|
|
28628
28832
|
deviceTypes: [DeviceType.Camera],
|
|
28629
|
-
methods: {
|
|
28630
|
-
deviceId: number(),
|
|
28631
|
-
|
|
28632
|
-
|
|
28633
|
-
|
|
28634
|
-
|
|
28635
|
-
|
|
28833
|
+
methods: {
|
|
28834
|
+
getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
|
|
28835
|
+
setSettings: method(object({
|
|
28836
|
+
deviceId: number(),
|
|
28837
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
28838
|
+
}), _void(), {
|
|
28839
|
+
kind: "mutation",
|
|
28840
|
+
auth: "admin"
|
|
28841
|
+
}),
|
|
28842
|
+
setEnabled: method(object({
|
|
28843
|
+
deviceId: number(),
|
|
28844
|
+
enabled: boolean()
|
|
28845
|
+
}), _void(), {
|
|
28846
|
+
kind: "mutation",
|
|
28847
|
+
auth: "admin"
|
|
28848
|
+
})
|
|
28849
|
+
},
|
|
28636
28850
|
events: { onDetected: { data: object({
|
|
28637
28851
|
deviceId: number(),
|
|
28638
28852
|
detection: NativeDetectionSchema
|
|
@@ -33480,7 +33694,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
33480
33694
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
33481
33695
|
totalObjects: number().int().nonnegative(),
|
|
33482
33696
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
33483
|
-
byClass: record(string(), number().int().nonnegative())
|
|
33697
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
33698
|
+
/**
|
|
33699
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
33700
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
33701
|
+
*
|
|
33702
|
+
* The operator's question about a scene has two halves and they answer
|
|
33703
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
33704
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
33705
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
33706
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
33707
|
+
*
|
|
33708
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
33709
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
33710
|
+
*
|
|
33711
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
33712
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
33713
|
+
* parked objects here" about a camera whose lot is full.
|
|
33714
|
+
*/
|
|
33715
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
33716
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
33717
|
+
* same absence rule. */
|
|
33718
|
+
transientObjects: number().int().nonnegative().optional()
|
|
33484
33719
|
});
|
|
33485
33720
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
33486
33721
|
zoneId: string(),
|
|
@@ -33603,6 +33838,23 @@ var HistoryPointSchema = object({
|
|
|
33603
33838
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
33604
33839
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
33605
33840
|
* combinatorial coverage the operator UI requested.
|
|
33841
|
+
*
|
|
33842
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
33843
|
+
*
|
|
33844
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
33845
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
33846
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
33847
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
33848
|
+
* horizon rather than to answer a question.
|
|
33849
|
+
*
|
|
33850
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
33851
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
33852
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
33853
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
33854
|
+
* function the writer uses, so the two cannot drift.
|
|
33855
|
+
*
|
|
33856
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
33857
|
+
* it. Do not add a fourth caller.
|
|
33606
33858
|
*/
|
|
33607
33859
|
var zoneAnalyticsCapability = {
|
|
33608
33860
|
name: "zone-analytics",
|
|
@@ -38002,12 +38254,24 @@ Object.freeze({
|
|
|
38002
38254
|
addonId: null,
|
|
38003
38255
|
access: "create"
|
|
38004
38256
|
},
|
|
38257
|
+
"nativeObjectDetection.getOptions": {
|
|
38258
|
+
capName: "native-object-detection",
|
|
38259
|
+
capScope: "device",
|
|
38260
|
+
addonId: null,
|
|
38261
|
+
access: "view"
|
|
38262
|
+
},
|
|
38005
38263
|
"nativeObjectDetection.setEnabled": {
|
|
38006
38264
|
capName: "native-object-detection",
|
|
38007
38265
|
capScope: "device",
|
|
38008
38266
|
addonId: null,
|
|
38009
38267
|
access: "create"
|
|
38010
38268
|
},
|
|
38269
|
+
"nativeObjectDetection.setSettings": {
|
|
38270
|
+
capName: "native-object-detection",
|
|
38271
|
+
capScope: "device",
|
|
38272
|
+
addonId: null,
|
|
38273
|
+
access: "create"
|
|
38274
|
+
},
|
|
38011
38275
|
"navigation.getFeatures": {
|
|
38012
38276
|
capName: "navigation",
|
|
38013
38277
|
capScope: "device",
|
|
@@ -38272,6 +38536,12 @@ Object.freeze({
|
|
|
38272
38536
|
addonId: null,
|
|
38273
38537
|
access: "view"
|
|
38274
38538
|
},
|
|
38539
|
+
"notificationRules.getClipRetentionAsks": {
|
|
38540
|
+
capName: "notification-rules",
|
|
38541
|
+
capScope: "system",
|
|
38542
|
+
addonId: null,
|
|
38543
|
+
access: "view"
|
|
38544
|
+
},
|
|
38275
38545
|
"notificationRules.getConditionCatalog": {
|
|
38276
38546
|
capName: "notification-rules",
|
|
38277
38547
|
capScope: "system",
|
|
@@ -38782,6 +39052,12 @@ Object.freeze({
|
|
|
38782
39052
|
addonId: null,
|
|
38783
39053
|
access: "create"
|
|
38784
39054
|
},
|
|
39055
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
39056
|
+
capName: "pipeline-analytics",
|
|
39057
|
+
capScope: "device",
|
|
39058
|
+
addonId: null,
|
|
39059
|
+
access: "view"
|
|
39060
|
+
},
|
|
38785
39061
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
38786
39062
|
capName: "pipeline-analytics",
|
|
38787
39063
|
capScope: "device",
|
|
@@ -39454,6 +39730,12 @@ Object.freeze({
|
|
|
39454
39730
|
addonId: null,
|
|
39455
39731
|
access: "create"
|
|
39456
39732
|
},
|
|
39733
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
39734
|
+
capName: "pipeline-runner",
|
|
39735
|
+
capScope: "system",
|
|
39736
|
+
addonId: null,
|
|
39737
|
+
access: "create"
|
|
39738
|
+
},
|
|
39457
39739
|
"pipelineRunner.runDetailSubtree": {
|
|
39458
39740
|
capName: "pipeline-runner",
|
|
39459
39741
|
capScope: "system",
|
|
@@ -42234,11 +42516,21 @@ Object.freeze({
|
|
|
42234
42516
|
form: "single",
|
|
42235
42517
|
optional: false
|
|
42236
42518
|
}],
|
|
42519
|
+
"nativeObjectDetection.getOptions": [{
|
|
42520
|
+
name: "deviceId",
|
|
42521
|
+
form: "single",
|
|
42522
|
+
optional: false
|
|
42523
|
+
}],
|
|
42237
42524
|
"nativeObjectDetection.setEnabled": [{
|
|
42238
42525
|
name: "deviceId",
|
|
42239
42526
|
form: "single",
|
|
42240
42527
|
optional: false
|
|
42241
42528
|
}],
|
|
42529
|
+
"nativeObjectDetection.setSettings": [{
|
|
42530
|
+
name: "deviceId",
|
|
42531
|
+
form: "single",
|
|
42532
|
+
optional: false
|
|
42533
|
+
}],
|
|
42242
42534
|
"navigation.getFeatures": [{
|
|
42243
42535
|
name: "deviceId",
|
|
42244
42536
|
form: "single",
|
|
@@ -42588,6 +42880,11 @@ Object.freeze({
|
|
|
42588
42880
|
form: "single",
|
|
42589
42881
|
optional: false
|
|
42590
42882
|
}],
|
|
42883
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
42884
|
+
name: "deviceId",
|
|
42885
|
+
form: "single",
|
|
42886
|
+
optional: false
|
|
42887
|
+
}],
|
|
42591
42888
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
42592
42889
|
name: "deviceId",
|
|
42593
42890
|
form: "single",
|
|
@@ -42778,6 +43075,11 @@ Object.freeze({
|
|
|
42778
43075
|
form: "single",
|
|
42779
43076
|
optional: false
|
|
42780
43077
|
}],
|
|
43078
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
43079
|
+
name: "deviceId",
|
|
43080
|
+
form: "single",
|
|
43081
|
+
optional: false
|
|
43082
|
+
}],
|
|
42781
43083
|
"pipelineRunner.runDetailSubtree": [{
|
|
42782
43084
|
name: "deviceId",
|
|
42783
43085
|
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(),
|
|
@@ -28611,11 +28780,46 @@ var NativeObjectDetectionStatusSchema = object({
|
|
|
28611
28780
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28612
28781
|
/**
|
|
28613
28782
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
28614
|
-
*
|
|
28615
|
-
*
|
|
28783
|
+
*
|
|
28784
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
28785
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
28786
|
+
* other detection choice is made. `geometry` on
|
|
28787
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
28788
|
+
* choice would buy this particular camera.
|
|
28616
28789
|
*/
|
|
28617
28790
|
enabled: boolean()
|
|
28618
28791
|
});
|
|
28792
|
+
/**
|
|
28793
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
28794
|
+
*
|
|
28795
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
28796
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
28797
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
28798
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
28799
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
28800
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
28801
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
28802
|
+
* something is in front of it, and its stream is already being pulled.
|
|
28803
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
28804
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
28805
|
+
* tracker as motion and no further.
|
|
28806
|
+
*
|
|
28807
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
28808
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
28809
|
+
* derived form is only as honest as `getOptions`).
|
|
28810
|
+
*/
|
|
28811
|
+
var NativeObjectGeometryEnum = _enum([
|
|
28812
|
+
"boxed",
|
|
28813
|
+
"while-streaming",
|
|
28814
|
+
"flag-only"
|
|
28815
|
+
]);
|
|
28816
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
28817
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
28818
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28819
|
+
/** What a detection from this camera carries. */
|
|
28820
|
+
geometry: NativeObjectGeometryEnum
|
|
28821
|
+
});
|
|
28822
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
28619
28823
|
var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
|
|
28620
28824
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
28621
28825
|
lastFetchedAt: number() });
|
|
@@ -28625,13 +28829,23 @@ var nativeObjectDetectionCapability = {
|
|
|
28625
28829
|
deviceNative: true,
|
|
28626
28830
|
mode: "singleton",
|
|
28627
28831
|
deviceTypes: [DeviceType.Camera],
|
|
28628
|
-
methods: {
|
|
28629
|
-
deviceId: number(),
|
|
28630
|
-
|
|
28631
|
-
|
|
28632
|
-
|
|
28633
|
-
|
|
28634
|
-
|
|
28832
|
+
methods: {
|
|
28833
|
+
getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
|
|
28834
|
+
setSettings: method(object({
|
|
28835
|
+
deviceId: number(),
|
|
28836
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
28837
|
+
}), _void(), {
|
|
28838
|
+
kind: "mutation",
|
|
28839
|
+
auth: "admin"
|
|
28840
|
+
}),
|
|
28841
|
+
setEnabled: method(object({
|
|
28842
|
+
deviceId: number(),
|
|
28843
|
+
enabled: boolean()
|
|
28844
|
+
}), _void(), {
|
|
28845
|
+
kind: "mutation",
|
|
28846
|
+
auth: "admin"
|
|
28847
|
+
})
|
|
28848
|
+
},
|
|
28635
28849
|
events: { onDetected: { data: object({
|
|
28636
28850
|
deviceId: number(),
|
|
28637
28851
|
detection: NativeDetectionSchema
|
|
@@ -33479,7 +33693,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
33479
33693
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
33480
33694
|
totalObjects: number().int().nonnegative(),
|
|
33481
33695
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
33482
|
-
byClass: record(string(), number().int().nonnegative())
|
|
33696
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
33697
|
+
/**
|
|
33698
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
33699
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
33700
|
+
*
|
|
33701
|
+
* The operator's question about a scene has two halves and they answer
|
|
33702
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
33703
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
33704
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
33705
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
33706
|
+
*
|
|
33707
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
33708
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
33709
|
+
*
|
|
33710
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
33711
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
33712
|
+
* parked objects here" about a camera whose lot is full.
|
|
33713
|
+
*/
|
|
33714
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
33715
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
33716
|
+
* same absence rule. */
|
|
33717
|
+
transientObjects: number().int().nonnegative().optional()
|
|
33483
33718
|
});
|
|
33484
33719
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
33485
33720
|
zoneId: string(),
|
|
@@ -33602,6 +33837,23 @@ var HistoryPointSchema = object({
|
|
|
33602
33837
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
33603
33838
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
33604
33839
|
* combinatorial coverage the operator UI requested.
|
|
33840
|
+
*
|
|
33841
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
33842
|
+
*
|
|
33843
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
33844
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
33845
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
33846
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
33847
|
+
* horizon rather than to answer a question.
|
|
33848
|
+
*
|
|
33849
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
33850
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
33851
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
33852
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
33853
|
+
* function the writer uses, so the two cannot drift.
|
|
33854
|
+
*
|
|
33855
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
33856
|
+
* it. Do not add a fourth caller.
|
|
33605
33857
|
*/
|
|
33606
33858
|
var zoneAnalyticsCapability = {
|
|
33607
33859
|
name: "zone-analytics",
|
|
@@ -38001,12 +38253,24 @@ Object.freeze({
|
|
|
38001
38253
|
addonId: null,
|
|
38002
38254
|
access: "create"
|
|
38003
38255
|
},
|
|
38256
|
+
"nativeObjectDetection.getOptions": {
|
|
38257
|
+
capName: "native-object-detection",
|
|
38258
|
+
capScope: "device",
|
|
38259
|
+
addonId: null,
|
|
38260
|
+
access: "view"
|
|
38261
|
+
},
|
|
38004
38262
|
"nativeObjectDetection.setEnabled": {
|
|
38005
38263
|
capName: "native-object-detection",
|
|
38006
38264
|
capScope: "device",
|
|
38007
38265
|
addonId: null,
|
|
38008
38266
|
access: "create"
|
|
38009
38267
|
},
|
|
38268
|
+
"nativeObjectDetection.setSettings": {
|
|
38269
|
+
capName: "native-object-detection",
|
|
38270
|
+
capScope: "device",
|
|
38271
|
+
addonId: null,
|
|
38272
|
+
access: "create"
|
|
38273
|
+
},
|
|
38010
38274
|
"navigation.getFeatures": {
|
|
38011
38275
|
capName: "navigation",
|
|
38012
38276
|
capScope: "device",
|
|
@@ -38271,6 +38535,12 @@ Object.freeze({
|
|
|
38271
38535
|
addonId: null,
|
|
38272
38536
|
access: "view"
|
|
38273
38537
|
},
|
|
38538
|
+
"notificationRules.getClipRetentionAsks": {
|
|
38539
|
+
capName: "notification-rules",
|
|
38540
|
+
capScope: "system",
|
|
38541
|
+
addonId: null,
|
|
38542
|
+
access: "view"
|
|
38543
|
+
},
|
|
38274
38544
|
"notificationRules.getConditionCatalog": {
|
|
38275
38545
|
capName: "notification-rules",
|
|
38276
38546
|
capScope: "system",
|
|
@@ -38781,6 +39051,12 @@ Object.freeze({
|
|
|
38781
39051
|
addonId: null,
|
|
38782
39052
|
access: "create"
|
|
38783
39053
|
},
|
|
39054
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
39055
|
+
capName: "pipeline-analytics",
|
|
39056
|
+
capScope: "device",
|
|
39057
|
+
addonId: null,
|
|
39058
|
+
access: "view"
|
|
39059
|
+
},
|
|
38784
39060
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
38785
39061
|
capName: "pipeline-analytics",
|
|
38786
39062
|
capScope: "device",
|
|
@@ -39453,6 +39729,12 @@ Object.freeze({
|
|
|
39453
39729
|
addonId: null,
|
|
39454
39730
|
access: "create"
|
|
39455
39731
|
},
|
|
39732
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
39733
|
+
capName: "pipeline-runner",
|
|
39734
|
+
capScope: "system",
|
|
39735
|
+
addonId: null,
|
|
39736
|
+
access: "create"
|
|
39737
|
+
},
|
|
39456
39738
|
"pipelineRunner.runDetailSubtree": {
|
|
39457
39739
|
capName: "pipeline-runner",
|
|
39458
39740
|
capScope: "system",
|
|
@@ -42233,11 +42515,21 @@ Object.freeze({
|
|
|
42233
42515
|
form: "single",
|
|
42234
42516
|
optional: false
|
|
42235
42517
|
}],
|
|
42518
|
+
"nativeObjectDetection.getOptions": [{
|
|
42519
|
+
name: "deviceId",
|
|
42520
|
+
form: "single",
|
|
42521
|
+
optional: false
|
|
42522
|
+
}],
|
|
42236
42523
|
"nativeObjectDetection.setEnabled": [{
|
|
42237
42524
|
name: "deviceId",
|
|
42238
42525
|
form: "single",
|
|
42239
42526
|
optional: false
|
|
42240
42527
|
}],
|
|
42528
|
+
"nativeObjectDetection.setSettings": [{
|
|
42529
|
+
name: "deviceId",
|
|
42530
|
+
form: "single",
|
|
42531
|
+
optional: false
|
|
42532
|
+
}],
|
|
42241
42533
|
"navigation.getFeatures": [{
|
|
42242
42534
|
name: "deviceId",
|
|
42243
42535
|
form: "single",
|
|
@@ -42587,6 +42879,11 @@ Object.freeze({
|
|
|
42587
42879
|
form: "single",
|
|
42588
42880
|
optional: false
|
|
42589
42881
|
}],
|
|
42882
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
42883
|
+
name: "deviceId",
|
|
42884
|
+
form: "single",
|
|
42885
|
+
optional: false
|
|
42886
|
+
}],
|
|
42590
42887
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
42591
42888
|
name: "deviceId",
|
|
42592
42889
|
form: "single",
|
|
@@ -42777,6 +43074,11 @@ Object.freeze({
|
|
|
42777
43074
|
form: "single",
|
|
42778
43075
|
optional: false
|
|
42779
43076
|
}],
|
|
43077
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
43078
|
+
name: "deviceId",
|
|
43079
|
+
form: "single",
|
|
43080
|
+
optional: false
|
|
43081
|
+
}],
|
|
42780
43082
|
"pipelineRunner.runDetailSubtree": [{
|
|
42781
43083
|
name: "deviceId",
|
|
42782
43084
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-unifi",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.103",
|
|
4
4
|
"description": "UniFi Network controller device-provider addon for CamStack — local-controller infra switches/APs (as containers) + network-client presence. NO cameras/Protect.",
|
|
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": "*",
|