@mega-yfue/eufy-sdk 0.5.0-beta.87 → 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.
package/dist/index.js
CHANGED
|
@@ -4712,6 +4712,10 @@ function cellGated(members) {
|
|
|
4712
4712
|
});
|
|
4713
4713
|
return Object.fromEntries(gated);
|
|
4714
4714
|
}
|
|
4715
|
+
function isChargingState(v) {
|
|
4716
|
+
const n = Number(v);
|
|
4717
|
+
return n !== 0 && n !== 2;
|
|
4718
|
+
}
|
|
4715
4719
|
var BATTERY_MEMBERS = cellGated({
|
|
4716
4720
|
/**
|
|
4717
4721
|
* The headline percentage, and this capability's detection evidence: reporting 1101 is what proves a
|
|
@@ -4737,10 +4741,7 @@ var BATTERY_MEMBERS = cellGated({
|
|
|
4737
4741
|
type: "bool",
|
|
4738
4742
|
kind: "boolean",
|
|
4739
4743
|
provenance: "apk",
|
|
4740
|
-
coerce:
|
|
4741
|
-
const n = Number(v);
|
|
4742
|
-
return n !== 0 && n !== 2;
|
|
4743
|
-
},
|
|
4744
|
+
coerce: isChargingState,
|
|
4744
4745
|
description: "Charging in progress \u2014 derived from BATTERY_STATUS (2111) as `value \u2209 {0,2}`, matching the app's own decode. 0/2 = not charging; a solar/USB charge (incl. a built-in solar panel, which reads 4) is non-zero."
|
|
4745
4746
|
},
|
|
4746
4747
|
/**
|
|
@@ -7809,36 +7810,34 @@ var LOCK = {
|
|
|
7809
7810
|
// dist/model/capabilities/keypad.js
|
|
7810
7811
|
var KEYPAD_MEMBERS = {
|
|
7811
7812
|
/**
|
|
7812
|
-
* `
|
|
7813
|
-
*
|
|
7814
|
-
*
|
|
7815
|
-
*
|
|
7813
|
+
* `APP_CMD_KEYPAD_BATTERY_CAP_STATE` (1653). The app's sensor parser maps it to `sensor_is_low_power`,
|
|
7814
|
+
* the field `APP_CMD_ENTRY_SENSOR_BAT_STATE` and `APP_CMD_MOTION_SENSOR_BAT_STATE` decode as a boolean,
|
|
7815
|
+
* yet gives 1653 itself no decode case. `unexposed` until a device confirms which value means low; in
|
|
7816
|
+
* the schema for `getProperty`, absent from the typed surface.
|
|
7816
7817
|
*/
|
|
7817
7818
|
batteryLow: {
|
|
7818
|
-
param:
|
|
7819
|
+
param: 1653,
|
|
7819
7820
|
type: "bool",
|
|
7820
7821
|
kind: "boolean",
|
|
7821
|
-
provenance: "
|
|
7822
|
+
provenance: "apk",
|
|
7822
7823
|
unexposed: true,
|
|
7823
|
-
description: "Keypad low-battery flag. UNVERIFIED:
|
|
7824
|
+
description: "Keypad low-battery flag (APP_CMD_KEYPAD_BATTERY_CAP_STATE, 1653). UNVERIFIED polarity: the app names it its low-battery field but does not decode its value."
|
|
7824
7825
|
},
|
|
7825
7826
|
/**
|
|
7826
|
-
*
|
|
7827
|
-
*
|
|
7828
|
-
* confirmed value space. In the schema for `getProperty`, absent from the typed surface.
|
|
7827
|
+
* `APP_CMD_KEYPAD_BATTERY_CHARGER_STATE` (1655), decoded the way the app's sensor parser decodes it:
|
|
7828
|
+
* `charging = value ∉ {0,2}` ({@link isChargingState}).
|
|
7829
7829
|
*/
|
|
7830
7830
|
charging: {
|
|
7831
|
-
param:
|
|
7831
|
+
param: 1655,
|
|
7832
7832
|
type: "bool",
|
|
7833
7833
|
kind: "boolean",
|
|
7834
|
-
provenance: "
|
|
7835
|
-
|
|
7836
|
-
description: "Keypad charging
|
|
7834
|
+
provenance: "apk",
|
|
7835
|
+
coerce: isChargingState,
|
|
7836
|
+
description: "Keypad charging \u2014 derived from APP_CMD_KEYPAD_BATTERY_CHARGER_STATE (1655) as `value \u2209 {0,2}`, matching the app's own decode."
|
|
7837
7837
|
},
|
|
7838
7838
|
/**
|
|
7839
|
-
* The keypad's link quality in dBm
|
|
7840
|
-
*
|
|
7841
|
-
* normalised to a bar count.
|
|
7839
|
+
* The keypad's link quality in dBm, on the same param 1141 the other sub-1G sensors report signal
|
|
7840
|
+
* strength on. Reported as the device measures it: raw dBm, never normalised to a bar count.
|
|
7842
7841
|
*/
|
|
7843
7842
|
rssi: {
|
|
7844
7843
|
param: 1141,
|