@camstack/addon-provider-wyze 0.2.114 → 0.2.115
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
|
@@ -5392,7 +5392,7 @@ var ZodIssueCode = {
|
|
|
5392
5392
|
var ZodFirstPartyTypeKind;
|
|
5393
5393
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5394
5394
|
//#endregion
|
|
5395
|
-
//#region ../types/dist/sleep-
|
|
5395
|
+
//#region ../types/dist/sleep-B1y0Fo1U.mjs
|
|
5396
5396
|
/**
|
|
5397
5397
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5398
5398
|
* window to float samples (D455).
|
|
@@ -31030,14 +31030,81 @@ var privacyMaskCapability = {
|
|
|
31030
31030
|
* whether persisting is worth a SQLite commit. */
|
|
31031
31031
|
volatileStateFields: ["lastFetchedAt"]
|
|
31032
31032
|
};
|
|
31033
|
+
/**
|
|
31034
|
+
* What a preset id DOES on this camera.
|
|
31035
|
+
*
|
|
31036
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
31037
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
31038
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
31039
|
+
* firmware:
|
|
31040
|
+
*
|
|
31041
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
31042
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
31043
|
+
* 95 Call OSD menu
|
|
31044
|
+
*
|
|
31045
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
31046
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
31047
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
31048
|
+
* operator as a transport failure.
|
|
31049
|
+
*
|
|
31050
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
31051
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
31052
|
+
* `deletePreset` are gated.
|
|
31053
|
+
*/
|
|
31054
|
+
var PtzPresetFunctionSchema = _enum([
|
|
31055
|
+
"home",
|
|
31056
|
+
"day-mode",
|
|
31057
|
+
"night-mode",
|
|
31058
|
+
"day-night-auto",
|
|
31059
|
+
"set-limits",
|
|
31060
|
+
"save-limits",
|
|
31061
|
+
"reboot",
|
|
31062
|
+
"osd-menu"
|
|
31063
|
+
]);
|
|
31033
31064
|
var PtzPresetSchema = object({
|
|
31034
31065
|
id: string(),
|
|
31035
|
-
name: string()
|
|
31066
|
+
name: string(),
|
|
31067
|
+
/**
|
|
31068
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
31069
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
31070
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
31071
|
+
*/
|
|
31072
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
31073
|
+
/**
|
|
31074
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
31075
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
31076
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
31077
|
+
*/
|
|
31078
|
+
writable: boolean()
|
|
31036
31079
|
});
|
|
31080
|
+
/**
|
|
31081
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
31082
|
+
* read it.
|
|
31083
|
+
*
|
|
31084
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
31085
|
+
* position no way to say so. All four said `0`:
|
|
31086
|
+
*
|
|
31087
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
31088
|
+
* path lands upstream"
|
|
31089
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
31090
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
31091
|
+
* onvif throws
|
|
31092
|
+
*
|
|
31093
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
31094
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
31095
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
31096
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
31097
|
+
* headroom", which evacuated a healthy disk.
|
|
31098
|
+
*
|
|
31099
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
31100
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
31101
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
31102
|
+
* tells callers to migrate to.
|
|
31103
|
+
*/
|
|
31037
31104
|
var PtzPositionSchema = object({
|
|
31038
|
-
pan: number(),
|
|
31039
|
-
tilt: number(),
|
|
31040
|
-
zoom: number()
|
|
31105
|
+
pan: number().nullable(),
|
|
31106
|
+
tilt: number().nullable(),
|
|
31107
|
+
zoom: number().nullable()
|
|
31041
31108
|
});
|
|
31042
31109
|
var PtzMoveCommandSchema = object({
|
|
31043
31110
|
pan: number().optional(),
|
|
@@ -31056,7 +31123,72 @@ var PtzOptionsSchema = object({
|
|
|
31056
31123
|
maxPresets: number().optional(),
|
|
31057
31124
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
31058
31125
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
31059
|
-
hasAutofocus: boolean()
|
|
31126
|
+
hasAutofocus: boolean(),
|
|
31127
|
+
/**
|
|
31128
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
31129
|
+
*
|
|
31130
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
31131
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
31132
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
31133
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
31134
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
31135
|
+
* the knob it is turning.
|
|
31136
|
+
*
|
|
31137
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
31138
|
+
* a float). Never a made-up number.
|
|
31139
|
+
*/
|
|
31140
|
+
speedSteps: number().int().positive().nullable(),
|
|
31141
|
+
/**
|
|
31142
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
31143
|
+
*
|
|
31144
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
31145
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
31146
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
31147
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
31148
|
+
* gain to be divided into.
|
|
31149
|
+
*
|
|
31150
|
+
* `null` = the driver cannot say.
|
|
31151
|
+
*/
|
|
31152
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
31153
|
+
});
|
|
31154
|
+
/**
|
|
31155
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
31156
|
+
*
|
|
31157
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
31158
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
31159
|
+
* not one of the three cameras honours its own:
|
|
31160
|
+
*
|
|
31161
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
31162
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
31163
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
31164
|
+
*
|
|
31165
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
31166
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
31167
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
31168
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
31169
|
+
*
|
|
31170
|
+
* `source` is what makes it honest:
|
|
31171
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
31172
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
31173
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
31174
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
31175
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
31176
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
31177
|
+
* no picker.
|
|
31178
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
31179
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
31180
|
+
*
|
|
31181
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
31182
|
+
* native case has no preset and homes perfectly well.
|
|
31183
|
+
*/
|
|
31184
|
+
var PtzHomePresetSchema = object({
|
|
31185
|
+
presetId: string().nullable(),
|
|
31186
|
+
source: _enum([
|
|
31187
|
+
"operator",
|
|
31188
|
+
"firmware",
|
|
31189
|
+
"native",
|
|
31190
|
+
"none"
|
|
31191
|
+
])
|
|
31060
31192
|
});
|
|
31061
31193
|
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({
|
|
31062
31194
|
deviceId: number(),
|
|
@@ -31074,7 +31206,13 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
31074
31206
|
}), _void(), {
|
|
31075
31207
|
kind: "mutation",
|
|
31076
31208
|
auth: "admin"
|
|
31077
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
31209
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
31210
|
+
deviceId: number(),
|
|
31211
|
+
presetId: string().nullable()
|
|
31212
|
+
}), _void(), {
|
|
31213
|
+
kind: "mutation",
|
|
31214
|
+
auth: "admin"
|
|
31215
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
31078
31216
|
deviceId: number(),
|
|
31079
31217
|
enabled: boolean()
|
|
31080
31218
|
}), _void(), { kind: "mutation" });
|
|
@@ -40328,6 +40466,12 @@ Object.freeze({
|
|
|
40328
40466
|
addonId: null,
|
|
40329
40467
|
access: "delete"
|
|
40330
40468
|
},
|
|
40469
|
+
"ptz.getHomePreset": {
|
|
40470
|
+
capName: "ptz",
|
|
40471
|
+
capScope: "device",
|
|
40472
|
+
addonId: null,
|
|
40473
|
+
access: "view"
|
|
40474
|
+
},
|
|
40331
40475
|
"ptz.getOptions": {
|
|
40332
40476
|
capName: "ptz",
|
|
40333
40477
|
capScope: "device",
|
|
@@ -40376,6 +40520,12 @@ Object.freeze({
|
|
|
40376
40520
|
addonId: null,
|
|
40377
40521
|
access: "create"
|
|
40378
40522
|
},
|
|
40523
|
+
"ptz.setHomePreset": {
|
|
40524
|
+
capName: "ptz",
|
|
40525
|
+
capScope: "device",
|
|
40526
|
+
addonId: null,
|
|
40527
|
+
access: "create"
|
|
40528
|
+
},
|
|
40379
40529
|
"ptz.stop": {
|
|
40380
40530
|
capName: "ptz",
|
|
40381
40531
|
capScope: "device",
|
|
@@ -43549,6 +43699,11 @@ Object.freeze({
|
|
|
43549
43699
|
form: "single",
|
|
43550
43700
|
optional: false
|
|
43551
43701
|
}],
|
|
43702
|
+
"ptz.getHomePreset": [{
|
|
43703
|
+
name: "deviceId",
|
|
43704
|
+
form: "single",
|
|
43705
|
+
optional: false
|
|
43706
|
+
}],
|
|
43552
43707
|
"ptz.getOptions": [{
|
|
43553
43708
|
name: "deviceId",
|
|
43554
43709
|
form: "single",
|
|
@@ -43589,6 +43744,11 @@ Object.freeze({
|
|
|
43589
43744
|
form: "single",
|
|
43590
43745
|
optional: false
|
|
43591
43746
|
}],
|
|
43747
|
+
"ptz.setHomePreset": [{
|
|
43748
|
+
name: "deviceId",
|
|
43749
|
+
form: "single",
|
|
43750
|
+
optional: false
|
|
43751
|
+
}],
|
|
43592
43752
|
"ptz.stop": [{
|
|
43593
43753
|
name: "deviceId",
|
|
43594
43754
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -5371,7 +5371,7 @@ var ZodIssueCode = {
|
|
|
5371
5371
|
var ZodFirstPartyTypeKind;
|
|
5372
5372
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5373
5373
|
//#endregion
|
|
5374
|
-
//#region ../types/dist/sleep-
|
|
5374
|
+
//#region ../types/dist/sleep-B1y0Fo1U.mjs
|
|
5375
5375
|
/**
|
|
5376
5376
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5377
5377
|
* window to float samples (D455).
|
|
@@ -31009,14 +31009,81 @@ var privacyMaskCapability = {
|
|
|
31009
31009
|
* whether persisting is worth a SQLite commit. */
|
|
31010
31010
|
volatileStateFields: ["lastFetchedAt"]
|
|
31011
31011
|
};
|
|
31012
|
+
/**
|
|
31013
|
+
* What a preset id DOES on this camera.
|
|
31014
|
+
*
|
|
31015
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
31016
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
31017
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
31018
|
+
* firmware:
|
|
31019
|
+
*
|
|
31020
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
31021
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
31022
|
+
* 95 Call OSD menu
|
|
31023
|
+
*
|
|
31024
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
31025
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
31026
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
31027
|
+
* operator as a transport failure.
|
|
31028
|
+
*
|
|
31029
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
31030
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
31031
|
+
* `deletePreset` are gated.
|
|
31032
|
+
*/
|
|
31033
|
+
var PtzPresetFunctionSchema = _enum([
|
|
31034
|
+
"home",
|
|
31035
|
+
"day-mode",
|
|
31036
|
+
"night-mode",
|
|
31037
|
+
"day-night-auto",
|
|
31038
|
+
"set-limits",
|
|
31039
|
+
"save-limits",
|
|
31040
|
+
"reboot",
|
|
31041
|
+
"osd-menu"
|
|
31042
|
+
]);
|
|
31012
31043
|
var PtzPresetSchema = object({
|
|
31013
31044
|
id: string(),
|
|
31014
|
-
name: string()
|
|
31045
|
+
name: string(),
|
|
31046
|
+
/**
|
|
31047
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
31048
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
31049
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
31050
|
+
*/
|
|
31051
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
31052
|
+
/**
|
|
31053
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
31054
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
31055
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
31056
|
+
*/
|
|
31057
|
+
writable: boolean()
|
|
31015
31058
|
});
|
|
31059
|
+
/**
|
|
31060
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
31061
|
+
* read it.
|
|
31062
|
+
*
|
|
31063
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
31064
|
+
* position no way to say so. All four said `0`:
|
|
31065
|
+
*
|
|
31066
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
31067
|
+
* path lands upstream"
|
|
31068
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
31069
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
31070
|
+
* onvif throws
|
|
31071
|
+
*
|
|
31072
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
31073
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
31074
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
31075
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
31076
|
+
* headroom", which evacuated a healthy disk.
|
|
31077
|
+
*
|
|
31078
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
31079
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
31080
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
31081
|
+
* tells callers to migrate to.
|
|
31082
|
+
*/
|
|
31016
31083
|
var PtzPositionSchema = object({
|
|
31017
|
-
pan: number(),
|
|
31018
|
-
tilt: number(),
|
|
31019
|
-
zoom: number()
|
|
31084
|
+
pan: number().nullable(),
|
|
31085
|
+
tilt: number().nullable(),
|
|
31086
|
+
zoom: number().nullable()
|
|
31020
31087
|
});
|
|
31021
31088
|
var PtzMoveCommandSchema = object({
|
|
31022
31089
|
pan: number().optional(),
|
|
@@ -31035,7 +31102,72 @@ var PtzOptionsSchema = object({
|
|
|
31035
31102
|
maxPresets: number().optional(),
|
|
31036
31103
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
31037
31104
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
31038
|
-
hasAutofocus: boolean()
|
|
31105
|
+
hasAutofocus: boolean(),
|
|
31106
|
+
/**
|
|
31107
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
31108
|
+
*
|
|
31109
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
31110
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
31111
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
31112
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
31113
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
31114
|
+
* the knob it is turning.
|
|
31115
|
+
*
|
|
31116
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
31117
|
+
* a float). Never a made-up number.
|
|
31118
|
+
*/
|
|
31119
|
+
speedSteps: number().int().positive().nullable(),
|
|
31120
|
+
/**
|
|
31121
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
31122
|
+
*
|
|
31123
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
31124
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
31125
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
31126
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
31127
|
+
* gain to be divided into.
|
|
31128
|
+
*
|
|
31129
|
+
* `null` = the driver cannot say.
|
|
31130
|
+
*/
|
|
31131
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
31132
|
+
});
|
|
31133
|
+
/**
|
|
31134
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
31135
|
+
*
|
|
31136
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
31137
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
31138
|
+
* not one of the three cameras honours its own:
|
|
31139
|
+
*
|
|
31140
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
31141
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
31142
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
31143
|
+
*
|
|
31144
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
31145
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
31146
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
31147
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
31148
|
+
*
|
|
31149
|
+
* `source` is what makes it honest:
|
|
31150
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
31151
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
31152
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
31153
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
31154
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
31155
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
31156
|
+
* no picker.
|
|
31157
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
31158
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
31159
|
+
*
|
|
31160
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
31161
|
+
* native case has no preset and homes perfectly well.
|
|
31162
|
+
*/
|
|
31163
|
+
var PtzHomePresetSchema = object({
|
|
31164
|
+
presetId: string().nullable(),
|
|
31165
|
+
source: _enum([
|
|
31166
|
+
"operator",
|
|
31167
|
+
"firmware",
|
|
31168
|
+
"native",
|
|
31169
|
+
"none"
|
|
31170
|
+
])
|
|
31039
31171
|
});
|
|
31040
31172
|
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({
|
|
31041
31173
|
deviceId: number(),
|
|
@@ -31053,7 +31185,13 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
31053
31185
|
}), _void(), {
|
|
31054
31186
|
kind: "mutation",
|
|
31055
31187
|
auth: "admin"
|
|
31056
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
31188
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
31189
|
+
deviceId: number(),
|
|
31190
|
+
presetId: string().nullable()
|
|
31191
|
+
}), _void(), {
|
|
31192
|
+
kind: "mutation",
|
|
31193
|
+
auth: "admin"
|
|
31194
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
31057
31195
|
deviceId: number(),
|
|
31058
31196
|
enabled: boolean()
|
|
31059
31197
|
}), _void(), { kind: "mutation" });
|
|
@@ -40307,6 +40445,12 @@ Object.freeze({
|
|
|
40307
40445
|
addonId: null,
|
|
40308
40446
|
access: "delete"
|
|
40309
40447
|
},
|
|
40448
|
+
"ptz.getHomePreset": {
|
|
40449
|
+
capName: "ptz",
|
|
40450
|
+
capScope: "device",
|
|
40451
|
+
addonId: null,
|
|
40452
|
+
access: "view"
|
|
40453
|
+
},
|
|
40310
40454
|
"ptz.getOptions": {
|
|
40311
40455
|
capName: "ptz",
|
|
40312
40456
|
capScope: "device",
|
|
@@ -40355,6 +40499,12 @@ Object.freeze({
|
|
|
40355
40499
|
addonId: null,
|
|
40356
40500
|
access: "create"
|
|
40357
40501
|
},
|
|
40502
|
+
"ptz.setHomePreset": {
|
|
40503
|
+
capName: "ptz",
|
|
40504
|
+
capScope: "device",
|
|
40505
|
+
addonId: null,
|
|
40506
|
+
access: "create"
|
|
40507
|
+
},
|
|
40358
40508
|
"ptz.stop": {
|
|
40359
40509
|
capName: "ptz",
|
|
40360
40510
|
capScope: "device",
|
|
@@ -43528,6 +43678,11 @@ Object.freeze({
|
|
|
43528
43678
|
form: "single",
|
|
43529
43679
|
optional: false
|
|
43530
43680
|
}],
|
|
43681
|
+
"ptz.getHomePreset": [{
|
|
43682
|
+
name: "deviceId",
|
|
43683
|
+
form: "single",
|
|
43684
|
+
optional: false
|
|
43685
|
+
}],
|
|
43531
43686
|
"ptz.getOptions": [{
|
|
43532
43687
|
name: "deviceId",
|
|
43533
43688
|
form: "single",
|
|
@@ -43568,6 +43723,11 @@ Object.freeze({
|
|
|
43568
43723
|
form: "single",
|
|
43569
43724
|
optional: false
|
|
43570
43725
|
}],
|
|
43726
|
+
"ptz.setHomePreset": [{
|
|
43727
|
+
name: "deviceId",
|
|
43728
|
+
form: "single",
|
|
43729
|
+
optional: false
|
|
43730
|
+
}],
|
|
43571
43731
|
"ptz.stop": [{
|
|
43572
43732
|
name: "deviceId",
|
|
43573
43733
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-wyze",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.115",
|
|
4
4
|
"description": "Wyze camera device-provider addon for CamStack — wraps the @apocaliss92/wyze-bridge-js P2P/DTLS client, feeding the stream-broker via the pull-rfc4571 lazy-publish path (a structural twin of addon-provider-reolink)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|