@camstack/addon-import-alexa 0.2.108 → 0.2.110
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
|
@@ -5399,7 +5399,7 @@ var ZodIssueCode = {
|
|
|
5399
5399
|
var ZodFirstPartyTypeKind;
|
|
5400
5400
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5401
5401
|
//#endregion
|
|
5402
|
-
//#region ../types/dist/sleep-
|
|
5402
|
+
//#region ../types/dist/sleep-B1y0Fo1U.mjs
|
|
5403
5403
|
/**
|
|
5404
5404
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5405
5405
|
* window to float samples (D455).
|
|
@@ -31127,14 +31127,81 @@ var privacyMaskCapability = {
|
|
|
31127
31127
|
* whether persisting is worth a SQLite commit. */
|
|
31128
31128
|
volatileStateFields: ["lastFetchedAt"]
|
|
31129
31129
|
};
|
|
31130
|
+
/**
|
|
31131
|
+
* What a preset id DOES on this camera.
|
|
31132
|
+
*
|
|
31133
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
31134
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
31135
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
31136
|
+
* firmware:
|
|
31137
|
+
*
|
|
31138
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
31139
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
31140
|
+
* 95 Call OSD menu
|
|
31141
|
+
*
|
|
31142
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
31143
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
31144
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
31145
|
+
* operator as a transport failure.
|
|
31146
|
+
*
|
|
31147
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
31148
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
31149
|
+
* `deletePreset` are gated.
|
|
31150
|
+
*/
|
|
31151
|
+
var PtzPresetFunctionSchema = _enum([
|
|
31152
|
+
"home",
|
|
31153
|
+
"day-mode",
|
|
31154
|
+
"night-mode",
|
|
31155
|
+
"day-night-auto",
|
|
31156
|
+
"set-limits",
|
|
31157
|
+
"save-limits",
|
|
31158
|
+
"reboot",
|
|
31159
|
+
"osd-menu"
|
|
31160
|
+
]);
|
|
31130
31161
|
var PtzPresetSchema = object({
|
|
31131
31162
|
id: string(),
|
|
31132
|
-
name: string()
|
|
31163
|
+
name: string(),
|
|
31164
|
+
/**
|
|
31165
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
31166
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
31167
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
31168
|
+
*/
|
|
31169
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
31170
|
+
/**
|
|
31171
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
31172
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
31173
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
31174
|
+
*/
|
|
31175
|
+
writable: boolean()
|
|
31133
31176
|
});
|
|
31177
|
+
/**
|
|
31178
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
31179
|
+
* read it.
|
|
31180
|
+
*
|
|
31181
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
31182
|
+
* position no way to say so. All four said `0`:
|
|
31183
|
+
*
|
|
31184
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
31185
|
+
* path lands upstream"
|
|
31186
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
31187
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
31188
|
+
* onvif throws
|
|
31189
|
+
*
|
|
31190
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
31191
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
31192
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
31193
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
31194
|
+
* headroom", which evacuated a healthy disk.
|
|
31195
|
+
*
|
|
31196
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
31197
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
31198
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
31199
|
+
* tells callers to migrate to.
|
|
31200
|
+
*/
|
|
31134
31201
|
var PtzPositionSchema = object({
|
|
31135
|
-
pan: number(),
|
|
31136
|
-
tilt: number(),
|
|
31137
|
-
zoom: number()
|
|
31202
|
+
pan: number().nullable(),
|
|
31203
|
+
tilt: number().nullable(),
|
|
31204
|
+
zoom: number().nullable()
|
|
31138
31205
|
});
|
|
31139
31206
|
var PtzMoveCommandSchema = object({
|
|
31140
31207
|
pan: number().optional(),
|
|
@@ -31153,7 +31220,72 @@ var PtzOptionsSchema = object({
|
|
|
31153
31220
|
maxPresets: number().optional(),
|
|
31154
31221
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
31155
31222
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
31156
|
-
hasAutofocus: boolean()
|
|
31223
|
+
hasAutofocus: boolean(),
|
|
31224
|
+
/**
|
|
31225
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
31226
|
+
*
|
|
31227
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
31228
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
31229
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
31230
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
31231
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
31232
|
+
* the knob it is turning.
|
|
31233
|
+
*
|
|
31234
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
31235
|
+
* a float). Never a made-up number.
|
|
31236
|
+
*/
|
|
31237
|
+
speedSteps: number().int().positive().nullable(),
|
|
31238
|
+
/**
|
|
31239
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
31240
|
+
*
|
|
31241
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
31242
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
31243
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
31244
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
31245
|
+
* gain to be divided into.
|
|
31246
|
+
*
|
|
31247
|
+
* `null` = the driver cannot say.
|
|
31248
|
+
*/
|
|
31249
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
31250
|
+
});
|
|
31251
|
+
/**
|
|
31252
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
31253
|
+
*
|
|
31254
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
31255
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
31256
|
+
* not one of the three cameras honours its own:
|
|
31257
|
+
*
|
|
31258
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
31259
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
31260
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
31261
|
+
*
|
|
31262
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
31263
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
31264
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
31265
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
31266
|
+
*
|
|
31267
|
+
* `source` is what makes it honest:
|
|
31268
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
31269
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
31270
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
31271
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
31272
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
31273
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
31274
|
+
* no picker.
|
|
31275
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
31276
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
31277
|
+
*
|
|
31278
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
31279
|
+
* native case has no preset and homes perfectly well.
|
|
31280
|
+
*/
|
|
31281
|
+
var PtzHomePresetSchema = object({
|
|
31282
|
+
presetId: string().nullable(),
|
|
31283
|
+
source: _enum([
|
|
31284
|
+
"operator",
|
|
31285
|
+
"firmware",
|
|
31286
|
+
"native",
|
|
31287
|
+
"none"
|
|
31288
|
+
])
|
|
31157
31289
|
});
|
|
31158
31290
|
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({
|
|
31159
31291
|
deviceId: number(),
|
|
@@ -31171,7 +31303,13 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
31171
31303
|
}), _void(), {
|
|
31172
31304
|
kind: "mutation",
|
|
31173
31305
|
auth: "admin"
|
|
31174
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
31306
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
31307
|
+
deviceId: number(),
|
|
31308
|
+
presetId: string().nullable()
|
|
31309
|
+
}), _void(), {
|
|
31310
|
+
kind: "mutation",
|
|
31311
|
+
auth: "admin"
|
|
31312
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
31175
31313
|
deviceId: number(),
|
|
31176
31314
|
enabled: boolean()
|
|
31177
31315
|
}), _void(), { kind: "mutation" });
|
|
@@ -40425,6 +40563,12 @@ Object.freeze({
|
|
|
40425
40563
|
addonId: null,
|
|
40426
40564
|
access: "delete"
|
|
40427
40565
|
},
|
|
40566
|
+
"ptz.getHomePreset": {
|
|
40567
|
+
capName: "ptz",
|
|
40568
|
+
capScope: "device",
|
|
40569
|
+
addonId: null,
|
|
40570
|
+
access: "view"
|
|
40571
|
+
},
|
|
40428
40572
|
"ptz.getOptions": {
|
|
40429
40573
|
capName: "ptz",
|
|
40430
40574
|
capScope: "device",
|
|
@@ -40473,6 +40617,12 @@ Object.freeze({
|
|
|
40473
40617
|
addonId: null,
|
|
40474
40618
|
access: "create"
|
|
40475
40619
|
},
|
|
40620
|
+
"ptz.setHomePreset": {
|
|
40621
|
+
capName: "ptz",
|
|
40622
|
+
capScope: "device",
|
|
40623
|
+
addonId: null,
|
|
40624
|
+
access: "create"
|
|
40625
|
+
},
|
|
40476
40626
|
"ptz.stop": {
|
|
40477
40627
|
capName: "ptz",
|
|
40478
40628
|
capScope: "device",
|
|
@@ -43646,6 +43796,11 @@ Object.freeze({
|
|
|
43646
43796
|
form: "single",
|
|
43647
43797
|
optional: false
|
|
43648
43798
|
}],
|
|
43799
|
+
"ptz.getHomePreset": [{
|
|
43800
|
+
name: "deviceId",
|
|
43801
|
+
form: "single",
|
|
43802
|
+
optional: false
|
|
43803
|
+
}],
|
|
43649
43804
|
"ptz.getOptions": [{
|
|
43650
43805
|
name: "deviceId",
|
|
43651
43806
|
form: "single",
|
|
@@ -43686,6 +43841,11 @@ Object.freeze({
|
|
|
43686
43841
|
form: "single",
|
|
43687
43842
|
optional: false
|
|
43688
43843
|
}],
|
|
43844
|
+
"ptz.setHomePreset": [{
|
|
43845
|
+
name: "deviceId",
|
|
43846
|
+
form: "single",
|
|
43847
|
+
optional: false
|
|
43848
|
+
}],
|
|
43689
43849
|
"ptz.stop": [{
|
|
43690
43850
|
name: "deviceId",
|
|
43691
43851
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -5399,7 +5399,7 @@ var ZodIssueCode = {
|
|
|
5399
5399
|
var ZodFirstPartyTypeKind;
|
|
5400
5400
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5401
5401
|
//#endregion
|
|
5402
|
-
//#region ../types/dist/sleep-
|
|
5402
|
+
//#region ../types/dist/sleep-B1y0Fo1U.mjs
|
|
5403
5403
|
/**
|
|
5404
5404
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5405
5405
|
* window to float samples (D455).
|
|
@@ -31127,14 +31127,81 @@ var privacyMaskCapability = {
|
|
|
31127
31127
|
* whether persisting is worth a SQLite commit. */
|
|
31128
31128
|
volatileStateFields: ["lastFetchedAt"]
|
|
31129
31129
|
};
|
|
31130
|
+
/**
|
|
31131
|
+
* What a preset id DOES on this camera.
|
|
31132
|
+
*
|
|
31133
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
31134
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
31135
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
31136
|
+
* firmware:
|
|
31137
|
+
*
|
|
31138
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
31139
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
31140
|
+
* 95 Call OSD menu
|
|
31141
|
+
*
|
|
31142
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
31143
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
31144
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
31145
|
+
* operator as a transport failure.
|
|
31146
|
+
*
|
|
31147
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
31148
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
31149
|
+
* `deletePreset` are gated.
|
|
31150
|
+
*/
|
|
31151
|
+
var PtzPresetFunctionSchema = _enum([
|
|
31152
|
+
"home",
|
|
31153
|
+
"day-mode",
|
|
31154
|
+
"night-mode",
|
|
31155
|
+
"day-night-auto",
|
|
31156
|
+
"set-limits",
|
|
31157
|
+
"save-limits",
|
|
31158
|
+
"reboot",
|
|
31159
|
+
"osd-menu"
|
|
31160
|
+
]);
|
|
31130
31161
|
var PtzPresetSchema = object({
|
|
31131
31162
|
id: string(),
|
|
31132
|
-
name: string()
|
|
31163
|
+
name: string(),
|
|
31164
|
+
/**
|
|
31165
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
31166
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
31167
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
31168
|
+
*/
|
|
31169
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
31170
|
+
/**
|
|
31171
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
31172
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
31173
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
31174
|
+
*/
|
|
31175
|
+
writable: boolean()
|
|
31133
31176
|
});
|
|
31177
|
+
/**
|
|
31178
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
31179
|
+
* read it.
|
|
31180
|
+
*
|
|
31181
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
31182
|
+
* position no way to say so. All four said `0`:
|
|
31183
|
+
*
|
|
31184
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
31185
|
+
* path lands upstream"
|
|
31186
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
31187
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
31188
|
+
* onvif throws
|
|
31189
|
+
*
|
|
31190
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
31191
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
31192
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
31193
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
31194
|
+
* headroom", which evacuated a healthy disk.
|
|
31195
|
+
*
|
|
31196
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
31197
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
31198
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
31199
|
+
* tells callers to migrate to.
|
|
31200
|
+
*/
|
|
31134
31201
|
var PtzPositionSchema = object({
|
|
31135
|
-
pan: number(),
|
|
31136
|
-
tilt: number(),
|
|
31137
|
-
zoom: number()
|
|
31202
|
+
pan: number().nullable(),
|
|
31203
|
+
tilt: number().nullable(),
|
|
31204
|
+
zoom: number().nullable()
|
|
31138
31205
|
});
|
|
31139
31206
|
var PtzMoveCommandSchema = object({
|
|
31140
31207
|
pan: number().optional(),
|
|
@@ -31153,7 +31220,72 @@ var PtzOptionsSchema = object({
|
|
|
31153
31220
|
maxPresets: number().optional(),
|
|
31154
31221
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
31155
31222
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
31156
|
-
hasAutofocus: boolean()
|
|
31223
|
+
hasAutofocus: boolean(),
|
|
31224
|
+
/**
|
|
31225
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
31226
|
+
*
|
|
31227
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
31228
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
31229
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
31230
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
31231
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
31232
|
+
* the knob it is turning.
|
|
31233
|
+
*
|
|
31234
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
31235
|
+
* a float). Never a made-up number.
|
|
31236
|
+
*/
|
|
31237
|
+
speedSteps: number().int().positive().nullable(),
|
|
31238
|
+
/**
|
|
31239
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
31240
|
+
*
|
|
31241
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
31242
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
31243
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
31244
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
31245
|
+
* gain to be divided into.
|
|
31246
|
+
*
|
|
31247
|
+
* `null` = the driver cannot say.
|
|
31248
|
+
*/
|
|
31249
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
31250
|
+
});
|
|
31251
|
+
/**
|
|
31252
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
31253
|
+
*
|
|
31254
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
31255
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
31256
|
+
* not one of the three cameras honours its own:
|
|
31257
|
+
*
|
|
31258
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
31259
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
31260
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
31261
|
+
*
|
|
31262
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
31263
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
31264
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
31265
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
31266
|
+
*
|
|
31267
|
+
* `source` is what makes it honest:
|
|
31268
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
31269
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
31270
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
31271
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
31272
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
31273
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
31274
|
+
* no picker.
|
|
31275
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
31276
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
31277
|
+
*
|
|
31278
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
31279
|
+
* native case has no preset and homes perfectly well.
|
|
31280
|
+
*/
|
|
31281
|
+
var PtzHomePresetSchema = object({
|
|
31282
|
+
presetId: string().nullable(),
|
|
31283
|
+
source: _enum([
|
|
31284
|
+
"operator",
|
|
31285
|
+
"firmware",
|
|
31286
|
+
"native",
|
|
31287
|
+
"none"
|
|
31288
|
+
])
|
|
31157
31289
|
});
|
|
31158
31290
|
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({
|
|
31159
31291
|
deviceId: number(),
|
|
@@ -31171,7 +31303,13 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
31171
31303
|
}), _void(), {
|
|
31172
31304
|
kind: "mutation",
|
|
31173
31305
|
auth: "admin"
|
|
31174
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
31306
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
31307
|
+
deviceId: number(),
|
|
31308
|
+
presetId: string().nullable()
|
|
31309
|
+
}), _void(), {
|
|
31310
|
+
kind: "mutation",
|
|
31311
|
+
auth: "admin"
|
|
31312
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
31175
31313
|
deviceId: number(),
|
|
31176
31314
|
enabled: boolean()
|
|
31177
31315
|
}), _void(), { kind: "mutation" });
|
|
@@ -40425,6 +40563,12 @@ Object.freeze({
|
|
|
40425
40563
|
addonId: null,
|
|
40426
40564
|
access: "delete"
|
|
40427
40565
|
},
|
|
40566
|
+
"ptz.getHomePreset": {
|
|
40567
|
+
capName: "ptz",
|
|
40568
|
+
capScope: "device",
|
|
40569
|
+
addonId: null,
|
|
40570
|
+
access: "view"
|
|
40571
|
+
},
|
|
40428
40572
|
"ptz.getOptions": {
|
|
40429
40573
|
capName: "ptz",
|
|
40430
40574
|
capScope: "device",
|
|
@@ -40473,6 +40617,12 @@ Object.freeze({
|
|
|
40473
40617
|
addonId: null,
|
|
40474
40618
|
access: "create"
|
|
40475
40619
|
},
|
|
40620
|
+
"ptz.setHomePreset": {
|
|
40621
|
+
capName: "ptz",
|
|
40622
|
+
capScope: "device",
|
|
40623
|
+
addonId: null,
|
|
40624
|
+
access: "create"
|
|
40625
|
+
},
|
|
40476
40626
|
"ptz.stop": {
|
|
40477
40627
|
capName: "ptz",
|
|
40478
40628
|
capScope: "device",
|
|
@@ -43646,6 +43796,11 @@ Object.freeze({
|
|
|
43646
43796
|
form: "single",
|
|
43647
43797
|
optional: false
|
|
43648
43798
|
}],
|
|
43799
|
+
"ptz.getHomePreset": [{
|
|
43800
|
+
name: "deviceId",
|
|
43801
|
+
form: "single",
|
|
43802
|
+
optional: false
|
|
43803
|
+
}],
|
|
43649
43804
|
"ptz.getOptions": [{
|
|
43650
43805
|
name: "deviceId",
|
|
43651
43806
|
form: "single",
|
|
@@ -43686,6 +43841,11 @@ Object.freeze({
|
|
|
43686
43841
|
form: "single",
|
|
43687
43842
|
optional: false
|
|
43688
43843
|
}],
|
|
43844
|
+
"ptz.setHomePreset": [{
|
|
43845
|
+
name: "deviceId",
|
|
43846
|
+
form: "single",
|
|
43847
|
+
optional: false
|
|
43848
|
+
}],
|
|
43689
43849
|
"ptz.stop": [{
|
|
43690
43850
|
name: "deviceId",
|
|
43691
43851
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-import-alexa",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.110",
|
|
4
4
|
"description": "Alexa device-import provider for CamStack — imports the smart-home devices in a user's Alexa account via the unofficial alexa-remote2 cookie/token client (the inverse of the Alexa exporter)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|