@mega-yfue/eufy-sdk 0.2.0-beta.23 → 0.2.0-beta.25

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.
@@ -66,32 +66,34 @@ declare const overP2p: (ctx: AvailabilityContext) => boolean;
66
66
  */
67
67
  export declare const LOCK_MEMBERS: {
68
68
  /**
69
- * The lock's own state, and the weakest thing in this table: 1200 is a `guessed` placeholder because
70
- * the lock announces (un)locking as a pushed event rather than holding a param, so the evidence gate
71
- * will normally leave this getter uninstalled and `lockState` is the real read. `writtenElsewhere`
72
- * points at the `lock`/`unlock` methods — a single `write` cannot express two verbs that carry no
73
- * value.
69
+ * The lock's own state, verified on param 6000: "4" = locked, "3" = unlocked.
70
+ * `writtenElsewhere` points at the `lock`/`unlock` methods — a single `write` cannot express two
71
+ * verbs that carry no value.
74
72
  */
75
73
  readonly locked: {
76
- readonly param: 1200;
74
+ readonly param: 6000;
77
75
  readonly type: "bool";
78
76
  readonly kind: "boolean";
79
- readonly provenance: "guessed";
77
+ readonly provenance: "verified";
80
78
  readonly writtenElsewhere: true;
81
- readonly description: "Lock state, true=locked. UNVERIFIED: no stable state param to key off; placeholder id pending verification.";
79
+ readonly coerce: (raw: string | number | boolean) => boolean;
80
+ readonly description: "Lock state, true=locked (verified: param 6000, 4=locked, 3=unlocked).";
82
81
  };
83
82
  /**
84
- * Cell charge as a percentage, on the same param 1101 every battery device reports. Named `battery`
83
+ * Cell charge as a percentage, on param 1101 or smart-lock param 6001. Named `battery`
85
84
  * within this capability rather than deferring to the `battery` capability: a lock resolves as a lock,
86
85
  * so the accessor is `dev.lock().battery`.
87
86
  */
88
87
  readonly battery: {
89
88
  readonly param: 1101;
89
+ readonly readAliases: readonly [{
90
+ readonly paramType: 6001;
91
+ }];
90
92
  readonly type: "number";
91
93
  readonly unit: "%";
92
94
  readonly kind: "percent";
93
95
  readonly provenance: "verified";
94
- readonly description: "Lock battery level 0-100 (verified: param 1101).";
96
+ readonly description: "Lock battery level 0-100 (verified: param 1101, alias 6001).";
95
97
  };
96
98
  /**
97
99
  * Link quality in dBm as the lock measures it, on the shared param 1141. Both actuation methods here
@@ -235,8 +237,9 @@ export declare const LOCK_MEMBERS: {
235
237
  };
236
238
  };
237
239
  /**
238
- * `lock` — smart lock. `locked` is the reported lock state, but there's no stable state param to
239
- * key off (only pushed via a CommandType-style event), so the param id here is a placeholder.
240
+ * `lock` — smart lock. `locked` reports lock state via verified param 6000 (4=locked, 3=unlocked);
241
+ * a device that reports no stable state param carries its transitions on the `lockState` event instead,
242
+ * whose payload names the decoded `locked`.
240
243
  */
241
244
  export declare const LOCK: CapabilityModule;
242
245
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mega-yfue/eufy-sdk",
3
- "version": "0.2.0-beta.23",
3
+ "version": "0.2.0-beta.25",
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",