@mega-yfue/eufy-sdk 0.5.0-beta.39 → 0.5.0-beta.40
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/index.js +6 -3
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6664,6 +6664,8 @@ var ZOOM_MODEL_HINT = /^T8170\b|^T8425\b|S340/i;
|
|
|
6664
6664
|
function hasZoomEvidence(ctx) {
|
|
6665
6665
|
return ZOOM_EVIDENCE_PARAMS.some((p) => ctx.paramIds.has(p)) || !!ctx.model && ZOOM_MODEL_HINT.test(ctx.model);
|
|
6666
6666
|
}
|
|
6667
|
+
var PRESET_EVIDENCE_PARAMS = [1029, 6090, 6091, 6092, 6210];
|
|
6668
|
+
var FIXED_LENS_MODELS = /* @__PURE__ */ new Set(["T8134"]);
|
|
6667
6669
|
function rotateCommand(direction, ctx, zoom = 1) {
|
|
6668
6670
|
return setJson(PTZ_CMD.PTZ_ROTATE, { cmd_type: 1, rotate_type: PTZ_ROTATE[direction], zoom }, ctx);
|
|
6669
6671
|
}
|
|
@@ -6828,8 +6830,9 @@ var PTZ = {
|
|
|
6828
6830
|
members: PTZ_MEMBERS,
|
|
6829
6831
|
properties: propertiesOf(PTZ_MEMBERS),
|
|
6830
6832
|
// SoloCam proves PT via reported preset params (6090/6091/6092/6210) and a rotate command surface
|
|
6831
|
-
// (1029); Indoor-PT (deviceType 31/35/111 + C220 range
|
|
6832
|
-
// vendor deviceType is the only honest signal; explicit
|
|
6833
|
+
// (1029), except on a FIXED_LENS_MODELS model; Indoor-PT (deviceType 31/35/111 + C220 range
|
|
6834
|
+
// 10008-10011) reports NO PT param, so the vendor deviceType is the only honest signal; explicit
|
|
6835
|
+
// PT/S340/S350 model names also prove it.
|
|
6833
6836
|
// OUTDOOR_PT_CAMERA (48, e.g. SoloCam S340 / T8170) is pan-tilt by definition but a live unit can
|
|
6834
6837
|
// report none of the preset params — trust the deviceType. The rotating SoloCam solar variant
|
|
6835
6838
|
// T8124R shares deviceType 62 with the FIXED T8124 base, so its model code is the only honest
|
|
@@ -6837,7 +6840,7 @@ var PTZ = {
|
|
|
6837
6840
|
// a `T81\d\dR` wildcard: the "R = rotating" reading is unverified for other models, and an
|
|
6838
6841
|
// over-broad hint would false-positive a future non-PT model, the same class of bug as a mislabel.
|
|
6839
6842
|
detection: {
|
|
6840
|
-
|
|
6843
|
+
detect: (record) => !FIXED_LENS_MODELS.has(record.model ?? "") && PRESET_EVIDENCE_PARAMS.some((p) => Object.hasOwn(record.params ?? {}, p)),
|
|
6841
6844
|
deviceTypes: [
|
|
6842
6845
|
DeviceType.OUTDOOR_PT_CAMERA,
|
|
6843
6846
|
DeviceType.INDOOR_PT_CAMERA,
|