@camstack/addon-matter-broker 0.2.109 → 0.2.111
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 +209 -7
- package/dist/addon.mjs +209 -7
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -5374,7 +5374,7 @@ var ZodIssueCode = {
|
|
|
5374
5374
|
var ZodFirstPartyTypeKind;
|
|
5375
5375
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5376
5376
|
//#endregion
|
|
5377
|
-
//#region ../types/dist/sleep-
|
|
5377
|
+
//#region ../types/dist/sleep-vl6nBE8d.mjs
|
|
5378
5378
|
/**
|
|
5379
5379
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5380
5380
|
* window to float samples (D455).
|
|
@@ -30966,14 +30966,81 @@ var privacyMaskCapability = {
|
|
|
30966
30966
|
* whether persisting is worth a SQLite commit. */
|
|
30967
30967
|
volatileStateFields: ["lastFetchedAt"]
|
|
30968
30968
|
};
|
|
30969
|
+
/**
|
|
30970
|
+
* What a preset id DOES on this camera.
|
|
30971
|
+
*
|
|
30972
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
30973
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
30974
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
30975
|
+
* firmware:
|
|
30976
|
+
*
|
|
30977
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
30978
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
30979
|
+
* 95 Call OSD menu
|
|
30980
|
+
*
|
|
30981
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
30982
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
30983
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
30984
|
+
* operator as a transport failure.
|
|
30985
|
+
*
|
|
30986
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
30987
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
30988
|
+
* `deletePreset` are gated.
|
|
30989
|
+
*/
|
|
30990
|
+
var PtzPresetFunctionSchema = _enum([
|
|
30991
|
+
"home",
|
|
30992
|
+
"day-mode",
|
|
30993
|
+
"night-mode",
|
|
30994
|
+
"day-night-auto",
|
|
30995
|
+
"set-limits",
|
|
30996
|
+
"save-limits",
|
|
30997
|
+
"reboot",
|
|
30998
|
+
"osd-menu"
|
|
30999
|
+
]);
|
|
30969
31000
|
var PtzPresetSchema = object({
|
|
30970
31001
|
id: string$2(),
|
|
30971
|
-
name: string$2()
|
|
31002
|
+
name: string$2(),
|
|
31003
|
+
/**
|
|
31004
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
31005
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
31006
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
31007
|
+
*/
|
|
31008
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
31009
|
+
/**
|
|
31010
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
31011
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
31012
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
31013
|
+
*/
|
|
31014
|
+
writable: boolean()
|
|
30972
31015
|
});
|
|
31016
|
+
/**
|
|
31017
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
31018
|
+
* read it.
|
|
31019
|
+
*
|
|
31020
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
31021
|
+
* position no way to say so. All four said `0`:
|
|
31022
|
+
*
|
|
31023
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
31024
|
+
* path lands upstream"
|
|
31025
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
31026
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
31027
|
+
* onvif throws
|
|
31028
|
+
*
|
|
31029
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
31030
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
31031
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
31032
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
31033
|
+
* headroom", which evacuated a healthy disk.
|
|
31034
|
+
*
|
|
31035
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
31036
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
31037
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
31038
|
+
* tells callers to migrate to.
|
|
31039
|
+
*/
|
|
30973
31040
|
var PtzPositionSchema = object({
|
|
30974
|
-
pan: number(),
|
|
30975
|
-
tilt: number(),
|
|
30976
|
-
zoom: number()
|
|
31041
|
+
pan: number().nullable(),
|
|
31042
|
+
tilt: number().nullable(),
|
|
31043
|
+
zoom: number().nullable()
|
|
30977
31044
|
});
|
|
30978
31045
|
var PtzMoveCommandSchema = object({
|
|
30979
31046
|
pan: number().optional(),
|
|
@@ -30992,7 +31059,72 @@ var PtzOptionsSchema = object({
|
|
|
30992
31059
|
maxPresets: number().optional(),
|
|
30993
31060
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
30994
31061
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
30995
|
-
hasAutofocus: boolean()
|
|
31062
|
+
hasAutofocus: boolean(),
|
|
31063
|
+
/**
|
|
31064
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
31065
|
+
*
|
|
31066
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
31067
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
31068
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
31069
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
31070
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
31071
|
+
* the knob it is turning.
|
|
31072
|
+
*
|
|
31073
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
31074
|
+
* a float). Never a made-up number.
|
|
31075
|
+
*/
|
|
31076
|
+
speedSteps: number().int().positive().nullable(),
|
|
31077
|
+
/**
|
|
31078
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
31079
|
+
*
|
|
31080
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
31081
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
31082
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
31083
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
31084
|
+
* gain to be divided into.
|
|
31085
|
+
*
|
|
31086
|
+
* `null` = the driver cannot say.
|
|
31087
|
+
*/
|
|
31088
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
31089
|
+
});
|
|
31090
|
+
/**
|
|
31091
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
31092
|
+
*
|
|
31093
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
31094
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
31095
|
+
* not one of the three cameras honours its own:
|
|
31096
|
+
*
|
|
31097
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
31098
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
31099
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
31100
|
+
*
|
|
31101
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
31102
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
31103
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
31104
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
31105
|
+
*
|
|
31106
|
+
* `source` is what makes it honest:
|
|
31107
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
31108
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
31109
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
31110
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
31111
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
31112
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
31113
|
+
* no picker.
|
|
31114
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
31115
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
31116
|
+
*
|
|
31117
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
31118
|
+
* native case has no preset and homes perfectly well.
|
|
31119
|
+
*/
|
|
31120
|
+
var PtzHomePresetSchema = object({
|
|
31121
|
+
presetId: string$2().nullable(),
|
|
31122
|
+
source: _enum([
|
|
31123
|
+
"operator",
|
|
31124
|
+
"firmware",
|
|
31125
|
+
"native",
|
|
31126
|
+
"none"
|
|
31127
|
+
])
|
|
30996
31128
|
});
|
|
30997
31129
|
DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(PtzMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), array(PtzPresetSchema)), method(object({
|
|
30998
31130
|
deviceId: number(),
|
|
@@ -31010,7 +31142,22 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
31010
31142
|
}), _void(), {
|
|
31011
31143
|
kind: "mutation",
|
|
31012
31144
|
auth: "admin"
|
|
31013
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
31145
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
31146
|
+
deviceId: number(),
|
|
31147
|
+
presetId: string$2().nullable()
|
|
31148
|
+
}), _void(), {
|
|
31149
|
+
kind: "mutation",
|
|
31150
|
+
auth: "admin"
|
|
31151
|
+
}), method(object({ deviceId: number() }), _void(), {
|
|
31152
|
+
kind: "mutation",
|
|
31153
|
+
auth: "admin"
|
|
31154
|
+
}), method(object({ deviceId: number() }), number().int().nullable()), method(object({
|
|
31155
|
+
deviceId: number(),
|
|
31156
|
+
seconds: number().int().min(0).max(3600)
|
|
31157
|
+
}), _void(), {
|
|
31158
|
+
kind: "mutation",
|
|
31159
|
+
auth: "admin"
|
|
31160
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
31014
31161
|
deviceId: number(),
|
|
31015
31162
|
enabled: boolean()
|
|
31016
31163
|
}), _void(), { kind: "mutation" });
|
|
@@ -40252,6 +40399,12 @@ Object.freeze({
|
|
|
40252
40399
|
addonId: null,
|
|
40253
40400
|
access: "create"
|
|
40254
40401
|
},
|
|
40402
|
+
"ptz.captureHomeHere": {
|
|
40403
|
+
capName: "ptz",
|
|
40404
|
+
capScope: "device",
|
|
40405
|
+
addonId: null,
|
|
40406
|
+
access: "create"
|
|
40407
|
+
},
|
|
40255
40408
|
"ptz.continuousMove": {
|
|
40256
40409
|
capName: "ptz",
|
|
40257
40410
|
capScope: "device",
|
|
@@ -40264,6 +40417,18 @@ Object.freeze({
|
|
|
40264
40417
|
addonId: null,
|
|
40265
40418
|
access: "delete"
|
|
40266
40419
|
},
|
|
40420
|
+
"ptz.getHomePreset": {
|
|
40421
|
+
capName: "ptz",
|
|
40422
|
+
capScope: "device",
|
|
40423
|
+
addonId: null,
|
|
40424
|
+
access: "view"
|
|
40425
|
+
},
|
|
40426
|
+
"ptz.getHomeReturnSeconds": {
|
|
40427
|
+
capName: "ptz",
|
|
40428
|
+
capScope: "device",
|
|
40429
|
+
addonId: null,
|
|
40430
|
+
access: "view"
|
|
40431
|
+
},
|
|
40267
40432
|
"ptz.getOptions": {
|
|
40268
40433
|
capName: "ptz",
|
|
40269
40434
|
capScope: "device",
|
|
@@ -40312,6 +40477,18 @@ Object.freeze({
|
|
|
40312
40477
|
addonId: null,
|
|
40313
40478
|
access: "create"
|
|
40314
40479
|
},
|
|
40480
|
+
"ptz.setHomePreset": {
|
|
40481
|
+
capName: "ptz",
|
|
40482
|
+
capScope: "device",
|
|
40483
|
+
addonId: null,
|
|
40484
|
+
access: "create"
|
|
40485
|
+
},
|
|
40486
|
+
"ptz.setHomeReturnSeconds": {
|
|
40487
|
+
capName: "ptz",
|
|
40488
|
+
capScope: "device",
|
|
40489
|
+
addonId: null,
|
|
40490
|
+
access: "create"
|
|
40491
|
+
},
|
|
40315
40492
|
"ptz.stop": {
|
|
40316
40493
|
capName: "ptz",
|
|
40317
40494
|
capScope: "device",
|
|
@@ -43475,6 +43652,11 @@ Object.freeze({
|
|
|
43475
43652
|
form: "single",
|
|
43476
43653
|
optional: false
|
|
43477
43654
|
}],
|
|
43655
|
+
"ptz.captureHomeHere": [{
|
|
43656
|
+
name: "deviceId",
|
|
43657
|
+
form: "single",
|
|
43658
|
+
optional: false
|
|
43659
|
+
}],
|
|
43478
43660
|
"ptz.continuousMove": [{
|
|
43479
43661
|
name: "deviceId",
|
|
43480
43662
|
form: "single",
|
|
@@ -43485,6 +43667,16 @@ Object.freeze({
|
|
|
43485
43667
|
form: "single",
|
|
43486
43668
|
optional: false
|
|
43487
43669
|
}],
|
|
43670
|
+
"ptz.getHomePreset": [{
|
|
43671
|
+
name: "deviceId",
|
|
43672
|
+
form: "single",
|
|
43673
|
+
optional: false
|
|
43674
|
+
}],
|
|
43675
|
+
"ptz.getHomeReturnSeconds": [{
|
|
43676
|
+
name: "deviceId",
|
|
43677
|
+
form: "single",
|
|
43678
|
+
optional: false
|
|
43679
|
+
}],
|
|
43488
43680
|
"ptz.getOptions": [{
|
|
43489
43681
|
name: "deviceId",
|
|
43490
43682
|
form: "single",
|
|
@@ -43525,6 +43717,16 @@ Object.freeze({
|
|
|
43525
43717
|
form: "single",
|
|
43526
43718
|
optional: false
|
|
43527
43719
|
}],
|
|
43720
|
+
"ptz.setHomePreset": [{
|
|
43721
|
+
name: "deviceId",
|
|
43722
|
+
form: "single",
|
|
43723
|
+
optional: false
|
|
43724
|
+
}],
|
|
43725
|
+
"ptz.setHomeReturnSeconds": [{
|
|
43726
|
+
name: "deviceId",
|
|
43727
|
+
form: "single",
|
|
43728
|
+
optional: false
|
|
43729
|
+
}],
|
|
43528
43730
|
"ptz.stop": [{
|
|
43529
43731
|
name: "deviceId",
|
|
43530
43732
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -5372,7 +5372,7 @@ var ZodIssueCode = {
|
|
|
5372
5372
|
var ZodFirstPartyTypeKind;
|
|
5373
5373
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5374
5374
|
//#endregion
|
|
5375
|
-
//#region ../types/dist/sleep-
|
|
5375
|
+
//#region ../types/dist/sleep-vl6nBE8d.mjs
|
|
5376
5376
|
/**
|
|
5377
5377
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5378
5378
|
* window to float samples (D455).
|
|
@@ -30964,14 +30964,81 @@ var privacyMaskCapability = {
|
|
|
30964
30964
|
* whether persisting is worth a SQLite commit. */
|
|
30965
30965
|
volatileStateFields: ["lastFetchedAt"]
|
|
30966
30966
|
};
|
|
30967
|
+
/**
|
|
30968
|
+
* What a preset id DOES on this camera.
|
|
30969
|
+
*
|
|
30970
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
30971
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
30972
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
30973
|
+
* firmware:
|
|
30974
|
+
*
|
|
30975
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
30976
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
30977
|
+
* 95 Call OSD menu
|
|
30978
|
+
*
|
|
30979
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
30980
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
30981
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
30982
|
+
* operator as a transport failure.
|
|
30983
|
+
*
|
|
30984
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
30985
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
30986
|
+
* `deletePreset` are gated.
|
|
30987
|
+
*/
|
|
30988
|
+
var PtzPresetFunctionSchema = _enum([
|
|
30989
|
+
"home",
|
|
30990
|
+
"day-mode",
|
|
30991
|
+
"night-mode",
|
|
30992
|
+
"day-night-auto",
|
|
30993
|
+
"set-limits",
|
|
30994
|
+
"save-limits",
|
|
30995
|
+
"reboot",
|
|
30996
|
+
"osd-menu"
|
|
30997
|
+
]);
|
|
30967
30998
|
var PtzPresetSchema = object({
|
|
30968
30999
|
id: string$2(),
|
|
30969
|
-
name: string$2()
|
|
31000
|
+
name: string$2(),
|
|
31001
|
+
/**
|
|
31002
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
31003
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
31004
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
31005
|
+
*/
|
|
31006
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
31007
|
+
/**
|
|
31008
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
31009
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
31010
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
31011
|
+
*/
|
|
31012
|
+
writable: boolean()
|
|
30970
31013
|
});
|
|
31014
|
+
/**
|
|
31015
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
31016
|
+
* read it.
|
|
31017
|
+
*
|
|
31018
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
31019
|
+
* position no way to say so. All four said `0`:
|
|
31020
|
+
*
|
|
31021
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
31022
|
+
* path lands upstream"
|
|
31023
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
31024
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
31025
|
+
* onvif throws
|
|
31026
|
+
*
|
|
31027
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
31028
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
31029
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
31030
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
31031
|
+
* headroom", which evacuated a healthy disk.
|
|
31032
|
+
*
|
|
31033
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
31034
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
31035
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
31036
|
+
* tells callers to migrate to.
|
|
31037
|
+
*/
|
|
30971
31038
|
var PtzPositionSchema = object({
|
|
30972
|
-
pan: number(),
|
|
30973
|
-
tilt: number(),
|
|
30974
|
-
zoom: number()
|
|
31039
|
+
pan: number().nullable(),
|
|
31040
|
+
tilt: number().nullable(),
|
|
31041
|
+
zoom: number().nullable()
|
|
30975
31042
|
});
|
|
30976
31043
|
var PtzMoveCommandSchema = object({
|
|
30977
31044
|
pan: number().optional(),
|
|
@@ -30990,7 +31057,72 @@ var PtzOptionsSchema = object({
|
|
|
30990
31057
|
maxPresets: number().optional(),
|
|
30991
31058
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
30992
31059
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
30993
|
-
hasAutofocus: boolean()
|
|
31060
|
+
hasAutofocus: boolean(),
|
|
31061
|
+
/**
|
|
31062
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
31063
|
+
*
|
|
31064
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
31065
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
31066
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
31067
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
31068
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
31069
|
+
* the knob it is turning.
|
|
31070
|
+
*
|
|
31071
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
31072
|
+
* a float). Never a made-up number.
|
|
31073
|
+
*/
|
|
31074
|
+
speedSteps: number().int().positive().nullable(),
|
|
31075
|
+
/**
|
|
31076
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
31077
|
+
*
|
|
31078
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
31079
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
31080
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
31081
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
31082
|
+
* gain to be divided into.
|
|
31083
|
+
*
|
|
31084
|
+
* `null` = the driver cannot say.
|
|
31085
|
+
*/
|
|
31086
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
31087
|
+
});
|
|
31088
|
+
/**
|
|
31089
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
31090
|
+
*
|
|
31091
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
31092
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
31093
|
+
* not one of the three cameras honours its own:
|
|
31094
|
+
*
|
|
31095
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
31096
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
31097
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
31098
|
+
*
|
|
31099
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
31100
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
31101
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
31102
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
31103
|
+
*
|
|
31104
|
+
* `source` is what makes it honest:
|
|
31105
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
31106
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
31107
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
31108
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
31109
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
31110
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
31111
|
+
* no picker.
|
|
31112
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
31113
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
31114
|
+
*
|
|
31115
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
31116
|
+
* native case has no preset and homes perfectly well.
|
|
31117
|
+
*/
|
|
31118
|
+
var PtzHomePresetSchema = object({
|
|
31119
|
+
presetId: string$2().nullable(),
|
|
31120
|
+
source: _enum([
|
|
31121
|
+
"operator",
|
|
31122
|
+
"firmware",
|
|
31123
|
+
"native",
|
|
31124
|
+
"none"
|
|
31125
|
+
])
|
|
30994
31126
|
});
|
|
30995
31127
|
DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(PtzMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), array(PtzPresetSchema)), method(object({
|
|
30996
31128
|
deviceId: number(),
|
|
@@ -31008,7 +31140,22 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
31008
31140
|
}), _void(), {
|
|
31009
31141
|
kind: "mutation",
|
|
31010
31142
|
auth: "admin"
|
|
31011
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
31143
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
31144
|
+
deviceId: number(),
|
|
31145
|
+
presetId: string$2().nullable()
|
|
31146
|
+
}), _void(), {
|
|
31147
|
+
kind: "mutation",
|
|
31148
|
+
auth: "admin"
|
|
31149
|
+
}), method(object({ deviceId: number() }), _void(), {
|
|
31150
|
+
kind: "mutation",
|
|
31151
|
+
auth: "admin"
|
|
31152
|
+
}), method(object({ deviceId: number() }), number().int().nullable()), method(object({
|
|
31153
|
+
deviceId: number(),
|
|
31154
|
+
seconds: number().int().min(0).max(3600)
|
|
31155
|
+
}), _void(), {
|
|
31156
|
+
kind: "mutation",
|
|
31157
|
+
auth: "admin"
|
|
31158
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
31012
31159
|
deviceId: number(),
|
|
31013
31160
|
enabled: boolean()
|
|
31014
31161
|
}), _void(), { kind: "mutation" });
|
|
@@ -40250,6 +40397,12 @@ Object.freeze({
|
|
|
40250
40397
|
addonId: null,
|
|
40251
40398
|
access: "create"
|
|
40252
40399
|
},
|
|
40400
|
+
"ptz.captureHomeHere": {
|
|
40401
|
+
capName: "ptz",
|
|
40402
|
+
capScope: "device",
|
|
40403
|
+
addonId: null,
|
|
40404
|
+
access: "create"
|
|
40405
|
+
},
|
|
40253
40406
|
"ptz.continuousMove": {
|
|
40254
40407
|
capName: "ptz",
|
|
40255
40408
|
capScope: "device",
|
|
@@ -40262,6 +40415,18 @@ Object.freeze({
|
|
|
40262
40415
|
addonId: null,
|
|
40263
40416
|
access: "delete"
|
|
40264
40417
|
},
|
|
40418
|
+
"ptz.getHomePreset": {
|
|
40419
|
+
capName: "ptz",
|
|
40420
|
+
capScope: "device",
|
|
40421
|
+
addonId: null,
|
|
40422
|
+
access: "view"
|
|
40423
|
+
},
|
|
40424
|
+
"ptz.getHomeReturnSeconds": {
|
|
40425
|
+
capName: "ptz",
|
|
40426
|
+
capScope: "device",
|
|
40427
|
+
addonId: null,
|
|
40428
|
+
access: "view"
|
|
40429
|
+
},
|
|
40265
40430
|
"ptz.getOptions": {
|
|
40266
40431
|
capName: "ptz",
|
|
40267
40432
|
capScope: "device",
|
|
@@ -40310,6 +40475,18 @@ Object.freeze({
|
|
|
40310
40475
|
addonId: null,
|
|
40311
40476
|
access: "create"
|
|
40312
40477
|
},
|
|
40478
|
+
"ptz.setHomePreset": {
|
|
40479
|
+
capName: "ptz",
|
|
40480
|
+
capScope: "device",
|
|
40481
|
+
addonId: null,
|
|
40482
|
+
access: "create"
|
|
40483
|
+
},
|
|
40484
|
+
"ptz.setHomeReturnSeconds": {
|
|
40485
|
+
capName: "ptz",
|
|
40486
|
+
capScope: "device",
|
|
40487
|
+
addonId: null,
|
|
40488
|
+
access: "create"
|
|
40489
|
+
},
|
|
40313
40490
|
"ptz.stop": {
|
|
40314
40491
|
capName: "ptz",
|
|
40315
40492
|
capScope: "device",
|
|
@@ -43473,6 +43650,11 @@ Object.freeze({
|
|
|
43473
43650
|
form: "single",
|
|
43474
43651
|
optional: false
|
|
43475
43652
|
}],
|
|
43653
|
+
"ptz.captureHomeHere": [{
|
|
43654
|
+
name: "deviceId",
|
|
43655
|
+
form: "single",
|
|
43656
|
+
optional: false
|
|
43657
|
+
}],
|
|
43476
43658
|
"ptz.continuousMove": [{
|
|
43477
43659
|
name: "deviceId",
|
|
43478
43660
|
form: "single",
|
|
@@ -43483,6 +43665,16 @@ Object.freeze({
|
|
|
43483
43665
|
form: "single",
|
|
43484
43666
|
optional: false
|
|
43485
43667
|
}],
|
|
43668
|
+
"ptz.getHomePreset": [{
|
|
43669
|
+
name: "deviceId",
|
|
43670
|
+
form: "single",
|
|
43671
|
+
optional: false
|
|
43672
|
+
}],
|
|
43673
|
+
"ptz.getHomeReturnSeconds": [{
|
|
43674
|
+
name: "deviceId",
|
|
43675
|
+
form: "single",
|
|
43676
|
+
optional: false
|
|
43677
|
+
}],
|
|
43486
43678
|
"ptz.getOptions": [{
|
|
43487
43679
|
name: "deviceId",
|
|
43488
43680
|
form: "single",
|
|
@@ -43523,6 +43715,16 @@ Object.freeze({
|
|
|
43523
43715
|
form: "single",
|
|
43524
43716
|
optional: false
|
|
43525
43717
|
}],
|
|
43718
|
+
"ptz.setHomePreset": [{
|
|
43719
|
+
name: "deviceId",
|
|
43720
|
+
form: "single",
|
|
43721
|
+
optional: false
|
|
43722
|
+
}],
|
|
43723
|
+
"ptz.setHomeReturnSeconds": [{
|
|
43724
|
+
name: "deviceId",
|
|
43725
|
+
form: "single",
|
|
43726
|
+
optional: false
|
|
43727
|
+
}],
|
|
43526
43728
|
"ptz.stop": [{
|
|
43527
43729
|
name: "deviceId",
|
|
43528
43730
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-matter-broker",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.111",
|
|
4
4
|
"description": "Matter broker addon for CamStack — owns a Matter fabric (commissioning + the long-lived controller) via the matter.js controller and brokers commissioned Matter nodes into CamStack",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|