@camstack/addon-provider-homematic 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 +209 -7
- package/dist/addon.mjs +209 -7
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -5369,7 +5369,7 @@ var ZodIssueCode = {
|
|
|
5369
5369
|
var ZodFirstPartyTypeKind;
|
|
5370
5370
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5371
5371
|
//#endregion
|
|
5372
|
-
//#region ../types/dist/sleep-
|
|
5372
|
+
//#region ../types/dist/sleep-vl6nBE8d.mjs
|
|
5373
5373
|
/**
|
|
5374
5374
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5375
5375
|
* window to float samples (D455).
|
|
@@ -30944,14 +30944,81 @@ var privacyMaskCapability = {
|
|
|
30944
30944
|
* whether persisting is worth a SQLite commit. */
|
|
30945
30945
|
volatileStateFields: ["lastFetchedAt"]
|
|
30946
30946
|
};
|
|
30947
|
+
/**
|
|
30948
|
+
* What a preset id DOES on this camera.
|
|
30949
|
+
*
|
|
30950
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
30951
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
30952
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
30953
|
+
* firmware:
|
|
30954
|
+
*
|
|
30955
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
30956
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
30957
|
+
* 95 Call OSD menu
|
|
30958
|
+
*
|
|
30959
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
30960
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
30961
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
30962
|
+
* operator as a transport failure.
|
|
30963
|
+
*
|
|
30964
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
30965
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
30966
|
+
* `deletePreset` are gated.
|
|
30967
|
+
*/
|
|
30968
|
+
var PtzPresetFunctionSchema = _enum([
|
|
30969
|
+
"home",
|
|
30970
|
+
"day-mode",
|
|
30971
|
+
"night-mode",
|
|
30972
|
+
"day-night-auto",
|
|
30973
|
+
"set-limits",
|
|
30974
|
+
"save-limits",
|
|
30975
|
+
"reboot",
|
|
30976
|
+
"osd-menu"
|
|
30977
|
+
]);
|
|
30947
30978
|
var PtzPresetSchema = object({
|
|
30948
30979
|
id: string(),
|
|
30949
|
-
name: string()
|
|
30980
|
+
name: string(),
|
|
30981
|
+
/**
|
|
30982
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
30983
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
30984
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
30985
|
+
*/
|
|
30986
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
30987
|
+
/**
|
|
30988
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
30989
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
30990
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
30991
|
+
*/
|
|
30992
|
+
writable: boolean()
|
|
30950
30993
|
});
|
|
30994
|
+
/**
|
|
30995
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
30996
|
+
* read it.
|
|
30997
|
+
*
|
|
30998
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
30999
|
+
* position no way to say so. All four said `0`:
|
|
31000
|
+
*
|
|
31001
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
31002
|
+
* path lands upstream"
|
|
31003
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
31004
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
31005
|
+
* onvif throws
|
|
31006
|
+
*
|
|
31007
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
31008
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
31009
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
31010
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
31011
|
+
* headroom", which evacuated a healthy disk.
|
|
31012
|
+
*
|
|
31013
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
31014
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
31015
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
31016
|
+
* tells callers to migrate to.
|
|
31017
|
+
*/
|
|
30951
31018
|
var PtzPositionSchema = object({
|
|
30952
|
-
pan: number(),
|
|
30953
|
-
tilt: number(),
|
|
30954
|
-
zoom: number()
|
|
31019
|
+
pan: number().nullable(),
|
|
31020
|
+
tilt: number().nullable(),
|
|
31021
|
+
zoom: number().nullable()
|
|
30955
31022
|
});
|
|
30956
31023
|
var PtzMoveCommandSchema = object({
|
|
30957
31024
|
pan: number().optional(),
|
|
@@ -30970,7 +31037,72 @@ var PtzOptionsSchema = object({
|
|
|
30970
31037
|
maxPresets: number().optional(),
|
|
30971
31038
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
30972
31039
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
30973
|
-
hasAutofocus: boolean()
|
|
31040
|
+
hasAutofocus: boolean(),
|
|
31041
|
+
/**
|
|
31042
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
31043
|
+
*
|
|
31044
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
31045
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
31046
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
31047
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
31048
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
31049
|
+
* the knob it is turning.
|
|
31050
|
+
*
|
|
31051
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
31052
|
+
* a float). Never a made-up number.
|
|
31053
|
+
*/
|
|
31054
|
+
speedSteps: number().int().positive().nullable(),
|
|
31055
|
+
/**
|
|
31056
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
31057
|
+
*
|
|
31058
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
31059
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
31060
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
31061
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
31062
|
+
* gain to be divided into.
|
|
31063
|
+
*
|
|
31064
|
+
* `null` = the driver cannot say.
|
|
31065
|
+
*/
|
|
31066
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
31067
|
+
});
|
|
31068
|
+
/**
|
|
31069
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
31070
|
+
*
|
|
31071
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
31072
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
31073
|
+
* not one of the three cameras honours its own:
|
|
31074
|
+
*
|
|
31075
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
31076
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
31077
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
31078
|
+
*
|
|
31079
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
31080
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
31081
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
31082
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
31083
|
+
*
|
|
31084
|
+
* `source` is what makes it honest:
|
|
31085
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
31086
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
31087
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
31088
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
31089
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
31090
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
31091
|
+
* no picker.
|
|
31092
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
31093
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
31094
|
+
*
|
|
31095
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
31096
|
+
* native case has no preset and homes perfectly well.
|
|
31097
|
+
*/
|
|
31098
|
+
var PtzHomePresetSchema = object({
|
|
31099
|
+
presetId: string().nullable(),
|
|
31100
|
+
source: _enum([
|
|
31101
|
+
"operator",
|
|
31102
|
+
"firmware",
|
|
31103
|
+
"native",
|
|
31104
|
+
"none"
|
|
31105
|
+
])
|
|
30974
31106
|
});
|
|
30975
31107
|
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({
|
|
30976
31108
|
deviceId: number(),
|
|
@@ -30988,7 +31120,22 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
30988
31120
|
}), _void(), {
|
|
30989
31121
|
kind: "mutation",
|
|
30990
31122
|
auth: "admin"
|
|
30991
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
31123
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
31124
|
+
deviceId: number(),
|
|
31125
|
+
presetId: string().nullable()
|
|
31126
|
+
}), _void(), {
|
|
31127
|
+
kind: "mutation",
|
|
31128
|
+
auth: "admin"
|
|
31129
|
+
}), method(object({ deviceId: number() }), _void(), {
|
|
31130
|
+
kind: "mutation",
|
|
31131
|
+
auth: "admin"
|
|
31132
|
+
}), method(object({ deviceId: number() }), number().int().nullable()), method(object({
|
|
31133
|
+
deviceId: number(),
|
|
31134
|
+
seconds: number().int().min(0).max(3600)
|
|
31135
|
+
}), _void(), {
|
|
31136
|
+
kind: "mutation",
|
|
31137
|
+
auth: "admin"
|
|
31138
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
30992
31139
|
deviceId: number(),
|
|
30993
31140
|
enabled: boolean()
|
|
30994
31141
|
}), _void(), { kind: "mutation" });
|
|
@@ -40230,6 +40377,12 @@ Object.freeze({
|
|
|
40230
40377
|
addonId: null,
|
|
40231
40378
|
access: "create"
|
|
40232
40379
|
},
|
|
40380
|
+
"ptz.captureHomeHere": {
|
|
40381
|
+
capName: "ptz",
|
|
40382
|
+
capScope: "device",
|
|
40383
|
+
addonId: null,
|
|
40384
|
+
access: "create"
|
|
40385
|
+
},
|
|
40233
40386
|
"ptz.continuousMove": {
|
|
40234
40387
|
capName: "ptz",
|
|
40235
40388
|
capScope: "device",
|
|
@@ -40242,6 +40395,18 @@ Object.freeze({
|
|
|
40242
40395
|
addonId: null,
|
|
40243
40396
|
access: "delete"
|
|
40244
40397
|
},
|
|
40398
|
+
"ptz.getHomePreset": {
|
|
40399
|
+
capName: "ptz",
|
|
40400
|
+
capScope: "device",
|
|
40401
|
+
addonId: null,
|
|
40402
|
+
access: "view"
|
|
40403
|
+
},
|
|
40404
|
+
"ptz.getHomeReturnSeconds": {
|
|
40405
|
+
capName: "ptz",
|
|
40406
|
+
capScope: "device",
|
|
40407
|
+
addonId: null,
|
|
40408
|
+
access: "view"
|
|
40409
|
+
},
|
|
40245
40410
|
"ptz.getOptions": {
|
|
40246
40411
|
capName: "ptz",
|
|
40247
40412
|
capScope: "device",
|
|
@@ -40290,6 +40455,18 @@ Object.freeze({
|
|
|
40290
40455
|
addonId: null,
|
|
40291
40456
|
access: "create"
|
|
40292
40457
|
},
|
|
40458
|
+
"ptz.setHomePreset": {
|
|
40459
|
+
capName: "ptz",
|
|
40460
|
+
capScope: "device",
|
|
40461
|
+
addonId: null,
|
|
40462
|
+
access: "create"
|
|
40463
|
+
},
|
|
40464
|
+
"ptz.setHomeReturnSeconds": {
|
|
40465
|
+
capName: "ptz",
|
|
40466
|
+
capScope: "device",
|
|
40467
|
+
addonId: null,
|
|
40468
|
+
access: "create"
|
|
40469
|
+
},
|
|
40293
40470
|
"ptz.stop": {
|
|
40294
40471
|
capName: "ptz",
|
|
40295
40472
|
capScope: "device",
|
|
@@ -43453,6 +43630,11 @@ Object.freeze({
|
|
|
43453
43630
|
form: "single",
|
|
43454
43631
|
optional: false
|
|
43455
43632
|
}],
|
|
43633
|
+
"ptz.captureHomeHere": [{
|
|
43634
|
+
name: "deviceId",
|
|
43635
|
+
form: "single",
|
|
43636
|
+
optional: false
|
|
43637
|
+
}],
|
|
43456
43638
|
"ptz.continuousMove": [{
|
|
43457
43639
|
name: "deviceId",
|
|
43458
43640
|
form: "single",
|
|
@@ -43463,6 +43645,16 @@ Object.freeze({
|
|
|
43463
43645
|
form: "single",
|
|
43464
43646
|
optional: false
|
|
43465
43647
|
}],
|
|
43648
|
+
"ptz.getHomePreset": [{
|
|
43649
|
+
name: "deviceId",
|
|
43650
|
+
form: "single",
|
|
43651
|
+
optional: false
|
|
43652
|
+
}],
|
|
43653
|
+
"ptz.getHomeReturnSeconds": [{
|
|
43654
|
+
name: "deviceId",
|
|
43655
|
+
form: "single",
|
|
43656
|
+
optional: false
|
|
43657
|
+
}],
|
|
43466
43658
|
"ptz.getOptions": [{
|
|
43467
43659
|
name: "deviceId",
|
|
43468
43660
|
form: "single",
|
|
@@ -43503,6 +43695,16 @@ Object.freeze({
|
|
|
43503
43695
|
form: "single",
|
|
43504
43696
|
optional: false
|
|
43505
43697
|
}],
|
|
43698
|
+
"ptz.setHomePreset": [{
|
|
43699
|
+
name: "deviceId",
|
|
43700
|
+
form: "single",
|
|
43701
|
+
optional: false
|
|
43702
|
+
}],
|
|
43703
|
+
"ptz.setHomeReturnSeconds": [{
|
|
43704
|
+
name: "deviceId",
|
|
43705
|
+
form: "single",
|
|
43706
|
+
optional: false
|
|
43707
|
+
}],
|
|
43506
43708
|
"ptz.stop": [{
|
|
43507
43709
|
name: "deviceId",
|
|
43508
43710
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -5370,7 +5370,7 @@ var ZodIssueCode = {
|
|
|
5370
5370
|
var ZodFirstPartyTypeKind;
|
|
5371
5371
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5372
5372
|
//#endregion
|
|
5373
|
-
//#region ../types/dist/sleep-
|
|
5373
|
+
//#region ../types/dist/sleep-vl6nBE8d.mjs
|
|
5374
5374
|
/**
|
|
5375
5375
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5376
5376
|
* window to float samples (D455).
|
|
@@ -30945,14 +30945,81 @@ var privacyMaskCapability = {
|
|
|
30945
30945
|
* whether persisting is worth a SQLite commit. */
|
|
30946
30946
|
volatileStateFields: ["lastFetchedAt"]
|
|
30947
30947
|
};
|
|
30948
|
+
/**
|
|
30949
|
+
* What a preset id DOES on this camera.
|
|
30950
|
+
*
|
|
30951
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
30952
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
30953
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
30954
|
+
* firmware:
|
|
30955
|
+
*
|
|
30956
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
30957
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
30958
|
+
* 95 Call OSD menu
|
|
30959
|
+
*
|
|
30960
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
30961
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
30962
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
30963
|
+
* operator as a transport failure.
|
|
30964
|
+
*
|
|
30965
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
30966
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
30967
|
+
* `deletePreset` are gated.
|
|
30968
|
+
*/
|
|
30969
|
+
var PtzPresetFunctionSchema = _enum([
|
|
30970
|
+
"home",
|
|
30971
|
+
"day-mode",
|
|
30972
|
+
"night-mode",
|
|
30973
|
+
"day-night-auto",
|
|
30974
|
+
"set-limits",
|
|
30975
|
+
"save-limits",
|
|
30976
|
+
"reboot",
|
|
30977
|
+
"osd-menu"
|
|
30978
|
+
]);
|
|
30948
30979
|
var PtzPresetSchema = object({
|
|
30949
30980
|
id: string(),
|
|
30950
|
-
name: string()
|
|
30981
|
+
name: string(),
|
|
30982
|
+
/**
|
|
30983
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
30984
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
30985
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
30986
|
+
*/
|
|
30987
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
30988
|
+
/**
|
|
30989
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
30990
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
30991
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
30992
|
+
*/
|
|
30993
|
+
writable: boolean()
|
|
30951
30994
|
});
|
|
30995
|
+
/**
|
|
30996
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
30997
|
+
* read it.
|
|
30998
|
+
*
|
|
30999
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
31000
|
+
* position no way to say so. All four said `0`:
|
|
31001
|
+
*
|
|
31002
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
31003
|
+
* path lands upstream"
|
|
31004
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
31005
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
31006
|
+
* onvif throws
|
|
31007
|
+
*
|
|
31008
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
31009
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
31010
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
31011
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
31012
|
+
* headroom", which evacuated a healthy disk.
|
|
31013
|
+
*
|
|
31014
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
31015
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
31016
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
31017
|
+
* tells callers to migrate to.
|
|
31018
|
+
*/
|
|
30952
31019
|
var PtzPositionSchema = object({
|
|
30953
|
-
pan: number(),
|
|
30954
|
-
tilt: number(),
|
|
30955
|
-
zoom: number()
|
|
31020
|
+
pan: number().nullable(),
|
|
31021
|
+
tilt: number().nullable(),
|
|
31022
|
+
zoom: number().nullable()
|
|
30956
31023
|
});
|
|
30957
31024
|
var PtzMoveCommandSchema = object({
|
|
30958
31025
|
pan: number().optional(),
|
|
@@ -30971,7 +31038,72 @@ var PtzOptionsSchema = object({
|
|
|
30971
31038
|
maxPresets: number().optional(),
|
|
30972
31039
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
30973
31040
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
30974
|
-
hasAutofocus: boolean()
|
|
31041
|
+
hasAutofocus: boolean(),
|
|
31042
|
+
/**
|
|
31043
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
31044
|
+
*
|
|
31045
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
31046
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
31047
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
31048
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
31049
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
31050
|
+
* the knob it is turning.
|
|
31051
|
+
*
|
|
31052
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
31053
|
+
* a float). Never a made-up number.
|
|
31054
|
+
*/
|
|
31055
|
+
speedSteps: number().int().positive().nullable(),
|
|
31056
|
+
/**
|
|
31057
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
31058
|
+
*
|
|
31059
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
31060
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
31061
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
31062
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
31063
|
+
* gain to be divided into.
|
|
31064
|
+
*
|
|
31065
|
+
* `null` = the driver cannot say.
|
|
31066
|
+
*/
|
|
31067
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
31068
|
+
});
|
|
31069
|
+
/**
|
|
31070
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
31071
|
+
*
|
|
31072
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
31073
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
31074
|
+
* not one of the three cameras honours its own:
|
|
31075
|
+
*
|
|
31076
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
31077
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
31078
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
31079
|
+
*
|
|
31080
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
31081
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
31082
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
31083
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
31084
|
+
*
|
|
31085
|
+
* `source` is what makes it honest:
|
|
31086
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
31087
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
31088
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
31089
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
31090
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
31091
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
31092
|
+
* no picker.
|
|
31093
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
31094
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
31095
|
+
*
|
|
31096
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
31097
|
+
* native case has no preset and homes perfectly well.
|
|
31098
|
+
*/
|
|
31099
|
+
var PtzHomePresetSchema = object({
|
|
31100
|
+
presetId: string().nullable(),
|
|
31101
|
+
source: _enum([
|
|
31102
|
+
"operator",
|
|
31103
|
+
"firmware",
|
|
31104
|
+
"native",
|
|
31105
|
+
"none"
|
|
31106
|
+
])
|
|
30975
31107
|
});
|
|
30976
31108
|
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({
|
|
30977
31109
|
deviceId: number(),
|
|
@@ -30989,7 +31121,22 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
30989
31121
|
}), _void(), {
|
|
30990
31122
|
kind: "mutation",
|
|
30991
31123
|
auth: "admin"
|
|
30992
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
31124
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
31125
|
+
deviceId: number(),
|
|
31126
|
+
presetId: string().nullable()
|
|
31127
|
+
}), _void(), {
|
|
31128
|
+
kind: "mutation",
|
|
31129
|
+
auth: "admin"
|
|
31130
|
+
}), method(object({ deviceId: number() }), _void(), {
|
|
31131
|
+
kind: "mutation",
|
|
31132
|
+
auth: "admin"
|
|
31133
|
+
}), method(object({ deviceId: number() }), number().int().nullable()), method(object({
|
|
31134
|
+
deviceId: number(),
|
|
31135
|
+
seconds: number().int().min(0).max(3600)
|
|
31136
|
+
}), _void(), {
|
|
31137
|
+
kind: "mutation",
|
|
31138
|
+
auth: "admin"
|
|
31139
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
30993
31140
|
deviceId: number(),
|
|
30994
31141
|
enabled: boolean()
|
|
30995
31142
|
}), _void(), { kind: "mutation" });
|
|
@@ -40231,6 +40378,12 @@ Object.freeze({
|
|
|
40231
40378
|
addonId: null,
|
|
40232
40379
|
access: "create"
|
|
40233
40380
|
},
|
|
40381
|
+
"ptz.captureHomeHere": {
|
|
40382
|
+
capName: "ptz",
|
|
40383
|
+
capScope: "device",
|
|
40384
|
+
addonId: null,
|
|
40385
|
+
access: "create"
|
|
40386
|
+
},
|
|
40234
40387
|
"ptz.continuousMove": {
|
|
40235
40388
|
capName: "ptz",
|
|
40236
40389
|
capScope: "device",
|
|
@@ -40243,6 +40396,18 @@ Object.freeze({
|
|
|
40243
40396
|
addonId: null,
|
|
40244
40397
|
access: "delete"
|
|
40245
40398
|
},
|
|
40399
|
+
"ptz.getHomePreset": {
|
|
40400
|
+
capName: "ptz",
|
|
40401
|
+
capScope: "device",
|
|
40402
|
+
addonId: null,
|
|
40403
|
+
access: "view"
|
|
40404
|
+
},
|
|
40405
|
+
"ptz.getHomeReturnSeconds": {
|
|
40406
|
+
capName: "ptz",
|
|
40407
|
+
capScope: "device",
|
|
40408
|
+
addonId: null,
|
|
40409
|
+
access: "view"
|
|
40410
|
+
},
|
|
40246
40411
|
"ptz.getOptions": {
|
|
40247
40412
|
capName: "ptz",
|
|
40248
40413
|
capScope: "device",
|
|
@@ -40291,6 +40456,18 @@ Object.freeze({
|
|
|
40291
40456
|
addonId: null,
|
|
40292
40457
|
access: "create"
|
|
40293
40458
|
},
|
|
40459
|
+
"ptz.setHomePreset": {
|
|
40460
|
+
capName: "ptz",
|
|
40461
|
+
capScope: "device",
|
|
40462
|
+
addonId: null,
|
|
40463
|
+
access: "create"
|
|
40464
|
+
},
|
|
40465
|
+
"ptz.setHomeReturnSeconds": {
|
|
40466
|
+
capName: "ptz",
|
|
40467
|
+
capScope: "device",
|
|
40468
|
+
addonId: null,
|
|
40469
|
+
access: "create"
|
|
40470
|
+
},
|
|
40294
40471
|
"ptz.stop": {
|
|
40295
40472
|
capName: "ptz",
|
|
40296
40473
|
capScope: "device",
|
|
@@ -43454,6 +43631,11 @@ Object.freeze({
|
|
|
43454
43631
|
form: "single",
|
|
43455
43632
|
optional: false
|
|
43456
43633
|
}],
|
|
43634
|
+
"ptz.captureHomeHere": [{
|
|
43635
|
+
name: "deviceId",
|
|
43636
|
+
form: "single",
|
|
43637
|
+
optional: false
|
|
43638
|
+
}],
|
|
43457
43639
|
"ptz.continuousMove": [{
|
|
43458
43640
|
name: "deviceId",
|
|
43459
43641
|
form: "single",
|
|
@@ -43464,6 +43646,16 @@ Object.freeze({
|
|
|
43464
43646
|
form: "single",
|
|
43465
43647
|
optional: false
|
|
43466
43648
|
}],
|
|
43649
|
+
"ptz.getHomePreset": [{
|
|
43650
|
+
name: "deviceId",
|
|
43651
|
+
form: "single",
|
|
43652
|
+
optional: false
|
|
43653
|
+
}],
|
|
43654
|
+
"ptz.getHomeReturnSeconds": [{
|
|
43655
|
+
name: "deviceId",
|
|
43656
|
+
form: "single",
|
|
43657
|
+
optional: false
|
|
43658
|
+
}],
|
|
43467
43659
|
"ptz.getOptions": [{
|
|
43468
43660
|
name: "deviceId",
|
|
43469
43661
|
form: "single",
|
|
@@ -43504,6 +43696,16 @@ Object.freeze({
|
|
|
43504
43696
|
form: "single",
|
|
43505
43697
|
optional: false
|
|
43506
43698
|
}],
|
|
43699
|
+
"ptz.setHomePreset": [{
|
|
43700
|
+
name: "deviceId",
|
|
43701
|
+
form: "single",
|
|
43702
|
+
optional: false
|
|
43703
|
+
}],
|
|
43704
|
+
"ptz.setHomeReturnSeconds": [{
|
|
43705
|
+
name: "deviceId",
|
|
43706
|
+
form: "single",
|
|
43707
|
+
optional: false
|
|
43708
|
+
}],
|
|
43507
43709
|
"ptz.stop": [{
|
|
43508
43710
|
name: "deviceId",
|
|
43509
43711
|
form: "single",
|
package/package.json
CHANGED