@camstack/addon-provider-onvif 1.2.111 → 1.2.113
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 +192 -12
- package/dist/addon.mjs +192 -12
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -5363,7 +5363,7 @@ var ZodIssueCode = {
|
|
|
5363
5363
|
var ZodFirstPartyTypeKind;
|
|
5364
5364
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5365
5365
|
//#endregion
|
|
5366
|
-
//#region ../types/dist/sleep-
|
|
5366
|
+
//#region ../types/dist/sleep-Bs3xPtSh.mjs
|
|
5367
5367
|
/**
|
|
5368
5368
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5369
5369
|
* window to float samples (D455).
|
|
@@ -11820,6 +11820,24 @@ var GetStreamWithCodecInputSchema = object({
|
|
|
11820
11820
|
});
|
|
11821
11821
|
var RtpSourceSchema = object({
|
|
11822
11822
|
url: string(),
|
|
11823
|
+
/**
|
|
11824
|
+
* The SENTRY counterpart of {@link url} — the dial that asks for the stream
|
|
11825
|
+
* WITHOUT asking for the camera — or `null` when this camera offers none.
|
|
11826
|
+
*
|
|
11827
|
+
* The broker answers it because the broker is the only thing that can:
|
|
11828
|
+
* eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
|
|
11829
|
+
* cap), asked of facts only the broker holds. A consumer re-deriving it from
|
|
11830
|
+
* cap bindings would be a second authority, and two authorities on the same
|
|
11831
|
+
* question is how a composite camera ends up dialling a sleeping camera
|
|
11832
|
+
* because its own copy of the rule was a release behind.
|
|
11833
|
+
*
|
|
11834
|
+
* `null` is a real answer and is never a live url in disguise: a consumer
|
|
11835
|
+
* that silently fell back to {@link url} would perform exactly the wake this
|
|
11836
|
+
* field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
|
|
11837
|
+
* transcode hands back an egress the broker is feeding itself, which has no
|
|
11838
|
+
* sentry counterpart.
|
|
11839
|
+
*/
|
|
11840
|
+
sentryUrl: string().nullable().optional(),
|
|
11823
11841
|
videoCodec: _enum(["H264", "H265"]),
|
|
11824
11842
|
audioCodec: string(),
|
|
11825
11843
|
resolution: object({
|
|
@@ -27347,6 +27365,114 @@ DeviceType.Light, DeviceType.Siren, DeviceType.Switch, method(object({
|
|
|
27347
27365
|
lastChangedAt: number()
|
|
27348
27366
|
});
|
|
27349
27367
|
/**
|
|
27368
|
+
* camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
|
|
27369
|
+
* page.
|
|
27370
|
+
*
|
|
27371
|
+
* ## Why this is a capability and not an addon settings schema
|
|
27372
|
+
*
|
|
27373
|
+
* It was one, and it did not render. The addon declared the editor as a
|
|
27374
|
+
* `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
|
|
27375
|
+
* returned that section correctly and `ConfigFormField` renders `type:'widget'`
|
|
27376
|
+
* perfectly well — and nothing ever asked camera-grid for it. The Cluster →
|
|
27377
|
+
* Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
|
|
27378
|
+
* addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
|
|
27379
|
+
* not on it "falls off silently".
|
|
27380
|
+
*
|
|
27381
|
+
* Adding a fifth name to that list would have been the wrong fix twice over:
|
|
27382
|
+
* that page is per-camera DETECTION tuning, and a grid's geometry belongs
|
|
27383
|
+
* beside PTZ and motion zones on the camera itself — which is exactly where the
|
|
27384
|
+
* framework already puts a widget, when the widget is declared on a CAPABILITY.
|
|
27385
|
+
* `deviceConfig.ui` is the mechanism (`motion-zones`, `ptz`, `ptz-autotrack`
|
|
27386
|
+
* all use it): the framework emits the structural section and the widget
|
|
27387
|
+
* self-persists through the cap's own mutations.
|
|
27388
|
+
*
|
|
27389
|
+
* ## Why one addon may implement it
|
|
27390
|
+
*
|
|
27391
|
+
* It is a device-scoped NATIVE cap, registered by the grid camera device
|
|
27392
|
+
* itself. Nothing else declares a composite camera, so nothing else has a
|
|
27393
|
+
* layout — and the device-scoped route means the widget asks THE camera, not
|
|
27394
|
+
* "the camera-grid addon", which is what let the old custom-action pair be
|
|
27395
|
+
* reached only by a caller that already knew the addon id.
|
|
27396
|
+
*
|
|
27397
|
+
* ## The tab
|
|
27398
|
+
*
|
|
27399
|
+
* `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
|
|
27400
|
+
* is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
|
|
27401
|
+
* entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
|
|
27402
|
+
* label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
|
|
27403
|
+
* next to "PTZ").
|
|
27404
|
+
*/
|
|
27405
|
+
/** A rectangle in normalized [0,1] coordinates of whatever contains it. */
|
|
27406
|
+
var GridNormalizedRectSchema = object({
|
|
27407
|
+
x: number().min(0).max(1),
|
|
27408
|
+
y: number().min(0).max(1),
|
|
27409
|
+
width: number().gt(0).max(1),
|
|
27410
|
+
height: number().gt(0).max(1)
|
|
27411
|
+
});
|
|
27412
|
+
/**
|
|
27413
|
+
* One source camera, the part of its picture taken, and where that part lands.
|
|
27414
|
+
*
|
|
27415
|
+
* Both rectangles are NORMALIZED (D519): a source camera can change resolution
|
|
27416
|
+
* — a profile switch, a firmware update, a substream that comes back different
|
|
27417
|
+
* — and a stored PIXEL rectangle would quietly start cutting the wrong region,
|
|
27418
|
+
* which is the class of bug nobody files.
|
|
27419
|
+
*/
|
|
27420
|
+
var GridLayoutCellSchema = object({
|
|
27421
|
+
deviceId: number().int().positive(),
|
|
27422
|
+
/** The part of the SOURCE taken, normalized against the source. */
|
|
27423
|
+
source: GridNormalizedRectSchema,
|
|
27424
|
+
/** Where it lands, normalized against the CANVAS. */
|
|
27425
|
+
cell: GridNormalizedRectSchema
|
|
27426
|
+
});
|
|
27427
|
+
/**
|
|
27428
|
+
* Which profiles this grid can actually compose, and why not.
|
|
27429
|
+
*
|
|
27430
|
+
* A grid's `high` composes its sources' `high` and its `low` their `low`, so a
|
|
27431
|
+
* profile is on offer only when EVERY source can serve it. The refusal NAMES
|
|
27432
|
+
* the sources, because "this grid has no low" is not a finding — "615 has no
|
|
27433
|
+
* low" is, and it is the one an operator can act on.
|
|
27434
|
+
*/
|
|
27435
|
+
var GridProfileOfferSchema = object({
|
|
27436
|
+
profile: _enum([
|
|
27437
|
+
"high",
|
|
27438
|
+
"mid",
|
|
27439
|
+
"low"
|
|
27440
|
+
]),
|
|
27441
|
+
offered: boolean(),
|
|
27442
|
+
/** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
|
|
27443
|
+
missingSources: array(number().int().positive())
|
|
27444
|
+
});
|
|
27445
|
+
var GridLayoutViewSchema = object({
|
|
27446
|
+
/** The persisted grid row this camera was declared from. */
|
|
27447
|
+
instanceId: string(),
|
|
27448
|
+
deviceId: number().int().nonnegative(),
|
|
27449
|
+
name: string(),
|
|
27450
|
+
/** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
|
|
27451
|
+
width: number().int(),
|
|
27452
|
+
height: number().int(),
|
|
27453
|
+
fps: number().int(),
|
|
27454
|
+
cells: array(GridLayoutCellSchema),
|
|
27455
|
+
/** What the catalog will publish, and what it refuses to. Read-only. */
|
|
27456
|
+
profiles: array(GridProfileOfferSchema)
|
|
27457
|
+
});
|
|
27458
|
+
var GridLayoutPatchSchema = object({
|
|
27459
|
+
deviceId: number().int().nonnegative(),
|
|
27460
|
+
name: string().min(1).max(160).optional(),
|
|
27461
|
+
width: number().int().min(160).max(7680).optional(),
|
|
27462
|
+
height: number().int().min(120).max(4320).optional(),
|
|
27463
|
+
fps: number().int().min(1).max(60).optional(),
|
|
27464
|
+
/**
|
|
27465
|
+
* The whole cell list at once. A per-cell patch would need an ordering the
|
|
27466
|
+
* editor does not have, and a half-applied layout is a picture nobody asked
|
|
27467
|
+
* for.
|
|
27468
|
+
*/
|
|
27469
|
+
cells: array(GridLayoutCellSchema).max(16)
|
|
27470
|
+
});
|
|
27471
|
+
DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
|
|
27472
|
+
kind: "mutation",
|
|
27473
|
+
auth: "admin"
|
|
27474
|
+
});
|
|
27475
|
+
/**
|
|
27350
27476
|
* Motion-zones share the same MaskShape vocabulary as privacy-mask — the
|
|
27351
27477
|
* on-camera motion-detection mask is a single `grid` region (a row-major
|
|
27352
27478
|
* boolean cell lattice the camera's onboard VMD evaluates). Composing it as
|
|
@@ -29049,6 +29175,26 @@ var PtzHomePresetSchema = object({
|
|
|
29049
29175
|
"none"
|
|
29050
29176
|
])
|
|
29051
29177
|
});
|
|
29178
|
+
/**
|
|
29179
|
+
* The camera's own idle-return behaviour: whether it goes home by itself, and
|
|
29180
|
+
* after how long.
|
|
29181
|
+
*
|
|
29182
|
+
* ONE shape, not two scalars, because on the camera they are ONE fact —
|
|
29183
|
+
* Reolink's guard point carries `benable` and `timeout` in the same element,
|
|
29184
|
+
* written by the same command. Reading them apart means two round-trips that
|
|
29185
|
+
* can disagree.
|
|
29186
|
+
*
|
|
29187
|
+
* `enabled` and `seconds` are INDEPENDENT: a camera can hold a 68 s delay with
|
|
29188
|
+
* the behaviour switched off, which is exactly what the vendor app leaves when
|
|
29189
|
+
* you turn the guard point off without clearing it. The first version of this
|
|
29190
|
+
* cap reported only the delay, so that state was invisible — a camera could be
|
|
29191
|
+
* configured to return after 68 seconds with no way to say whether it should
|
|
29192
|
+
* return at all.
|
|
29193
|
+
*/
|
|
29194
|
+
var PtzHomeReturnSchema = object({
|
|
29195
|
+
enabled: boolean(),
|
|
29196
|
+
seconds: number().int()
|
|
29197
|
+
});
|
|
29052
29198
|
var ptzCapability = {
|
|
29053
29199
|
name: "ptz",
|
|
29054
29200
|
scope: "device",
|
|
@@ -29131,18 +29277,25 @@ var ptzCapability = {
|
|
|
29131
29277
|
auth: "admin"
|
|
29132
29278
|
}),
|
|
29133
29279
|
/**
|
|
29134
|
-
*
|
|
29135
|
-
* `null` when it has no such behaviour.
|
|
29280
|
+
* Whether the camera returns home on its own when left idle, and after how
|
|
29281
|
+
* long. `null` when it has no such behaviour at all.
|
|
29136
29282
|
*
|
|
29137
29283
|
* Reolink's guard point carries one (`timeout`, freely settable in
|
|
29138
29284
|
* seconds). It is a real function of the camera that we did not expose at
|
|
29139
29285
|
* all, and it belongs next to the home it governs rather than in a vendor
|
|
29140
29286
|
* settings page nobody associates with Home.
|
|
29141
29287
|
*/
|
|
29142
|
-
|
|
29143
|
-
/**
|
|
29144
|
-
|
|
29288
|
+
getHomeReturn: method(object({ deviceId: number() }), PtzHomeReturnSchema.nullable()),
|
|
29289
|
+
/**
|
|
29290
|
+
* Set both together. Refused by a camera with no idle-return behaviour.
|
|
29291
|
+
*
|
|
29292
|
+
* They travel together for the same reason they are read together: the
|
|
29293
|
+
* underlying write carries both, so setting one alone means reading the
|
|
29294
|
+
* other back first and racing whoever else is writing.
|
|
29295
|
+
*/
|
|
29296
|
+
setHomeReturn: method(object({
|
|
29145
29297
|
deviceId: number(),
|
|
29298
|
+
enabled: boolean(),
|
|
29146
29299
|
seconds: number().int().min(0).max(3600)
|
|
29147
29300
|
}), _void(), {
|
|
29148
29301
|
kind: "mutation",
|
|
@@ -33266,6 +33419,18 @@ Object.freeze({
|
|
|
33266
33419
|
addonId: null,
|
|
33267
33420
|
access: "view"
|
|
33268
33421
|
},
|
|
33422
|
+
"cameraGridLayout.getLayout": {
|
|
33423
|
+
capName: "camera-grid-layout",
|
|
33424
|
+
capScope: "device",
|
|
33425
|
+
addonId: null,
|
|
33426
|
+
access: "view"
|
|
33427
|
+
},
|
|
33428
|
+
"cameraGridLayout.saveLayout": {
|
|
33429
|
+
capName: "camera-grid-layout",
|
|
33430
|
+
capScope: "device",
|
|
33431
|
+
addonId: null,
|
|
33432
|
+
access: "create"
|
|
33433
|
+
},
|
|
33269
33434
|
"cameraStreams.getBrokerStreams": {
|
|
33270
33435
|
capName: "camera-streams",
|
|
33271
33436
|
capScope: "device",
|
|
@@ -37016,7 +37181,7 @@ Object.freeze({
|
|
|
37016
37181
|
addonId: null,
|
|
37017
37182
|
access: "view"
|
|
37018
37183
|
},
|
|
37019
|
-
"ptz.
|
|
37184
|
+
"ptz.getHomeReturn": {
|
|
37020
37185
|
capName: "ptz",
|
|
37021
37186
|
capScope: "device",
|
|
37022
37187
|
addonId: null,
|
|
@@ -37076,7 +37241,7 @@ Object.freeze({
|
|
|
37076
37241
|
addonId: null,
|
|
37077
37242
|
access: "create"
|
|
37078
37243
|
},
|
|
37079
|
-
"ptz.
|
|
37244
|
+
"ptz.setHomeReturn": {
|
|
37080
37245
|
capName: "ptz",
|
|
37081
37246
|
capScope: "device",
|
|
37082
37247
|
addonId: null,
|
|
@@ -38965,6 +39130,21 @@ Object.freeze({
|
|
|
38965
39130
|
form: "single",
|
|
38966
39131
|
optional: false
|
|
38967
39132
|
}],
|
|
39133
|
+
"cameraGridLayout.getLayout": [{
|
|
39134
|
+
name: "deviceId",
|
|
39135
|
+
form: "single",
|
|
39136
|
+
optional: false
|
|
39137
|
+
}],
|
|
39138
|
+
"cameraGridLayout.saveLayout": [{
|
|
39139
|
+
name: "cells",
|
|
39140
|
+
form: "object-array",
|
|
39141
|
+
optional: false,
|
|
39142
|
+
itemField: "deviceId"
|
|
39143
|
+
}, {
|
|
39144
|
+
name: "deviceId",
|
|
39145
|
+
form: "single",
|
|
39146
|
+
optional: false
|
|
39147
|
+
}],
|
|
38968
39148
|
"cameraStreams.getBrokerStreams": [{
|
|
38969
39149
|
name: "deviceId",
|
|
38970
39150
|
form: "single",
|
|
@@ -40265,7 +40445,7 @@ Object.freeze({
|
|
|
40265
40445
|
form: "single",
|
|
40266
40446
|
optional: false
|
|
40267
40447
|
}],
|
|
40268
|
-
"ptz.
|
|
40448
|
+
"ptz.getHomeReturn": [{
|
|
40269
40449
|
name: "deviceId",
|
|
40270
40450
|
form: "single",
|
|
40271
40451
|
optional: false
|
|
@@ -40315,7 +40495,7 @@ Object.freeze({
|
|
|
40315
40495
|
form: "single",
|
|
40316
40496
|
optional: false
|
|
40317
40497
|
}],
|
|
40318
|
-
"ptz.
|
|
40498
|
+
"ptz.setHomeReturn": [{
|
|
40319
40499
|
name: "deviceId",
|
|
40320
40500
|
form: "single",
|
|
40321
40501
|
optional: false
|
|
@@ -50460,10 +50640,10 @@ var OnvifCamera = class {
|
|
|
50460
50640
|
captureHomeHere: async () => {
|
|
50461
50641
|
throw new Error("OnvifCamera: home is the PTZ origin on ONVIF and cannot be moved to the current position");
|
|
50462
50642
|
},
|
|
50463
|
-
|
|
50643
|
+
getHomeReturn: async () => {
|
|
50464
50644
|
return null;
|
|
50465
50645
|
},
|
|
50466
|
-
|
|
50646
|
+
setHomeReturn: async () => {
|
|
50467
50647
|
throw new Error("OnvifCamera: no idle-return timer on this driver");
|
|
50468
50648
|
},
|
|
50469
50649
|
setHomePreset: async () => {
|
package/dist/addon.mjs
CHANGED
|
@@ -5364,7 +5364,7 @@ var ZodIssueCode = {
|
|
|
5364
5364
|
var ZodFirstPartyTypeKind;
|
|
5365
5365
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5366
5366
|
//#endregion
|
|
5367
|
-
//#region ../types/dist/sleep-
|
|
5367
|
+
//#region ../types/dist/sleep-Bs3xPtSh.mjs
|
|
5368
5368
|
/**
|
|
5369
5369
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5370
5370
|
* window to float samples (D455).
|
|
@@ -11821,6 +11821,24 @@ var GetStreamWithCodecInputSchema = object({
|
|
|
11821
11821
|
});
|
|
11822
11822
|
var RtpSourceSchema = object({
|
|
11823
11823
|
url: string(),
|
|
11824
|
+
/**
|
|
11825
|
+
* The SENTRY counterpart of {@link url} — the dial that asks for the stream
|
|
11826
|
+
* WITHOUT asking for the camera — or `null` when this camera offers none.
|
|
11827
|
+
*
|
|
11828
|
+
* The broker answers it because the broker is the only thing that can:
|
|
11829
|
+
* eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
|
|
11830
|
+
* cap), asked of facts only the broker holds. A consumer re-deriving it from
|
|
11831
|
+
* cap bindings would be a second authority, and two authorities on the same
|
|
11832
|
+
* question is how a composite camera ends up dialling a sleeping camera
|
|
11833
|
+
* because its own copy of the rule was a release behind.
|
|
11834
|
+
*
|
|
11835
|
+
* `null` is a real answer and is never a live url in disguise: a consumer
|
|
11836
|
+
* that silently fell back to {@link url} would perform exactly the wake this
|
|
11837
|
+
* field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
|
|
11838
|
+
* transcode hands back an egress the broker is feeding itself, which has no
|
|
11839
|
+
* sentry counterpart.
|
|
11840
|
+
*/
|
|
11841
|
+
sentryUrl: string().nullable().optional(),
|
|
11824
11842
|
videoCodec: _enum(["H264", "H265"]),
|
|
11825
11843
|
audioCodec: string(),
|
|
11826
11844
|
resolution: object({
|
|
@@ -27348,6 +27366,114 @@ DeviceType.Light, DeviceType.Siren, DeviceType.Switch, method(object({
|
|
|
27348
27366
|
lastChangedAt: number()
|
|
27349
27367
|
});
|
|
27350
27368
|
/**
|
|
27369
|
+
* camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
|
|
27370
|
+
* page.
|
|
27371
|
+
*
|
|
27372
|
+
* ## Why this is a capability and not an addon settings schema
|
|
27373
|
+
*
|
|
27374
|
+
* It was one, and it did not render. The addon declared the editor as a
|
|
27375
|
+
* `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
|
|
27376
|
+
* returned that section correctly and `ConfigFormField` renders `type:'widget'`
|
|
27377
|
+
* perfectly well — and nothing ever asked camera-grid for it. The Cluster →
|
|
27378
|
+
* Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
|
|
27379
|
+
* addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
|
|
27380
|
+
* not on it "falls off silently".
|
|
27381
|
+
*
|
|
27382
|
+
* Adding a fifth name to that list would have been the wrong fix twice over:
|
|
27383
|
+
* that page is per-camera DETECTION tuning, and a grid's geometry belongs
|
|
27384
|
+
* beside PTZ and motion zones on the camera itself — which is exactly where the
|
|
27385
|
+
* framework already puts a widget, when the widget is declared on a CAPABILITY.
|
|
27386
|
+
* `deviceConfig.ui` is the mechanism (`motion-zones`, `ptz`, `ptz-autotrack`
|
|
27387
|
+
* all use it): the framework emits the structural section and the widget
|
|
27388
|
+
* self-persists through the cap's own mutations.
|
|
27389
|
+
*
|
|
27390
|
+
* ## Why one addon may implement it
|
|
27391
|
+
*
|
|
27392
|
+
* It is a device-scoped NATIVE cap, registered by the grid camera device
|
|
27393
|
+
* itself. Nothing else declares a composite camera, so nothing else has a
|
|
27394
|
+
* layout — and the device-scoped route means the widget asks THE camera, not
|
|
27395
|
+
* "the camera-grid addon", which is what let the old custom-action pair be
|
|
27396
|
+
* reached only by a caller that already knew the addon id.
|
|
27397
|
+
*
|
|
27398
|
+
* ## The tab
|
|
27399
|
+
*
|
|
27400
|
+
* `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
|
|
27401
|
+
* is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
|
|
27402
|
+
* entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
|
|
27403
|
+
* label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
|
|
27404
|
+
* next to "PTZ").
|
|
27405
|
+
*/
|
|
27406
|
+
/** A rectangle in normalized [0,1] coordinates of whatever contains it. */
|
|
27407
|
+
var GridNormalizedRectSchema = object({
|
|
27408
|
+
x: number().min(0).max(1),
|
|
27409
|
+
y: number().min(0).max(1),
|
|
27410
|
+
width: number().gt(0).max(1),
|
|
27411
|
+
height: number().gt(0).max(1)
|
|
27412
|
+
});
|
|
27413
|
+
/**
|
|
27414
|
+
* One source camera, the part of its picture taken, and where that part lands.
|
|
27415
|
+
*
|
|
27416
|
+
* Both rectangles are NORMALIZED (D519): a source camera can change resolution
|
|
27417
|
+
* — a profile switch, a firmware update, a substream that comes back different
|
|
27418
|
+
* — and a stored PIXEL rectangle would quietly start cutting the wrong region,
|
|
27419
|
+
* which is the class of bug nobody files.
|
|
27420
|
+
*/
|
|
27421
|
+
var GridLayoutCellSchema = object({
|
|
27422
|
+
deviceId: number().int().positive(),
|
|
27423
|
+
/** The part of the SOURCE taken, normalized against the source. */
|
|
27424
|
+
source: GridNormalizedRectSchema,
|
|
27425
|
+
/** Where it lands, normalized against the CANVAS. */
|
|
27426
|
+
cell: GridNormalizedRectSchema
|
|
27427
|
+
});
|
|
27428
|
+
/**
|
|
27429
|
+
* Which profiles this grid can actually compose, and why not.
|
|
27430
|
+
*
|
|
27431
|
+
* A grid's `high` composes its sources' `high` and its `low` their `low`, so a
|
|
27432
|
+
* profile is on offer only when EVERY source can serve it. The refusal NAMES
|
|
27433
|
+
* the sources, because "this grid has no low" is not a finding — "615 has no
|
|
27434
|
+
* low" is, and it is the one an operator can act on.
|
|
27435
|
+
*/
|
|
27436
|
+
var GridProfileOfferSchema = object({
|
|
27437
|
+
profile: _enum([
|
|
27438
|
+
"high",
|
|
27439
|
+
"mid",
|
|
27440
|
+
"low"
|
|
27441
|
+
]),
|
|
27442
|
+
offered: boolean(),
|
|
27443
|
+
/** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
|
|
27444
|
+
missingSources: array(number().int().positive())
|
|
27445
|
+
});
|
|
27446
|
+
var GridLayoutViewSchema = object({
|
|
27447
|
+
/** The persisted grid row this camera was declared from. */
|
|
27448
|
+
instanceId: string(),
|
|
27449
|
+
deviceId: number().int().nonnegative(),
|
|
27450
|
+
name: string(),
|
|
27451
|
+
/** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
|
|
27452
|
+
width: number().int(),
|
|
27453
|
+
height: number().int(),
|
|
27454
|
+
fps: number().int(),
|
|
27455
|
+
cells: array(GridLayoutCellSchema),
|
|
27456
|
+
/** What the catalog will publish, and what it refuses to. Read-only. */
|
|
27457
|
+
profiles: array(GridProfileOfferSchema)
|
|
27458
|
+
});
|
|
27459
|
+
var GridLayoutPatchSchema = object({
|
|
27460
|
+
deviceId: number().int().nonnegative(),
|
|
27461
|
+
name: string().min(1).max(160).optional(),
|
|
27462
|
+
width: number().int().min(160).max(7680).optional(),
|
|
27463
|
+
height: number().int().min(120).max(4320).optional(),
|
|
27464
|
+
fps: number().int().min(1).max(60).optional(),
|
|
27465
|
+
/**
|
|
27466
|
+
* The whole cell list at once. A per-cell patch would need an ordering the
|
|
27467
|
+
* editor does not have, and a half-applied layout is a picture nobody asked
|
|
27468
|
+
* for.
|
|
27469
|
+
*/
|
|
27470
|
+
cells: array(GridLayoutCellSchema).max(16)
|
|
27471
|
+
});
|
|
27472
|
+
DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
|
|
27473
|
+
kind: "mutation",
|
|
27474
|
+
auth: "admin"
|
|
27475
|
+
});
|
|
27476
|
+
/**
|
|
27351
27477
|
* Motion-zones share the same MaskShape vocabulary as privacy-mask — the
|
|
27352
27478
|
* on-camera motion-detection mask is a single `grid` region (a row-major
|
|
27353
27479
|
* boolean cell lattice the camera's onboard VMD evaluates). Composing it as
|
|
@@ -29050,6 +29176,26 @@ var PtzHomePresetSchema = object({
|
|
|
29050
29176
|
"none"
|
|
29051
29177
|
])
|
|
29052
29178
|
});
|
|
29179
|
+
/**
|
|
29180
|
+
* The camera's own idle-return behaviour: whether it goes home by itself, and
|
|
29181
|
+
* after how long.
|
|
29182
|
+
*
|
|
29183
|
+
* ONE shape, not two scalars, because on the camera they are ONE fact —
|
|
29184
|
+
* Reolink's guard point carries `benable` and `timeout` in the same element,
|
|
29185
|
+
* written by the same command. Reading them apart means two round-trips that
|
|
29186
|
+
* can disagree.
|
|
29187
|
+
*
|
|
29188
|
+
* `enabled` and `seconds` are INDEPENDENT: a camera can hold a 68 s delay with
|
|
29189
|
+
* the behaviour switched off, which is exactly what the vendor app leaves when
|
|
29190
|
+
* you turn the guard point off without clearing it. The first version of this
|
|
29191
|
+
* cap reported only the delay, so that state was invisible — a camera could be
|
|
29192
|
+
* configured to return after 68 seconds with no way to say whether it should
|
|
29193
|
+
* return at all.
|
|
29194
|
+
*/
|
|
29195
|
+
var PtzHomeReturnSchema = object({
|
|
29196
|
+
enabled: boolean(),
|
|
29197
|
+
seconds: number().int()
|
|
29198
|
+
});
|
|
29053
29199
|
var ptzCapability = {
|
|
29054
29200
|
name: "ptz",
|
|
29055
29201
|
scope: "device",
|
|
@@ -29132,18 +29278,25 @@ var ptzCapability = {
|
|
|
29132
29278
|
auth: "admin"
|
|
29133
29279
|
}),
|
|
29134
29280
|
/**
|
|
29135
|
-
*
|
|
29136
|
-
* `null` when it has no such behaviour.
|
|
29281
|
+
* Whether the camera returns home on its own when left idle, and after how
|
|
29282
|
+
* long. `null` when it has no such behaviour at all.
|
|
29137
29283
|
*
|
|
29138
29284
|
* Reolink's guard point carries one (`timeout`, freely settable in
|
|
29139
29285
|
* seconds). It is a real function of the camera that we did not expose at
|
|
29140
29286
|
* all, and it belongs next to the home it governs rather than in a vendor
|
|
29141
29287
|
* settings page nobody associates with Home.
|
|
29142
29288
|
*/
|
|
29143
|
-
|
|
29144
|
-
/**
|
|
29145
|
-
|
|
29289
|
+
getHomeReturn: method(object({ deviceId: number() }), PtzHomeReturnSchema.nullable()),
|
|
29290
|
+
/**
|
|
29291
|
+
* Set both together. Refused by a camera with no idle-return behaviour.
|
|
29292
|
+
*
|
|
29293
|
+
* They travel together for the same reason they are read together: the
|
|
29294
|
+
* underlying write carries both, so setting one alone means reading the
|
|
29295
|
+
* other back first and racing whoever else is writing.
|
|
29296
|
+
*/
|
|
29297
|
+
setHomeReturn: method(object({
|
|
29146
29298
|
deviceId: number(),
|
|
29299
|
+
enabled: boolean(),
|
|
29147
29300
|
seconds: number().int().min(0).max(3600)
|
|
29148
29301
|
}), _void(), {
|
|
29149
29302
|
kind: "mutation",
|
|
@@ -33267,6 +33420,18 @@ Object.freeze({
|
|
|
33267
33420
|
addonId: null,
|
|
33268
33421
|
access: "view"
|
|
33269
33422
|
},
|
|
33423
|
+
"cameraGridLayout.getLayout": {
|
|
33424
|
+
capName: "camera-grid-layout",
|
|
33425
|
+
capScope: "device",
|
|
33426
|
+
addonId: null,
|
|
33427
|
+
access: "view"
|
|
33428
|
+
},
|
|
33429
|
+
"cameraGridLayout.saveLayout": {
|
|
33430
|
+
capName: "camera-grid-layout",
|
|
33431
|
+
capScope: "device",
|
|
33432
|
+
addonId: null,
|
|
33433
|
+
access: "create"
|
|
33434
|
+
},
|
|
33270
33435
|
"cameraStreams.getBrokerStreams": {
|
|
33271
33436
|
capName: "camera-streams",
|
|
33272
33437
|
capScope: "device",
|
|
@@ -37017,7 +37182,7 @@ Object.freeze({
|
|
|
37017
37182
|
addonId: null,
|
|
37018
37183
|
access: "view"
|
|
37019
37184
|
},
|
|
37020
|
-
"ptz.
|
|
37185
|
+
"ptz.getHomeReturn": {
|
|
37021
37186
|
capName: "ptz",
|
|
37022
37187
|
capScope: "device",
|
|
37023
37188
|
addonId: null,
|
|
@@ -37077,7 +37242,7 @@ Object.freeze({
|
|
|
37077
37242
|
addonId: null,
|
|
37078
37243
|
access: "create"
|
|
37079
37244
|
},
|
|
37080
|
-
"ptz.
|
|
37245
|
+
"ptz.setHomeReturn": {
|
|
37081
37246
|
capName: "ptz",
|
|
37082
37247
|
capScope: "device",
|
|
37083
37248
|
addonId: null,
|
|
@@ -38966,6 +39131,21 @@ Object.freeze({
|
|
|
38966
39131
|
form: "single",
|
|
38967
39132
|
optional: false
|
|
38968
39133
|
}],
|
|
39134
|
+
"cameraGridLayout.getLayout": [{
|
|
39135
|
+
name: "deviceId",
|
|
39136
|
+
form: "single",
|
|
39137
|
+
optional: false
|
|
39138
|
+
}],
|
|
39139
|
+
"cameraGridLayout.saveLayout": [{
|
|
39140
|
+
name: "cells",
|
|
39141
|
+
form: "object-array",
|
|
39142
|
+
optional: false,
|
|
39143
|
+
itemField: "deviceId"
|
|
39144
|
+
}, {
|
|
39145
|
+
name: "deviceId",
|
|
39146
|
+
form: "single",
|
|
39147
|
+
optional: false
|
|
39148
|
+
}],
|
|
38969
39149
|
"cameraStreams.getBrokerStreams": [{
|
|
38970
39150
|
name: "deviceId",
|
|
38971
39151
|
form: "single",
|
|
@@ -40266,7 +40446,7 @@ Object.freeze({
|
|
|
40266
40446
|
form: "single",
|
|
40267
40447
|
optional: false
|
|
40268
40448
|
}],
|
|
40269
|
-
"ptz.
|
|
40449
|
+
"ptz.getHomeReturn": [{
|
|
40270
40450
|
name: "deviceId",
|
|
40271
40451
|
form: "single",
|
|
40272
40452
|
optional: false
|
|
@@ -40316,7 +40496,7 @@ Object.freeze({
|
|
|
40316
40496
|
form: "single",
|
|
40317
40497
|
optional: false
|
|
40318
40498
|
}],
|
|
40319
|
-
"ptz.
|
|
40499
|
+
"ptz.setHomeReturn": [{
|
|
40320
40500
|
name: "deviceId",
|
|
40321
40501
|
form: "single",
|
|
40322
40502
|
optional: false
|
|
@@ -50461,10 +50641,10 @@ var OnvifCamera = class {
|
|
|
50461
50641
|
captureHomeHere: async () => {
|
|
50462
50642
|
throw new Error("OnvifCamera: home is the PTZ origin on ONVIF and cannot be moved to the current position");
|
|
50463
50643
|
},
|
|
50464
|
-
|
|
50644
|
+
getHomeReturn: async () => {
|
|
50465
50645
|
return null;
|
|
50466
50646
|
},
|
|
50467
|
-
|
|
50647
|
+
setHomeReturn: async () => {
|
|
50468
50648
|
throw new Error("OnvifCamera: no idle-return timer on this driver");
|
|
50469
50649
|
},
|
|
50470
50650
|
setHomePreset: async () => {
|