@camstack/addon-notifiers 1.2.114 → 1.2.116
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
|
@@ -5390,7 +5390,7 @@ var ZodIssueCode = {
|
|
|
5390
5390
|
var ZodFirstPartyTypeKind;
|
|
5391
5391
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5392
5392
|
//#endregion
|
|
5393
|
-
//#region ../types/dist/sleep-
|
|
5393
|
+
//#region ../types/dist/sleep-vl6nBE8d.mjs
|
|
5394
5394
|
/**
|
|
5395
5395
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5396
5396
|
* window to float samples (D455).
|
|
@@ -28888,14 +28888,81 @@ DeviceType.Camera, method(object({ deviceId: number() }), PrivacyMaskOptionsSche
|
|
|
28888
28888
|
kind: "mutation",
|
|
28889
28889
|
auth: "admin"
|
|
28890
28890
|
});
|
|
28891
|
+
/**
|
|
28892
|
+
* What a preset id DOES on this camera.
|
|
28893
|
+
*
|
|
28894
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
28895
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
28896
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
28897
|
+
* firmware:
|
|
28898
|
+
*
|
|
28899
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
28900
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
28901
|
+
* 95 Call OSD menu
|
|
28902
|
+
*
|
|
28903
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
28904
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
28905
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
28906
|
+
* operator as a transport failure.
|
|
28907
|
+
*
|
|
28908
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
28909
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
28910
|
+
* `deletePreset` are gated.
|
|
28911
|
+
*/
|
|
28912
|
+
var PtzPresetFunctionSchema = _enum([
|
|
28913
|
+
"home",
|
|
28914
|
+
"day-mode",
|
|
28915
|
+
"night-mode",
|
|
28916
|
+
"day-night-auto",
|
|
28917
|
+
"set-limits",
|
|
28918
|
+
"save-limits",
|
|
28919
|
+
"reboot",
|
|
28920
|
+
"osd-menu"
|
|
28921
|
+
]);
|
|
28891
28922
|
var PtzPresetSchema = object({
|
|
28892
28923
|
id: string(),
|
|
28893
|
-
name: string()
|
|
28924
|
+
name: string(),
|
|
28925
|
+
/**
|
|
28926
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
28927
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
28928
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
28929
|
+
*/
|
|
28930
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
28931
|
+
/**
|
|
28932
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
28933
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
28934
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
28935
|
+
*/
|
|
28936
|
+
writable: boolean()
|
|
28894
28937
|
});
|
|
28938
|
+
/**
|
|
28939
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
28940
|
+
* read it.
|
|
28941
|
+
*
|
|
28942
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
28943
|
+
* position no way to say so. All four said `0`:
|
|
28944
|
+
*
|
|
28945
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
28946
|
+
* path lands upstream"
|
|
28947
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
28948
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
28949
|
+
* onvif throws
|
|
28950
|
+
*
|
|
28951
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
28952
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
28953
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
28954
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
28955
|
+
* headroom", which evacuated a healthy disk.
|
|
28956
|
+
*
|
|
28957
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
28958
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
28959
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
28960
|
+
* tells callers to migrate to.
|
|
28961
|
+
*/
|
|
28895
28962
|
var PtzPositionSchema = object({
|
|
28896
|
-
pan: number(),
|
|
28897
|
-
tilt: number(),
|
|
28898
|
-
zoom: number()
|
|
28963
|
+
pan: number().nullable(),
|
|
28964
|
+
tilt: number().nullable(),
|
|
28965
|
+
zoom: number().nullable()
|
|
28899
28966
|
});
|
|
28900
28967
|
var PtzMoveCommandSchema = object({
|
|
28901
28968
|
pan: number().optional(),
|
|
@@ -28914,7 +28981,72 @@ var PtzOptionsSchema = object({
|
|
|
28914
28981
|
maxPresets: number().optional(),
|
|
28915
28982
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
28916
28983
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
28917
|
-
hasAutofocus: boolean()
|
|
28984
|
+
hasAutofocus: boolean(),
|
|
28985
|
+
/**
|
|
28986
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
28987
|
+
*
|
|
28988
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
28989
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
28990
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
28991
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
28992
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
28993
|
+
* the knob it is turning.
|
|
28994
|
+
*
|
|
28995
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
28996
|
+
* a float). Never a made-up number.
|
|
28997
|
+
*/
|
|
28998
|
+
speedSteps: number().int().positive().nullable(),
|
|
28999
|
+
/**
|
|
29000
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
29001
|
+
*
|
|
29002
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
29003
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
29004
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
29005
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
29006
|
+
* gain to be divided into.
|
|
29007
|
+
*
|
|
29008
|
+
* `null` = the driver cannot say.
|
|
29009
|
+
*/
|
|
29010
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
29011
|
+
});
|
|
29012
|
+
/**
|
|
29013
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
29014
|
+
*
|
|
29015
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
29016
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
29017
|
+
* not one of the three cameras honours its own:
|
|
29018
|
+
*
|
|
29019
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
29020
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
29021
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
29022
|
+
*
|
|
29023
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
29024
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
29025
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
29026
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
29027
|
+
*
|
|
29028
|
+
* `source` is what makes it honest:
|
|
29029
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
29030
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
29031
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
29032
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
29033
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
29034
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
29035
|
+
* no picker.
|
|
29036
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
29037
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
29038
|
+
*
|
|
29039
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
29040
|
+
* native case has no preset and homes perfectly well.
|
|
29041
|
+
*/
|
|
29042
|
+
var PtzHomePresetSchema = object({
|
|
29043
|
+
presetId: string().nullable(),
|
|
29044
|
+
source: _enum([
|
|
29045
|
+
"operator",
|
|
29046
|
+
"firmware",
|
|
29047
|
+
"native",
|
|
29048
|
+
"none"
|
|
29049
|
+
])
|
|
28918
29050
|
});
|
|
28919
29051
|
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({
|
|
28920
29052
|
deviceId: number(),
|
|
@@ -28932,7 +29064,22 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
28932
29064
|
}), _void(), {
|
|
28933
29065
|
kind: "mutation",
|
|
28934
29066
|
auth: "admin"
|
|
28935
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
29067
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
29068
|
+
deviceId: number(),
|
|
29069
|
+
presetId: string().nullable()
|
|
29070
|
+
}), _void(), {
|
|
29071
|
+
kind: "mutation",
|
|
29072
|
+
auth: "admin"
|
|
29073
|
+
}), method(object({ deviceId: number() }), _void(), {
|
|
29074
|
+
kind: "mutation",
|
|
29075
|
+
auth: "admin"
|
|
29076
|
+
}), method(object({ deviceId: number() }), number().int().nullable()), method(object({
|
|
29077
|
+
deviceId: number(),
|
|
29078
|
+
seconds: number().int().min(0).max(3600)
|
|
29079
|
+
}), _void(), {
|
|
29080
|
+
kind: "mutation",
|
|
29081
|
+
auth: "admin"
|
|
29082
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
28936
29083
|
deviceId: number(),
|
|
28937
29084
|
enabled: boolean()
|
|
28938
29085
|
}), _void(), { kind: "mutation" });
|
|
@@ -35935,6 +36082,12 @@ Object.freeze({
|
|
|
35935
36082
|
addonId: null,
|
|
35936
36083
|
access: "create"
|
|
35937
36084
|
},
|
|
36085
|
+
"ptz.captureHomeHere": {
|
|
36086
|
+
capName: "ptz",
|
|
36087
|
+
capScope: "device",
|
|
36088
|
+
addonId: null,
|
|
36089
|
+
access: "create"
|
|
36090
|
+
},
|
|
35938
36091
|
"ptz.continuousMove": {
|
|
35939
36092
|
capName: "ptz",
|
|
35940
36093
|
capScope: "device",
|
|
@@ -35947,6 +36100,18 @@ Object.freeze({
|
|
|
35947
36100
|
addonId: null,
|
|
35948
36101
|
access: "delete"
|
|
35949
36102
|
},
|
|
36103
|
+
"ptz.getHomePreset": {
|
|
36104
|
+
capName: "ptz",
|
|
36105
|
+
capScope: "device",
|
|
36106
|
+
addonId: null,
|
|
36107
|
+
access: "view"
|
|
36108
|
+
},
|
|
36109
|
+
"ptz.getHomeReturnSeconds": {
|
|
36110
|
+
capName: "ptz",
|
|
36111
|
+
capScope: "device",
|
|
36112
|
+
addonId: null,
|
|
36113
|
+
access: "view"
|
|
36114
|
+
},
|
|
35950
36115
|
"ptz.getOptions": {
|
|
35951
36116
|
capName: "ptz",
|
|
35952
36117
|
capScope: "device",
|
|
@@ -35995,6 +36160,18 @@ Object.freeze({
|
|
|
35995
36160
|
addonId: null,
|
|
35996
36161
|
access: "create"
|
|
35997
36162
|
},
|
|
36163
|
+
"ptz.setHomePreset": {
|
|
36164
|
+
capName: "ptz",
|
|
36165
|
+
capScope: "device",
|
|
36166
|
+
addonId: null,
|
|
36167
|
+
access: "create"
|
|
36168
|
+
},
|
|
36169
|
+
"ptz.setHomeReturnSeconds": {
|
|
36170
|
+
capName: "ptz",
|
|
36171
|
+
capScope: "device",
|
|
36172
|
+
addonId: null,
|
|
36173
|
+
access: "create"
|
|
36174
|
+
},
|
|
35998
36175
|
"ptz.stop": {
|
|
35999
36176
|
capName: "ptz",
|
|
36000
36177
|
capScope: "device",
|
|
@@ -39158,6 +39335,11 @@ Object.freeze({
|
|
|
39158
39335
|
form: "single",
|
|
39159
39336
|
optional: false
|
|
39160
39337
|
}],
|
|
39338
|
+
"ptz.captureHomeHere": [{
|
|
39339
|
+
name: "deviceId",
|
|
39340
|
+
form: "single",
|
|
39341
|
+
optional: false
|
|
39342
|
+
}],
|
|
39161
39343
|
"ptz.continuousMove": [{
|
|
39162
39344
|
name: "deviceId",
|
|
39163
39345
|
form: "single",
|
|
@@ -39168,6 +39350,16 @@ Object.freeze({
|
|
|
39168
39350
|
form: "single",
|
|
39169
39351
|
optional: false
|
|
39170
39352
|
}],
|
|
39353
|
+
"ptz.getHomePreset": [{
|
|
39354
|
+
name: "deviceId",
|
|
39355
|
+
form: "single",
|
|
39356
|
+
optional: false
|
|
39357
|
+
}],
|
|
39358
|
+
"ptz.getHomeReturnSeconds": [{
|
|
39359
|
+
name: "deviceId",
|
|
39360
|
+
form: "single",
|
|
39361
|
+
optional: false
|
|
39362
|
+
}],
|
|
39171
39363
|
"ptz.getOptions": [{
|
|
39172
39364
|
name: "deviceId",
|
|
39173
39365
|
form: "single",
|
|
@@ -39208,6 +39400,16 @@ Object.freeze({
|
|
|
39208
39400
|
form: "single",
|
|
39209
39401
|
optional: false
|
|
39210
39402
|
}],
|
|
39403
|
+
"ptz.setHomePreset": [{
|
|
39404
|
+
name: "deviceId",
|
|
39405
|
+
form: "single",
|
|
39406
|
+
optional: false
|
|
39407
|
+
}],
|
|
39408
|
+
"ptz.setHomeReturnSeconds": [{
|
|
39409
|
+
name: "deviceId",
|
|
39410
|
+
form: "single",
|
|
39411
|
+
optional: false
|
|
39412
|
+
}],
|
|
39211
39413
|
"ptz.stop": [{
|
|
39212
39414
|
name: "deviceId",
|
|
39213
39415
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -5363,7 +5363,7 @@ var ZodIssueCode = {
|
|
|
5363
5363
|
var ZodFirstPartyTypeKind;
|
|
5364
5364
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5365
5365
|
//#endregion
|
|
5366
|
-
//#region ../types/dist/sleep-
|
|
5366
|
+
//#region ../types/dist/sleep-vl6nBE8d.mjs
|
|
5367
5367
|
/**
|
|
5368
5368
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5369
5369
|
* window to float samples (D455).
|
|
@@ -28861,14 +28861,81 @@ DeviceType.Camera, method(object({ deviceId: number() }), PrivacyMaskOptionsSche
|
|
|
28861
28861
|
kind: "mutation",
|
|
28862
28862
|
auth: "admin"
|
|
28863
28863
|
});
|
|
28864
|
+
/**
|
|
28865
|
+
* What a preset id DOES on this camera.
|
|
28866
|
+
*
|
|
28867
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
28868
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
28869
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
28870
|
+
* firmware:
|
|
28871
|
+
*
|
|
28872
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
28873
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
28874
|
+
* 95 Call OSD menu
|
|
28875
|
+
*
|
|
28876
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
28877
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
28878
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
28879
|
+
* operator as a transport failure.
|
|
28880
|
+
*
|
|
28881
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
28882
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
28883
|
+
* `deletePreset` are gated.
|
|
28884
|
+
*/
|
|
28885
|
+
var PtzPresetFunctionSchema = _enum([
|
|
28886
|
+
"home",
|
|
28887
|
+
"day-mode",
|
|
28888
|
+
"night-mode",
|
|
28889
|
+
"day-night-auto",
|
|
28890
|
+
"set-limits",
|
|
28891
|
+
"save-limits",
|
|
28892
|
+
"reboot",
|
|
28893
|
+
"osd-menu"
|
|
28894
|
+
]);
|
|
28864
28895
|
var PtzPresetSchema = object({
|
|
28865
28896
|
id: string(),
|
|
28866
|
-
name: string()
|
|
28897
|
+
name: string(),
|
|
28898
|
+
/**
|
|
28899
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
28900
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
28901
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
28902
|
+
*/
|
|
28903
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
28904
|
+
/**
|
|
28905
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
28906
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
28907
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
28908
|
+
*/
|
|
28909
|
+
writable: boolean()
|
|
28867
28910
|
});
|
|
28911
|
+
/**
|
|
28912
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
28913
|
+
* read it.
|
|
28914
|
+
*
|
|
28915
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
28916
|
+
* position no way to say so. All four said `0`:
|
|
28917
|
+
*
|
|
28918
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
28919
|
+
* path lands upstream"
|
|
28920
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
28921
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
28922
|
+
* onvif throws
|
|
28923
|
+
*
|
|
28924
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
28925
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
28926
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
28927
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
28928
|
+
* headroom", which evacuated a healthy disk.
|
|
28929
|
+
*
|
|
28930
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
28931
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
28932
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
28933
|
+
* tells callers to migrate to.
|
|
28934
|
+
*/
|
|
28868
28935
|
var PtzPositionSchema = object({
|
|
28869
|
-
pan: number(),
|
|
28870
|
-
tilt: number(),
|
|
28871
|
-
zoom: number()
|
|
28936
|
+
pan: number().nullable(),
|
|
28937
|
+
tilt: number().nullable(),
|
|
28938
|
+
zoom: number().nullable()
|
|
28872
28939
|
});
|
|
28873
28940
|
var PtzMoveCommandSchema = object({
|
|
28874
28941
|
pan: number().optional(),
|
|
@@ -28887,7 +28954,72 @@ var PtzOptionsSchema = object({
|
|
|
28887
28954
|
maxPresets: number().optional(),
|
|
28888
28955
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
28889
28956
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
28890
|
-
hasAutofocus: boolean()
|
|
28957
|
+
hasAutofocus: boolean(),
|
|
28958
|
+
/**
|
|
28959
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
28960
|
+
*
|
|
28961
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
28962
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
28963
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
28964
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
28965
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
28966
|
+
* the knob it is turning.
|
|
28967
|
+
*
|
|
28968
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
28969
|
+
* a float). Never a made-up number.
|
|
28970
|
+
*/
|
|
28971
|
+
speedSteps: number().int().positive().nullable(),
|
|
28972
|
+
/**
|
|
28973
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
28974
|
+
*
|
|
28975
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
28976
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
28977
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
28978
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
28979
|
+
* gain to be divided into.
|
|
28980
|
+
*
|
|
28981
|
+
* `null` = the driver cannot say.
|
|
28982
|
+
*/
|
|
28983
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
28984
|
+
});
|
|
28985
|
+
/**
|
|
28986
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
28987
|
+
*
|
|
28988
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
28989
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
28990
|
+
* not one of the three cameras honours its own:
|
|
28991
|
+
*
|
|
28992
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
28993
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
28994
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
28995
|
+
*
|
|
28996
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
28997
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
28998
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
28999
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
29000
|
+
*
|
|
29001
|
+
* `source` is what makes it honest:
|
|
29002
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
29003
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
29004
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
29005
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
29006
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
29007
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
29008
|
+
* no picker.
|
|
29009
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
29010
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
29011
|
+
*
|
|
29012
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
29013
|
+
* native case has no preset and homes perfectly well.
|
|
29014
|
+
*/
|
|
29015
|
+
var PtzHomePresetSchema = object({
|
|
29016
|
+
presetId: string().nullable(),
|
|
29017
|
+
source: _enum([
|
|
29018
|
+
"operator",
|
|
29019
|
+
"firmware",
|
|
29020
|
+
"native",
|
|
29021
|
+
"none"
|
|
29022
|
+
])
|
|
28891
29023
|
});
|
|
28892
29024
|
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({
|
|
28893
29025
|
deviceId: number(),
|
|
@@ -28905,7 +29037,22 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
28905
29037
|
}), _void(), {
|
|
28906
29038
|
kind: "mutation",
|
|
28907
29039
|
auth: "admin"
|
|
28908
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
29040
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
29041
|
+
deviceId: number(),
|
|
29042
|
+
presetId: string().nullable()
|
|
29043
|
+
}), _void(), {
|
|
29044
|
+
kind: "mutation",
|
|
29045
|
+
auth: "admin"
|
|
29046
|
+
}), method(object({ deviceId: number() }), _void(), {
|
|
29047
|
+
kind: "mutation",
|
|
29048
|
+
auth: "admin"
|
|
29049
|
+
}), method(object({ deviceId: number() }), number().int().nullable()), method(object({
|
|
29050
|
+
deviceId: number(),
|
|
29051
|
+
seconds: number().int().min(0).max(3600)
|
|
29052
|
+
}), _void(), {
|
|
29053
|
+
kind: "mutation",
|
|
29054
|
+
auth: "admin"
|
|
29055
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
28909
29056
|
deviceId: number(),
|
|
28910
29057
|
enabled: boolean()
|
|
28911
29058
|
}), _void(), { kind: "mutation" });
|
|
@@ -35908,6 +36055,12 @@ Object.freeze({
|
|
|
35908
36055
|
addonId: null,
|
|
35909
36056
|
access: "create"
|
|
35910
36057
|
},
|
|
36058
|
+
"ptz.captureHomeHere": {
|
|
36059
|
+
capName: "ptz",
|
|
36060
|
+
capScope: "device",
|
|
36061
|
+
addonId: null,
|
|
36062
|
+
access: "create"
|
|
36063
|
+
},
|
|
35911
36064
|
"ptz.continuousMove": {
|
|
35912
36065
|
capName: "ptz",
|
|
35913
36066
|
capScope: "device",
|
|
@@ -35920,6 +36073,18 @@ Object.freeze({
|
|
|
35920
36073
|
addonId: null,
|
|
35921
36074
|
access: "delete"
|
|
35922
36075
|
},
|
|
36076
|
+
"ptz.getHomePreset": {
|
|
36077
|
+
capName: "ptz",
|
|
36078
|
+
capScope: "device",
|
|
36079
|
+
addonId: null,
|
|
36080
|
+
access: "view"
|
|
36081
|
+
},
|
|
36082
|
+
"ptz.getHomeReturnSeconds": {
|
|
36083
|
+
capName: "ptz",
|
|
36084
|
+
capScope: "device",
|
|
36085
|
+
addonId: null,
|
|
36086
|
+
access: "view"
|
|
36087
|
+
},
|
|
35923
36088
|
"ptz.getOptions": {
|
|
35924
36089
|
capName: "ptz",
|
|
35925
36090
|
capScope: "device",
|
|
@@ -35968,6 +36133,18 @@ Object.freeze({
|
|
|
35968
36133
|
addonId: null,
|
|
35969
36134
|
access: "create"
|
|
35970
36135
|
},
|
|
36136
|
+
"ptz.setHomePreset": {
|
|
36137
|
+
capName: "ptz",
|
|
36138
|
+
capScope: "device",
|
|
36139
|
+
addonId: null,
|
|
36140
|
+
access: "create"
|
|
36141
|
+
},
|
|
36142
|
+
"ptz.setHomeReturnSeconds": {
|
|
36143
|
+
capName: "ptz",
|
|
36144
|
+
capScope: "device",
|
|
36145
|
+
addonId: null,
|
|
36146
|
+
access: "create"
|
|
36147
|
+
},
|
|
35971
36148
|
"ptz.stop": {
|
|
35972
36149
|
capName: "ptz",
|
|
35973
36150
|
capScope: "device",
|
|
@@ -39131,6 +39308,11 @@ Object.freeze({
|
|
|
39131
39308
|
form: "single",
|
|
39132
39309
|
optional: false
|
|
39133
39310
|
}],
|
|
39311
|
+
"ptz.captureHomeHere": [{
|
|
39312
|
+
name: "deviceId",
|
|
39313
|
+
form: "single",
|
|
39314
|
+
optional: false
|
|
39315
|
+
}],
|
|
39134
39316
|
"ptz.continuousMove": [{
|
|
39135
39317
|
name: "deviceId",
|
|
39136
39318
|
form: "single",
|
|
@@ -39141,6 +39323,16 @@ Object.freeze({
|
|
|
39141
39323
|
form: "single",
|
|
39142
39324
|
optional: false
|
|
39143
39325
|
}],
|
|
39326
|
+
"ptz.getHomePreset": [{
|
|
39327
|
+
name: "deviceId",
|
|
39328
|
+
form: "single",
|
|
39329
|
+
optional: false
|
|
39330
|
+
}],
|
|
39331
|
+
"ptz.getHomeReturnSeconds": [{
|
|
39332
|
+
name: "deviceId",
|
|
39333
|
+
form: "single",
|
|
39334
|
+
optional: false
|
|
39335
|
+
}],
|
|
39144
39336
|
"ptz.getOptions": [{
|
|
39145
39337
|
name: "deviceId",
|
|
39146
39338
|
form: "single",
|
|
@@ -39181,6 +39373,16 @@ Object.freeze({
|
|
|
39181
39373
|
form: "single",
|
|
39182
39374
|
optional: false
|
|
39183
39375
|
}],
|
|
39376
|
+
"ptz.setHomePreset": [{
|
|
39377
|
+
name: "deviceId",
|
|
39378
|
+
form: "single",
|
|
39379
|
+
optional: false
|
|
39380
|
+
}],
|
|
39381
|
+
"ptz.setHomeReturnSeconds": [{
|
|
39382
|
+
name: "deviceId",
|
|
39383
|
+
form: "single",
|
|
39384
|
+
optional: false
|
|
39385
|
+
}],
|
|
39184
39386
|
"ptz.stop": [{
|
|
39185
39387
|
name: "deviceId",
|
|
39186
39388
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-notifiers",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.116",
|
|
4
4
|
"description": "System notifiers addon for CamStack — a `notification-output` collection provider hosting per-kind notifier adapters (ntfy, pushover, gotify, telegram, discord, webhook, zentik).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|