@mega-yfue/eufy-sdk 0.6.0-beta.45 → 0.6.0-beta.46

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
@@ -5151,31 +5151,6 @@ var CONTACT_MEMBERS = {
5151
5151
  provenance: "verified",
5152
5152
  description: "Contact state, true=open (verified: param 1550 entry-sensor contact)."
5153
5153
  },
5154
- /**
5155
- * Unix seconds at which the sensor last checked in — the liveness read beside the contact state, and
5156
- * the way to tell a genuinely closed door from a sensor that stopped reporting. A `timestamp` kind
5157
- * takes no `unit`: it is an instant, not a duration.
5158
- */
5159
- lastSeen: {
5160
- param: 1551,
5161
- type: "number",
5162
- kind: "timestamp",
5163
- provenance: "verified",
5164
- description: "Last-seen unix timestamp, seconds (verified: param 1551)."
5165
- },
5166
- /**
5167
- * Link quality to whichever radio the sensor is paired over, in dBm as the device measures it. The
5168
- * same param 1141 the other sub-1G sensors report on, so the number is comparable across them —
5169
- * unlike a bars mapping, which this SDK never applies.
5170
- */
5171
- rssi: {
5172
- param: 1141,
5173
- type: "number",
5174
- unit: "dBm",
5175
- kind: "dbm",
5176
- provenance: "verified",
5177
- description: "Sub-1G/Wi-Fi signal strength (verified: param 1141 = RSSI)."
5178
- },
5179
5154
  /**
5180
5155
  * Rejected, not clamped, outside the tone enum: a fire-and-forget write of a bogus tone would look like
5181
5156
  * it worked. The wire is a direct-binary scalar `[ch][value][acct]` at signCode 8 — the app's own
@@ -5230,7 +5205,7 @@ var CONTACT_MEMBERS = {
5230
5205
  };
5231
5206
  var CONTACT = {
5232
5207
  capability: "contact",
5233
- description: "Entry (door/window) sensor: contact state, last-seen, and the built-in alarm tone/volume.",
5208
+ description: "Entry (door/window) sensor: contact state and the built-in alarm tone/volume.",
5234
5209
  members: CONTACT_MEMBERS,
5235
5210
  properties: propertiesOf(CONTACT_MEMBERS),
5236
5211
  /** A reported entry-sensor contact param (1550) is the verified proof of a contact sensor. */
@@ -7612,18 +7587,6 @@ var LEAK_MEMBERS = {
7612
7587
  kind: "boolean",
7613
7588
  provenance: "guessed",
7614
7589
  description: "Water-leak detected. UNVERIFIED: actually delivered as a push event, not a state param; placeholder id pending capture verification."
7615
- },
7616
- /**
7617
- * Unix seconds at which the sensor last checked in — param 1551, the same last-seen id the other
7618
- * sensor capabilities read. A `timestamp` kind takes no `unit`: the number is an instant, not a
7619
- * duration, and declaring `unit: "s"` beside it fails the value-kind spec.
7620
- */
7621
- lastSeen: {
7622
- param: 1551,
7623
- type: "number",
7624
- kind: "timestamp",
7625
- provenance: "verified",
7626
- description: "Last-seen unix timestamp, seconds (verified: param 1551)."
7627
7590
  }
7628
7591
  };
7629
7592
  var LEAK = {
@@ -7649,18 +7612,6 @@ var SMOKE_MEMBERS = {
7649
7612
  kind: "boolean",
7650
7613
  provenance: "guessed",
7651
7614
  description: "Smoke detected. UNVERIFIED: placeholder id pending capture verification."
7652
- },
7653
- /**
7654
- * Unix seconds at which the detector last checked in — param 1551, the same last-seen id the other
7655
- * sensor capabilities read. A `timestamp` kind takes no `unit`: the number is an instant, not a
7656
- * duration, and declaring `unit: "s"` beside it fails the value-kind spec.
7657
- */
7658
- lastSeen: {
7659
- param: 1551,
7660
- type: "number",
7661
- kind: "timestamp",
7662
- provenance: "verified",
7663
- description: "Last-seen unix timestamp, seconds (verified: param 1551)."
7664
7615
  }
7665
7616
  };
7666
7617
  var SMOKE = {
@@ -7686,11 +7637,23 @@ var CO_MEMBERS = {
7686
7637
  kind: "boolean",
7687
7638
  provenance: "guessed",
7688
7639
  description: "Carbon-monoxide detected. UNVERIFIED: placeholder id pending capture verification."
7689
- },
7640
+ }
7641
+ };
7642
+ var CO = {
7643
+ capability: "co",
7644
+ description: "Carbon-monoxide (CO) detector alarm state.",
7645
+ members: CO_MEMBERS,
7646
+ properties: propertiesOf(CO_MEMBERS),
7647
+ // CO detectors expose no stable state param; the model/name (co/carbon) is the signal.
7648
+ detection: { modelHints: [/co\b|carbon/i] }
7649
+ };
7650
+
7651
+ // dist/model/capabilities/link.js
7652
+ var LINK_MEMBERS = {
7690
7653
  /**
7691
- * Unix seconds at which the detector last checked in — param 1551, the same last-seen id the other
7692
- * sensor capabilities read. A `timestamp` kind takes no `unit`: the number is an instant, not a
7693
- * duration, and declaring `unit: "s"` beside it fails the value-kind spec.
7654
+ * Unix seconds at which the device last checked in, as the device itself reports it — beside
7655
+ * `deviceState(sn).lastSeenMs`, which the SDK derives from the cloud's own update times. A
7656
+ * `timestamp` takes no `unit`: it is an instant, not a duration.
7694
7657
  */
7695
7658
  lastSeen: {
7696
7659
  param: 1551,
@@ -7698,15 +7661,23 @@ var CO_MEMBERS = {
7698
7661
  kind: "timestamp",
7699
7662
  provenance: "verified",
7700
7663
  description: "Last-seen unix timestamp, seconds (verified: param 1551)."
7664
+ },
7665
+ /** Link quality in dBm as the device measures it, never normalised to a bar count. */
7666
+ rssi: {
7667
+ param: 1141,
7668
+ type: "number",
7669
+ unit: "dBm",
7670
+ kind: "dbm",
7671
+ provenance: "verified",
7672
+ description: "Sub-1G/Wi-Fi signal strength (verified: param 1141 = RSSI)."
7701
7673
  }
7702
7674
  };
7703
- var CO = {
7704
- capability: "co",
7705
- description: "Carbon-monoxide (CO) detector alarm state.",
7706
- members: CO_MEMBERS,
7707
- properties: propertiesOf(CO_MEMBERS),
7708
- // CO detectors expose no stable state param; the model/name (co/carbon) is the signal.
7709
- detection: { modelHints: [/co\b|carbon/i] }
7675
+ var LINK = {
7676
+ capability: "link",
7677
+ description: "Check-in timestamp and signal strength, as the device reports them.",
7678
+ members: LINK_MEMBERS,
7679
+ properties: propertiesOf(LINK_MEMBERS),
7680
+ detection: { evidenceParams: [1551, 1141] }
7710
7681
  };
7711
7682
 
7712
7683
  // dist/model/capabilities/lock.js
@@ -7822,18 +7793,6 @@ var LOCK_MEMBERS = {
7822
7793
  provenance: "verified",
7823
7794
  description: "Lock battery level 0-100 (verified: param 1101, alias 6001)."
7824
7795
  },
7825
- /**
7826
- * Link quality in dBm as the lock measures it, on the shared param 1141. On the `ff09` wire the
7827
- * actuations are fire-and-forget, so a weak link is silent rather than an error.
7828
- */
7829
- rssi: {
7830
- param: 1141,
7831
- type: "number",
7832
- unit: "dBm",
7833
- kind: "dbm",
7834
- provenance: "verified",
7835
- description: "Lock signal strength (verified: param 1141 = RSSI)."
7836
- },
7837
7796
  /**
7838
7797
  * Lock the deadbolt/door. Resolves after sending, without confirming physical state — except on the
7839
7798
  * classic Wi-Fi lock, which answers: there it rejects on a device refusal or no reply as well.
@@ -8053,18 +8012,6 @@ var KEYPAD_MEMBERS = {
8053
8012
  provenance: "apk",
8054
8013
  coerce: isChargingState,
8055
8014
  description: "Keypad charging \u2014 derived from APP_CMD_KEYPAD_BATTERY_CHARGER_STATE (1655) as `value \u2209 {0,2}`, matching the app's own decode."
8056
- },
8057
- /**
8058
- * The keypad's link quality in dBm, on the same param 1141 the other sub-1G sensors report signal
8059
- * strength on. Reported as the device measures it: raw dBm, never normalised to a bar count.
8060
- */
8061
- rssi: {
8062
- param: 1141,
8063
- type: "number",
8064
- unit: "dBm",
8065
- kind: "dbm",
8066
- provenance: "verified",
8067
- description: "Keypad signal strength (verified: param 1141 = RSSI)."
8068
8015
  }
8069
8016
  };
8070
8017
  var KEYPAD = {
@@ -11591,6 +11538,7 @@ var MODULES = [
11591
11538
  LOCATE,
11592
11539
  SMART_DROP,
11593
11540
  DISPLAY,
11541
+ LINK,
11594
11542
  INFO
11595
11543
  ];
11596
11544
  var BY_CAP = new Map(MODULES.map((m) => [m.capability, m]));
@@ -33722,6 +33670,7 @@ export {
33722
33670
  LEAK_MEMBERS,
33723
33671
  LIFE_PARAMS,
33724
33672
  LIGHT_MEMBERS,
33673
+ LINK_MEMBERS,
33725
33674
  LIVE_TRACE_MESSAGE,
33726
33675
  LOCATE_MEMBERS,
33727
33676
  LOCK_MEMBERS,