@mega-yfue/eufy-sdk 0.6.0-beta.40 → 0.6.0-beta.41
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 +17 -2
- package/dist/index.js.map +2 -2
- package/dist/model/capabilities/motion.d.ts +16 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4231,6 +4231,13 @@ var MOTION_CMD = {
|
|
|
4231
4231
|
* as a `1700` control payload carrying an index rather than the `1350` envelope its siblings take.
|
|
4232
4232
|
*/
|
|
4233
4233
|
INDOOR_SENSITIVITY_INDEX: 6041,
|
|
4234
|
+
/**
|
|
4235
|
+
* Motion detection on-off on a T8410 (app `CMD_INDOOR_DET_SET_MOTION_DETECT_ENABLE`). `1700` control
|
|
4236
|
+
* payload `{"commandType":6040,"data":{"enable":0,"quality":0,"status":0|1,"value":0}}`.
|
|
4237
|
+
*
|
|
4238
|
+
* ⚠️ Replay + readback confirmed on a standalone and a HomeBase 3-attached T8410, NOT byte-captured.
|
|
4239
|
+
*/
|
|
4240
|
+
INDOOR_MOTION_ENABLE: 6040,
|
|
4234
4241
|
/**
|
|
4235
4242
|
* Detection sensitivity a solo camera REPORTS (app `SET_MOTION_DETECTION_SENSITIVITY_SOLO`). It does
|
|
4236
4243
|
* not accept writes on this id — the write goes to {@link MOTION_SENSITIVITY}, which is why a scale
|
|
@@ -4362,6 +4369,9 @@ function sensitivityCommand(step, scale, ctx) {
|
|
|
4362
4369
|
return setPayload(scale.writeId, { sensitivity: value, channel: ctx.channel }, ctx, 0, void 0, "auto");
|
|
4363
4370
|
}
|
|
4364
4371
|
var EXIT_TEST_MODE_VALUE = 808464384;
|
|
4372
|
+
function isT8410(ctx) {
|
|
4373
|
+
return ctx.model === "T8410";
|
|
4374
|
+
}
|
|
4365
4375
|
function requireFamily(action, ctx, verifiedOn) {
|
|
4366
4376
|
const isSensor = ctx.codec === "sensor";
|
|
4367
4377
|
if (isSensor === (verifiedOn === "sensor"))
|
|
@@ -4399,10 +4409,15 @@ var MOTION_MEMBERS = {
|
|
|
4399
4409
|
type: "bool",
|
|
4400
4410
|
kind: "boolean",
|
|
4401
4411
|
provenance: "verified",
|
|
4402
|
-
|
|
4412
|
+
readAvailable: (ctx) => !isT8410(ctx),
|
|
4413
|
+
readAliases: [{ paramType: MOTION_CMD.INDOOR_MOTION_ENABLE, available: isT8410 }],
|
|
4414
|
+
description: "Motion/PIR detection enabled (verified: param 1011 = CAMERA_PIR; a T8410 reads and writes INDOOR_MOTION_ENABLE 6040 instead).",
|
|
4403
4415
|
write: (v, ctx) => {
|
|
4404
4416
|
requireFamily("motionDetection", ctx, "camera");
|
|
4405
|
-
|
|
4417
|
+
const on = asBool(v) ? 1 : 0;
|
|
4418
|
+
if (!isT8410(ctx))
|
|
4419
|
+
return setScalar(MOTION_CMD.CAMERA_PIR, on, ctx, "direct-binary");
|
|
4420
|
+
return setJson(MOTION_CMD.INDOOR_MOTION_ENABLE, { enable: 0, quality: 0, status: on, value: 0 }, ctx);
|
|
4406
4421
|
},
|
|
4407
4422
|
writeAs: "setDetection"
|
|
4408
4423
|
},
|