@camstack/addon-provider-dreame 0.2.110 → 0.2.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +167 -7
- package/dist/addon.mjs +167 -7
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -58137,7 +58137,7 @@ var ZodIssueCode = {
|
|
|
58137
58137
|
var ZodFirstPartyTypeKind;
|
|
58138
58138
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
58139
58139
|
//#endregion
|
|
58140
|
-
//#region ../types/dist/sleep-
|
|
58140
|
+
//#region ../types/dist/sleep-B1y0Fo1U.mjs
|
|
58141
58141
|
/**
|
|
58142
58142
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
58143
58143
|
* window to float samples (D455).
|
|
@@ -83836,14 +83836,81 @@ var privacyMaskCapability = {
|
|
|
83836
83836
|
* whether persisting is worth a SQLite commit. */
|
|
83837
83837
|
volatileStateFields: ["lastFetchedAt"]
|
|
83838
83838
|
};
|
|
83839
|
+
/**
|
|
83840
|
+
* What a preset id DOES on this camera.
|
|
83841
|
+
*
|
|
83842
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
83843
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
83844
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
83845
|
+
* firmware:
|
|
83846
|
+
*
|
|
83847
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
83848
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
83849
|
+
* 95 Call OSD menu
|
|
83850
|
+
*
|
|
83851
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
83852
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
83853
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
83854
|
+
* operator as a transport failure.
|
|
83855
|
+
*
|
|
83856
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
83857
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
83858
|
+
* `deletePreset` are gated.
|
|
83859
|
+
*/
|
|
83860
|
+
var PtzPresetFunctionSchema = _enum([
|
|
83861
|
+
"home",
|
|
83862
|
+
"day-mode",
|
|
83863
|
+
"night-mode",
|
|
83864
|
+
"day-night-auto",
|
|
83865
|
+
"set-limits",
|
|
83866
|
+
"save-limits",
|
|
83867
|
+
"reboot",
|
|
83868
|
+
"osd-menu"
|
|
83869
|
+
]);
|
|
83839
83870
|
var PtzPresetSchema = object({
|
|
83840
83871
|
id: string(),
|
|
83841
|
-
name: string()
|
|
83872
|
+
name: string(),
|
|
83873
|
+
/**
|
|
83874
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
83875
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
83876
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
83877
|
+
*/
|
|
83878
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
83879
|
+
/**
|
|
83880
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
83881
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
83882
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
83883
|
+
*/
|
|
83884
|
+
writable: boolean()
|
|
83842
83885
|
});
|
|
83886
|
+
/**
|
|
83887
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
83888
|
+
* read it.
|
|
83889
|
+
*
|
|
83890
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
83891
|
+
* position no way to say so. All four said `0`:
|
|
83892
|
+
*
|
|
83893
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
83894
|
+
* path lands upstream"
|
|
83895
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
83896
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
83897
|
+
* onvif throws
|
|
83898
|
+
*
|
|
83899
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
83900
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
83901
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
83902
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
83903
|
+
* headroom", which evacuated a healthy disk.
|
|
83904
|
+
*
|
|
83905
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
83906
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
83907
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
83908
|
+
* tells callers to migrate to.
|
|
83909
|
+
*/
|
|
83843
83910
|
var PtzPositionSchema = object({
|
|
83844
|
-
pan: number(),
|
|
83845
|
-
tilt: number(),
|
|
83846
|
-
zoom: number()
|
|
83911
|
+
pan: number().nullable(),
|
|
83912
|
+
tilt: number().nullable(),
|
|
83913
|
+
zoom: number().nullable()
|
|
83847
83914
|
});
|
|
83848
83915
|
var PtzMoveCommandSchema = object({
|
|
83849
83916
|
pan: number().optional(),
|
|
@@ -83862,7 +83929,72 @@ var PtzOptionsSchema = object({
|
|
|
83862
83929
|
maxPresets: number().optional(),
|
|
83863
83930
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
83864
83931
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
83865
|
-
hasAutofocus: boolean()
|
|
83932
|
+
hasAutofocus: boolean(),
|
|
83933
|
+
/**
|
|
83934
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
83935
|
+
*
|
|
83936
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
83937
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
83938
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
83939
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
83940
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
83941
|
+
* the knob it is turning.
|
|
83942
|
+
*
|
|
83943
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
83944
|
+
* a float). Never a made-up number.
|
|
83945
|
+
*/
|
|
83946
|
+
speedSteps: number().int().positive().nullable(),
|
|
83947
|
+
/**
|
|
83948
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
83949
|
+
*
|
|
83950
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
83951
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
83952
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
83953
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
83954
|
+
* gain to be divided into.
|
|
83955
|
+
*
|
|
83956
|
+
* `null` = the driver cannot say.
|
|
83957
|
+
*/
|
|
83958
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
83959
|
+
});
|
|
83960
|
+
/**
|
|
83961
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
83962
|
+
*
|
|
83963
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
83964
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
83965
|
+
* not one of the three cameras honours its own:
|
|
83966
|
+
*
|
|
83967
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
83968
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
83969
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
83970
|
+
*
|
|
83971
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
83972
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
83973
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
83974
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
83975
|
+
*
|
|
83976
|
+
* `source` is what makes it honest:
|
|
83977
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
83978
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
83979
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
83980
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
83981
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
83982
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
83983
|
+
* no picker.
|
|
83984
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
83985
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
83986
|
+
*
|
|
83987
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
83988
|
+
* native case has no preset and homes perfectly well.
|
|
83989
|
+
*/
|
|
83990
|
+
var PtzHomePresetSchema = object({
|
|
83991
|
+
presetId: string().nullable(),
|
|
83992
|
+
source: _enum([
|
|
83993
|
+
"operator",
|
|
83994
|
+
"firmware",
|
|
83995
|
+
"native",
|
|
83996
|
+
"none"
|
|
83997
|
+
])
|
|
83866
83998
|
});
|
|
83867
83999
|
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({
|
|
83868
84000
|
deviceId: number(),
|
|
@@ -83880,7 +84012,13 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
83880
84012
|
}), _void(), {
|
|
83881
84013
|
kind: "mutation",
|
|
83882
84014
|
auth: "admin"
|
|
83883
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
84015
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
84016
|
+
deviceId: number(),
|
|
84017
|
+
presetId: string().nullable()
|
|
84018
|
+
}), _void(), {
|
|
84019
|
+
kind: "mutation",
|
|
84020
|
+
auth: "admin"
|
|
84021
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
83884
84022
|
deviceId: number(),
|
|
83885
84023
|
enabled: boolean()
|
|
83886
84024
|
}), _void(), { kind: "mutation" });
|
|
@@ -93134,6 +93272,12 @@ Object.freeze({
|
|
|
93134
93272
|
addonId: null,
|
|
93135
93273
|
access: "delete"
|
|
93136
93274
|
},
|
|
93275
|
+
"ptz.getHomePreset": {
|
|
93276
|
+
capName: "ptz",
|
|
93277
|
+
capScope: "device",
|
|
93278
|
+
addonId: null,
|
|
93279
|
+
access: "view"
|
|
93280
|
+
},
|
|
93137
93281
|
"ptz.getOptions": {
|
|
93138
93282
|
capName: "ptz",
|
|
93139
93283
|
capScope: "device",
|
|
@@ -93182,6 +93326,12 @@ Object.freeze({
|
|
|
93182
93326
|
addonId: null,
|
|
93183
93327
|
access: "create"
|
|
93184
93328
|
},
|
|
93329
|
+
"ptz.setHomePreset": {
|
|
93330
|
+
capName: "ptz",
|
|
93331
|
+
capScope: "device",
|
|
93332
|
+
addonId: null,
|
|
93333
|
+
access: "create"
|
|
93334
|
+
},
|
|
93185
93335
|
"ptz.stop": {
|
|
93186
93336
|
capName: "ptz",
|
|
93187
93337
|
capScope: "device",
|
|
@@ -96355,6 +96505,11 @@ Object.freeze({
|
|
|
96355
96505
|
form: "single",
|
|
96356
96506
|
optional: false
|
|
96357
96507
|
}],
|
|
96508
|
+
"ptz.getHomePreset": [{
|
|
96509
|
+
name: "deviceId",
|
|
96510
|
+
form: "single",
|
|
96511
|
+
optional: false
|
|
96512
|
+
}],
|
|
96358
96513
|
"ptz.getOptions": [{
|
|
96359
96514
|
name: "deviceId",
|
|
96360
96515
|
form: "single",
|
|
@@ -96395,6 +96550,11 @@ Object.freeze({
|
|
|
96395
96550
|
form: "single",
|
|
96396
96551
|
optional: false
|
|
96397
96552
|
}],
|
|
96553
|
+
"ptz.setHomePreset": [{
|
|
96554
|
+
name: "deviceId",
|
|
96555
|
+
form: "single",
|
|
96556
|
+
optional: false
|
|
96557
|
+
}],
|
|
96398
96558
|
"ptz.stop": [{
|
|
96399
96559
|
name: "deviceId",
|
|
96400
96560
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -58134,7 +58134,7 @@ var ZodIssueCode = {
|
|
|
58134
58134
|
var ZodFirstPartyTypeKind;
|
|
58135
58135
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
58136
58136
|
//#endregion
|
|
58137
|
-
//#region ../types/dist/sleep-
|
|
58137
|
+
//#region ../types/dist/sleep-B1y0Fo1U.mjs
|
|
58138
58138
|
/**
|
|
58139
58139
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
58140
58140
|
* window to float samples (D455).
|
|
@@ -83833,14 +83833,81 @@ var privacyMaskCapability = {
|
|
|
83833
83833
|
* whether persisting is worth a SQLite commit. */
|
|
83834
83834
|
volatileStateFields: ["lastFetchedAt"]
|
|
83835
83835
|
};
|
|
83836
|
+
/**
|
|
83837
|
+
* What a preset id DOES on this camera.
|
|
83838
|
+
*
|
|
83839
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
83840
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
83841
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
83842
|
+
* firmware:
|
|
83843
|
+
*
|
|
83844
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
83845
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
83846
|
+
* 95 Call OSD menu
|
|
83847
|
+
*
|
|
83848
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
83849
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
83850
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
83851
|
+
* operator as a transport failure.
|
|
83852
|
+
*
|
|
83853
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
83854
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
83855
|
+
* `deletePreset` are gated.
|
|
83856
|
+
*/
|
|
83857
|
+
var PtzPresetFunctionSchema = _enum([
|
|
83858
|
+
"home",
|
|
83859
|
+
"day-mode",
|
|
83860
|
+
"night-mode",
|
|
83861
|
+
"day-night-auto",
|
|
83862
|
+
"set-limits",
|
|
83863
|
+
"save-limits",
|
|
83864
|
+
"reboot",
|
|
83865
|
+
"osd-menu"
|
|
83866
|
+
]);
|
|
83836
83867
|
var PtzPresetSchema = object({
|
|
83837
83868
|
id: string(),
|
|
83838
|
-
name: string()
|
|
83869
|
+
name: string(),
|
|
83870
|
+
/**
|
|
83871
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
83872
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
83873
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
83874
|
+
*/
|
|
83875
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
83876
|
+
/**
|
|
83877
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
83878
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
83879
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
83880
|
+
*/
|
|
83881
|
+
writable: boolean()
|
|
83839
83882
|
});
|
|
83883
|
+
/**
|
|
83884
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
83885
|
+
* read it.
|
|
83886
|
+
*
|
|
83887
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
83888
|
+
* position no way to say so. All four said `0`:
|
|
83889
|
+
*
|
|
83890
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
83891
|
+
* path lands upstream"
|
|
83892
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
83893
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
83894
|
+
* onvif throws
|
|
83895
|
+
*
|
|
83896
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
83897
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
83898
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
83899
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
83900
|
+
* headroom", which evacuated a healthy disk.
|
|
83901
|
+
*
|
|
83902
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
83903
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
83904
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
83905
|
+
* tells callers to migrate to.
|
|
83906
|
+
*/
|
|
83840
83907
|
var PtzPositionSchema = object({
|
|
83841
|
-
pan: number(),
|
|
83842
|
-
tilt: number(),
|
|
83843
|
-
zoom: number()
|
|
83908
|
+
pan: number().nullable(),
|
|
83909
|
+
tilt: number().nullable(),
|
|
83910
|
+
zoom: number().nullable()
|
|
83844
83911
|
});
|
|
83845
83912
|
var PtzMoveCommandSchema = object({
|
|
83846
83913
|
pan: number().optional(),
|
|
@@ -83859,7 +83926,72 @@ var PtzOptionsSchema = object({
|
|
|
83859
83926
|
maxPresets: number().optional(),
|
|
83860
83927
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
83861
83928
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
83862
|
-
hasAutofocus: boolean()
|
|
83929
|
+
hasAutofocus: boolean(),
|
|
83930
|
+
/**
|
|
83931
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
83932
|
+
*
|
|
83933
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
83934
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
83935
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
83936
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
83937
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
83938
|
+
* the knob it is turning.
|
|
83939
|
+
*
|
|
83940
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
83941
|
+
* a float). Never a made-up number.
|
|
83942
|
+
*/
|
|
83943
|
+
speedSteps: number().int().positive().nullable(),
|
|
83944
|
+
/**
|
|
83945
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
83946
|
+
*
|
|
83947
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
83948
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
83949
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
83950
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
83951
|
+
* gain to be divided into.
|
|
83952
|
+
*
|
|
83953
|
+
* `null` = the driver cannot say.
|
|
83954
|
+
*/
|
|
83955
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
83956
|
+
});
|
|
83957
|
+
/**
|
|
83958
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
83959
|
+
*
|
|
83960
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
83961
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
83962
|
+
* not one of the three cameras honours its own:
|
|
83963
|
+
*
|
|
83964
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
83965
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
83966
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
83967
|
+
*
|
|
83968
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
83969
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
83970
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
83971
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
83972
|
+
*
|
|
83973
|
+
* `source` is what makes it honest:
|
|
83974
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
83975
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
83976
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
83977
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
83978
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
83979
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
83980
|
+
* no picker.
|
|
83981
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
83982
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
83983
|
+
*
|
|
83984
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
83985
|
+
* native case has no preset and homes perfectly well.
|
|
83986
|
+
*/
|
|
83987
|
+
var PtzHomePresetSchema = object({
|
|
83988
|
+
presetId: string().nullable(),
|
|
83989
|
+
source: _enum([
|
|
83990
|
+
"operator",
|
|
83991
|
+
"firmware",
|
|
83992
|
+
"native",
|
|
83993
|
+
"none"
|
|
83994
|
+
])
|
|
83863
83995
|
});
|
|
83864
83996
|
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({
|
|
83865
83997
|
deviceId: number(),
|
|
@@ -83877,7 +84009,13 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
83877
84009
|
}), _void(), {
|
|
83878
84010
|
kind: "mutation",
|
|
83879
84011
|
auth: "admin"
|
|
83880
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
84012
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
84013
|
+
deviceId: number(),
|
|
84014
|
+
presetId: string().nullable()
|
|
84015
|
+
}), _void(), {
|
|
84016
|
+
kind: "mutation",
|
|
84017
|
+
auth: "admin"
|
|
84018
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
83881
84019
|
deviceId: number(),
|
|
83882
84020
|
enabled: boolean()
|
|
83883
84021
|
}), _void(), { kind: "mutation" });
|
|
@@ -93131,6 +93269,12 @@ Object.freeze({
|
|
|
93131
93269
|
addonId: null,
|
|
93132
93270
|
access: "delete"
|
|
93133
93271
|
},
|
|
93272
|
+
"ptz.getHomePreset": {
|
|
93273
|
+
capName: "ptz",
|
|
93274
|
+
capScope: "device",
|
|
93275
|
+
addonId: null,
|
|
93276
|
+
access: "view"
|
|
93277
|
+
},
|
|
93134
93278
|
"ptz.getOptions": {
|
|
93135
93279
|
capName: "ptz",
|
|
93136
93280
|
capScope: "device",
|
|
@@ -93179,6 +93323,12 @@ Object.freeze({
|
|
|
93179
93323
|
addonId: null,
|
|
93180
93324
|
access: "create"
|
|
93181
93325
|
},
|
|
93326
|
+
"ptz.setHomePreset": {
|
|
93327
|
+
capName: "ptz",
|
|
93328
|
+
capScope: "device",
|
|
93329
|
+
addonId: null,
|
|
93330
|
+
access: "create"
|
|
93331
|
+
},
|
|
93182
93332
|
"ptz.stop": {
|
|
93183
93333
|
capName: "ptz",
|
|
93184
93334
|
capScope: "device",
|
|
@@ -96352,6 +96502,11 @@ Object.freeze({
|
|
|
96352
96502
|
form: "single",
|
|
96353
96503
|
optional: false
|
|
96354
96504
|
}],
|
|
96505
|
+
"ptz.getHomePreset": [{
|
|
96506
|
+
name: "deviceId",
|
|
96507
|
+
form: "single",
|
|
96508
|
+
optional: false
|
|
96509
|
+
}],
|
|
96355
96510
|
"ptz.getOptions": [{
|
|
96356
96511
|
name: "deviceId",
|
|
96357
96512
|
form: "single",
|
|
@@ -96392,6 +96547,11 @@ Object.freeze({
|
|
|
96392
96547
|
form: "single",
|
|
96393
96548
|
optional: false
|
|
96394
96549
|
}],
|
|
96550
|
+
"ptz.setHomePreset": [{
|
|
96551
|
+
name: "deviceId",
|
|
96552
|
+
form: "single",
|
|
96553
|
+
optional: false
|
|
96554
|
+
}],
|
|
96395
96555
|
"ptz.stop": [{
|
|
96396
96556
|
name: "deviceId",
|
|
96397
96557
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-dreame",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.112",
|
|
4
4
|
"description": "Dreame robot-vacuum / lawn-mower device-provider addon for CamStack — wraps the @apocaliss92/nodedreame Dreamehome cloud client",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|