@mega-yfue/eufy-sdk 0.2.0-beta.24 → 0.2.0-beta.26
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
CHANGED
|
@@ -2612,6 +2612,7 @@ var DeviceType = {
|
|
|
2612
2612
|
PROFESSIONAL_247: 24,
|
|
2613
2613
|
MINIBASE_CHIME: 25,
|
|
2614
2614
|
CAMERA3_PRO: 26,
|
|
2615
|
+
STATION_9000: 27,
|
|
2615
2616
|
HOMEBASE_MINI: 28,
|
|
2616
2617
|
INDOOR_CAMERA: 30,
|
|
2617
2618
|
INDOOR_PT_CAMERA: 31,
|
|
@@ -2708,6 +2709,7 @@ function classifyDevice(raw) {
|
|
|
2708
2709
|
var STATION_TYPES = /* @__PURE__ */ new Set([
|
|
2709
2710
|
DeviceType.STATION,
|
|
2710
2711
|
DeviceType.HB3,
|
|
2712
|
+
DeviceType.STATION_9000,
|
|
2711
2713
|
DeviceType.MINIBASE_CHIME,
|
|
2712
2714
|
DeviceType.HOMEBASE_MINI,
|
|
2713
2715
|
DeviceType.NVR_S4_MAX,
|
|
@@ -2787,6 +2789,8 @@ function codecFromModel(model) {
|
|
|
2787
2789
|
return "station";
|
|
2788
2790
|
if (/^T8N0/.test(m) || /^T8E0/.test(m))
|
|
2789
2791
|
return "station";
|
|
2792
|
+
if (/^T9000/.test(m))
|
|
2793
|
+
return "station";
|
|
2790
2794
|
if (/^T74/.test(m))
|
|
2791
2795
|
return "lock";
|
|
2792
2796
|
if (/^T85/.test(m))
|
|
@@ -4801,6 +4805,7 @@ var WALL_LIGHT_TYPES = /* @__PURE__ */ new Set([
|
|
|
4801
4805
|
var HOMEBASE_TYPES = /* @__PURE__ */ new Set([
|
|
4802
4806
|
DeviceType.STATION,
|
|
4803
4807
|
DeviceType.HB3,
|
|
4808
|
+
DeviceType.STATION_9000,
|
|
4804
4809
|
DeviceType.MINIBASE_CHIME,
|
|
4805
4810
|
DeviceType.HOMEBASE_MINI
|
|
4806
4811
|
]);
|
|
@@ -7029,32 +7034,32 @@ function settingToggle(settingId, name, enabled, ctx, sink) {
|
|
|
7029
7034
|
var overP2p = (ctx) => ctx.hasP2p === true;
|
|
7030
7035
|
var LOCK_MEMBERS = {
|
|
7031
7036
|
/**
|
|
7032
|
-
* The lock's own state,
|
|
7033
|
-
*
|
|
7034
|
-
*
|
|
7035
|
-
* points at the `lock`/`unlock` methods — a single `write` cannot express two verbs that carry no
|
|
7036
|
-
* value.
|
|
7037
|
+
* The lock's own state, verified on param 6000: "4" = locked, "3" = unlocked.
|
|
7038
|
+
* `writtenElsewhere` points at the `lock`/`unlock` methods — a single `write` cannot express two
|
|
7039
|
+
* verbs that carry no value.
|
|
7037
7040
|
*/
|
|
7038
7041
|
locked: {
|
|
7039
|
-
param:
|
|
7042
|
+
param: 6e3,
|
|
7040
7043
|
type: "bool",
|
|
7041
7044
|
kind: "boolean",
|
|
7042
|
-
provenance: "
|
|
7045
|
+
provenance: "verified",
|
|
7043
7046
|
writtenElsewhere: true,
|
|
7044
|
-
|
|
7047
|
+
coerce: (raw) => String(raw).trim() === "4",
|
|
7048
|
+
description: "Lock state, true=locked (verified: param 6000, 4=locked, 3=unlocked)."
|
|
7045
7049
|
},
|
|
7046
7050
|
/**
|
|
7047
|
-
* Cell charge as a percentage, on
|
|
7051
|
+
* Cell charge as a percentage, on param 1101 or smart-lock param 6001. Named `battery`
|
|
7048
7052
|
* within this capability rather than deferring to the `battery` capability: a lock resolves as a lock,
|
|
7049
7053
|
* so the accessor is `dev.lock().battery`.
|
|
7050
7054
|
*/
|
|
7051
7055
|
battery: {
|
|
7052
7056
|
param: 1101,
|
|
7057
|
+
readAliases: [{ paramType: 6001 }],
|
|
7053
7058
|
type: "number",
|
|
7054
7059
|
unit: "%",
|
|
7055
7060
|
kind: "percent",
|
|
7056
7061
|
provenance: "verified",
|
|
7057
|
-
description: "Lock battery level 0-100 (verified: param 1101)."
|
|
7062
|
+
description: "Lock battery level 0-100 (verified: param 1101, alias 6001)."
|
|
7058
7063
|
},
|
|
7059
7064
|
/**
|
|
7060
7065
|
* Link quality in dBm as the lock measures it, on the shared param 1141. Both actuation methods here
|
|
@@ -7212,16 +7217,26 @@ function settingToggleCommand(settingId, enabled, ctx) {
|
|
|
7212
7217
|
value: asBool(enabled)
|
|
7213
7218
|
};
|
|
7214
7219
|
}
|
|
7220
|
+
function decodeLockTransition(signal) {
|
|
7221
|
+
if (signal.source !== "push" || signal.eventType === void 0)
|
|
7222
|
+
return {};
|
|
7223
|
+
const e = signal.eventType;
|
|
7224
|
+
if (e >= LockPushEvent.MANUAL_LOCK && e <= LockPushEvent.TEMPORARY_PW_LOCK)
|
|
7225
|
+
return { locked: true };
|
|
7226
|
+
const unlocked = e >= LockPushEvent.MANUAL_UNLOCK && e <= LockPushEvent.APP_UNLOCK || e === LockPushEvent.TEMPORARY_PW_UNLOCK;
|
|
7227
|
+
return unlocked ? { locked: false } : {};
|
|
7228
|
+
}
|
|
7215
7229
|
var LOCK = {
|
|
7216
7230
|
capability: "lock",
|
|
7217
7231
|
description: "Smart-lock locked/unlocked state and battery.",
|
|
7218
7232
|
members: LOCK_MEMBERS,
|
|
7219
7233
|
properties: propertiesOf(LOCK_MEMBERS),
|
|
7220
|
-
// Lock state is reported via
|
|
7234
|
+
// Lock state is reported via param 6000 (verified: 4=locked, 3=unlocked); the model name (lock/safe) is a
|
|
7221
7235
|
// signal, and every lock-codec device has the lock capability as its baseline.
|
|
7222
|
-
detection: { modelHints: [/lock/i, /safe/i], codecs: ["lock"] },
|
|
7223
|
-
// Inbound FCM lock events (LockPushEvent 257..771: (un)lock actions + alarms) → one "lockState"
|
|
7224
|
-
|
|
7236
|
+
detection: { evidenceParams: [6e3], modelHints: [/lock/i, /safe/i], codecs: ["lock"] },
|
|
7237
|
+
// Inbound FCM lock events (LockPushEvent 257..771: (un)lock actions + alarms) → one "lockState", whose
|
|
7238
|
+
// payload carries a decoded `locked` boolean for the (un)lock actions (see decodeLockTransition).
|
|
7239
|
+
events: [{ source: "push", match: [257, 771], emit: "lockState", derive: decodeLockTransition }]
|
|
7225
7240
|
};
|
|
7226
7241
|
|
|
7227
7242
|
// dist/model/capabilities/keypad.js
|
|
@@ -11937,6 +11952,16 @@ var SECURITY_PARAMS = {
|
|
|
11937
11952
|
type: "string",
|
|
11938
11953
|
provenance: "guessed"
|
|
11939
11954
|
},
|
|
11955
|
+
6e3: {
|
|
11956
|
+
name: "lockStatus",
|
|
11957
|
+
type: "number",
|
|
11958
|
+
provenance: "verified"
|
|
11959
|
+
},
|
|
11960
|
+
6001: {
|
|
11961
|
+
name: "lockBattery",
|
|
11962
|
+
type: "number",
|
|
11963
|
+
provenance: "verified"
|
|
11964
|
+
},
|
|
11940
11965
|
6010: {
|
|
11941
11966
|
name: "pwList",
|
|
11942
11967
|
type: "bool",
|