@camstack/addon-mqtt-broker 1.2.110 → 1.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/mqtt-broker.addon.js +209 -7
- package/dist/mqtt-broker.addon.mjs +209 -7
- package/package.json +1 -1
|
@@ -5405,7 +5405,7 @@ var ZodIssueCode = {
|
|
|
5405
5405
|
var ZodFirstPartyTypeKind;
|
|
5406
5406
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5407
5407
|
//#endregion
|
|
5408
|
-
//#region ../types/dist/sleep-
|
|
5408
|
+
//#region ../types/dist/sleep-vl6nBE8d.mjs
|
|
5409
5409
|
/**
|
|
5410
5410
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5411
5411
|
* window to float samples (D455).
|
|
@@ -28799,14 +28799,81 @@ DeviceType.Camera, method(object({ deviceId: number() }), PrivacyMaskOptionsSche
|
|
|
28799
28799
|
kind: "mutation",
|
|
28800
28800
|
auth: "admin"
|
|
28801
28801
|
});
|
|
28802
|
+
/**
|
|
28803
|
+
* What a preset id DOES on this camera.
|
|
28804
|
+
*
|
|
28805
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
28806
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
28807
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
28808
|
+
* firmware:
|
|
28809
|
+
*
|
|
28810
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
28811
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
28812
|
+
* 95 Call OSD menu
|
|
28813
|
+
*
|
|
28814
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
28815
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
28816
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
28817
|
+
* operator as a transport failure.
|
|
28818
|
+
*
|
|
28819
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
28820
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
28821
|
+
* `deletePreset` are gated.
|
|
28822
|
+
*/
|
|
28823
|
+
var PtzPresetFunctionSchema = _enum([
|
|
28824
|
+
"home",
|
|
28825
|
+
"day-mode",
|
|
28826
|
+
"night-mode",
|
|
28827
|
+
"day-night-auto",
|
|
28828
|
+
"set-limits",
|
|
28829
|
+
"save-limits",
|
|
28830
|
+
"reboot",
|
|
28831
|
+
"osd-menu"
|
|
28832
|
+
]);
|
|
28802
28833
|
var PtzPresetSchema = object({
|
|
28803
28834
|
id: string(),
|
|
28804
|
-
name: string()
|
|
28835
|
+
name: string(),
|
|
28836
|
+
/**
|
|
28837
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
28838
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
28839
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
28840
|
+
*/
|
|
28841
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
28842
|
+
/**
|
|
28843
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
28844
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
28845
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
28846
|
+
*/
|
|
28847
|
+
writable: boolean()
|
|
28805
28848
|
});
|
|
28849
|
+
/**
|
|
28850
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
28851
|
+
* read it.
|
|
28852
|
+
*
|
|
28853
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
28854
|
+
* position no way to say so. All four said `0`:
|
|
28855
|
+
*
|
|
28856
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
28857
|
+
* path lands upstream"
|
|
28858
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
28859
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
28860
|
+
* onvif throws
|
|
28861
|
+
*
|
|
28862
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
28863
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
28864
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
28865
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
28866
|
+
* headroom", which evacuated a healthy disk.
|
|
28867
|
+
*
|
|
28868
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
28869
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
28870
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
28871
|
+
* tells callers to migrate to.
|
|
28872
|
+
*/
|
|
28806
28873
|
var PtzPositionSchema = object({
|
|
28807
|
-
pan: number(),
|
|
28808
|
-
tilt: number(),
|
|
28809
|
-
zoom: number()
|
|
28874
|
+
pan: number().nullable(),
|
|
28875
|
+
tilt: number().nullable(),
|
|
28876
|
+
zoom: number().nullable()
|
|
28810
28877
|
});
|
|
28811
28878
|
var PtzMoveCommandSchema = object({
|
|
28812
28879
|
pan: number().optional(),
|
|
@@ -28825,7 +28892,72 @@ var PtzOptionsSchema = object({
|
|
|
28825
28892
|
maxPresets: number().optional(),
|
|
28826
28893
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
28827
28894
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
28828
|
-
hasAutofocus: boolean()
|
|
28895
|
+
hasAutofocus: boolean(),
|
|
28896
|
+
/**
|
|
28897
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
28898
|
+
*
|
|
28899
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
28900
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
28901
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
28902
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
28903
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
28904
|
+
* the knob it is turning.
|
|
28905
|
+
*
|
|
28906
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
28907
|
+
* a float). Never a made-up number.
|
|
28908
|
+
*/
|
|
28909
|
+
speedSteps: number().int().positive().nullable(),
|
|
28910
|
+
/**
|
|
28911
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
28912
|
+
*
|
|
28913
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
28914
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
28915
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
28916
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
28917
|
+
* gain to be divided into.
|
|
28918
|
+
*
|
|
28919
|
+
* `null` = the driver cannot say.
|
|
28920
|
+
*/
|
|
28921
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
28922
|
+
});
|
|
28923
|
+
/**
|
|
28924
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
28925
|
+
*
|
|
28926
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
28927
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
28928
|
+
* not one of the three cameras honours its own:
|
|
28929
|
+
*
|
|
28930
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
28931
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
28932
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
28933
|
+
*
|
|
28934
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
28935
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
28936
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
28937
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
28938
|
+
*
|
|
28939
|
+
* `source` is what makes it honest:
|
|
28940
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
28941
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
28942
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
28943
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
28944
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
28945
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
28946
|
+
* no picker.
|
|
28947
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
28948
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
28949
|
+
*
|
|
28950
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
28951
|
+
* native case has no preset and homes perfectly well.
|
|
28952
|
+
*/
|
|
28953
|
+
var PtzHomePresetSchema = object({
|
|
28954
|
+
presetId: string().nullable(),
|
|
28955
|
+
source: _enum([
|
|
28956
|
+
"operator",
|
|
28957
|
+
"firmware",
|
|
28958
|
+
"native",
|
|
28959
|
+
"none"
|
|
28960
|
+
])
|
|
28829
28961
|
});
|
|
28830
28962
|
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({
|
|
28831
28963
|
deviceId: number(),
|
|
@@ -28843,7 +28975,22 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
28843
28975
|
}), _void(), {
|
|
28844
28976
|
kind: "mutation",
|
|
28845
28977
|
auth: "admin"
|
|
28846
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
28978
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
28979
|
+
deviceId: number(),
|
|
28980
|
+
presetId: string().nullable()
|
|
28981
|
+
}), _void(), {
|
|
28982
|
+
kind: "mutation",
|
|
28983
|
+
auth: "admin"
|
|
28984
|
+
}), method(object({ deviceId: number() }), _void(), {
|
|
28985
|
+
kind: "mutation",
|
|
28986
|
+
auth: "admin"
|
|
28987
|
+
}), method(object({ deviceId: number() }), number().int().nullable()), method(object({
|
|
28988
|
+
deviceId: number(),
|
|
28989
|
+
seconds: number().int().min(0).max(3600)
|
|
28990
|
+
}), _void(), {
|
|
28991
|
+
kind: "mutation",
|
|
28992
|
+
auth: "admin"
|
|
28993
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
28847
28994
|
deviceId: number(),
|
|
28848
28995
|
enabled: boolean()
|
|
28849
28996
|
}), _void(), { kind: "mutation" });
|
|
@@ -35846,6 +35993,12 @@ Object.freeze({
|
|
|
35846
35993
|
addonId: null,
|
|
35847
35994
|
access: "create"
|
|
35848
35995
|
},
|
|
35996
|
+
"ptz.captureHomeHere": {
|
|
35997
|
+
capName: "ptz",
|
|
35998
|
+
capScope: "device",
|
|
35999
|
+
addonId: null,
|
|
36000
|
+
access: "create"
|
|
36001
|
+
},
|
|
35849
36002
|
"ptz.continuousMove": {
|
|
35850
36003
|
capName: "ptz",
|
|
35851
36004
|
capScope: "device",
|
|
@@ -35858,6 +36011,18 @@ Object.freeze({
|
|
|
35858
36011
|
addonId: null,
|
|
35859
36012
|
access: "delete"
|
|
35860
36013
|
},
|
|
36014
|
+
"ptz.getHomePreset": {
|
|
36015
|
+
capName: "ptz",
|
|
36016
|
+
capScope: "device",
|
|
36017
|
+
addonId: null,
|
|
36018
|
+
access: "view"
|
|
36019
|
+
},
|
|
36020
|
+
"ptz.getHomeReturnSeconds": {
|
|
36021
|
+
capName: "ptz",
|
|
36022
|
+
capScope: "device",
|
|
36023
|
+
addonId: null,
|
|
36024
|
+
access: "view"
|
|
36025
|
+
},
|
|
35861
36026
|
"ptz.getOptions": {
|
|
35862
36027
|
capName: "ptz",
|
|
35863
36028
|
capScope: "device",
|
|
@@ -35906,6 +36071,18 @@ Object.freeze({
|
|
|
35906
36071
|
addonId: null,
|
|
35907
36072
|
access: "create"
|
|
35908
36073
|
},
|
|
36074
|
+
"ptz.setHomePreset": {
|
|
36075
|
+
capName: "ptz",
|
|
36076
|
+
capScope: "device",
|
|
36077
|
+
addonId: null,
|
|
36078
|
+
access: "create"
|
|
36079
|
+
},
|
|
36080
|
+
"ptz.setHomeReturnSeconds": {
|
|
36081
|
+
capName: "ptz",
|
|
36082
|
+
capScope: "device",
|
|
36083
|
+
addonId: null,
|
|
36084
|
+
access: "create"
|
|
36085
|
+
},
|
|
35909
36086
|
"ptz.stop": {
|
|
35910
36087
|
capName: "ptz",
|
|
35911
36088
|
capScope: "device",
|
|
@@ -39069,6 +39246,11 @@ Object.freeze({
|
|
|
39069
39246
|
form: "single",
|
|
39070
39247
|
optional: false
|
|
39071
39248
|
}],
|
|
39249
|
+
"ptz.captureHomeHere": [{
|
|
39250
|
+
name: "deviceId",
|
|
39251
|
+
form: "single",
|
|
39252
|
+
optional: false
|
|
39253
|
+
}],
|
|
39072
39254
|
"ptz.continuousMove": [{
|
|
39073
39255
|
name: "deviceId",
|
|
39074
39256
|
form: "single",
|
|
@@ -39079,6 +39261,16 @@ Object.freeze({
|
|
|
39079
39261
|
form: "single",
|
|
39080
39262
|
optional: false
|
|
39081
39263
|
}],
|
|
39264
|
+
"ptz.getHomePreset": [{
|
|
39265
|
+
name: "deviceId",
|
|
39266
|
+
form: "single",
|
|
39267
|
+
optional: false
|
|
39268
|
+
}],
|
|
39269
|
+
"ptz.getHomeReturnSeconds": [{
|
|
39270
|
+
name: "deviceId",
|
|
39271
|
+
form: "single",
|
|
39272
|
+
optional: false
|
|
39273
|
+
}],
|
|
39082
39274
|
"ptz.getOptions": [{
|
|
39083
39275
|
name: "deviceId",
|
|
39084
39276
|
form: "single",
|
|
@@ -39119,6 +39311,16 @@ Object.freeze({
|
|
|
39119
39311
|
form: "single",
|
|
39120
39312
|
optional: false
|
|
39121
39313
|
}],
|
|
39314
|
+
"ptz.setHomePreset": [{
|
|
39315
|
+
name: "deviceId",
|
|
39316
|
+
form: "single",
|
|
39317
|
+
optional: false
|
|
39318
|
+
}],
|
|
39319
|
+
"ptz.setHomeReturnSeconds": [{
|
|
39320
|
+
name: "deviceId",
|
|
39321
|
+
form: "single",
|
|
39322
|
+
optional: false
|
|
39323
|
+
}],
|
|
39122
39324
|
"ptz.stop": [{
|
|
39123
39325
|
name: "deviceId",
|
|
39124
39326
|
form: "single",
|
|
@@ -5400,7 +5400,7 @@ var ZodIssueCode = {
|
|
|
5400
5400
|
var ZodFirstPartyTypeKind;
|
|
5401
5401
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5402
5402
|
//#endregion
|
|
5403
|
-
//#region ../types/dist/sleep-
|
|
5403
|
+
//#region ../types/dist/sleep-vl6nBE8d.mjs
|
|
5404
5404
|
/**
|
|
5405
5405
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5406
5406
|
* window to float samples (D455).
|
|
@@ -28794,14 +28794,81 @@ DeviceType.Camera, method(object({ deviceId: number() }), PrivacyMaskOptionsSche
|
|
|
28794
28794
|
kind: "mutation",
|
|
28795
28795
|
auth: "admin"
|
|
28796
28796
|
});
|
|
28797
|
+
/**
|
|
28798
|
+
* What a preset id DOES on this camera.
|
|
28799
|
+
*
|
|
28800
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
28801
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
28802
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
28803
|
+
* firmware:
|
|
28804
|
+
*
|
|
28805
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
28806
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
28807
|
+
* 95 Call OSD menu
|
|
28808
|
+
*
|
|
28809
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
28810
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
28811
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
28812
|
+
* operator as a transport failure.
|
|
28813
|
+
*
|
|
28814
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
28815
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
28816
|
+
* `deletePreset` are gated.
|
|
28817
|
+
*/
|
|
28818
|
+
var PtzPresetFunctionSchema = _enum([
|
|
28819
|
+
"home",
|
|
28820
|
+
"day-mode",
|
|
28821
|
+
"night-mode",
|
|
28822
|
+
"day-night-auto",
|
|
28823
|
+
"set-limits",
|
|
28824
|
+
"save-limits",
|
|
28825
|
+
"reboot",
|
|
28826
|
+
"osd-menu"
|
|
28827
|
+
]);
|
|
28797
28828
|
var PtzPresetSchema = object({
|
|
28798
28829
|
id: string(),
|
|
28799
|
-
name: string()
|
|
28830
|
+
name: string(),
|
|
28831
|
+
/**
|
|
28832
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
28833
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
28834
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
28835
|
+
*/
|
|
28836
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
28837
|
+
/**
|
|
28838
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
28839
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
28840
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
28841
|
+
*/
|
|
28842
|
+
writable: boolean()
|
|
28800
28843
|
});
|
|
28844
|
+
/**
|
|
28845
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
28846
|
+
* read it.
|
|
28847
|
+
*
|
|
28848
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
28849
|
+
* position no way to say so. All four said `0`:
|
|
28850
|
+
*
|
|
28851
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
28852
|
+
* path lands upstream"
|
|
28853
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
28854
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
28855
|
+
* onvif throws
|
|
28856
|
+
*
|
|
28857
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
28858
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
28859
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
28860
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
28861
|
+
* headroom", which evacuated a healthy disk.
|
|
28862
|
+
*
|
|
28863
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
28864
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
28865
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
28866
|
+
* tells callers to migrate to.
|
|
28867
|
+
*/
|
|
28801
28868
|
var PtzPositionSchema = object({
|
|
28802
|
-
pan: number(),
|
|
28803
|
-
tilt: number(),
|
|
28804
|
-
zoom: number()
|
|
28869
|
+
pan: number().nullable(),
|
|
28870
|
+
tilt: number().nullable(),
|
|
28871
|
+
zoom: number().nullable()
|
|
28805
28872
|
});
|
|
28806
28873
|
var PtzMoveCommandSchema = object({
|
|
28807
28874
|
pan: number().optional(),
|
|
@@ -28820,7 +28887,72 @@ var PtzOptionsSchema = object({
|
|
|
28820
28887
|
maxPresets: number().optional(),
|
|
28821
28888
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
28822
28889
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
28823
|
-
hasAutofocus: boolean()
|
|
28890
|
+
hasAutofocus: boolean(),
|
|
28891
|
+
/**
|
|
28892
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
28893
|
+
*
|
|
28894
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
28895
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
28896
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
28897
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
28898
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
28899
|
+
* the knob it is turning.
|
|
28900
|
+
*
|
|
28901
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
28902
|
+
* a float). Never a made-up number.
|
|
28903
|
+
*/
|
|
28904
|
+
speedSteps: number().int().positive().nullable(),
|
|
28905
|
+
/**
|
|
28906
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
28907
|
+
*
|
|
28908
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
28909
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
28910
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
28911
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
28912
|
+
* gain to be divided into.
|
|
28913
|
+
*
|
|
28914
|
+
* `null` = the driver cannot say.
|
|
28915
|
+
*/
|
|
28916
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
28917
|
+
});
|
|
28918
|
+
/**
|
|
28919
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
28920
|
+
*
|
|
28921
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
28922
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
28923
|
+
* not one of the three cameras honours its own:
|
|
28924
|
+
*
|
|
28925
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
28926
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
28927
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
28928
|
+
*
|
|
28929
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
28930
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
28931
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
28932
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
28933
|
+
*
|
|
28934
|
+
* `source` is what makes it honest:
|
|
28935
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
28936
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
28937
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
28938
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
28939
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
28940
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
28941
|
+
* no picker.
|
|
28942
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
28943
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
28944
|
+
*
|
|
28945
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
28946
|
+
* native case has no preset and homes perfectly well.
|
|
28947
|
+
*/
|
|
28948
|
+
var PtzHomePresetSchema = object({
|
|
28949
|
+
presetId: string().nullable(),
|
|
28950
|
+
source: _enum([
|
|
28951
|
+
"operator",
|
|
28952
|
+
"firmware",
|
|
28953
|
+
"native",
|
|
28954
|
+
"none"
|
|
28955
|
+
])
|
|
28824
28956
|
});
|
|
28825
28957
|
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({
|
|
28826
28958
|
deviceId: number(),
|
|
@@ -28838,7 +28970,22 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
28838
28970
|
}), _void(), {
|
|
28839
28971
|
kind: "mutation",
|
|
28840
28972
|
auth: "admin"
|
|
28841
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
28973
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
28974
|
+
deviceId: number(),
|
|
28975
|
+
presetId: string().nullable()
|
|
28976
|
+
}), _void(), {
|
|
28977
|
+
kind: "mutation",
|
|
28978
|
+
auth: "admin"
|
|
28979
|
+
}), method(object({ deviceId: number() }), _void(), {
|
|
28980
|
+
kind: "mutation",
|
|
28981
|
+
auth: "admin"
|
|
28982
|
+
}), method(object({ deviceId: number() }), number().int().nullable()), method(object({
|
|
28983
|
+
deviceId: number(),
|
|
28984
|
+
seconds: number().int().min(0).max(3600)
|
|
28985
|
+
}), _void(), {
|
|
28986
|
+
kind: "mutation",
|
|
28987
|
+
auth: "admin"
|
|
28988
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
28842
28989
|
deviceId: number(),
|
|
28843
28990
|
enabled: boolean()
|
|
28844
28991
|
}), _void(), { kind: "mutation" });
|
|
@@ -35841,6 +35988,12 @@ Object.freeze({
|
|
|
35841
35988
|
addonId: null,
|
|
35842
35989
|
access: "create"
|
|
35843
35990
|
},
|
|
35991
|
+
"ptz.captureHomeHere": {
|
|
35992
|
+
capName: "ptz",
|
|
35993
|
+
capScope: "device",
|
|
35994
|
+
addonId: null,
|
|
35995
|
+
access: "create"
|
|
35996
|
+
},
|
|
35844
35997
|
"ptz.continuousMove": {
|
|
35845
35998
|
capName: "ptz",
|
|
35846
35999
|
capScope: "device",
|
|
@@ -35853,6 +36006,18 @@ Object.freeze({
|
|
|
35853
36006
|
addonId: null,
|
|
35854
36007
|
access: "delete"
|
|
35855
36008
|
},
|
|
36009
|
+
"ptz.getHomePreset": {
|
|
36010
|
+
capName: "ptz",
|
|
36011
|
+
capScope: "device",
|
|
36012
|
+
addonId: null,
|
|
36013
|
+
access: "view"
|
|
36014
|
+
},
|
|
36015
|
+
"ptz.getHomeReturnSeconds": {
|
|
36016
|
+
capName: "ptz",
|
|
36017
|
+
capScope: "device",
|
|
36018
|
+
addonId: null,
|
|
36019
|
+
access: "view"
|
|
36020
|
+
},
|
|
35856
36021
|
"ptz.getOptions": {
|
|
35857
36022
|
capName: "ptz",
|
|
35858
36023
|
capScope: "device",
|
|
@@ -35901,6 +36066,18 @@ Object.freeze({
|
|
|
35901
36066
|
addonId: null,
|
|
35902
36067
|
access: "create"
|
|
35903
36068
|
},
|
|
36069
|
+
"ptz.setHomePreset": {
|
|
36070
|
+
capName: "ptz",
|
|
36071
|
+
capScope: "device",
|
|
36072
|
+
addonId: null,
|
|
36073
|
+
access: "create"
|
|
36074
|
+
},
|
|
36075
|
+
"ptz.setHomeReturnSeconds": {
|
|
36076
|
+
capName: "ptz",
|
|
36077
|
+
capScope: "device",
|
|
36078
|
+
addonId: null,
|
|
36079
|
+
access: "create"
|
|
36080
|
+
},
|
|
35904
36081
|
"ptz.stop": {
|
|
35905
36082
|
capName: "ptz",
|
|
35906
36083
|
capScope: "device",
|
|
@@ -39064,6 +39241,11 @@ Object.freeze({
|
|
|
39064
39241
|
form: "single",
|
|
39065
39242
|
optional: false
|
|
39066
39243
|
}],
|
|
39244
|
+
"ptz.captureHomeHere": [{
|
|
39245
|
+
name: "deviceId",
|
|
39246
|
+
form: "single",
|
|
39247
|
+
optional: false
|
|
39248
|
+
}],
|
|
39067
39249
|
"ptz.continuousMove": [{
|
|
39068
39250
|
name: "deviceId",
|
|
39069
39251
|
form: "single",
|
|
@@ -39074,6 +39256,16 @@ Object.freeze({
|
|
|
39074
39256
|
form: "single",
|
|
39075
39257
|
optional: false
|
|
39076
39258
|
}],
|
|
39259
|
+
"ptz.getHomePreset": [{
|
|
39260
|
+
name: "deviceId",
|
|
39261
|
+
form: "single",
|
|
39262
|
+
optional: false
|
|
39263
|
+
}],
|
|
39264
|
+
"ptz.getHomeReturnSeconds": [{
|
|
39265
|
+
name: "deviceId",
|
|
39266
|
+
form: "single",
|
|
39267
|
+
optional: false
|
|
39268
|
+
}],
|
|
39077
39269
|
"ptz.getOptions": [{
|
|
39078
39270
|
name: "deviceId",
|
|
39079
39271
|
form: "single",
|
|
@@ -39114,6 +39306,16 @@ Object.freeze({
|
|
|
39114
39306
|
form: "single",
|
|
39115
39307
|
optional: false
|
|
39116
39308
|
}],
|
|
39309
|
+
"ptz.setHomePreset": [{
|
|
39310
|
+
name: "deviceId",
|
|
39311
|
+
form: "single",
|
|
39312
|
+
optional: false
|
|
39313
|
+
}],
|
|
39314
|
+
"ptz.setHomeReturnSeconds": [{
|
|
39315
|
+
name: "deviceId",
|
|
39316
|
+
form: "single",
|
|
39317
|
+
optional: false
|
|
39318
|
+
}],
|
|
39117
39319
|
"ptz.stop": [{
|
|
39118
39320
|
name: "deviceId",
|
|
39119
39321
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-mqtt-broker",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.112",
|
|
4
4
|
"description": "MQTT broker registry addon for CamStack — manages external broker entries + an optional embedded aedes broker. Consumers spin up their own `mqtt.js` clients via the `mqtt-broker` cap.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|