@camstack/addon-provider-tuya 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 +209 -7
- package/dist/addon.mjs +209 -7
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -6180,7 +6180,7 @@ var ZodIssueCode = {
|
|
|
6180
6180
|
var ZodFirstPartyTypeKind;
|
|
6181
6181
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
6182
6182
|
//#endregion
|
|
6183
|
-
//#region ../types/dist/sleep-
|
|
6183
|
+
//#region ../types/dist/sleep-vl6nBE8d.mjs
|
|
6184
6184
|
/**
|
|
6185
6185
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
6186
6186
|
* window to float samples (D455).
|
|
@@ -31714,14 +31714,81 @@ var privacyMaskCapability = {
|
|
|
31714
31714
|
* whether persisting is worth a SQLite commit. */
|
|
31715
31715
|
volatileStateFields: ["lastFetchedAt"]
|
|
31716
31716
|
};
|
|
31717
|
+
/**
|
|
31718
|
+
* What a preset id DOES on this camera.
|
|
31719
|
+
*
|
|
31720
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
31721
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
31722
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
31723
|
+
* firmware:
|
|
31724
|
+
*
|
|
31725
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
31726
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
31727
|
+
* 95 Call OSD menu
|
|
31728
|
+
*
|
|
31729
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
31730
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
31731
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
31732
|
+
* operator as a transport failure.
|
|
31733
|
+
*
|
|
31734
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
31735
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
31736
|
+
* `deletePreset` are gated.
|
|
31737
|
+
*/
|
|
31738
|
+
var PtzPresetFunctionSchema = _enum([
|
|
31739
|
+
"home",
|
|
31740
|
+
"day-mode",
|
|
31741
|
+
"night-mode",
|
|
31742
|
+
"day-night-auto",
|
|
31743
|
+
"set-limits",
|
|
31744
|
+
"save-limits",
|
|
31745
|
+
"reboot",
|
|
31746
|
+
"osd-menu"
|
|
31747
|
+
]);
|
|
31717
31748
|
var PtzPresetSchema = object({
|
|
31718
31749
|
id: string(),
|
|
31719
|
-
name: string()
|
|
31750
|
+
name: string(),
|
|
31751
|
+
/**
|
|
31752
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
31753
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
31754
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
31755
|
+
*/
|
|
31756
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
31757
|
+
/**
|
|
31758
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
31759
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
31760
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
31761
|
+
*/
|
|
31762
|
+
writable: boolean()
|
|
31720
31763
|
});
|
|
31764
|
+
/**
|
|
31765
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
31766
|
+
* read it.
|
|
31767
|
+
*
|
|
31768
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
31769
|
+
* position no way to say so. All four said `0`:
|
|
31770
|
+
*
|
|
31771
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
31772
|
+
* path lands upstream"
|
|
31773
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
31774
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
31775
|
+
* onvif throws
|
|
31776
|
+
*
|
|
31777
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
31778
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
31779
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
31780
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
31781
|
+
* headroom", which evacuated a healthy disk.
|
|
31782
|
+
*
|
|
31783
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
31784
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
31785
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
31786
|
+
* tells callers to migrate to.
|
|
31787
|
+
*/
|
|
31721
31788
|
var PtzPositionSchema = object({
|
|
31722
|
-
pan: number(),
|
|
31723
|
-
tilt: number(),
|
|
31724
|
-
zoom: number()
|
|
31789
|
+
pan: number().nullable(),
|
|
31790
|
+
tilt: number().nullable(),
|
|
31791
|
+
zoom: number().nullable()
|
|
31725
31792
|
});
|
|
31726
31793
|
var PtzMoveCommandSchema = object({
|
|
31727
31794
|
pan: number().optional(),
|
|
@@ -31740,7 +31807,72 @@ var PtzOptionsSchema = object({
|
|
|
31740
31807
|
maxPresets: number().optional(),
|
|
31741
31808
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
31742
31809
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
31743
|
-
hasAutofocus: boolean()
|
|
31810
|
+
hasAutofocus: boolean(),
|
|
31811
|
+
/**
|
|
31812
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
31813
|
+
*
|
|
31814
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
31815
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
31816
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
31817
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
31818
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
31819
|
+
* the knob it is turning.
|
|
31820
|
+
*
|
|
31821
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
31822
|
+
* a float). Never a made-up number.
|
|
31823
|
+
*/
|
|
31824
|
+
speedSteps: number().int().positive().nullable(),
|
|
31825
|
+
/**
|
|
31826
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
31827
|
+
*
|
|
31828
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
31829
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
31830
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
31831
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
31832
|
+
* gain to be divided into.
|
|
31833
|
+
*
|
|
31834
|
+
* `null` = the driver cannot say.
|
|
31835
|
+
*/
|
|
31836
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
31837
|
+
});
|
|
31838
|
+
/**
|
|
31839
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
31840
|
+
*
|
|
31841
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
31842
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
31843
|
+
* not one of the three cameras honours its own:
|
|
31844
|
+
*
|
|
31845
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
31846
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
31847
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
31848
|
+
*
|
|
31849
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
31850
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
31851
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
31852
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
31853
|
+
*
|
|
31854
|
+
* `source` is what makes it honest:
|
|
31855
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
31856
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
31857
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
31858
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
31859
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
31860
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
31861
|
+
* no picker.
|
|
31862
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
31863
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
31864
|
+
*
|
|
31865
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
31866
|
+
* native case has no preset and homes perfectly well.
|
|
31867
|
+
*/
|
|
31868
|
+
var PtzHomePresetSchema = object({
|
|
31869
|
+
presetId: string().nullable(),
|
|
31870
|
+
source: _enum([
|
|
31871
|
+
"operator",
|
|
31872
|
+
"firmware",
|
|
31873
|
+
"native",
|
|
31874
|
+
"none"
|
|
31875
|
+
])
|
|
31744
31876
|
});
|
|
31745
31877
|
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({
|
|
31746
31878
|
deviceId: number(),
|
|
@@ -31758,7 +31890,22 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
31758
31890
|
}), _void(), {
|
|
31759
31891
|
kind: "mutation",
|
|
31760
31892
|
auth: "admin"
|
|
31761
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
31893
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
31894
|
+
deviceId: number(),
|
|
31895
|
+
presetId: string().nullable()
|
|
31896
|
+
}), _void(), {
|
|
31897
|
+
kind: "mutation",
|
|
31898
|
+
auth: "admin"
|
|
31899
|
+
}), method(object({ deviceId: number() }), _void(), {
|
|
31900
|
+
kind: "mutation",
|
|
31901
|
+
auth: "admin"
|
|
31902
|
+
}), method(object({ deviceId: number() }), number().int().nullable()), method(object({
|
|
31903
|
+
deviceId: number(),
|
|
31904
|
+
seconds: number().int().min(0).max(3600)
|
|
31905
|
+
}), _void(), {
|
|
31906
|
+
kind: "mutation",
|
|
31907
|
+
auth: "admin"
|
|
31908
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
31762
31909
|
deviceId: number(),
|
|
31763
31910
|
enabled: boolean()
|
|
31764
31911
|
}), _void(), { kind: "mutation" });
|
|
@@ -41000,6 +41147,12 @@ Object.freeze({
|
|
|
41000
41147
|
addonId: null,
|
|
41001
41148
|
access: "create"
|
|
41002
41149
|
},
|
|
41150
|
+
"ptz.captureHomeHere": {
|
|
41151
|
+
capName: "ptz",
|
|
41152
|
+
capScope: "device",
|
|
41153
|
+
addonId: null,
|
|
41154
|
+
access: "create"
|
|
41155
|
+
},
|
|
41003
41156
|
"ptz.continuousMove": {
|
|
41004
41157
|
capName: "ptz",
|
|
41005
41158
|
capScope: "device",
|
|
@@ -41012,6 +41165,18 @@ Object.freeze({
|
|
|
41012
41165
|
addonId: null,
|
|
41013
41166
|
access: "delete"
|
|
41014
41167
|
},
|
|
41168
|
+
"ptz.getHomePreset": {
|
|
41169
|
+
capName: "ptz",
|
|
41170
|
+
capScope: "device",
|
|
41171
|
+
addonId: null,
|
|
41172
|
+
access: "view"
|
|
41173
|
+
},
|
|
41174
|
+
"ptz.getHomeReturnSeconds": {
|
|
41175
|
+
capName: "ptz",
|
|
41176
|
+
capScope: "device",
|
|
41177
|
+
addonId: null,
|
|
41178
|
+
access: "view"
|
|
41179
|
+
},
|
|
41015
41180
|
"ptz.getOptions": {
|
|
41016
41181
|
capName: "ptz",
|
|
41017
41182
|
capScope: "device",
|
|
@@ -41060,6 +41225,18 @@ Object.freeze({
|
|
|
41060
41225
|
addonId: null,
|
|
41061
41226
|
access: "create"
|
|
41062
41227
|
},
|
|
41228
|
+
"ptz.setHomePreset": {
|
|
41229
|
+
capName: "ptz",
|
|
41230
|
+
capScope: "device",
|
|
41231
|
+
addonId: null,
|
|
41232
|
+
access: "create"
|
|
41233
|
+
},
|
|
41234
|
+
"ptz.setHomeReturnSeconds": {
|
|
41235
|
+
capName: "ptz",
|
|
41236
|
+
capScope: "device",
|
|
41237
|
+
addonId: null,
|
|
41238
|
+
access: "create"
|
|
41239
|
+
},
|
|
41063
41240
|
"ptz.stop": {
|
|
41064
41241
|
capName: "ptz",
|
|
41065
41242
|
capScope: "device",
|
|
@@ -44223,6 +44400,11 @@ Object.freeze({
|
|
|
44223
44400
|
form: "single",
|
|
44224
44401
|
optional: false
|
|
44225
44402
|
}],
|
|
44403
|
+
"ptz.captureHomeHere": [{
|
|
44404
|
+
name: "deviceId",
|
|
44405
|
+
form: "single",
|
|
44406
|
+
optional: false
|
|
44407
|
+
}],
|
|
44226
44408
|
"ptz.continuousMove": [{
|
|
44227
44409
|
name: "deviceId",
|
|
44228
44410
|
form: "single",
|
|
@@ -44233,6 +44415,16 @@ Object.freeze({
|
|
|
44233
44415
|
form: "single",
|
|
44234
44416
|
optional: false
|
|
44235
44417
|
}],
|
|
44418
|
+
"ptz.getHomePreset": [{
|
|
44419
|
+
name: "deviceId",
|
|
44420
|
+
form: "single",
|
|
44421
|
+
optional: false
|
|
44422
|
+
}],
|
|
44423
|
+
"ptz.getHomeReturnSeconds": [{
|
|
44424
|
+
name: "deviceId",
|
|
44425
|
+
form: "single",
|
|
44426
|
+
optional: false
|
|
44427
|
+
}],
|
|
44236
44428
|
"ptz.getOptions": [{
|
|
44237
44429
|
name: "deviceId",
|
|
44238
44430
|
form: "single",
|
|
@@ -44273,6 +44465,16 @@ Object.freeze({
|
|
|
44273
44465
|
form: "single",
|
|
44274
44466
|
optional: false
|
|
44275
44467
|
}],
|
|
44468
|
+
"ptz.setHomePreset": [{
|
|
44469
|
+
name: "deviceId",
|
|
44470
|
+
form: "single",
|
|
44471
|
+
optional: false
|
|
44472
|
+
}],
|
|
44473
|
+
"ptz.setHomeReturnSeconds": [{
|
|
44474
|
+
name: "deviceId",
|
|
44475
|
+
form: "single",
|
|
44476
|
+
optional: false
|
|
44477
|
+
}],
|
|
44276
44478
|
"ptz.stop": [{
|
|
44277
44479
|
name: "deviceId",
|
|
44278
44480
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -6179,7 +6179,7 @@ var ZodIssueCode = {
|
|
|
6179
6179
|
var ZodFirstPartyTypeKind;
|
|
6180
6180
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
6181
6181
|
//#endregion
|
|
6182
|
-
//#region ../types/dist/sleep-
|
|
6182
|
+
//#region ../types/dist/sleep-vl6nBE8d.mjs
|
|
6183
6183
|
/**
|
|
6184
6184
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
6185
6185
|
* window to float samples (D455).
|
|
@@ -31713,14 +31713,81 @@ var privacyMaskCapability = {
|
|
|
31713
31713
|
* whether persisting is worth a SQLite commit. */
|
|
31714
31714
|
volatileStateFields: ["lastFetchedAt"]
|
|
31715
31715
|
};
|
|
31716
|
+
/**
|
|
31717
|
+
* What a preset id DOES on this camera.
|
|
31718
|
+
*
|
|
31719
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
31720
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
31721
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
31722
|
+
* firmware:
|
|
31723
|
+
*
|
|
31724
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
31725
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
31726
|
+
* 95 Call OSD menu
|
|
31727
|
+
*
|
|
31728
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
31729
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
31730
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
31731
|
+
* operator as a transport failure.
|
|
31732
|
+
*
|
|
31733
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
31734
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
31735
|
+
* `deletePreset` are gated.
|
|
31736
|
+
*/
|
|
31737
|
+
var PtzPresetFunctionSchema = _enum([
|
|
31738
|
+
"home",
|
|
31739
|
+
"day-mode",
|
|
31740
|
+
"night-mode",
|
|
31741
|
+
"day-night-auto",
|
|
31742
|
+
"set-limits",
|
|
31743
|
+
"save-limits",
|
|
31744
|
+
"reboot",
|
|
31745
|
+
"osd-menu"
|
|
31746
|
+
]);
|
|
31716
31747
|
var PtzPresetSchema = object({
|
|
31717
31748
|
id: string(),
|
|
31718
|
-
name: string()
|
|
31749
|
+
name: string(),
|
|
31750
|
+
/**
|
|
31751
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
31752
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
31753
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
31754
|
+
*/
|
|
31755
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
31756
|
+
/**
|
|
31757
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
31758
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
31759
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
31760
|
+
*/
|
|
31761
|
+
writable: boolean()
|
|
31719
31762
|
});
|
|
31763
|
+
/**
|
|
31764
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
31765
|
+
* read it.
|
|
31766
|
+
*
|
|
31767
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
31768
|
+
* position no way to say so. All four said `0`:
|
|
31769
|
+
*
|
|
31770
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
31771
|
+
* path lands upstream"
|
|
31772
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
31773
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
31774
|
+
* onvif throws
|
|
31775
|
+
*
|
|
31776
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
31777
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
31778
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
31779
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
31780
|
+
* headroom", which evacuated a healthy disk.
|
|
31781
|
+
*
|
|
31782
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
31783
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
31784
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
31785
|
+
* tells callers to migrate to.
|
|
31786
|
+
*/
|
|
31720
31787
|
var PtzPositionSchema = object({
|
|
31721
|
-
pan: number(),
|
|
31722
|
-
tilt: number(),
|
|
31723
|
-
zoom: number()
|
|
31788
|
+
pan: number().nullable(),
|
|
31789
|
+
tilt: number().nullable(),
|
|
31790
|
+
zoom: number().nullable()
|
|
31724
31791
|
});
|
|
31725
31792
|
var PtzMoveCommandSchema = object({
|
|
31726
31793
|
pan: number().optional(),
|
|
@@ -31739,7 +31806,72 @@ var PtzOptionsSchema = object({
|
|
|
31739
31806
|
maxPresets: number().optional(),
|
|
31740
31807
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
31741
31808
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
31742
|
-
hasAutofocus: boolean()
|
|
31809
|
+
hasAutofocus: boolean(),
|
|
31810
|
+
/**
|
|
31811
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
31812
|
+
*
|
|
31813
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
31814
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
31815
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
31816
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
31817
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
31818
|
+
* the knob it is turning.
|
|
31819
|
+
*
|
|
31820
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
31821
|
+
* a float). Never a made-up number.
|
|
31822
|
+
*/
|
|
31823
|
+
speedSteps: number().int().positive().nullable(),
|
|
31824
|
+
/**
|
|
31825
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
31826
|
+
*
|
|
31827
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
31828
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
31829
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
31830
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
31831
|
+
* gain to be divided into.
|
|
31832
|
+
*
|
|
31833
|
+
* `null` = the driver cannot say.
|
|
31834
|
+
*/
|
|
31835
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
31836
|
+
});
|
|
31837
|
+
/**
|
|
31838
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
31839
|
+
*
|
|
31840
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
31841
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
31842
|
+
* not one of the three cameras honours its own:
|
|
31843
|
+
*
|
|
31844
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
31845
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
31846
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
31847
|
+
*
|
|
31848
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
31849
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
31850
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
31851
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
31852
|
+
*
|
|
31853
|
+
* `source` is what makes it honest:
|
|
31854
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
31855
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
31856
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
31857
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
31858
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
31859
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
31860
|
+
* no picker.
|
|
31861
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
31862
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
31863
|
+
*
|
|
31864
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
31865
|
+
* native case has no preset and homes perfectly well.
|
|
31866
|
+
*/
|
|
31867
|
+
var PtzHomePresetSchema = object({
|
|
31868
|
+
presetId: string().nullable(),
|
|
31869
|
+
source: _enum([
|
|
31870
|
+
"operator",
|
|
31871
|
+
"firmware",
|
|
31872
|
+
"native",
|
|
31873
|
+
"none"
|
|
31874
|
+
])
|
|
31743
31875
|
});
|
|
31744
31876
|
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({
|
|
31745
31877
|
deviceId: number(),
|
|
@@ -31757,7 +31889,22 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
31757
31889
|
}), _void(), {
|
|
31758
31890
|
kind: "mutation",
|
|
31759
31891
|
auth: "admin"
|
|
31760
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
31892
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
31893
|
+
deviceId: number(),
|
|
31894
|
+
presetId: string().nullable()
|
|
31895
|
+
}), _void(), {
|
|
31896
|
+
kind: "mutation",
|
|
31897
|
+
auth: "admin"
|
|
31898
|
+
}), method(object({ deviceId: number() }), _void(), {
|
|
31899
|
+
kind: "mutation",
|
|
31900
|
+
auth: "admin"
|
|
31901
|
+
}), method(object({ deviceId: number() }), number().int().nullable()), method(object({
|
|
31902
|
+
deviceId: number(),
|
|
31903
|
+
seconds: number().int().min(0).max(3600)
|
|
31904
|
+
}), _void(), {
|
|
31905
|
+
kind: "mutation",
|
|
31906
|
+
auth: "admin"
|
|
31907
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
31761
31908
|
deviceId: number(),
|
|
31762
31909
|
enabled: boolean()
|
|
31763
31910
|
}), _void(), { kind: "mutation" });
|
|
@@ -40999,6 +41146,12 @@ Object.freeze({
|
|
|
40999
41146
|
addonId: null,
|
|
41000
41147
|
access: "create"
|
|
41001
41148
|
},
|
|
41149
|
+
"ptz.captureHomeHere": {
|
|
41150
|
+
capName: "ptz",
|
|
41151
|
+
capScope: "device",
|
|
41152
|
+
addonId: null,
|
|
41153
|
+
access: "create"
|
|
41154
|
+
},
|
|
41002
41155
|
"ptz.continuousMove": {
|
|
41003
41156
|
capName: "ptz",
|
|
41004
41157
|
capScope: "device",
|
|
@@ -41011,6 +41164,18 @@ Object.freeze({
|
|
|
41011
41164
|
addonId: null,
|
|
41012
41165
|
access: "delete"
|
|
41013
41166
|
},
|
|
41167
|
+
"ptz.getHomePreset": {
|
|
41168
|
+
capName: "ptz",
|
|
41169
|
+
capScope: "device",
|
|
41170
|
+
addonId: null,
|
|
41171
|
+
access: "view"
|
|
41172
|
+
},
|
|
41173
|
+
"ptz.getHomeReturnSeconds": {
|
|
41174
|
+
capName: "ptz",
|
|
41175
|
+
capScope: "device",
|
|
41176
|
+
addonId: null,
|
|
41177
|
+
access: "view"
|
|
41178
|
+
},
|
|
41014
41179
|
"ptz.getOptions": {
|
|
41015
41180
|
capName: "ptz",
|
|
41016
41181
|
capScope: "device",
|
|
@@ -41059,6 +41224,18 @@ Object.freeze({
|
|
|
41059
41224
|
addonId: null,
|
|
41060
41225
|
access: "create"
|
|
41061
41226
|
},
|
|
41227
|
+
"ptz.setHomePreset": {
|
|
41228
|
+
capName: "ptz",
|
|
41229
|
+
capScope: "device",
|
|
41230
|
+
addonId: null,
|
|
41231
|
+
access: "create"
|
|
41232
|
+
},
|
|
41233
|
+
"ptz.setHomeReturnSeconds": {
|
|
41234
|
+
capName: "ptz",
|
|
41235
|
+
capScope: "device",
|
|
41236
|
+
addonId: null,
|
|
41237
|
+
access: "create"
|
|
41238
|
+
},
|
|
41062
41239
|
"ptz.stop": {
|
|
41063
41240
|
capName: "ptz",
|
|
41064
41241
|
capScope: "device",
|
|
@@ -44222,6 +44399,11 @@ Object.freeze({
|
|
|
44222
44399
|
form: "single",
|
|
44223
44400
|
optional: false
|
|
44224
44401
|
}],
|
|
44402
|
+
"ptz.captureHomeHere": [{
|
|
44403
|
+
name: "deviceId",
|
|
44404
|
+
form: "single",
|
|
44405
|
+
optional: false
|
|
44406
|
+
}],
|
|
44225
44407
|
"ptz.continuousMove": [{
|
|
44226
44408
|
name: "deviceId",
|
|
44227
44409
|
form: "single",
|
|
@@ -44232,6 +44414,16 @@ Object.freeze({
|
|
|
44232
44414
|
form: "single",
|
|
44233
44415
|
optional: false
|
|
44234
44416
|
}],
|
|
44417
|
+
"ptz.getHomePreset": [{
|
|
44418
|
+
name: "deviceId",
|
|
44419
|
+
form: "single",
|
|
44420
|
+
optional: false
|
|
44421
|
+
}],
|
|
44422
|
+
"ptz.getHomeReturnSeconds": [{
|
|
44423
|
+
name: "deviceId",
|
|
44424
|
+
form: "single",
|
|
44425
|
+
optional: false
|
|
44426
|
+
}],
|
|
44235
44427
|
"ptz.getOptions": [{
|
|
44236
44428
|
name: "deviceId",
|
|
44237
44429
|
form: "single",
|
|
@@ -44272,6 +44464,16 @@ Object.freeze({
|
|
|
44272
44464
|
form: "single",
|
|
44273
44465
|
optional: false
|
|
44274
44466
|
}],
|
|
44467
|
+
"ptz.setHomePreset": [{
|
|
44468
|
+
name: "deviceId",
|
|
44469
|
+
form: "single",
|
|
44470
|
+
optional: false
|
|
44471
|
+
}],
|
|
44472
|
+
"ptz.setHomeReturnSeconds": [{
|
|
44473
|
+
name: "deviceId",
|
|
44474
|
+
form: "single",
|
|
44475
|
+
optional: false
|
|
44476
|
+
}],
|
|
44275
44477
|
"ptz.stop": [{
|
|
44276
44478
|
name: "deviceId",
|
|
44277
44479
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-tuya",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.112",
|
|
4
4
|
"description": "Tuya / Smart Life device-provider addon for CamStack — account-onboarded (Tuya IoT cloud fetch of device localKeys) + LOCAL DP control via the @apocaliss92/nodetuya encrypted-LAN client, exposing switch / water-heater-family kettle entities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|