@mega-yfue/eufy-sdk 0.2.0-beta.3 → 0.2.0-beta.30
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/client/device-registry.d.ts +14 -28
- package/dist/client/eufy-mega.d.ts +16 -11
- package/dist/client/types.d.ts +6 -2
- package/dist/core/contracts.d.ts +26 -30
- package/dist/core/crypto.d.ts +10 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/logger.d.ts +5 -3
- package/dist/core/solix-types.d.ts +121 -0
- package/dist/core/store.d.ts +38 -10
- package/dist/index.js +2929 -505
- package/dist/index.js.map +4 -4
- package/dist/model/capabilities/access.d.ts +22 -3
- package/dist/model/capabilities/arming.d.ts +33 -27
- package/dist/model/capabilities/battery.d.ts +32 -4
- package/dist/model/capabilities/contact.d.ts +4 -0
- package/dist/model/capabilities/display.d.ts +85 -0
- package/dist/model/capabilities/doorbell.d.ts +24 -14
- package/dist/model/capabilities/index.d.ts +19 -4
- package/dist/model/capabilities/lock.d.ts +15 -12
- package/dist/model/capabilities/ptz.d.ts +6 -2
- package/dist/model/capabilities/solix.d.ts +173 -0
- package/dist/model/capabilities/types.d.ts +69 -12
- package/dist/model/capabilities/vacuum-clean.d.ts +133 -25
- package/dist/model/classify.d.ts +3 -1
- package/dist/model/device-family.d.ts +2 -1
- package/dist/model/device-types.d.ts +1 -0
- package/dist/model/device.d.ts +15 -0
- package/dist/model/index.d.ts +5 -0
- package/dist/model/param-dictionary.d.ts +24 -0
- package/dist/model/param-namespace.d.ts +1 -1
- package/dist/model/solix-catalog.d.ts +25 -0
- package/dist/model/solix-device.d.ts +137 -0
- package/dist/model/solix-family.d.ts +31 -0
- package/dist/model/solix-site.d.ts +70 -0
- package/dist/model/types.d.ts +5 -5
- package/dist/transport/ff09.d.ts +7 -0
- package/dist/transport/http/decodeImageV2.d.ts +8 -14
- package/dist/transport/http/index.d.ts +1 -0
- package/dist/transport/http/jpeg-scan.d.ts +59 -0
- package/dist/transport/http/media-download.d.ts +3 -0
- package/dist/transport/http/mega-client.d.ts +89 -9
- package/dist/transport/http/solix-client.d.ts +270 -0
- package/dist/transport/http/solix-constants.d.ts +56 -0
- package/dist/transport/media-failure.d.ts +48 -0
- package/dist/transport/mqtt/index.d.ts +3 -0
- package/dist/transport/mqtt/secure-mqtt.d.ts +14 -1
- package/dist/transport/mqtt/solix-mqtt.d.ts +360 -0
- package/dist/transport/mqtt/topics.d.ts +30 -0
- package/dist/transport/p2p/command-router.d.ts +131 -19
- package/dist/transport/p2p/live-stream.d.ts +5 -4
- package/dist/transport/p2p/live-trace.d.ts +48 -5
- package/dist/transport/p2p/media.d.ts +11 -0
- package/dist/transport/p2p/p2p-session.d.ts +9 -0
- package/dist/transport/p2p/session-manager.d.ts +57 -23
- package/dist/transport/p2p/shared-live-source.d.ts +10 -1
- package/dist/transport/p2p/station-channels.d.ts +54 -0
- package/dist/transport/stored-image-cache.d.ts +7 -1
- package/package.json +7 -6
|
@@ -50,9 +50,28 @@ export declare function setJsonRaw(cmd: number, data: Record<string, unknown>, c
|
|
|
50
50
|
* Set a param carried in the `SET_PAYLOAD` (1350) envelope — `{account_id,cmd,mChannel,mValue3:cmd,
|
|
51
51
|
* payload}`, GCM signCode 8 — NOT the bare `{commandType,data}` 1700 wrapper `setJson` uses. The wire
|
|
52
52
|
* eufy uses for a few doorbell controls (status-LED 1716 `{light_enable}`). Level-2 by default; the
|
|
53
|
-
* sink resolves the session/account_id and replays the frame.
|
|
54
|
-
*
|
|
55
|
-
*
|
|
53
|
+
* sink resolves the session/account_id and replays the frame.
|
|
54
|
+
*
|
|
55
|
+
* ## When this envelope takes `form: "auto"`
|
|
56
|
+
*
|
|
57
|
+
* Left at the default the frame is level-2 ONLY, and on a station holding no level-2 key that does not
|
|
58
|
+
* fail — it WAITS: the transport spends the full level-2 grace, re-prompts, spends it again, and only
|
|
59
|
+
* then throws. Every caller with a shorter bound sees a hang rather than a refusal, so a control on a
|
|
60
|
+
* device that may be its own keyless station is effectively unreachable. `"auto"` hands the choice to
|
|
61
|
+
* the session (`sendBySessionLevel`), which seals level-2 wherever a key exists — unchanged for a
|
|
62
|
+
* HomeBase — and level-1 where none does.
|
|
63
|
+
*
|
|
64
|
+
* Two conditions, and BOTH have to hold:
|
|
65
|
+
*
|
|
66
|
+
* 1. **`mValue3` is passed explicitly as 0.** The level-1 form of this envelope writes `mValue3:0`
|
|
67
|
+
* itself, while the level-2 form defaults it to the sub-command — so a command that passes 0 sends
|
|
68
|
+
* byte-identical JSON either way and `"auto"` only changes the seal. A command that OMITS `mValue3`
|
|
69
|
+
* would send a DIFFERENT object at level 1 than the one captured at level 2; that is a new wire
|
|
70
|
+
* needing its own evidence, not a downgrade, and it stays pinned until something captures it.
|
|
71
|
+
* 2. **The device can be its own station.** A camera or doorbell may be standalone; a HomeBase, and an
|
|
72
|
+
* accessory whose session IS its HomeBase's, always holds a key. Where a key is structurally
|
|
73
|
+
* guaranteed, staying pinned is the honest behaviour: a keyless station there is an anomaly, and
|
|
74
|
+
* throwing says so where a silently-ignored level-1 frame would look like success.
|
|
56
75
|
*/
|
|
57
76
|
export declare function setPayload(cmd: number, payload: Record<string, unknown>, ctx: CommandContext, mValue3?: number, channel?: number, form?: ScalarForm): Command;
|
|
58
77
|
/**
|
|
@@ -2,27 +2,35 @@ import { type Surface } from "./members.js";
|
|
|
2
2
|
import type { CapabilityModule, CommandContext } from "./types.js";
|
|
3
3
|
import type { Command } from "../../core/contracts.js";
|
|
4
4
|
/**
|
|
5
|
-
* The guard modes `setMode` can SET —
|
|
6
|
-
*
|
|
7
|
-
* evidence. `ArmingMode` is both the const value-object (`ArmingMode.home`) and the union type of its
|
|
5
|
+
* The guard modes `setMode` can SET — every mode a station reports, all nine confirmed against real
|
|
6
|
+
* hardware. `ArmingMode` is both the const value-object (`ArmingMode.home`) and the union type of its
|
|
8
7
|
* values, so callers pass the named constant: `setMode(ArmingMode.home)`.
|
|
9
8
|
*
|
|
10
9
|
* The domain of `setMode` (cmd 1224) alone. The alarm-delay write (cmd 1255) carries its own mode integer
|
|
11
|
-
* on a separate wire and takes {@link AlarmDelayMode}
|
|
10
|
+
* on a separate wire and takes {@link AlarmDelayMode}, which stays NARROWER — evidence for one command is
|
|
11
|
+
* not evidence for the other, and 1255 still has no capture beyond its byte-captured three.
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* compile-time half of the refusal; `mode`'s published argument and the generated rejection are the
|
|
17
|
-
* runtime half.
|
|
13
|
+
* A mode belongs here only once its write is confirmed against real hardware, because a fire-and-forget
|
|
14
|
+
* wire makes a wrong mode look exactly like success; `ARMING_MODE_WIRE` carries the per-value evidence.
|
|
15
|
+
* The union is also what `ARMING_MODE_WIRE` is keyed by, so the table cannot name a mode this does not.
|
|
18
16
|
*/
|
|
19
17
|
export declare const ArmingMode: {
|
|
20
18
|
/** Armed — full protection, nobody home (wire value 0). */
|
|
21
19
|
readonly away: "away";
|
|
22
20
|
/** Armed for occupancy — reduced/perimeter protection while home (wire value 1). */
|
|
23
21
|
readonly home: "home";
|
|
22
|
+
/** Scheduled — the station follows the timetable configured in the app (wire value 2). */
|
|
23
|
+
readonly schedule: "schedule";
|
|
24
24
|
/** Custom 1 — a user-defined posture configured in the app (wire value 3). */
|
|
25
25
|
readonly custom1: "custom1";
|
|
26
|
+
/** Custom 2 — a user-defined posture configured in the app (wire value 4). */
|
|
27
|
+
readonly custom2: "custom2";
|
|
28
|
+
/** Custom 3 — a user-defined posture configured in the app (wire value 5). */
|
|
29
|
+
readonly custom3: "custom3";
|
|
30
|
+
/** Off — the station's alarm system is switched off entirely (wire value 6). */
|
|
31
|
+
readonly off: "off";
|
|
32
|
+
/** Geofenced — the station follows the app's location-based rules (wire value 47). */
|
|
33
|
+
readonly geo: "geo";
|
|
26
34
|
/** Disarmed — no alarms; sensors still report state (wire value 63). */
|
|
27
35
|
readonly disarmed: "disarmed";
|
|
28
36
|
};
|
|
@@ -60,10 +68,14 @@ export declare const ARMING_CMD: {
|
|
|
60
68
|
*
|
|
61
69
|
* ⚠️ Only 3 of the 9 modes were exercised in that capture — `mode_type` 0 (away), 63 (disarmed), 1
|
|
62
70
|
* (home), all confirmed byte-exact. Re-confirmed live 2026-08-05: each reported its own MODE_SWITCH push
|
|
63
|
-
* within ~5s of the write.
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* per-value
|
|
71
|
+
* within ~5s of the write. The remaining six are live confirmations rather than captures — `custom1` 3
|
|
72
|
+
* first, then `schedule` 2, `custom2` 4, `custom3` 5, `off` 6 and `geo` 47 — each sent as this exact
|
|
73
|
+
* frame and each observed to bring MODE_SWITCH back, so all nine are settable. `ARMING_MODE_WIRE` has
|
|
74
|
+
* the per-value evidence and the dates.
|
|
75
|
+
*
|
|
76
|
+
* The ENCRYPTION LEVEL is the session's to pick (`"auto"`), not this command's: the T8030 the envelope
|
|
77
|
+
* was captured on holds a level-2 key and seals it level-2, while an own-session camera that never
|
|
78
|
+
* negotiates one carries the same envelope level-1. See `armingCommand`.
|
|
67
79
|
*/
|
|
68
80
|
readonly SET_ARMING: 1224;
|
|
69
81
|
/**
|
|
@@ -164,11 +176,10 @@ export type ArmingActions = Surface<typeof ARMING_MEMBERS>;
|
|
|
164
176
|
*/
|
|
165
177
|
export declare const ARMING_MEMBERS: {
|
|
166
178
|
/**
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
* declaration.
|
|
179
|
+
* Read and write are the same nine modes, so `enumValues` is the whole domain: `writeDomain` falls back
|
|
180
|
+
* to it, and the derived setter, the refusal message and the offered argument all read from that one
|
|
181
|
+
* declaration. A member states an `args` entry only where the two sides DIFFER. See
|
|
182
|
+
* {@link ARMING_MODE_WIRE} for the per-value evidence.
|
|
172
183
|
*
|
|
173
184
|
* `armingCommand` may also throw synchronously (missing account identity) and `bindMembers` turns that
|
|
174
185
|
* into a rejection, so the builder stays plain.
|
|
@@ -188,11 +199,6 @@ export declare const ARMING_MEMBERS: {
|
|
|
188
199
|
readonly kind: "enum";
|
|
189
200
|
readonly enumValues: Record<number, string>;
|
|
190
201
|
readonly provenance: "verified";
|
|
191
|
-
readonly args: readonly [{
|
|
192
|
-
readonly name: "mode";
|
|
193
|
-
readonly kind: "enum";
|
|
194
|
-
readonly values: readonly number[];
|
|
195
|
-
}];
|
|
196
202
|
readonly description: string;
|
|
197
203
|
readonly observation: {
|
|
198
204
|
readonly event: "armingModeChanged";
|
|
@@ -221,9 +227,9 @@ export declare const ARMING_MEMBERS: {
|
|
|
221
227
|
readonly setAlarmDelayConfig: import("./members.js").MethodMember<(mode: AlarmDelayMode, config: AlarmDelayConfig) => Promise<void>>;
|
|
222
228
|
};
|
|
223
229
|
/**
|
|
224
|
-
* `arming` — guard/arming mode. `armingMode` (see {@link ARMING_CMD.SET_ARMING}) has a verified
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
*
|
|
230
|
+
* `arming` — guard/arming mode. `armingMode` (see {@link ARMING_CMD.SET_ARMING}) has a verified read/write
|
|
231
|
+
* MECHANISM, and all 9 modes it reports are now confirmed as writes — the {@link ArmingMode} union is the
|
|
232
|
+
* whole set. See `ARMING_MODE_WIRE` for which three are byte-captured and which six are live-confirmed.
|
|
233
|
+
* The alarm-delay write (cmd 1255) is unaffected and keeps its narrower {@link AlarmDelayMode}.
|
|
228
234
|
*/
|
|
229
235
|
export declare const ARMING: CapabilityModule;
|
|
@@ -90,8 +90,33 @@ export type BatteryActions = Surface<typeof BATTERY_MEMBERS>;
|
|
|
90
90
|
* The richer raw `APP_CMD_SET_POWER_SOURCE` blob is a separate param, surfaced as `powerSourceInfo`.
|
|
91
91
|
*/
|
|
92
92
|
declare function decodePowerSource(raw: string | number | boolean): number | string;
|
|
93
|
-
/**
|
|
94
|
-
|
|
93
|
+
/**
|
|
94
|
+
* The params whose subject IS the physical cell — so every member reading one must carry
|
|
95
|
+
* {@link notMainsCamera}.
|
|
96
|
+
*
|
|
97
|
+
* The ONE place that fact is declared. {@link cellGated} applies {@link notMainsCamera} from this list
|
|
98
|
+
* when the table is built, so a member never states the gate itself: adding a cell read is adding its
|
|
99
|
+
* param here, and there is no second place for it to be missing from. A per-member `available` was the
|
|
100
|
+
* alternative and is what the first two passes of this guard got wrong, in both directions — first by
|
|
101
|
+
* covering two of the seven, then by reading `unexposed` as covering a third.
|
|
102
|
+
*
|
|
103
|
+
* What is NOT here matters as much.
|
|
104
|
+
*
|
|
105
|
+
* - `workingMode` and the three `record*` settings describe how hard the camera works, not what powers
|
|
106
|
+
* it, and a mains camera genuinely has them. They are the reason the capability stays attached.
|
|
107
|
+
* - `cameraInfo` (1103) is a number whose meaning is unevidenced. Gating it would assert it is a
|
|
108
|
+
* battery fact, which is the kind of claim this guard exists to stop making.
|
|
109
|
+
* - `powerSource` (1293) is the open one. Both values it names — `Battery` and `External Solar Panel` —
|
|
110
|
+
* describe how a CELL is fed, so by this list's own rule it arguably belongs here. It is out because
|
|
111
|
+
* every param above is one a live mains camera was observed to publish and 1293 was not among them,
|
|
112
|
+
* and because it is `requires`-gated on its own param, so it appears only where the device reports
|
|
113
|
+
* it. Gating it would also withhold a described WRITE rather than a read, which is a different class
|
|
114
|
+
* of change. Unresolved rather than decided: see the note in the pull request.
|
|
115
|
+
*
|
|
116
|
+
* The two solar params ARE here: a panel exists to charge a cell, so a device without one has no solar
|
|
117
|
+
* harvest to report either.
|
|
118
|
+
*/
|
|
119
|
+
export declare const CELL_PARAMS: readonly number[];
|
|
95
120
|
/**
|
|
96
121
|
* Every `battery` feature, declared once — the property schema, the evidence-gated getters, the derived
|
|
97
122
|
* setters, the intent routes and the descriptions all come out of this table. Order is schema order.
|
|
@@ -117,7 +142,6 @@ export declare const BATTERY_MEMBERS: {
|
|
|
117
142
|
readonly unit: "%";
|
|
118
143
|
readonly kind: "percent";
|
|
119
144
|
readonly provenance: "verified";
|
|
120
|
-
readonly available: typeof notMainsCamera;
|
|
121
145
|
readonly description: "Battery level 0-100 (verified: param 1101).";
|
|
122
146
|
};
|
|
123
147
|
/**
|
|
@@ -130,7 +154,6 @@ export declare const BATTERY_MEMBERS: {
|
|
|
130
154
|
readonly type: "bool";
|
|
131
155
|
readonly kind: "boolean";
|
|
132
156
|
readonly provenance: "apk";
|
|
133
|
-
readonly available: typeof notMainsCamera;
|
|
134
157
|
readonly coerce: (v: string | number | boolean) => boolean;
|
|
135
158
|
readonly description: string;
|
|
136
159
|
};
|
|
@@ -300,6 +323,11 @@ export declare const BATTERY_MEMBERS: {
|
|
|
300
323
|
* Reported, so it stays in the schema and answers through `getProperty` — but given no typed getter:
|
|
301
324
|
* the payload's fields have never been decoded, and a getter would hand back an opaque blob typed as
|
|
302
325
|
* though it meant something.
|
|
326
|
+
*
|
|
327
|
+
* `unexposed` is NOT a substitute for the cell gate. It suppresses the fluent GETTER; `propertiesOf`
|
|
328
|
+
* filters `writeOnly` and `available` and deliberately not `unexposed`, because a schema entry
|
|
329
|
+
* reachable through `getProperty` is the whole point of the mark. So a cell param needs
|
|
330
|
+
* {@link CELL_PARAMS} either way, or a mains camera publishes "battery power history" and answers it.
|
|
303
331
|
*/
|
|
304
332
|
readonly batteryPowerStats: {
|
|
305
333
|
readonly param: 3100;
|
|
@@ -106,6 +106,10 @@ export declare const CONTACT_MEMBERS: {
|
|
|
106
106
|
* `1350` SET_PAYLOAD, `mChannel` = the device channel, `mValue3` 0, payload carrying the channel and a
|
|
107
107
|
* transaction stamp — the byte-shape of the app's own captured frame. Out of range is refused rather
|
|
108
108
|
* than clamped: the app's slider has no values outside it, so one is a caller error, not a nudge.
|
|
109
|
+
*
|
|
110
|
+
* Level-2 only, though the `mValue3` 0 would allow `"auto"`: an entry sensor's session IS its
|
|
111
|
+
* HomeBase's, which always holds a key — the second of `setPayload`'s two conditions, not an oversight
|
|
112
|
+
* of the first.
|
|
109
113
|
*/
|
|
110
114
|
readonly alarmVolume: {
|
|
111
115
|
readonly param: 1508;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { CapabilityModule } from "./types.js";
|
|
2
|
+
import { type Surface } from "./members.js";
|
|
3
|
+
/**
|
|
4
|
+
* `display` — a eufy Smart Display's charge.
|
|
5
|
+
*
|
|
6
|
+
* One typed read, and the smallness is the finding rather than a gap. The captured unit (a T87A0,
|
|
7
|
+
* 2026-09-04) connects over secure MQTT with no `p2p_did`, so it speaks no P2P at all, and it reported
|
|
8
|
+
* six params in an id range no other line uses. Only one of them tells a caller something it could not
|
|
9
|
+
* get another way:
|
|
10
|
+
*
|
|
11
|
+
* - 8005 and 8006 restate the model's retail name and code, which `info` already answers from the
|
|
12
|
+
* curated registry and the cloud record. Their evidence IS that agreement, so a getter beside `info`
|
|
13
|
+
* would offer a caller a second spelling of what it just read. They are named in the display param
|
|
14
|
+
* dictionary, which is what makes them readable off `getProperties()`.
|
|
15
|
+
* - 8003 is version-shaped and nothing confirms what it means, so it is `unexposed`: in the schema with
|
|
16
|
+
* its type and its `guessed` label, reachable through `getProperty`, no typed getter.
|
|
17
|
+
*
|
|
18
|
+
* Nothing is writable. No capture pins a write for any display param, and an AIoT write is
|
|
19
|
+
* fire-and-forget, so a wrong frame to a device that acknowledges nothing looks exactly like success. A
|
|
20
|
+
* screen, a volume, an assistant: the device plainly has all three and reports none of them in anything
|
|
21
|
+
* captured, which means the reads have to arrive before a control can be honest about what it moves.
|
|
22
|
+
*
|
|
23
|
+
* @module model/capabilities/display
|
|
24
|
+
*/
|
|
25
|
+
/** Smart Display param ids this capability reads. The rest of the range is named in the dictionary. */
|
|
26
|
+
export declare const DISPLAY_PARAM: {
|
|
27
|
+
readonly BATTERY: 8001;
|
|
28
|
+
readonly SOFTWARE_VERSION: 8003;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* The `display` reads. Read-only; see the module note for why there is no write.
|
|
32
|
+
*
|
|
33
|
+
* Exported but NOT published: the entries state their wire ids and what each claim rests on, which the
|
|
34
|
+
* reference site does not carry.
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
export declare const DISPLAY_MEMBERS: {
|
|
38
|
+
/**
|
|
39
|
+
* Battery level, 0-100.
|
|
40
|
+
*
|
|
41
|
+
* **On this capability rather than on `battery`, and that is the line partition doing its job.** The
|
|
42
|
+
* security-line `battery` capability reads param 1101 and a Smart Display's charge is 8001 in its own
|
|
43
|
+
* id space — two wires that happen to mean the same thing. One capability reading both would be a claim
|
|
44
|
+
* that the two ecosystems share a param space, so a consumer reads a display's charge through
|
|
45
|
+
* `dev.display()` and a camera's through `dev.battery()`.
|
|
46
|
+
*
|
|
47
|
+
* `verified` rather than `mega`: the id is in the device's cloud record, but the NAME came from the
|
|
48
|
+
* maintainer's own knowledge of the hardware rather than from the cloud data-point list, and `"100"`
|
|
49
|
+
* fits brightness, volume or charge equally.
|
|
50
|
+
*
|
|
51
|
+
* The scale is `percent` on the reading itself, not on convention alone: a full charge reads `255` on a
|
|
52
|
+
* 0-255 scale and `1000` on a 0-1000 one, so `"100"` on a charged unit is positive evidence for 0-100
|
|
53
|
+
* rather than merely consistent with it. What nobody has done is watch it MOVE, which is why a value
|
|
54
|
+
* frozen at 100 would not yet be distinguishable from a healthy one.
|
|
55
|
+
*/
|
|
56
|
+
readonly battery: {
|
|
57
|
+
readonly param: 8001;
|
|
58
|
+
readonly type: "number";
|
|
59
|
+
readonly unit: "%";
|
|
60
|
+
readonly kind: "percent";
|
|
61
|
+
readonly provenance: "verified";
|
|
62
|
+
readonly description: "Battery level, 0-100 (param 8001).";
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Version-shaped, and that shape is the whole of the evidence — hence `guessed`, and hence no typed
|
|
66
|
+
* getter: a caller reading this off a bound object cannot see the label.
|
|
67
|
+
*
|
|
68
|
+
* `unexposed` rather than absent, so the schema still carries its type and that label and
|
|
69
|
+
* `getProperty("softwareVersion")` still answers. `dev.info()?.firmwareVersion` is the field to trust
|
|
70
|
+
* where the cloud record carries one; on this display it does not, which is the only reason 8003 is
|
|
71
|
+
* named at all.
|
|
72
|
+
*/
|
|
73
|
+
readonly softwareVersion: {
|
|
74
|
+
readonly param: 8003;
|
|
75
|
+
readonly type: "string";
|
|
76
|
+
readonly kind: "text";
|
|
77
|
+
readonly provenance: "guessed";
|
|
78
|
+
readonly unexposed: true;
|
|
79
|
+
readonly description: "Version-shaped string (param 8003), meaning unconfirmed — prefer `info.firmwareVersion`.";
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
/** `display` — a eufy Smart Display (T87Ax). Read-only; no display write is captured. */
|
|
83
|
+
export declare const DISPLAY: CapabilityModule;
|
|
84
|
+
/** Bound Smart Display reads — the object returned by `dev.display()`. Read-only. */
|
|
85
|
+
export type DisplayActions = Surface<typeof DISPLAY_MEMBERS>;
|
|
@@ -14,8 +14,9 @@ export declare const DOORBELL_CMD: {
|
|
|
14
14
|
*/
|
|
15
15
|
readonly QUICK_RESPONSE: 1706;
|
|
16
16
|
/**
|
|
17
|
-
* Mechanical (wired) chime enable/disable — whether the doorbell drives an existing wired chime box
|
|
18
|
-
* (as opposed to / in addition to the
|
|
17
|
+
* Mechanical (wired) chime enable/disable — whether the doorbell drives an existing wired chime box,
|
|
18
|
+
* the app's "existing doorbell chime" (as opposed to / in addition to the HomeBase acting as the chime,
|
|
19
|
+
* param 1702 `chimeSwitch` above; toggling each switch alone wrote one parameter and named the pair). Same
|
|
19
20
|
* 136-byte direct-binary shape as `QUICK_RESPONSE`/camera on-off: `[u32 channel][u32 value][account_id
|
|
20
21
|
* ASCII, zero-padded to 128 bytes]`, outer P2P cmd = 1703 itself, signCode 8, on the device's own
|
|
21
22
|
* channel. Reversed from a live capture (outer-cmd 1703, signCode 8, captured on the doorbell's
|
|
@@ -24,6 +25,19 @@ export declare const DOORBELL_CMD: {
|
|
|
24
25
|
* App `APP_CMD_BAT_DOORBELL_MECHANICAL_CHIME_SWITCH`.
|
|
25
26
|
*/
|
|
26
27
|
readonly MECHANICAL_CHIME_SWITCH: 1703;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the HOMEBASE acts as the doorbell's chime — the app's "HomeBase as chime" switch, as opposed
|
|
30
|
+
* to the wired chime box {@link DOORBELL_CMD.MECHANICAL_CHIME_SWITCH} drives. The app constant reads
|
|
31
|
+
* `CHIME_SWITCH`, which is why this was long described as a separate plug-in chime; toggling that one
|
|
32
|
+
* switch alone on a T8210 behind a HomeBase wrote 1702 and nothing else, and the account has no
|
|
33
|
+
* plug-in chime at all. Same 136-byte direct-binary shape as
|
|
34
|
+
* that sibling: `[u32 channel][u32 value][account_id ASCII, zero-padded to 128 bytes]`, outer P2P cmd
|
|
35
|
+
* 1702 itself, signCode 8, on the device's own channel. Reversed from a live capture (outer-cmd 1702,
|
|
36
|
+
* signCode 8, on the doorbell's `device_channel` — 2 for that unit, NOT a wire constant, always use
|
|
37
|
+
* `ctx.channel`): turning OFF sent `value=0`, turning ON sent `value=1` — a plain boolean.
|
|
38
|
+
* App `APP_CMD_BAT_DOORBELL_CHIME_SWITCH`.
|
|
39
|
+
*/
|
|
40
|
+
readonly CHIME_SWITCH: 1702;
|
|
27
41
|
/**
|
|
28
42
|
* Wide Dynamic Range (WDR) image switch — a video/image tone-mapping setting that widens the
|
|
29
43
|
* exposure range in high-contrast scenes (bright sky behind a visitor, etc). SAME 136-byte
|
|
@@ -158,13 +172,10 @@ export declare function parseQuickResponses(voiceList: Array<{
|
|
|
158
172
|
/**
|
|
159
173
|
* Every `doorbell` feature, declared once.
|
|
160
174
|
*
|
|
161
|
-
*
|
|
175
|
+
* Two of the seven reads are read-ONLY here even though the device accepts a write, because the write
|
|
162
176
|
* does not belong to this capability or is not confirmed:
|
|
163
177
|
* - `ringtoneVolume` (1708) — the WRITE lives on `audio`, which owns every volume wire. 1708 leaks
|
|
164
178
|
* onto non-doorbell cameras, so `audio` gates its setter on the doorbell capability instead.
|
|
165
|
-
* - `chimeSwitch` (1702) — READ confirmed on a T8214, the WRITE wire never captured. Its 1703/1704
|
|
166
|
-
* siblings share the param range but that is NOT evidence of a shared frame, and a wrong guess on a
|
|
167
|
-
* fire-and-forget P2P write looks exactly like success.
|
|
168
179
|
* - `notificationMode` (1710) — a config JSON the device reports whole; no write is captured.
|
|
169
180
|
*
|
|
170
181
|
* Exported but NOT published: each entry states its wire id and the evidence it was confirmed on,
|
|
@@ -173,19 +184,18 @@ export declare function parseQuickResponses(voiceList: Array<{
|
|
|
173
184
|
*/
|
|
174
185
|
export declare const DOORBELL_MEMBERS: {
|
|
175
186
|
/**
|
|
176
|
-
* The
|
|
177
|
-
* `mechanicalChimeSwitch` drives. `
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
* Sharing the 1702-1719 range with its captured siblings is not evidence of a shared frame shape.
|
|
187
|
+
* The HOMEBASE as the doorbell's chime — the hub plays the ring, not the wired chime box
|
|
188
|
+
* `mechanicalChimeSwitch` drives. `provenance` is "verified" on our own decrypt of the app's frame,
|
|
189
|
+
* not merely the param id observed live: direct-binary `[ch][value][acct]`, 1=on/0=off, the same shape
|
|
190
|
+
* as its 1703 sibling — captured, not inferred from the shared param range.
|
|
181
191
|
*/
|
|
182
192
|
readonly chimeSwitch: {
|
|
183
193
|
readonly param: 1702;
|
|
184
194
|
readonly type: "bool";
|
|
185
195
|
readonly kind: "boolean";
|
|
186
|
-
readonly provenance: "
|
|
187
|
-
readonly unverified: true;
|
|
196
|
+
readonly provenance: "verified";
|
|
188
197
|
readonly description: string;
|
|
198
|
+
readonly write: (v: string | number | boolean, ctx: import("./types.js").CommandContext) => import("../../core/contracts.js").Command;
|
|
189
199
|
};
|
|
190
200
|
/**
|
|
191
201
|
* `provenance` is "verified" not "mega": the actual write wire is confirmed (
|
|
@@ -197,7 +207,7 @@ export declare const DOORBELL_MEMBERS: {
|
|
|
197
207
|
readonly type: "bool";
|
|
198
208
|
readonly kind: "boolean";
|
|
199
209
|
readonly provenance: "verified";
|
|
200
|
-
readonly description:
|
|
210
|
+
readonly description: string;
|
|
201
211
|
readonly write: (v: string | number | boolean, ctx: import("./types.js").CommandContext) => import("../../core/contracts.js").Command;
|
|
202
212
|
};
|
|
203
213
|
/** Same reasoning and the same capture session as {@link DOORBELL_MEMBERS.mechanicalChimeSwitch}. */
|
|
@@ -40,6 +40,7 @@ import type { KeypadActions } from "./keypad.js";
|
|
|
40
40
|
import type { RtspActions } from "./rtsp.js";
|
|
41
41
|
import type { VacuumCleanActions } from "./vacuum-clean.js";
|
|
42
42
|
import type { VacuumDockActions } from "./vacuum-dock.js";
|
|
43
|
+
import type { DisplayActions } from "./display.js";
|
|
43
44
|
import type { SuctionActions } from "./suction.js";
|
|
44
45
|
import type { LocateActions } from "./locate.js";
|
|
45
46
|
import type { DeviceInfo } from "./info.js";
|
|
@@ -53,6 +54,15 @@ export declare function getCapabilityModule(cap: Capability): CapabilityModule |
|
|
|
53
54
|
* @internal
|
|
54
55
|
*/
|
|
55
56
|
export declare const CAPABILITY_MODULES: Record<Capability, CapabilityModule>;
|
|
57
|
+
/**
|
|
58
|
+
* Every param these capabilities declare before any gate — the set a device's schema is a subset of.
|
|
59
|
+
*
|
|
60
|
+
* A param in here that a device's schema does NOT carry is one a gate withheld: the capability resolved,
|
|
61
|
+
* and its member decided the read does not describe this device — a cell reading on a mains model, a mode
|
|
62
|
+
* a family does not carry. Read-aliases count, since a member reads them under its own name.
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
65
|
+
export declare function claimedParams(caps: Capability[]): Set<number>;
|
|
56
66
|
/**
|
|
57
67
|
* Merge the property schemas of several capabilities into one flat, de-duplicated list.
|
|
58
68
|
*
|
|
@@ -74,10 +84,12 @@ export declare function mergeProperties(caps: Capability[], ctx?: AvailabilityCo
|
|
|
74
84
|
* - a `modelHints` regex matches the model/category/name haystack,
|
|
75
85
|
* - `codecs` includes `codec`,
|
|
76
86
|
* - `detect(rec, codec)` returns true.
|
|
77
|
-
*
|
|
87
|
+
*
|
|
88
|
+
* An absent `codec` belongs to no line, so only the line-agnostic capabilities can match — the truthful
|
|
89
|
+
* answer for a device outside the eufy families entirely. Never throws. Returns a de-duplicated array.
|
|
78
90
|
* @internal
|
|
79
91
|
*/
|
|
80
|
-
export declare function detectCapabilities(rec: CloudRecord, codec
|
|
92
|
+
export declare function detectCapabilities(rec: CloudRecord, codec?: Codec): Capability[];
|
|
81
93
|
/**
|
|
82
94
|
* The baseline capabilities a codec grants every device of that family — derived from the modules
|
|
83
95
|
* that declare the codec in their {@link import("./types").DetectionSpec} `codecs`. Each capability
|
|
@@ -411,6 +423,8 @@ export interface DeviceActionMap {
|
|
|
411
423
|
suction: SuctionActions;
|
|
412
424
|
/** RoboVac locate (find-robot beep): `locating`; `locate(on?)`. */
|
|
413
425
|
locate: LocateActions;
|
|
426
|
+
/** Smart Display (read-only): `battery`. No display write is captured. */
|
|
427
|
+
display: DisplayActions;
|
|
414
428
|
/** Identity metadata (read-only): `{ manufacturer, model, serialNumber, name, deviceType?, firmwareVersion?, hardwareVersion? }`. */
|
|
415
429
|
info: DeviceInfo;
|
|
416
430
|
}
|
|
@@ -467,7 +481,7 @@ export declare function buildActions(caps: readonly Capability[], deps: MemberDe
|
|
|
467
481
|
* @internal
|
|
468
482
|
*/
|
|
469
483
|
export declare function describeCapabilities(bound: Partial<DeviceActionMap>, ctx?: AvailabilityContext): CapabilityDescriptor[];
|
|
470
|
-
export type { CommandContext, CapabilityActions, CapabilityStateReader, CapabilityModule, DetectionSpec, CapabilityFrame, CapabilityEvent, InboundSignal, EventMapping, ProductLine, ActionArgSpec, DecodedState, } from "./types.js";
|
|
484
|
+
export type { CommandContext, CapabilityActions, CapabilityStateReader, CapabilityModule, DetectionSpec, CapabilityFrame, CapabilityEvent, InboundSignal, EventClaim, EventMapping, ProductLine, ActionArgSpec, DecodedState, } from "./types.js";
|
|
471
485
|
/**
|
|
472
486
|
* The value-kind vocabulary a read is annotated with, re-exported from the barrel that publishes the
|
|
473
487
|
* read itself, so the union a member's `kind` is drawn from is reachable from the same import.
|
|
@@ -529,6 +543,7 @@ export { RTSP_MEMBERS } from "./rtsp.js";
|
|
|
529
543
|
export { SIREN_MEMBERS } from "./siren.js";
|
|
530
544
|
export { SMART_LIGHT_MEMBERS } from "./smart-light.js";
|
|
531
545
|
export { SMOKE_MEMBERS } from "./smoke.js";
|
|
546
|
+
export { DISPLAY_MEMBERS, type DisplayActions } from "./display.js";
|
|
532
547
|
export { SUCTION_MEMBERS } from "./suction.js";
|
|
533
548
|
export { VACUUM_CLEAN_MEMBERS } from "./vacuum-clean.js";
|
|
534
549
|
export type { DeviceInfo } from "./info.js";
|
|
@@ -550,7 +565,7 @@ export { HubAlarmTone, type HubAlarmToneValue } from "./siren.js";
|
|
|
550
565
|
* RoboVac activity and clean type are the declared returns of the public `dev.vacuumClean()` getters,
|
|
551
566
|
* so both unions are published.
|
|
552
567
|
*/
|
|
553
|
-
export type { VacuumActivity, VacuumCleanType, CarpetStrategy, CleanExtent } from "./vacuum-clean.js";
|
|
568
|
+
export type { VacuumActivity, VacuumCleanType, CarpetStrategy, CleanExtent, VacuumRoomTarget, VacuumZoneTarget, } from "./vacuum-clean.js";
|
|
554
569
|
/** The lists those unions are taken from — published because each union names its own. */
|
|
555
570
|
export { VACUUM_ACTIVITIES, VACUUM_CLEAN_TYPES, CARPET_STRATEGIES, CLEAN_EXTENTS, MOP_LEVELS } from "./vacuum-clean.js";
|
|
556
571
|
export { SuctionLevel, suctionLevelName, type SuctionLevelValue } from "./suction.js";
|
|
@@ -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,
|
|
70
|
-
*
|
|
71
|
-
*
|
|
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:
|
|
74
|
+
readonly param: 6000;
|
|
77
75
|
readonly type: "bool";
|
|
78
76
|
readonly kind: "boolean";
|
|
79
|
-
readonly provenance: "
|
|
77
|
+
readonly provenance: "verified";
|
|
80
78
|
readonly writtenElsewhere: true;
|
|
81
|
-
readonly
|
|
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
|
|
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`
|
|
239
|
-
*
|
|
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 {};
|
|
@@ -199,8 +199,12 @@ export declare function savePresetCommand(id: number, ctx: CommandContext): [Com
|
|
|
199
199
|
*
|
|
200
200
|
* 6242 sets the default to the preset the camera is **currently parked on**. To move the default, park
|
|
201
201
|
* the camera on `presetId` first — `preview(presetId)`, let the pan finish, then `setDefault(presetId)`.
|
|
202
|
-
* Sent while the camera is elsewhere, it has no effect.
|
|
203
|
-
*
|
|
202
|
+
* Sent while the camera is elsewhere, it has no effect.
|
|
203
|
+
*
|
|
204
|
+
* Level-2 only, unlike `zoom` beside it: this frame carries the envelope's DEFAULT `mValue3` (the
|
|
205
|
+
* sub-command), which the level-1 form cannot express — it writes 0. Downgrading it would send an
|
|
206
|
+
* object nothing has captured, so it stays pinned and is unreachable on a keyless standalone camera
|
|
207
|
+
* until one is. See `setPayload`'s two conditions.
|
|
204
208
|
*/
|
|
205
209
|
export declare function setDefaultPositionCommand(presetId: number, ctx: CommandContext): Command;
|
|
206
210
|
/**
|