@mega-yfue/eufy-sdk 0.5.0-beta.86 → 0.5.0-beta.88
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.
|
@@ -122,6 +122,11 @@ export declare function cameraPowerTier(model: string | undefined, capabilities:
|
|
|
122
122
|
* harvest to report either.
|
|
123
123
|
*/
|
|
124
124
|
export declare const CELL_PARAMS: readonly number[];
|
|
125
|
+
/**
|
|
126
|
+
* The app's charger-state decode: `charging = value ∉ {0,2}`. The app applies this one rule both to a
|
|
127
|
+
* camera's `BATTERY_STATUS` (2111) and to a keypad's `APP_CMD_KEYPAD_BATTERY_CHARGER_STATE` (1655).
|
|
128
|
+
*/
|
|
129
|
+
export declare function isChargingState(v: string | number | boolean): boolean;
|
|
125
130
|
/**
|
|
126
131
|
* Every `battery` feature, declared once — the property schema, the evidence-gated getters, the derived
|
|
127
132
|
* setters, the intent routes and the descriptions all come out of this table. Order is schema order.
|
|
@@ -159,7 +164,7 @@ export declare const BATTERY_MEMBERS: {
|
|
|
159
164
|
readonly type: "bool";
|
|
160
165
|
readonly kind: "boolean";
|
|
161
166
|
readonly provenance: "apk";
|
|
162
|
-
readonly coerce:
|
|
167
|
+
readonly coerce: typeof isChargingState;
|
|
163
168
|
readonly description: string;
|
|
164
169
|
};
|
|
165
170
|
/**
|
|
@@ -418,7 +418,7 @@ export interface DeviceActionMap {
|
|
|
418
418
|
smoke: SmokeActions;
|
|
419
419
|
/** CO-detector reads (read-only): `coDetected`, `lastSeen`. */
|
|
420
420
|
co: CoActions;
|
|
421
|
-
/** Security-keypad reads (read-only): `rssi`. */
|
|
421
|
+
/** Security-keypad reads (read-only): `charging`, `rssi`. */
|
|
422
422
|
keypad: KeypadActions;
|
|
423
423
|
/** RTSP publish for a NAS/NVR: `publish`/`withdraw` + `published`, `requireAuth`/`allowAnonymous`, `recordingMode`/`setRecordingMode`. One camera at a time per station. */
|
|
424
424
|
rtsp: RtspActions;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
+
import { isChargingState } from "./battery.js";
|
|
1
2
|
import { type Surface } from "./members.js";
|
|
2
3
|
import type { CapabilityModule } from "./types.js";
|
|
3
4
|
/**
|
|
4
|
-
* Every `keypad` feature, declared once.
|
|
5
|
+
* Every `keypad` feature, declared once. `rssi` is a verified read and `charging` follows the app's own
|
|
6
|
+
* decode of the keypad's charger state.
|
|
5
7
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* live) whose low/charging semantics are not confirmed. They stay in the schema so a diagnosis can
|
|
9
|
-
* reach them through `getProperty`, with no typed getter asserting a meaning this SDK cannot back.
|
|
10
|
-
* A live probe of the fleet's T8960 confirms neither is reported at all today.
|
|
8
|
+
* `batteryLow` is `unexposed`: the app maps its param to the same low-battery field the entry and motion
|
|
9
|
+
* sensors feed, but its value decode is absent from the app's parser, so the polarity is not evidenced.
|
|
11
10
|
*
|
|
12
11
|
* Exported but NOT published: each entry states its wire id and the evidence it was confirmed on,
|
|
13
12
|
* which the reference site does not carry.
|
|
@@ -15,36 +14,34 @@ import type { CapabilityModule } from "./types.js";
|
|
|
15
14
|
*/
|
|
16
15
|
export declare const KEYPAD_MEMBERS: {
|
|
17
16
|
/**
|
|
18
|
-
* `
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
17
|
+
* `APP_CMD_KEYPAD_BATTERY_CAP_STATE` (1653). The app's sensor parser maps it to `sensor_is_low_power`,
|
|
18
|
+
* the field `APP_CMD_ENTRY_SENSOR_BAT_STATE` and `APP_CMD_MOTION_SENSOR_BAT_STATE` decode as a boolean,
|
|
19
|
+
* yet gives 1653 itself no decode case. `unexposed` until a device confirms which value means low; in
|
|
20
|
+
* the schema for `getProperty`, absent from the typed surface.
|
|
22
21
|
*/
|
|
23
22
|
readonly batteryLow: {
|
|
24
|
-
readonly param:
|
|
23
|
+
readonly param: 1653;
|
|
25
24
|
readonly type: "bool";
|
|
26
25
|
readonly kind: "boolean";
|
|
27
|
-
readonly provenance: "
|
|
26
|
+
readonly provenance: "apk";
|
|
28
27
|
readonly unexposed: true;
|
|
29
28
|
readonly description: string;
|
|
30
29
|
};
|
|
31
30
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* confirmed value space. In the schema for `getProperty`, absent from the typed surface.
|
|
31
|
+
* `APP_CMD_KEYPAD_BATTERY_CHARGER_STATE` (1655), decoded the way the app's sensor parser decodes it:
|
|
32
|
+
* `charging = value ∉ {0,2}` ({@link isChargingState}).
|
|
35
33
|
*/
|
|
36
34
|
readonly charging: {
|
|
37
|
-
readonly param:
|
|
35
|
+
readonly param: 1655;
|
|
38
36
|
readonly type: "bool";
|
|
39
37
|
readonly kind: "boolean";
|
|
40
|
-
readonly provenance: "
|
|
41
|
-
readonly
|
|
42
|
-
readonly description:
|
|
38
|
+
readonly provenance: "apk";
|
|
39
|
+
readonly coerce: typeof isChargingState;
|
|
40
|
+
readonly description: string;
|
|
43
41
|
};
|
|
44
42
|
/**
|
|
45
|
-
* The keypad's link quality in dBm
|
|
46
|
-
*
|
|
47
|
-
* normalised to a bar count.
|
|
43
|
+
* The keypad's link quality in dBm, on the same param 1141 the other sub-1G sensors report signal
|
|
44
|
+
* strength on. Reported as the device measures it: raw dBm, never normalised to a bar count.
|
|
48
45
|
*/
|
|
49
46
|
readonly rssi: {
|
|
50
47
|
readonly param: 1141;
|
|
@@ -57,5 +54,5 @@ export declare const KEYPAD_MEMBERS: {
|
|
|
57
54
|
};
|
|
58
55
|
/** Bound keypad reads — the object returned by `dev.keypad()`. Read-only. */
|
|
59
56
|
export type KeypadActions = Surface<typeof KEYPAD_MEMBERS>;
|
|
60
|
-
/** `keypad` — security keypad.
|
|
57
|
+
/** `keypad` — security keypad. Charging, battery-low and signal. */
|
|
61
58
|
export declare const KEYPAD: CapabilityModule;
|
|
@@ -32,6 +32,11 @@ export declare class PushClient extends EventEmitter {
|
|
|
32
32
|
private closing;
|
|
33
33
|
/** Consecutive MCS login rejections — transient ones self-heal via reconnect (see {@link onMessage}). */
|
|
34
34
|
private loginFailures;
|
|
35
|
+
/**
|
|
36
|
+
* How many of {@link persistentIds} the last `LoginRequest` reported; a successful `LoginResponse`
|
|
37
|
+
* acknowledges them, so they are dropped then.
|
|
38
|
+
*/
|
|
39
|
+
private reportedIds;
|
|
35
40
|
constructor(creds: FcmCredentials, logger?: Logger);
|
|
36
41
|
/** Persistent ids already seen (set this from storage to avoid re-delivery). */
|
|
37
42
|
setPersistentIds(ids: string[]): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mega-yfue/eufy-sdk",
|
|
3
|
-
"version": "0.5.0-beta.
|
|
3
|
+
"version": "0.5.0-beta.88",
|
|
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",
|