@mega-yfue/eufy-sdk 0.2.0-beta.27 → 0.2.0-beta.28

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
@@ -27144,8 +27144,9 @@ var SolixClient = class _SolixClient {
27144
27144
  * Read the Solarbank's battery SOC-limit settings (`param_type "27"`) — a plain authenticated read.
27145
27145
  * Returns `undefined` when the site carries no SOC block (e.g. non-Solarbank hardware). The realtime
27146
27146
  * `dischargeLowerLimit` also arrives on the MQTT `b5` telemetry blob; this is the authoritative,
27147
- * app-synced source (and the only source for `chargeUpperLimit` / `backupReserve`). Verified live
27148
- * against a known AE103 setting (discharge 20 / charge 80).
27147
+ * app-synced source for `chargeUpperLimit`. `backupReserve` (with its enable switch) also has a second
27148
+ * source under the same name, the realtime MQTT `b5` frame; whether the two agree while the switch is
27149
+ * OFF is not yet verified. Verified live against a known AE103 setting (discharge 20 / charge 80).
27149
27150
  */
27150
27151
  async getSafetySocParams(siteId) {
27151
27152
  const p = await this.getSiteDeviceParam(siteId, _SolixClient.SOC_PARAM_TYPE);
@@ -27359,6 +27360,13 @@ function addSolarbankScalars(frame, out) {
27359
27360
  if (b5 && b5[0] === 4 && b5.length === 4) {
27360
27361
  out.dischargeLimit = b5[1];
27361
27362
  out.chargeLimit = b5[3];
27363
+ } else if (b5 && b5[0] === 4 && b5.length === 25) {
27364
+ out.backupReserve = b5[1];
27365
+ }
27366
+ const df = frame.fields.get(223);
27367
+ if (df && df[0] === 4 && df.length >= 7) {
27368
+ out.gridImportLimit = df.readUInt16LE(3);
27369
+ out.gridExportLimit = df.readUInt16LE(5);
27362
27370
  }
27363
27371
  }
27364
27372
  var SolixMqtt = class extends EventEmitter10 {