@camstack/addon-mqtt-broker 1.2.109 → 1.2.111
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 +167 -7
- package/dist/mqtt-broker.addon.mjs +167 -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-B1y0Fo1U.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,13 @@ 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() }), PtzPositionSchema), method(object({
|
|
28847
28985
|
deviceId: number(),
|
|
28848
28986
|
enabled: boolean()
|
|
28849
28987
|
}), _void(), { kind: "mutation" });
|
|
@@ -35858,6 +35996,12 @@ Object.freeze({
|
|
|
35858
35996
|
addonId: null,
|
|
35859
35997
|
access: "delete"
|
|
35860
35998
|
},
|
|
35999
|
+
"ptz.getHomePreset": {
|
|
36000
|
+
capName: "ptz",
|
|
36001
|
+
capScope: "device",
|
|
36002
|
+
addonId: null,
|
|
36003
|
+
access: "view"
|
|
36004
|
+
},
|
|
35861
36005
|
"ptz.getOptions": {
|
|
35862
36006
|
capName: "ptz",
|
|
35863
36007
|
capScope: "device",
|
|
@@ -35906,6 +36050,12 @@ Object.freeze({
|
|
|
35906
36050
|
addonId: null,
|
|
35907
36051
|
access: "create"
|
|
35908
36052
|
},
|
|
36053
|
+
"ptz.setHomePreset": {
|
|
36054
|
+
capName: "ptz",
|
|
36055
|
+
capScope: "device",
|
|
36056
|
+
addonId: null,
|
|
36057
|
+
access: "create"
|
|
36058
|
+
},
|
|
35909
36059
|
"ptz.stop": {
|
|
35910
36060
|
capName: "ptz",
|
|
35911
36061
|
capScope: "device",
|
|
@@ -39079,6 +39229,11 @@ Object.freeze({
|
|
|
39079
39229
|
form: "single",
|
|
39080
39230
|
optional: false
|
|
39081
39231
|
}],
|
|
39232
|
+
"ptz.getHomePreset": [{
|
|
39233
|
+
name: "deviceId",
|
|
39234
|
+
form: "single",
|
|
39235
|
+
optional: false
|
|
39236
|
+
}],
|
|
39082
39237
|
"ptz.getOptions": [{
|
|
39083
39238
|
name: "deviceId",
|
|
39084
39239
|
form: "single",
|
|
@@ -39119,6 +39274,11 @@ Object.freeze({
|
|
|
39119
39274
|
form: "single",
|
|
39120
39275
|
optional: false
|
|
39121
39276
|
}],
|
|
39277
|
+
"ptz.setHomePreset": [{
|
|
39278
|
+
name: "deviceId",
|
|
39279
|
+
form: "single",
|
|
39280
|
+
optional: false
|
|
39281
|
+
}],
|
|
39122
39282
|
"ptz.stop": [{
|
|
39123
39283
|
name: "deviceId",
|
|
39124
39284
|
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-B1y0Fo1U.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,13 @@ 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() }), PtzPositionSchema), method(object({
|
|
28842
28980
|
deviceId: number(),
|
|
28843
28981
|
enabled: boolean()
|
|
28844
28982
|
}), _void(), { kind: "mutation" });
|
|
@@ -35853,6 +35991,12 @@ Object.freeze({
|
|
|
35853
35991
|
addonId: null,
|
|
35854
35992
|
access: "delete"
|
|
35855
35993
|
},
|
|
35994
|
+
"ptz.getHomePreset": {
|
|
35995
|
+
capName: "ptz",
|
|
35996
|
+
capScope: "device",
|
|
35997
|
+
addonId: null,
|
|
35998
|
+
access: "view"
|
|
35999
|
+
},
|
|
35856
36000
|
"ptz.getOptions": {
|
|
35857
36001
|
capName: "ptz",
|
|
35858
36002
|
capScope: "device",
|
|
@@ -35901,6 +36045,12 @@ Object.freeze({
|
|
|
35901
36045
|
addonId: null,
|
|
35902
36046
|
access: "create"
|
|
35903
36047
|
},
|
|
36048
|
+
"ptz.setHomePreset": {
|
|
36049
|
+
capName: "ptz",
|
|
36050
|
+
capScope: "device",
|
|
36051
|
+
addonId: null,
|
|
36052
|
+
access: "create"
|
|
36053
|
+
},
|
|
35904
36054
|
"ptz.stop": {
|
|
35905
36055
|
capName: "ptz",
|
|
35906
36056
|
capScope: "device",
|
|
@@ -39074,6 +39224,11 @@ Object.freeze({
|
|
|
39074
39224
|
form: "single",
|
|
39075
39225
|
optional: false
|
|
39076
39226
|
}],
|
|
39227
|
+
"ptz.getHomePreset": [{
|
|
39228
|
+
name: "deviceId",
|
|
39229
|
+
form: "single",
|
|
39230
|
+
optional: false
|
|
39231
|
+
}],
|
|
39077
39232
|
"ptz.getOptions": [{
|
|
39078
39233
|
name: "deviceId",
|
|
39079
39234
|
form: "single",
|
|
@@ -39114,6 +39269,11 @@ Object.freeze({
|
|
|
39114
39269
|
form: "single",
|
|
39115
39270
|
optional: false
|
|
39116
39271
|
}],
|
|
39272
|
+
"ptz.setHomePreset": [{
|
|
39273
|
+
name: "deviceId",
|
|
39274
|
+
form: "single",
|
|
39275
|
+
optional: false
|
|
39276
|
+
}],
|
|
39117
39277
|
"ptz.stop": [{
|
|
39118
39278
|
name: "deviceId",
|
|
39119
39279
|
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.111",
|
|
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",
|