@camstack/addon-provider-velux 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
|
@@ -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-vl6nBE8d.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).
|
|
@@ -30869,14 +30869,81 @@ var privacyMaskCapability = {
|
|
|
30869
30869
|
* whether persisting is worth a SQLite commit. */
|
|
30870
30870
|
volatileStateFields: ["lastFetchedAt"]
|
|
30871
30871
|
};
|
|
30872
|
+
/**
|
|
30873
|
+
* What a preset id DOES on this camera.
|
|
30874
|
+
*
|
|
30875
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
30876
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
30877
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
30878
|
+
* firmware:
|
|
30879
|
+
*
|
|
30880
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
30881
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
30882
|
+
* 95 Call OSD menu
|
|
30883
|
+
*
|
|
30884
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
30885
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
30886
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
30887
|
+
* operator as a transport failure.
|
|
30888
|
+
*
|
|
30889
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
30890
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
30891
|
+
* `deletePreset` are gated.
|
|
30892
|
+
*/
|
|
30893
|
+
var PtzPresetFunctionSchema = _enum([
|
|
30894
|
+
"home",
|
|
30895
|
+
"day-mode",
|
|
30896
|
+
"night-mode",
|
|
30897
|
+
"day-night-auto",
|
|
30898
|
+
"set-limits",
|
|
30899
|
+
"save-limits",
|
|
30900
|
+
"reboot",
|
|
30901
|
+
"osd-menu"
|
|
30902
|
+
]);
|
|
30872
30903
|
var PtzPresetSchema = object({
|
|
30873
30904
|
id: string(),
|
|
30874
|
-
name: string()
|
|
30905
|
+
name: string(),
|
|
30906
|
+
/**
|
|
30907
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
30908
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
30909
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
30910
|
+
*/
|
|
30911
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
30912
|
+
/**
|
|
30913
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
30914
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
30915
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
30916
|
+
*/
|
|
30917
|
+
writable: boolean()
|
|
30875
30918
|
});
|
|
30919
|
+
/**
|
|
30920
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
30921
|
+
* read it.
|
|
30922
|
+
*
|
|
30923
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
30924
|
+
* position no way to say so. All four said `0`:
|
|
30925
|
+
*
|
|
30926
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
30927
|
+
* path lands upstream"
|
|
30928
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
30929
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
30930
|
+
* onvif throws
|
|
30931
|
+
*
|
|
30932
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
30933
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
30934
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
30935
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
30936
|
+
* headroom", which evacuated a healthy disk.
|
|
30937
|
+
*
|
|
30938
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
30939
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
30940
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
30941
|
+
* tells callers to migrate to.
|
|
30942
|
+
*/
|
|
30876
30943
|
var PtzPositionSchema = object({
|
|
30877
|
-
pan: number(),
|
|
30878
|
-
tilt: number(),
|
|
30879
|
-
zoom: number()
|
|
30944
|
+
pan: number().nullable(),
|
|
30945
|
+
tilt: number().nullable(),
|
|
30946
|
+
zoom: number().nullable()
|
|
30880
30947
|
});
|
|
30881
30948
|
var PtzMoveCommandSchema = object({
|
|
30882
30949
|
pan: number().optional(),
|
|
@@ -30895,7 +30962,72 @@ var PtzOptionsSchema = object({
|
|
|
30895
30962
|
maxPresets: number().optional(),
|
|
30896
30963
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
30897
30964
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
30898
|
-
hasAutofocus: boolean()
|
|
30965
|
+
hasAutofocus: boolean(),
|
|
30966
|
+
/**
|
|
30967
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
30968
|
+
*
|
|
30969
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
30970
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
30971
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
30972
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
30973
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
30974
|
+
* the knob it is turning.
|
|
30975
|
+
*
|
|
30976
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
30977
|
+
* a float). Never a made-up number.
|
|
30978
|
+
*/
|
|
30979
|
+
speedSteps: number().int().positive().nullable(),
|
|
30980
|
+
/**
|
|
30981
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
30982
|
+
*
|
|
30983
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
30984
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
30985
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
30986
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
30987
|
+
* gain to be divided into.
|
|
30988
|
+
*
|
|
30989
|
+
* `null` = the driver cannot say.
|
|
30990
|
+
*/
|
|
30991
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
30992
|
+
});
|
|
30993
|
+
/**
|
|
30994
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
30995
|
+
*
|
|
30996
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
30997
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
30998
|
+
* not one of the three cameras honours its own:
|
|
30999
|
+
*
|
|
31000
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
31001
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
31002
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
31003
|
+
*
|
|
31004
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
31005
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
31006
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
31007
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
31008
|
+
*
|
|
31009
|
+
* `source` is what makes it honest:
|
|
31010
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
31011
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
31012
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
31013
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
31014
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
31015
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
31016
|
+
* no picker.
|
|
31017
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
31018
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
31019
|
+
*
|
|
31020
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
31021
|
+
* native case has no preset and homes perfectly well.
|
|
31022
|
+
*/
|
|
31023
|
+
var PtzHomePresetSchema = object({
|
|
31024
|
+
presetId: string().nullable(),
|
|
31025
|
+
source: _enum([
|
|
31026
|
+
"operator",
|
|
31027
|
+
"firmware",
|
|
31028
|
+
"native",
|
|
31029
|
+
"none"
|
|
31030
|
+
])
|
|
30899
31031
|
});
|
|
30900
31032
|
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({
|
|
30901
31033
|
deviceId: number(),
|
|
@@ -30913,7 +31045,22 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
30913
31045
|
}), _void(), {
|
|
30914
31046
|
kind: "mutation",
|
|
30915
31047
|
auth: "admin"
|
|
30916
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
31048
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
31049
|
+
deviceId: number(),
|
|
31050
|
+
presetId: string().nullable()
|
|
31051
|
+
}), _void(), {
|
|
31052
|
+
kind: "mutation",
|
|
31053
|
+
auth: "admin"
|
|
31054
|
+
}), method(object({ deviceId: number() }), _void(), {
|
|
31055
|
+
kind: "mutation",
|
|
31056
|
+
auth: "admin"
|
|
31057
|
+
}), method(object({ deviceId: number() }), number().int().nullable()), method(object({
|
|
31058
|
+
deviceId: number(),
|
|
31059
|
+
seconds: number().int().min(0).max(3600)
|
|
31060
|
+
}), _void(), {
|
|
31061
|
+
kind: "mutation",
|
|
31062
|
+
auth: "admin"
|
|
31063
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
30917
31064
|
deviceId: number(),
|
|
30918
31065
|
enabled: boolean()
|
|
30919
31066
|
}), _void(), { kind: "mutation" });
|
|
@@ -40155,6 +40302,12 @@ Object.freeze({
|
|
|
40155
40302
|
addonId: null,
|
|
40156
40303
|
access: "create"
|
|
40157
40304
|
},
|
|
40305
|
+
"ptz.captureHomeHere": {
|
|
40306
|
+
capName: "ptz",
|
|
40307
|
+
capScope: "device",
|
|
40308
|
+
addonId: null,
|
|
40309
|
+
access: "create"
|
|
40310
|
+
},
|
|
40158
40311
|
"ptz.continuousMove": {
|
|
40159
40312
|
capName: "ptz",
|
|
40160
40313
|
capScope: "device",
|
|
@@ -40167,6 +40320,18 @@ Object.freeze({
|
|
|
40167
40320
|
addonId: null,
|
|
40168
40321
|
access: "delete"
|
|
40169
40322
|
},
|
|
40323
|
+
"ptz.getHomePreset": {
|
|
40324
|
+
capName: "ptz",
|
|
40325
|
+
capScope: "device",
|
|
40326
|
+
addonId: null,
|
|
40327
|
+
access: "view"
|
|
40328
|
+
},
|
|
40329
|
+
"ptz.getHomeReturnSeconds": {
|
|
40330
|
+
capName: "ptz",
|
|
40331
|
+
capScope: "device",
|
|
40332
|
+
addonId: null,
|
|
40333
|
+
access: "view"
|
|
40334
|
+
},
|
|
40170
40335
|
"ptz.getOptions": {
|
|
40171
40336
|
capName: "ptz",
|
|
40172
40337
|
capScope: "device",
|
|
@@ -40215,6 +40380,18 @@ Object.freeze({
|
|
|
40215
40380
|
addonId: null,
|
|
40216
40381
|
access: "create"
|
|
40217
40382
|
},
|
|
40383
|
+
"ptz.setHomePreset": {
|
|
40384
|
+
capName: "ptz",
|
|
40385
|
+
capScope: "device",
|
|
40386
|
+
addonId: null,
|
|
40387
|
+
access: "create"
|
|
40388
|
+
},
|
|
40389
|
+
"ptz.setHomeReturnSeconds": {
|
|
40390
|
+
capName: "ptz",
|
|
40391
|
+
capScope: "device",
|
|
40392
|
+
addonId: null,
|
|
40393
|
+
access: "create"
|
|
40394
|
+
},
|
|
40218
40395
|
"ptz.stop": {
|
|
40219
40396
|
capName: "ptz",
|
|
40220
40397
|
capScope: "device",
|
|
@@ -43378,6 +43555,11 @@ Object.freeze({
|
|
|
43378
43555
|
form: "single",
|
|
43379
43556
|
optional: false
|
|
43380
43557
|
}],
|
|
43558
|
+
"ptz.captureHomeHere": [{
|
|
43559
|
+
name: "deviceId",
|
|
43560
|
+
form: "single",
|
|
43561
|
+
optional: false
|
|
43562
|
+
}],
|
|
43381
43563
|
"ptz.continuousMove": [{
|
|
43382
43564
|
name: "deviceId",
|
|
43383
43565
|
form: "single",
|
|
@@ -43388,6 +43570,16 @@ Object.freeze({
|
|
|
43388
43570
|
form: "single",
|
|
43389
43571
|
optional: false
|
|
43390
43572
|
}],
|
|
43573
|
+
"ptz.getHomePreset": [{
|
|
43574
|
+
name: "deviceId",
|
|
43575
|
+
form: "single",
|
|
43576
|
+
optional: false
|
|
43577
|
+
}],
|
|
43578
|
+
"ptz.getHomeReturnSeconds": [{
|
|
43579
|
+
name: "deviceId",
|
|
43580
|
+
form: "single",
|
|
43581
|
+
optional: false
|
|
43582
|
+
}],
|
|
43391
43583
|
"ptz.getOptions": [{
|
|
43392
43584
|
name: "deviceId",
|
|
43393
43585
|
form: "single",
|
|
@@ -43428,6 +43620,16 @@ Object.freeze({
|
|
|
43428
43620
|
form: "single",
|
|
43429
43621
|
optional: false
|
|
43430
43622
|
}],
|
|
43623
|
+
"ptz.setHomePreset": [{
|
|
43624
|
+
name: "deviceId",
|
|
43625
|
+
form: "single",
|
|
43626
|
+
optional: false
|
|
43627
|
+
}],
|
|
43628
|
+
"ptz.setHomeReturnSeconds": [{
|
|
43629
|
+
name: "deviceId",
|
|
43630
|
+
form: "single",
|
|
43631
|
+
optional: false
|
|
43632
|
+
}],
|
|
43431
43633
|
"ptz.stop": [{
|
|
43432
43634
|
name: "deviceId",
|
|
43433
43635
|
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-vl6nBE8d.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).
|
|
@@ -30868,14 +30868,81 @@ var privacyMaskCapability = {
|
|
|
30868
30868
|
* whether persisting is worth a SQLite commit. */
|
|
30869
30869
|
volatileStateFields: ["lastFetchedAt"]
|
|
30870
30870
|
};
|
|
30871
|
+
/**
|
|
30872
|
+
* What a preset id DOES on this camera.
|
|
30873
|
+
*
|
|
30874
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
30875
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
30876
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
30877
|
+
* firmware:
|
|
30878
|
+
*
|
|
30879
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
30880
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
30881
|
+
* 95 Call OSD menu
|
|
30882
|
+
*
|
|
30883
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
30884
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
30885
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
30886
|
+
* operator as a transport failure.
|
|
30887
|
+
*
|
|
30888
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
30889
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
30890
|
+
* `deletePreset` are gated.
|
|
30891
|
+
*/
|
|
30892
|
+
var PtzPresetFunctionSchema = _enum([
|
|
30893
|
+
"home",
|
|
30894
|
+
"day-mode",
|
|
30895
|
+
"night-mode",
|
|
30896
|
+
"day-night-auto",
|
|
30897
|
+
"set-limits",
|
|
30898
|
+
"save-limits",
|
|
30899
|
+
"reboot",
|
|
30900
|
+
"osd-menu"
|
|
30901
|
+
]);
|
|
30871
30902
|
var PtzPresetSchema = object({
|
|
30872
30903
|
id: string(),
|
|
30873
|
-
name: string()
|
|
30904
|
+
name: string(),
|
|
30905
|
+
/**
|
|
30906
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
30907
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
30908
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
30909
|
+
*/
|
|
30910
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
30911
|
+
/**
|
|
30912
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
30913
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
30914
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
30915
|
+
*/
|
|
30916
|
+
writable: boolean()
|
|
30874
30917
|
});
|
|
30918
|
+
/**
|
|
30919
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
30920
|
+
* read it.
|
|
30921
|
+
*
|
|
30922
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
30923
|
+
* position no way to say so. All four said `0`:
|
|
30924
|
+
*
|
|
30925
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
30926
|
+
* path lands upstream"
|
|
30927
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
30928
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
30929
|
+
* onvif throws
|
|
30930
|
+
*
|
|
30931
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
30932
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
30933
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
30934
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
30935
|
+
* headroom", which evacuated a healthy disk.
|
|
30936
|
+
*
|
|
30937
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
30938
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
30939
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
30940
|
+
* tells callers to migrate to.
|
|
30941
|
+
*/
|
|
30875
30942
|
var PtzPositionSchema = object({
|
|
30876
|
-
pan: number(),
|
|
30877
|
-
tilt: number(),
|
|
30878
|
-
zoom: number()
|
|
30943
|
+
pan: number().nullable(),
|
|
30944
|
+
tilt: number().nullable(),
|
|
30945
|
+
zoom: number().nullable()
|
|
30879
30946
|
});
|
|
30880
30947
|
var PtzMoveCommandSchema = object({
|
|
30881
30948
|
pan: number().optional(),
|
|
@@ -30894,7 +30961,72 @@ var PtzOptionsSchema = object({
|
|
|
30894
30961
|
maxPresets: number().optional(),
|
|
30895
30962
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
30896
30963
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
30897
|
-
hasAutofocus: boolean()
|
|
30964
|
+
hasAutofocus: boolean(),
|
|
30965
|
+
/**
|
|
30966
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
30967
|
+
*
|
|
30968
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
30969
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
30970
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
30971
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
30972
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
30973
|
+
* the knob it is turning.
|
|
30974
|
+
*
|
|
30975
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
30976
|
+
* a float). Never a made-up number.
|
|
30977
|
+
*/
|
|
30978
|
+
speedSteps: number().int().positive().nullable(),
|
|
30979
|
+
/**
|
|
30980
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
30981
|
+
*
|
|
30982
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
30983
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
30984
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
30985
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
30986
|
+
* gain to be divided into.
|
|
30987
|
+
*
|
|
30988
|
+
* `null` = the driver cannot say.
|
|
30989
|
+
*/
|
|
30990
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
30991
|
+
});
|
|
30992
|
+
/**
|
|
30993
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
30994
|
+
*
|
|
30995
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
30996
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
30997
|
+
* not one of the three cameras honours its own:
|
|
30998
|
+
*
|
|
30999
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
31000
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
31001
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
31002
|
+
*
|
|
31003
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
31004
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
31005
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
31006
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
31007
|
+
*
|
|
31008
|
+
* `source` is what makes it honest:
|
|
31009
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
31010
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
31011
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
31012
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
31013
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
31014
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
31015
|
+
* no picker.
|
|
31016
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
31017
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
31018
|
+
*
|
|
31019
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
31020
|
+
* native case has no preset and homes perfectly well.
|
|
31021
|
+
*/
|
|
31022
|
+
var PtzHomePresetSchema = object({
|
|
31023
|
+
presetId: string().nullable(),
|
|
31024
|
+
source: _enum([
|
|
31025
|
+
"operator",
|
|
31026
|
+
"firmware",
|
|
31027
|
+
"native",
|
|
31028
|
+
"none"
|
|
31029
|
+
])
|
|
30898
31030
|
});
|
|
30899
31031
|
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({
|
|
30900
31032
|
deviceId: number(),
|
|
@@ -30912,7 +31044,22 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
30912
31044
|
}), _void(), {
|
|
30913
31045
|
kind: "mutation",
|
|
30914
31046
|
auth: "admin"
|
|
30915
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
31047
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
31048
|
+
deviceId: number(),
|
|
31049
|
+
presetId: string().nullable()
|
|
31050
|
+
}), _void(), {
|
|
31051
|
+
kind: "mutation",
|
|
31052
|
+
auth: "admin"
|
|
31053
|
+
}), method(object({ deviceId: number() }), _void(), {
|
|
31054
|
+
kind: "mutation",
|
|
31055
|
+
auth: "admin"
|
|
31056
|
+
}), method(object({ deviceId: number() }), number().int().nullable()), method(object({
|
|
31057
|
+
deviceId: number(),
|
|
31058
|
+
seconds: number().int().min(0).max(3600)
|
|
31059
|
+
}), _void(), {
|
|
31060
|
+
kind: "mutation",
|
|
31061
|
+
auth: "admin"
|
|
31062
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
30916
31063
|
deviceId: number(),
|
|
30917
31064
|
enabled: boolean()
|
|
30918
31065
|
}), _void(), { kind: "mutation" });
|
|
@@ -40154,6 +40301,12 @@ Object.freeze({
|
|
|
40154
40301
|
addonId: null,
|
|
40155
40302
|
access: "create"
|
|
40156
40303
|
},
|
|
40304
|
+
"ptz.captureHomeHere": {
|
|
40305
|
+
capName: "ptz",
|
|
40306
|
+
capScope: "device",
|
|
40307
|
+
addonId: null,
|
|
40308
|
+
access: "create"
|
|
40309
|
+
},
|
|
40157
40310
|
"ptz.continuousMove": {
|
|
40158
40311
|
capName: "ptz",
|
|
40159
40312
|
capScope: "device",
|
|
@@ -40166,6 +40319,18 @@ Object.freeze({
|
|
|
40166
40319
|
addonId: null,
|
|
40167
40320
|
access: "delete"
|
|
40168
40321
|
},
|
|
40322
|
+
"ptz.getHomePreset": {
|
|
40323
|
+
capName: "ptz",
|
|
40324
|
+
capScope: "device",
|
|
40325
|
+
addonId: null,
|
|
40326
|
+
access: "view"
|
|
40327
|
+
},
|
|
40328
|
+
"ptz.getHomeReturnSeconds": {
|
|
40329
|
+
capName: "ptz",
|
|
40330
|
+
capScope: "device",
|
|
40331
|
+
addonId: null,
|
|
40332
|
+
access: "view"
|
|
40333
|
+
},
|
|
40169
40334
|
"ptz.getOptions": {
|
|
40170
40335
|
capName: "ptz",
|
|
40171
40336
|
capScope: "device",
|
|
@@ -40214,6 +40379,18 @@ Object.freeze({
|
|
|
40214
40379
|
addonId: null,
|
|
40215
40380
|
access: "create"
|
|
40216
40381
|
},
|
|
40382
|
+
"ptz.setHomePreset": {
|
|
40383
|
+
capName: "ptz",
|
|
40384
|
+
capScope: "device",
|
|
40385
|
+
addonId: null,
|
|
40386
|
+
access: "create"
|
|
40387
|
+
},
|
|
40388
|
+
"ptz.setHomeReturnSeconds": {
|
|
40389
|
+
capName: "ptz",
|
|
40390
|
+
capScope: "device",
|
|
40391
|
+
addonId: null,
|
|
40392
|
+
access: "create"
|
|
40393
|
+
},
|
|
40217
40394
|
"ptz.stop": {
|
|
40218
40395
|
capName: "ptz",
|
|
40219
40396
|
capScope: "device",
|
|
@@ -43377,6 +43554,11 @@ Object.freeze({
|
|
|
43377
43554
|
form: "single",
|
|
43378
43555
|
optional: false
|
|
43379
43556
|
}],
|
|
43557
|
+
"ptz.captureHomeHere": [{
|
|
43558
|
+
name: "deviceId",
|
|
43559
|
+
form: "single",
|
|
43560
|
+
optional: false
|
|
43561
|
+
}],
|
|
43380
43562
|
"ptz.continuousMove": [{
|
|
43381
43563
|
name: "deviceId",
|
|
43382
43564
|
form: "single",
|
|
@@ -43387,6 +43569,16 @@ Object.freeze({
|
|
|
43387
43569
|
form: "single",
|
|
43388
43570
|
optional: false
|
|
43389
43571
|
}],
|
|
43572
|
+
"ptz.getHomePreset": [{
|
|
43573
|
+
name: "deviceId",
|
|
43574
|
+
form: "single",
|
|
43575
|
+
optional: false
|
|
43576
|
+
}],
|
|
43577
|
+
"ptz.getHomeReturnSeconds": [{
|
|
43578
|
+
name: "deviceId",
|
|
43579
|
+
form: "single",
|
|
43580
|
+
optional: false
|
|
43581
|
+
}],
|
|
43390
43582
|
"ptz.getOptions": [{
|
|
43391
43583
|
name: "deviceId",
|
|
43392
43584
|
form: "single",
|
|
@@ -43427,6 +43619,16 @@ Object.freeze({
|
|
|
43427
43619
|
form: "single",
|
|
43428
43620
|
optional: false
|
|
43429
43621
|
}],
|
|
43622
|
+
"ptz.setHomePreset": [{
|
|
43623
|
+
name: "deviceId",
|
|
43624
|
+
form: "single",
|
|
43625
|
+
optional: false
|
|
43626
|
+
}],
|
|
43627
|
+
"ptz.setHomeReturnSeconds": [{
|
|
43628
|
+
name: "deviceId",
|
|
43629
|
+
form: "single",
|
|
43630
|
+
optional: false
|
|
43631
|
+
}],
|
|
43430
43632
|
"ptz.stop": [{
|
|
43431
43633
|
name: "deviceId",
|
|
43432
43634
|
form: "single",
|
package/package.json
CHANGED