@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.
@@ -1,5 +1,5 @@
1
1
  import { type Surface } from "./members.js";
2
- import type { CapabilityModule, CommandContext } from "./types.js";
2
+ import type { AvailabilityContext, CapabilityModule, CommandContext } from "./types.js";
3
3
  import type { Command } from "../../core/contracts.js";
4
4
  /**
5
5
  * The P2P **feature-command ids** this motion capability drives. Capability-owned wire vocabulary
@@ -125,6 +125,13 @@ export declare const MOTION_CMD: {
125
125
  * as a `1700` control payload carrying an index rather than the `1350` envelope its siblings take.
126
126
  */
127
127
  readonly INDOOR_SENSITIVITY_INDEX: 6041;
128
+ /**
129
+ * Motion detection on-off on a T8410 (app `CMD_INDOOR_DET_SET_MOTION_DETECT_ENABLE`). `1700` control
130
+ * payload `{"commandType":6040,"data":{"enable":0,"quality":0,"status":0|1,"value":0}}`.
131
+ *
132
+ * ⚠️ Replay + readback confirmed on a standalone and a HomeBase 3-attached T8410, NOT byte-captured.
133
+ */
134
+ readonly INDOOR_MOTION_ENABLE: 6040;
128
135
  /**
129
136
  * Detection sensitivity a solo camera REPORTS (app `SET_MOTION_DETECTION_SENSITIVITY_SOLO`). It does
130
137
  * not accept writes on this id — the write goes to {@link MOTION_SENSITIVITY}, which is why a scale
@@ -187,6 +194,8 @@ export declare function decodeAiDetectType(value: number): AiDetectFlags;
187
194
  * `ai_detect_type` field of the JSON object form. Answers `undefined` for any other shape.
188
195
  */
189
196
  declare function decodeAiDetectTypeParam(raw: unknown): number | undefined;
197
+ /** A T8410, whose motion switch is {@link MOTION_CMD.INDOOR_MOTION_ENABLE} rather than {@link MOTION_CMD.CAMERA_PIR}. */
198
+ declare function isT8410(ctx: AvailabilityContext): boolean;
190
199
  /**
191
200
  * Decode a `radar_wd_switch` (2706, loitering) read the way the app does:
192
201
  * `typeof v === "object" ? v.radar_wd_switch : v`. The device may store it as a JSON object
@@ -227,7 +236,12 @@ export declare const MOTION_MEMBERS: {
227
236
  readonly type: "bool";
228
237
  readonly kind: "boolean";
229
238
  readonly provenance: "verified";
230
- readonly description: "Motion/PIR detection enabled (verified: param 1011 = CAMERA_PIR).";
239
+ readonly readAvailable: (ctx: AvailabilityContext) => boolean;
240
+ readonly readAliases: readonly [{
241
+ readonly paramType: 6040;
242
+ readonly available: typeof isT8410;
243
+ }];
244
+ readonly description: string;
231
245
  readonly write: (v: string | number | boolean, ctx: CommandContext) => Command;
232
246
  readonly writeAs: "setDetection";
233
247
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mega-yfue/eufy-sdk",
3
- "version": "0.6.0-beta.40",
3
+ "version": "0.6.0-beta.41",
4
4
  "description": "One typed TypeScript client for the Anker eufy v6 cloud — capability-driven devices, realtime events over P2P/MQTT/push, and live media",
5
5
  "license": "Apache-2.0",
6
6
  "author": "mega-yfue",