@camstack/addon-provider-petkit 0.2.110 → 0.2.112
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
|
@@ -6462,7 +6462,7 @@ var ZodIssueCode = {
|
|
|
6462
6462
|
var ZodFirstPartyTypeKind;
|
|
6463
6463
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
6464
6464
|
//#endregion
|
|
6465
|
-
//#region ../types/dist/sleep-
|
|
6465
|
+
//#region ../types/dist/sleep-vl6nBE8d.mjs
|
|
6466
6466
|
/**
|
|
6467
6467
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
6468
6468
|
* window to float samples (D455).
|
|
@@ -31996,14 +31996,81 @@ var privacyMaskCapability = {
|
|
|
31996
31996
|
* whether persisting is worth a SQLite commit. */
|
|
31997
31997
|
volatileStateFields: ["lastFetchedAt"]
|
|
31998
31998
|
};
|
|
31999
|
+
/**
|
|
32000
|
+
* What a preset id DOES on this camera.
|
|
32001
|
+
*
|
|
32002
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
32003
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
32004
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
32005
|
+
* firmware:
|
|
32006
|
+
*
|
|
32007
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
32008
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
32009
|
+
* 95 Call OSD menu
|
|
32010
|
+
*
|
|
32011
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
32012
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
32013
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
32014
|
+
* operator as a transport failure.
|
|
32015
|
+
*
|
|
32016
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
32017
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
32018
|
+
* `deletePreset` are gated.
|
|
32019
|
+
*/
|
|
32020
|
+
var PtzPresetFunctionSchema = _enum([
|
|
32021
|
+
"home",
|
|
32022
|
+
"day-mode",
|
|
32023
|
+
"night-mode",
|
|
32024
|
+
"day-night-auto",
|
|
32025
|
+
"set-limits",
|
|
32026
|
+
"save-limits",
|
|
32027
|
+
"reboot",
|
|
32028
|
+
"osd-menu"
|
|
32029
|
+
]);
|
|
31999
32030
|
var PtzPresetSchema = object({
|
|
32000
32031
|
id: string(),
|
|
32001
|
-
name: string()
|
|
32032
|
+
name: string(),
|
|
32033
|
+
/**
|
|
32034
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
32035
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
32036
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
32037
|
+
*/
|
|
32038
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
32039
|
+
/**
|
|
32040
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
32041
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
32042
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
32043
|
+
*/
|
|
32044
|
+
writable: boolean()
|
|
32002
32045
|
});
|
|
32046
|
+
/**
|
|
32047
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
32048
|
+
* read it.
|
|
32049
|
+
*
|
|
32050
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
32051
|
+
* position no way to say so. All four said `0`:
|
|
32052
|
+
*
|
|
32053
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
32054
|
+
* path lands upstream"
|
|
32055
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
32056
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
32057
|
+
* onvif throws
|
|
32058
|
+
*
|
|
32059
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
32060
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
32061
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
32062
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
32063
|
+
* headroom", which evacuated a healthy disk.
|
|
32064
|
+
*
|
|
32065
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
32066
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
32067
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
32068
|
+
* tells callers to migrate to.
|
|
32069
|
+
*/
|
|
32003
32070
|
var PtzPositionSchema = object({
|
|
32004
|
-
pan: number(),
|
|
32005
|
-
tilt: number(),
|
|
32006
|
-
zoom: number()
|
|
32071
|
+
pan: number().nullable(),
|
|
32072
|
+
tilt: number().nullable(),
|
|
32073
|
+
zoom: number().nullable()
|
|
32007
32074
|
});
|
|
32008
32075
|
var PtzMoveCommandSchema = object({
|
|
32009
32076
|
pan: number().optional(),
|
|
@@ -32022,7 +32089,72 @@ var PtzOptionsSchema = object({
|
|
|
32022
32089
|
maxPresets: number().optional(),
|
|
32023
32090
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
32024
32091
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
32025
|
-
hasAutofocus: boolean()
|
|
32092
|
+
hasAutofocus: boolean(),
|
|
32093
|
+
/**
|
|
32094
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
32095
|
+
*
|
|
32096
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
32097
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
32098
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
32099
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
32100
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
32101
|
+
* the knob it is turning.
|
|
32102
|
+
*
|
|
32103
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
32104
|
+
* a float). Never a made-up number.
|
|
32105
|
+
*/
|
|
32106
|
+
speedSteps: number().int().positive().nullable(),
|
|
32107
|
+
/**
|
|
32108
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
32109
|
+
*
|
|
32110
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
32111
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
32112
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
32113
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
32114
|
+
* gain to be divided into.
|
|
32115
|
+
*
|
|
32116
|
+
* `null` = the driver cannot say.
|
|
32117
|
+
*/
|
|
32118
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
32119
|
+
});
|
|
32120
|
+
/**
|
|
32121
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
32122
|
+
*
|
|
32123
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
32124
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
32125
|
+
* not one of the three cameras honours its own:
|
|
32126
|
+
*
|
|
32127
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
32128
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
32129
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
32130
|
+
*
|
|
32131
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
32132
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
32133
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
32134
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
32135
|
+
*
|
|
32136
|
+
* `source` is what makes it honest:
|
|
32137
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
32138
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
32139
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
32140
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
32141
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
32142
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
32143
|
+
* no picker.
|
|
32144
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
32145
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
32146
|
+
*
|
|
32147
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
32148
|
+
* native case has no preset and homes perfectly well.
|
|
32149
|
+
*/
|
|
32150
|
+
var PtzHomePresetSchema = object({
|
|
32151
|
+
presetId: string().nullable(),
|
|
32152
|
+
source: _enum([
|
|
32153
|
+
"operator",
|
|
32154
|
+
"firmware",
|
|
32155
|
+
"native",
|
|
32156
|
+
"none"
|
|
32157
|
+
])
|
|
32026
32158
|
});
|
|
32027
32159
|
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({
|
|
32028
32160
|
deviceId: number(),
|
|
@@ -32040,7 +32172,22 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
32040
32172
|
}), _void(), {
|
|
32041
32173
|
kind: "mutation",
|
|
32042
32174
|
auth: "admin"
|
|
32043
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
32175
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
32176
|
+
deviceId: number(),
|
|
32177
|
+
presetId: string().nullable()
|
|
32178
|
+
}), _void(), {
|
|
32179
|
+
kind: "mutation",
|
|
32180
|
+
auth: "admin"
|
|
32181
|
+
}), method(object({ deviceId: number() }), _void(), {
|
|
32182
|
+
kind: "mutation",
|
|
32183
|
+
auth: "admin"
|
|
32184
|
+
}), method(object({ deviceId: number() }), number().int().nullable()), method(object({
|
|
32185
|
+
deviceId: number(),
|
|
32186
|
+
seconds: number().int().min(0).max(3600)
|
|
32187
|
+
}), _void(), {
|
|
32188
|
+
kind: "mutation",
|
|
32189
|
+
auth: "admin"
|
|
32190
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
32044
32191
|
deviceId: number(),
|
|
32045
32192
|
enabled: boolean()
|
|
32046
32193
|
}), _void(), { kind: "mutation" });
|
|
@@ -41282,6 +41429,12 @@ Object.freeze({
|
|
|
41282
41429
|
addonId: null,
|
|
41283
41430
|
access: "create"
|
|
41284
41431
|
},
|
|
41432
|
+
"ptz.captureHomeHere": {
|
|
41433
|
+
capName: "ptz",
|
|
41434
|
+
capScope: "device",
|
|
41435
|
+
addonId: null,
|
|
41436
|
+
access: "create"
|
|
41437
|
+
},
|
|
41285
41438
|
"ptz.continuousMove": {
|
|
41286
41439
|
capName: "ptz",
|
|
41287
41440
|
capScope: "device",
|
|
@@ -41294,6 +41447,18 @@ Object.freeze({
|
|
|
41294
41447
|
addonId: null,
|
|
41295
41448
|
access: "delete"
|
|
41296
41449
|
},
|
|
41450
|
+
"ptz.getHomePreset": {
|
|
41451
|
+
capName: "ptz",
|
|
41452
|
+
capScope: "device",
|
|
41453
|
+
addonId: null,
|
|
41454
|
+
access: "view"
|
|
41455
|
+
},
|
|
41456
|
+
"ptz.getHomeReturnSeconds": {
|
|
41457
|
+
capName: "ptz",
|
|
41458
|
+
capScope: "device",
|
|
41459
|
+
addonId: null,
|
|
41460
|
+
access: "view"
|
|
41461
|
+
},
|
|
41297
41462
|
"ptz.getOptions": {
|
|
41298
41463
|
capName: "ptz",
|
|
41299
41464
|
capScope: "device",
|
|
@@ -41342,6 +41507,18 @@ Object.freeze({
|
|
|
41342
41507
|
addonId: null,
|
|
41343
41508
|
access: "create"
|
|
41344
41509
|
},
|
|
41510
|
+
"ptz.setHomePreset": {
|
|
41511
|
+
capName: "ptz",
|
|
41512
|
+
capScope: "device",
|
|
41513
|
+
addonId: null,
|
|
41514
|
+
access: "create"
|
|
41515
|
+
},
|
|
41516
|
+
"ptz.setHomeReturnSeconds": {
|
|
41517
|
+
capName: "ptz",
|
|
41518
|
+
capScope: "device",
|
|
41519
|
+
addonId: null,
|
|
41520
|
+
access: "create"
|
|
41521
|
+
},
|
|
41345
41522
|
"ptz.stop": {
|
|
41346
41523
|
capName: "ptz",
|
|
41347
41524
|
capScope: "device",
|
|
@@ -44505,6 +44682,11 @@ Object.freeze({
|
|
|
44505
44682
|
form: "single",
|
|
44506
44683
|
optional: false
|
|
44507
44684
|
}],
|
|
44685
|
+
"ptz.captureHomeHere": [{
|
|
44686
|
+
name: "deviceId",
|
|
44687
|
+
form: "single",
|
|
44688
|
+
optional: false
|
|
44689
|
+
}],
|
|
44508
44690
|
"ptz.continuousMove": [{
|
|
44509
44691
|
name: "deviceId",
|
|
44510
44692
|
form: "single",
|
|
@@ -44515,6 +44697,16 @@ Object.freeze({
|
|
|
44515
44697
|
form: "single",
|
|
44516
44698
|
optional: false
|
|
44517
44699
|
}],
|
|
44700
|
+
"ptz.getHomePreset": [{
|
|
44701
|
+
name: "deviceId",
|
|
44702
|
+
form: "single",
|
|
44703
|
+
optional: false
|
|
44704
|
+
}],
|
|
44705
|
+
"ptz.getHomeReturnSeconds": [{
|
|
44706
|
+
name: "deviceId",
|
|
44707
|
+
form: "single",
|
|
44708
|
+
optional: false
|
|
44709
|
+
}],
|
|
44518
44710
|
"ptz.getOptions": [{
|
|
44519
44711
|
name: "deviceId",
|
|
44520
44712
|
form: "single",
|
|
@@ -44555,6 +44747,16 @@ Object.freeze({
|
|
|
44555
44747
|
form: "single",
|
|
44556
44748
|
optional: false
|
|
44557
44749
|
}],
|
|
44750
|
+
"ptz.setHomePreset": [{
|
|
44751
|
+
name: "deviceId",
|
|
44752
|
+
form: "single",
|
|
44753
|
+
optional: false
|
|
44754
|
+
}],
|
|
44755
|
+
"ptz.setHomeReturnSeconds": [{
|
|
44756
|
+
name: "deviceId",
|
|
44757
|
+
form: "single",
|
|
44758
|
+
optional: false
|
|
44759
|
+
}],
|
|
44558
44760
|
"ptz.stop": [{
|
|
44559
44761
|
name: "deviceId",
|
|
44560
44762
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -6461,7 +6461,7 @@ var ZodIssueCode = {
|
|
|
6461
6461
|
var ZodFirstPartyTypeKind;
|
|
6462
6462
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
6463
6463
|
//#endregion
|
|
6464
|
-
//#region ../types/dist/sleep-
|
|
6464
|
+
//#region ../types/dist/sleep-vl6nBE8d.mjs
|
|
6465
6465
|
/**
|
|
6466
6466
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
6467
6467
|
* window to float samples (D455).
|
|
@@ -31995,14 +31995,81 @@ var privacyMaskCapability = {
|
|
|
31995
31995
|
* whether persisting is worth a SQLite commit. */
|
|
31996
31996
|
volatileStateFields: ["lastFetchedAt"]
|
|
31997
31997
|
};
|
|
31998
|
+
/**
|
|
31999
|
+
* What a preset id DOES on this camera.
|
|
32000
|
+
*
|
|
32001
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
32002
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
32003
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
32004
|
+
* firmware:
|
|
32005
|
+
*
|
|
32006
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
32007
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
32008
|
+
* 95 Call OSD menu
|
|
32009
|
+
*
|
|
32010
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
32011
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
32012
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
32013
|
+
* operator as a transport failure.
|
|
32014
|
+
*
|
|
32015
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
32016
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
32017
|
+
* `deletePreset` are gated.
|
|
32018
|
+
*/
|
|
32019
|
+
var PtzPresetFunctionSchema = _enum([
|
|
32020
|
+
"home",
|
|
32021
|
+
"day-mode",
|
|
32022
|
+
"night-mode",
|
|
32023
|
+
"day-night-auto",
|
|
32024
|
+
"set-limits",
|
|
32025
|
+
"save-limits",
|
|
32026
|
+
"reboot",
|
|
32027
|
+
"osd-menu"
|
|
32028
|
+
]);
|
|
31998
32029
|
var PtzPresetSchema = object({
|
|
31999
32030
|
id: string(),
|
|
32000
|
-
name: string()
|
|
32031
|
+
name: string(),
|
|
32032
|
+
/**
|
|
32033
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
32034
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
32035
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
32036
|
+
*/
|
|
32037
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
32038
|
+
/**
|
|
32039
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
32040
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
32041
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
32042
|
+
*/
|
|
32043
|
+
writable: boolean()
|
|
32001
32044
|
});
|
|
32045
|
+
/**
|
|
32046
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
32047
|
+
* read it.
|
|
32048
|
+
*
|
|
32049
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
32050
|
+
* position no way to say so. All four said `0`:
|
|
32051
|
+
*
|
|
32052
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
32053
|
+
* path lands upstream"
|
|
32054
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
32055
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
32056
|
+
* onvif throws
|
|
32057
|
+
*
|
|
32058
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
32059
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
32060
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
32061
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
32062
|
+
* headroom", which evacuated a healthy disk.
|
|
32063
|
+
*
|
|
32064
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
32065
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
32066
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
32067
|
+
* tells callers to migrate to.
|
|
32068
|
+
*/
|
|
32002
32069
|
var PtzPositionSchema = object({
|
|
32003
|
-
pan: number(),
|
|
32004
|
-
tilt: number(),
|
|
32005
|
-
zoom: number()
|
|
32070
|
+
pan: number().nullable(),
|
|
32071
|
+
tilt: number().nullable(),
|
|
32072
|
+
zoom: number().nullable()
|
|
32006
32073
|
});
|
|
32007
32074
|
var PtzMoveCommandSchema = object({
|
|
32008
32075
|
pan: number().optional(),
|
|
@@ -32021,7 +32088,72 @@ var PtzOptionsSchema = object({
|
|
|
32021
32088
|
maxPresets: number().optional(),
|
|
32022
32089
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
32023
32090
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
32024
|
-
hasAutofocus: boolean()
|
|
32091
|
+
hasAutofocus: boolean(),
|
|
32092
|
+
/**
|
|
32093
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
32094
|
+
*
|
|
32095
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
32096
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
32097
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
32098
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
32099
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
32100
|
+
* the knob it is turning.
|
|
32101
|
+
*
|
|
32102
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
32103
|
+
* a float). Never a made-up number.
|
|
32104
|
+
*/
|
|
32105
|
+
speedSteps: number().int().positive().nullable(),
|
|
32106
|
+
/**
|
|
32107
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
32108
|
+
*
|
|
32109
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
32110
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
32111
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
32112
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
32113
|
+
* gain to be divided into.
|
|
32114
|
+
*
|
|
32115
|
+
* `null` = the driver cannot say.
|
|
32116
|
+
*/
|
|
32117
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
32118
|
+
});
|
|
32119
|
+
/**
|
|
32120
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
32121
|
+
*
|
|
32122
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
32123
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
32124
|
+
* not one of the three cameras honours its own:
|
|
32125
|
+
*
|
|
32126
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
32127
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
32128
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
32129
|
+
*
|
|
32130
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
32131
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
32132
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
32133
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
32134
|
+
*
|
|
32135
|
+
* `source` is what makes it honest:
|
|
32136
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
32137
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
32138
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
32139
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
32140
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
32141
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
32142
|
+
* no picker.
|
|
32143
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
32144
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
32145
|
+
*
|
|
32146
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
32147
|
+
* native case has no preset and homes perfectly well.
|
|
32148
|
+
*/
|
|
32149
|
+
var PtzHomePresetSchema = object({
|
|
32150
|
+
presetId: string().nullable(),
|
|
32151
|
+
source: _enum([
|
|
32152
|
+
"operator",
|
|
32153
|
+
"firmware",
|
|
32154
|
+
"native",
|
|
32155
|
+
"none"
|
|
32156
|
+
])
|
|
32025
32157
|
});
|
|
32026
32158
|
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({
|
|
32027
32159
|
deviceId: number(),
|
|
@@ -32039,7 +32171,22 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
32039
32171
|
}), _void(), {
|
|
32040
32172
|
kind: "mutation",
|
|
32041
32173
|
auth: "admin"
|
|
32042
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
32174
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
32175
|
+
deviceId: number(),
|
|
32176
|
+
presetId: string().nullable()
|
|
32177
|
+
}), _void(), {
|
|
32178
|
+
kind: "mutation",
|
|
32179
|
+
auth: "admin"
|
|
32180
|
+
}), method(object({ deviceId: number() }), _void(), {
|
|
32181
|
+
kind: "mutation",
|
|
32182
|
+
auth: "admin"
|
|
32183
|
+
}), method(object({ deviceId: number() }), number().int().nullable()), method(object({
|
|
32184
|
+
deviceId: number(),
|
|
32185
|
+
seconds: number().int().min(0).max(3600)
|
|
32186
|
+
}), _void(), {
|
|
32187
|
+
kind: "mutation",
|
|
32188
|
+
auth: "admin"
|
|
32189
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
32043
32190
|
deviceId: number(),
|
|
32044
32191
|
enabled: boolean()
|
|
32045
32192
|
}), _void(), { kind: "mutation" });
|
|
@@ -41281,6 +41428,12 @@ Object.freeze({
|
|
|
41281
41428
|
addonId: null,
|
|
41282
41429
|
access: "create"
|
|
41283
41430
|
},
|
|
41431
|
+
"ptz.captureHomeHere": {
|
|
41432
|
+
capName: "ptz",
|
|
41433
|
+
capScope: "device",
|
|
41434
|
+
addonId: null,
|
|
41435
|
+
access: "create"
|
|
41436
|
+
},
|
|
41284
41437
|
"ptz.continuousMove": {
|
|
41285
41438
|
capName: "ptz",
|
|
41286
41439
|
capScope: "device",
|
|
@@ -41293,6 +41446,18 @@ Object.freeze({
|
|
|
41293
41446
|
addonId: null,
|
|
41294
41447
|
access: "delete"
|
|
41295
41448
|
},
|
|
41449
|
+
"ptz.getHomePreset": {
|
|
41450
|
+
capName: "ptz",
|
|
41451
|
+
capScope: "device",
|
|
41452
|
+
addonId: null,
|
|
41453
|
+
access: "view"
|
|
41454
|
+
},
|
|
41455
|
+
"ptz.getHomeReturnSeconds": {
|
|
41456
|
+
capName: "ptz",
|
|
41457
|
+
capScope: "device",
|
|
41458
|
+
addonId: null,
|
|
41459
|
+
access: "view"
|
|
41460
|
+
},
|
|
41296
41461
|
"ptz.getOptions": {
|
|
41297
41462
|
capName: "ptz",
|
|
41298
41463
|
capScope: "device",
|
|
@@ -41341,6 +41506,18 @@ Object.freeze({
|
|
|
41341
41506
|
addonId: null,
|
|
41342
41507
|
access: "create"
|
|
41343
41508
|
},
|
|
41509
|
+
"ptz.setHomePreset": {
|
|
41510
|
+
capName: "ptz",
|
|
41511
|
+
capScope: "device",
|
|
41512
|
+
addonId: null,
|
|
41513
|
+
access: "create"
|
|
41514
|
+
},
|
|
41515
|
+
"ptz.setHomeReturnSeconds": {
|
|
41516
|
+
capName: "ptz",
|
|
41517
|
+
capScope: "device",
|
|
41518
|
+
addonId: null,
|
|
41519
|
+
access: "create"
|
|
41520
|
+
},
|
|
41344
41521
|
"ptz.stop": {
|
|
41345
41522
|
capName: "ptz",
|
|
41346
41523
|
capScope: "device",
|
|
@@ -44504,6 +44681,11 @@ Object.freeze({
|
|
|
44504
44681
|
form: "single",
|
|
44505
44682
|
optional: false
|
|
44506
44683
|
}],
|
|
44684
|
+
"ptz.captureHomeHere": [{
|
|
44685
|
+
name: "deviceId",
|
|
44686
|
+
form: "single",
|
|
44687
|
+
optional: false
|
|
44688
|
+
}],
|
|
44507
44689
|
"ptz.continuousMove": [{
|
|
44508
44690
|
name: "deviceId",
|
|
44509
44691
|
form: "single",
|
|
@@ -44514,6 +44696,16 @@ Object.freeze({
|
|
|
44514
44696
|
form: "single",
|
|
44515
44697
|
optional: false
|
|
44516
44698
|
}],
|
|
44699
|
+
"ptz.getHomePreset": [{
|
|
44700
|
+
name: "deviceId",
|
|
44701
|
+
form: "single",
|
|
44702
|
+
optional: false
|
|
44703
|
+
}],
|
|
44704
|
+
"ptz.getHomeReturnSeconds": [{
|
|
44705
|
+
name: "deviceId",
|
|
44706
|
+
form: "single",
|
|
44707
|
+
optional: false
|
|
44708
|
+
}],
|
|
44517
44709
|
"ptz.getOptions": [{
|
|
44518
44710
|
name: "deviceId",
|
|
44519
44711
|
form: "single",
|
|
@@ -44554,6 +44746,16 @@ Object.freeze({
|
|
|
44554
44746
|
form: "single",
|
|
44555
44747
|
optional: false
|
|
44556
44748
|
}],
|
|
44749
|
+
"ptz.setHomePreset": [{
|
|
44750
|
+
name: "deviceId",
|
|
44751
|
+
form: "single",
|
|
44752
|
+
optional: false
|
|
44753
|
+
}],
|
|
44754
|
+
"ptz.setHomeReturnSeconds": [{
|
|
44755
|
+
name: "deviceId",
|
|
44756
|
+
form: "single",
|
|
44757
|
+
optional: false
|
|
44758
|
+
}],
|
|
44557
44759
|
"ptz.stop": [{
|
|
44558
44760
|
name: "deviceId",
|
|
44559
44761
|
form: "single",
|
package/package.json
CHANGED