@camstack/addon-provider-dreo 0.2.109 → 0.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/addon.js +167 -7
- package/dist/addon.mjs +167 -7
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -5396,7 +5396,7 @@ var ZodIssueCode = {
|
|
|
5396
5396
|
var ZodFirstPartyTypeKind;
|
|
5397
5397
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5398
5398
|
//#endregion
|
|
5399
|
-
//#region ../types/dist/sleep-
|
|
5399
|
+
//#region ../types/dist/sleep-B1y0Fo1U.mjs
|
|
5400
5400
|
/**
|
|
5401
5401
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5402
5402
|
* window to float samples (D455).
|
|
@@ -30930,14 +30930,81 @@ var privacyMaskCapability = {
|
|
|
30930
30930
|
* whether persisting is worth a SQLite commit. */
|
|
30931
30931
|
volatileStateFields: ["lastFetchedAt"]
|
|
30932
30932
|
};
|
|
30933
|
+
/**
|
|
30934
|
+
* What a preset id DOES on this camera.
|
|
30935
|
+
*
|
|
30936
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
30937
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
30938
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
30939
|
+
* firmware:
|
|
30940
|
+
*
|
|
30941
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
30942
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
30943
|
+
* 95 Call OSD menu
|
|
30944
|
+
*
|
|
30945
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
30946
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
30947
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
30948
|
+
* operator as a transport failure.
|
|
30949
|
+
*
|
|
30950
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
30951
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
30952
|
+
* `deletePreset` are gated.
|
|
30953
|
+
*/
|
|
30954
|
+
var PtzPresetFunctionSchema = _enum([
|
|
30955
|
+
"home",
|
|
30956
|
+
"day-mode",
|
|
30957
|
+
"night-mode",
|
|
30958
|
+
"day-night-auto",
|
|
30959
|
+
"set-limits",
|
|
30960
|
+
"save-limits",
|
|
30961
|
+
"reboot",
|
|
30962
|
+
"osd-menu"
|
|
30963
|
+
]);
|
|
30933
30964
|
var PtzPresetSchema = object({
|
|
30934
30965
|
id: string(),
|
|
30935
|
-
name: string()
|
|
30966
|
+
name: string(),
|
|
30967
|
+
/**
|
|
30968
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
30969
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
30970
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
30971
|
+
*/
|
|
30972
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
30973
|
+
/**
|
|
30974
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
30975
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
30976
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
30977
|
+
*/
|
|
30978
|
+
writable: boolean()
|
|
30936
30979
|
});
|
|
30980
|
+
/**
|
|
30981
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
30982
|
+
* read it.
|
|
30983
|
+
*
|
|
30984
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
30985
|
+
* position no way to say so. All four said `0`:
|
|
30986
|
+
*
|
|
30987
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
30988
|
+
* path lands upstream"
|
|
30989
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
30990
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
30991
|
+
* onvif throws
|
|
30992
|
+
*
|
|
30993
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
30994
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
30995
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
30996
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
30997
|
+
* headroom", which evacuated a healthy disk.
|
|
30998
|
+
*
|
|
30999
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
31000
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
31001
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
31002
|
+
* tells callers to migrate to.
|
|
31003
|
+
*/
|
|
30937
31004
|
var PtzPositionSchema = object({
|
|
30938
|
-
pan: number(),
|
|
30939
|
-
tilt: number(),
|
|
30940
|
-
zoom: number()
|
|
31005
|
+
pan: number().nullable(),
|
|
31006
|
+
tilt: number().nullable(),
|
|
31007
|
+
zoom: number().nullable()
|
|
30941
31008
|
});
|
|
30942
31009
|
var PtzMoveCommandSchema = object({
|
|
30943
31010
|
pan: number().optional(),
|
|
@@ -30956,7 +31023,72 @@ var PtzOptionsSchema = object({
|
|
|
30956
31023
|
maxPresets: number().optional(),
|
|
30957
31024
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
30958
31025
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
30959
|
-
hasAutofocus: boolean()
|
|
31026
|
+
hasAutofocus: boolean(),
|
|
31027
|
+
/**
|
|
31028
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
31029
|
+
*
|
|
31030
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
31031
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
31032
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
31033
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
31034
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
31035
|
+
* the knob it is turning.
|
|
31036
|
+
*
|
|
31037
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
31038
|
+
* a float). Never a made-up number.
|
|
31039
|
+
*/
|
|
31040
|
+
speedSteps: number().int().positive().nullable(),
|
|
31041
|
+
/**
|
|
31042
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
31043
|
+
*
|
|
31044
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
31045
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
31046
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
31047
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
31048
|
+
* gain to be divided into.
|
|
31049
|
+
*
|
|
31050
|
+
* `null` = the driver cannot say.
|
|
31051
|
+
*/
|
|
31052
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
31053
|
+
});
|
|
31054
|
+
/**
|
|
31055
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
31056
|
+
*
|
|
31057
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
31058
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
31059
|
+
* not one of the three cameras honours its own:
|
|
31060
|
+
*
|
|
31061
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
31062
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
31063
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
31064
|
+
*
|
|
31065
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
31066
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
31067
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
31068
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
31069
|
+
*
|
|
31070
|
+
* `source` is what makes it honest:
|
|
31071
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
31072
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
31073
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
31074
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
31075
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
31076
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
31077
|
+
* no picker.
|
|
31078
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
31079
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
31080
|
+
*
|
|
31081
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
31082
|
+
* native case has no preset and homes perfectly well.
|
|
31083
|
+
*/
|
|
31084
|
+
var PtzHomePresetSchema = object({
|
|
31085
|
+
presetId: string().nullable(),
|
|
31086
|
+
source: _enum([
|
|
31087
|
+
"operator",
|
|
31088
|
+
"firmware",
|
|
31089
|
+
"native",
|
|
31090
|
+
"none"
|
|
31091
|
+
])
|
|
30960
31092
|
});
|
|
30961
31093
|
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({
|
|
30962
31094
|
deviceId: number(),
|
|
@@ -30974,7 +31106,13 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
30974
31106
|
}), _void(), {
|
|
30975
31107
|
kind: "mutation",
|
|
30976
31108
|
auth: "admin"
|
|
30977
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
31109
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
31110
|
+
deviceId: number(),
|
|
31111
|
+
presetId: string().nullable()
|
|
31112
|
+
}), _void(), {
|
|
31113
|
+
kind: "mutation",
|
|
31114
|
+
auth: "admin"
|
|
31115
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
30978
31116
|
deviceId: number(),
|
|
30979
31117
|
enabled: boolean()
|
|
30980
31118
|
}), _void(), { kind: "mutation" });
|
|
@@ -40228,6 +40366,12 @@ Object.freeze({
|
|
|
40228
40366
|
addonId: null,
|
|
40229
40367
|
access: "delete"
|
|
40230
40368
|
},
|
|
40369
|
+
"ptz.getHomePreset": {
|
|
40370
|
+
capName: "ptz",
|
|
40371
|
+
capScope: "device",
|
|
40372
|
+
addonId: null,
|
|
40373
|
+
access: "view"
|
|
40374
|
+
},
|
|
40231
40375
|
"ptz.getOptions": {
|
|
40232
40376
|
capName: "ptz",
|
|
40233
40377
|
capScope: "device",
|
|
@@ -40276,6 +40420,12 @@ Object.freeze({
|
|
|
40276
40420
|
addonId: null,
|
|
40277
40421
|
access: "create"
|
|
40278
40422
|
},
|
|
40423
|
+
"ptz.setHomePreset": {
|
|
40424
|
+
capName: "ptz",
|
|
40425
|
+
capScope: "device",
|
|
40426
|
+
addonId: null,
|
|
40427
|
+
access: "create"
|
|
40428
|
+
},
|
|
40279
40429
|
"ptz.stop": {
|
|
40280
40430
|
capName: "ptz",
|
|
40281
40431
|
capScope: "device",
|
|
@@ -43449,6 +43599,11 @@ Object.freeze({
|
|
|
43449
43599
|
form: "single",
|
|
43450
43600
|
optional: false
|
|
43451
43601
|
}],
|
|
43602
|
+
"ptz.getHomePreset": [{
|
|
43603
|
+
name: "deviceId",
|
|
43604
|
+
form: "single",
|
|
43605
|
+
optional: false
|
|
43606
|
+
}],
|
|
43452
43607
|
"ptz.getOptions": [{
|
|
43453
43608
|
name: "deviceId",
|
|
43454
43609
|
form: "single",
|
|
@@ -43489,6 +43644,11 @@ Object.freeze({
|
|
|
43489
43644
|
form: "single",
|
|
43490
43645
|
optional: false
|
|
43491
43646
|
}],
|
|
43647
|
+
"ptz.setHomePreset": [{
|
|
43648
|
+
name: "deviceId",
|
|
43649
|
+
form: "single",
|
|
43650
|
+
optional: false
|
|
43651
|
+
}],
|
|
43492
43652
|
"ptz.stop": [{
|
|
43493
43653
|
name: "deviceId",
|
|
43494
43654
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -5397,7 +5397,7 @@ var ZodIssueCode = {
|
|
|
5397
5397
|
var ZodFirstPartyTypeKind;
|
|
5398
5398
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5399
5399
|
//#endregion
|
|
5400
|
-
//#region ../types/dist/sleep-
|
|
5400
|
+
//#region ../types/dist/sleep-B1y0Fo1U.mjs
|
|
5401
5401
|
/**
|
|
5402
5402
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5403
5403
|
* window to float samples (D455).
|
|
@@ -30931,14 +30931,81 @@ var privacyMaskCapability = {
|
|
|
30931
30931
|
* whether persisting is worth a SQLite commit. */
|
|
30932
30932
|
volatileStateFields: ["lastFetchedAt"]
|
|
30933
30933
|
};
|
|
30934
|
+
/**
|
|
30935
|
+
* What a preset id DOES on this camera.
|
|
30936
|
+
*
|
|
30937
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
30938
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
30939
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
30940
|
+
* firmware:
|
|
30941
|
+
*
|
|
30942
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
30943
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
30944
|
+
* 95 Call OSD menu
|
|
30945
|
+
*
|
|
30946
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
30947
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
30948
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
30949
|
+
* operator as a transport failure.
|
|
30950
|
+
*
|
|
30951
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
30952
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
30953
|
+
* `deletePreset` are gated.
|
|
30954
|
+
*/
|
|
30955
|
+
var PtzPresetFunctionSchema = _enum([
|
|
30956
|
+
"home",
|
|
30957
|
+
"day-mode",
|
|
30958
|
+
"night-mode",
|
|
30959
|
+
"day-night-auto",
|
|
30960
|
+
"set-limits",
|
|
30961
|
+
"save-limits",
|
|
30962
|
+
"reboot",
|
|
30963
|
+
"osd-menu"
|
|
30964
|
+
]);
|
|
30934
30965
|
var PtzPresetSchema = object({
|
|
30935
30966
|
id: string(),
|
|
30936
|
-
name: string()
|
|
30967
|
+
name: string(),
|
|
30968
|
+
/**
|
|
30969
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
30970
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
30971
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
30972
|
+
*/
|
|
30973
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
30974
|
+
/**
|
|
30975
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
30976
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
30977
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
30978
|
+
*/
|
|
30979
|
+
writable: boolean()
|
|
30937
30980
|
});
|
|
30981
|
+
/**
|
|
30982
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
30983
|
+
* read it.
|
|
30984
|
+
*
|
|
30985
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
30986
|
+
* position no way to say so. All four said `0`:
|
|
30987
|
+
*
|
|
30988
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
30989
|
+
* path lands upstream"
|
|
30990
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
30991
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
30992
|
+
* onvif throws
|
|
30993
|
+
*
|
|
30994
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
30995
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
30996
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
30997
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
30998
|
+
* headroom", which evacuated a healthy disk.
|
|
30999
|
+
*
|
|
31000
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
31001
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
31002
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
31003
|
+
* tells callers to migrate to.
|
|
31004
|
+
*/
|
|
30938
31005
|
var PtzPositionSchema = object({
|
|
30939
|
-
pan: number(),
|
|
30940
|
-
tilt: number(),
|
|
30941
|
-
zoom: number()
|
|
31006
|
+
pan: number().nullable(),
|
|
31007
|
+
tilt: number().nullable(),
|
|
31008
|
+
zoom: number().nullable()
|
|
30942
31009
|
});
|
|
30943
31010
|
var PtzMoveCommandSchema = object({
|
|
30944
31011
|
pan: number().optional(),
|
|
@@ -30957,7 +31024,72 @@ var PtzOptionsSchema = object({
|
|
|
30957
31024
|
maxPresets: number().optional(),
|
|
30958
31025
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
30959
31026
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
30960
|
-
hasAutofocus: boolean()
|
|
31027
|
+
hasAutofocus: boolean(),
|
|
31028
|
+
/**
|
|
31029
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
31030
|
+
*
|
|
31031
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
31032
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
31033
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
31034
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
31035
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
31036
|
+
* the knob it is turning.
|
|
31037
|
+
*
|
|
31038
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
31039
|
+
* a float). Never a made-up number.
|
|
31040
|
+
*/
|
|
31041
|
+
speedSteps: number().int().positive().nullable(),
|
|
31042
|
+
/**
|
|
31043
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
31044
|
+
*
|
|
31045
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
31046
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
31047
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
31048
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
31049
|
+
* gain to be divided into.
|
|
31050
|
+
*
|
|
31051
|
+
* `null` = the driver cannot say.
|
|
31052
|
+
*/
|
|
31053
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
31054
|
+
});
|
|
31055
|
+
/**
|
|
31056
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
31057
|
+
*
|
|
31058
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
31059
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
31060
|
+
* not one of the three cameras honours its own:
|
|
31061
|
+
*
|
|
31062
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
31063
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
31064
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
31065
|
+
*
|
|
31066
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
31067
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
31068
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
31069
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
31070
|
+
*
|
|
31071
|
+
* `source` is what makes it honest:
|
|
31072
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
31073
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
31074
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
31075
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
31076
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
31077
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
31078
|
+
* no picker.
|
|
31079
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
31080
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
31081
|
+
*
|
|
31082
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
31083
|
+
* native case has no preset and homes perfectly well.
|
|
31084
|
+
*/
|
|
31085
|
+
var PtzHomePresetSchema = object({
|
|
31086
|
+
presetId: string().nullable(),
|
|
31087
|
+
source: _enum([
|
|
31088
|
+
"operator",
|
|
31089
|
+
"firmware",
|
|
31090
|
+
"native",
|
|
31091
|
+
"none"
|
|
31092
|
+
])
|
|
30961
31093
|
});
|
|
30962
31094
|
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({
|
|
30963
31095
|
deviceId: number(),
|
|
@@ -30975,7 +31107,13 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
30975
31107
|
}), _void(), {
|
|
30976
31108
|
kind: "mutation",
|
|
30977
31109
|
auth: "admin"
|
|
30978
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
31110
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
31111
|
+
deviceId: number(),
|
|
31112
|
+
presetId: string().nullable()
|
|
31113
|
+
}), _void(), {
|
|
31114
|
+
kind: "mutation",
|
|
31115
|
+
auth: "admin"
|
|
31116
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
30979
31117
|
deviceId: number(),
|
|
30980
31118
|
enabled: boolean()
|
|
30981
31119
|
}), _void(), { kind: "mutation" });
|
|
@@ -40229,6 +40367,12 @@ Object.freeze({
|
|
|
40229
40367
|
addonId: null,
|
|
40230
40368
|
access: "delete"
|
|
40231
40369
|
},
|
|
40370
|
+
"ptz.getHomePreset": {
|
|
40371
|
+
capName: "ptz",
|
|
40372
|
+
capScope: "device",
|
|
40373
|
+
addonId: null,
|
|
40374
|
+
access: "view"
|
|
40375
|
+
},
|
|
40232
40376
|
"ptz.getOptions": {
|
|
40233
40377
|
capName: "ptz",
|
|
40234
40378
|
capScope: "device",
|
|
@@ -40277,6 +40421,12 @@ Object.freeze({
|
|
|
40277
40421
|
addonId: null,
|
|
40278
40422
|
access: "create"
|
|
40279
40423
|
},
|
|
40424
|
+
"ptz.setHomePreset": {
|
|
40425
|
+
capName: "ptz",
|
|
40426
|
+
capScope: "device",
|
|
40427
|
+
addonId: null,
|
|
40428
|
+
access: "create"
|
|
40429
|
+
},
|
|
40280
40430
|
"ptz.stop": {
|
|
40281
40431
|
capName: "ptz",
|
|
40282
40432
|
capScope: "device",
|
|
@@ -43450,6 +43600,11 @@ Object.freeze({
|
|
|
43450
43600
|
form: "single",
|
|
43451
43601
|
optional: false
|
|
43452
43602
|
}],
|
|
43603
|
+
"ptz.getHomePreset": [{
|
|
43604
|
+
name: "deviceId",
|
|
43605
|
+
form: "single",
|
|
43606
|
+
optional: false
|
|
43607
|
+
}],
|
|
43453
43608
|
"ptz.getOptions": [{
|
|
43454
43609
|
name: "deviceId",
|
|
43455
43610
|
form: "single",
|
|
@@ -43490,6 +43645,11 @@ Object.freeze({
|
|
|
43490
43645
|
form: "single",
|
|
43491
43646
|
optional: false
|
|
43492
43647
|
}],
|
|
43648
|
+
"ptz.setHomePreset": [{
|
|
43649
|
+
name: "deviceId",
|
|
43650
|
+
form: "single",
|
|
43651
|
+
optional: false
|
|
43652
|
+
}],
|
|
43493
43653
|
"ptz.stop": [{
|
|
43494
43654
|
name: "deviceId",
|
|
43495
43655
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-dreo",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.111",
|
|
4
4
|
"description": "Dreo smart-device (fan / air-circulator / purifier / heater / humidifier) device-provider addon for CamStack — wraps the @apocaliss92/nodedreo Dreo cloud client (REST + WebSocket)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|