@mega-yfue/eufy-sdk 0.5.0-beta.61 → 0.5.0-beta.63

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
@@ -2635,6 +2635,7 @@ var SecureMqtt = class extends EventEmitter {
2635
2635
  async open() {
2636
2636
  const mqtt = await loadMqtt();
2637
2637
  const c = this.o.credentials;
2638
+ const scope = c.app_name ?? "default";
2638
2639
  const port = c.endpoint_port ?? 8883;
2639
2640
  const pinned = this.o.instanceIp;
2640
2641
  const reconnectPeriod = this.o.reconnectPeriod ?? 5e3;
@@ -2674,10 +2675,11 @@ var SecureMqtt = class extends EventEmitter {
2674
2675
  }
2675
2676
  this.emit("connect");
2676
2677
  });
2677
- client.on("connect", () => this.logger.info(`[smqtt] connected (${c.app_name ?? "default"})`));
2678
+ client.on("connect", () => this.logger.info(`[smqtt] connected (${scope})`));
2678
2679
  client.on("reconnect", () => this.logger.warn("[smqtt] reconnecting"));
2679
2680
  client.on("close", () => this.emit("disconnect", "close"));
2680
2681
  client.on("error", (err) => {
2682
+ this.logger.warn(`[smqtt] socket error (${scope}): ${err.message}`);
2681
2683
  this.emit("error", err);
2682
2684
  if (!settled) {
2683
2685
  settled = true;
@@ -11487,6 +11489,8 @@ var MODEL_REGISTRY = {
11487
11489
  // Sensors — the concrete sensor kind is curated (DeviceType 2 alone is ambiguous).
11488
11490
  T8900: { codec: "sensor", caps: ["contact"], name: "Entry Sensor" },
11489
11491
  T8910: { codec: "sensor", caps: ["battery"], name: "Motion Sensor" },
11492
+ // Smoke Alarm E10. `smoke` is curated: its model hint matches the name, not the T-code.
11493
+ T90S0: { codec: "sensor", caps: ["smoke"], name: "Smoke Alarm E10" },
11490
11494
  // Keypad (DeviceType 11).
11491
11495
  T8960: { codec: "keypad", name: "Keypad" },
11492
11496
  // Clean line — robot vacuums (Tuya-DP transport) + robot mowers (own `mower` codec, Tuya P2P).
@@ -26873,7 +26877,10 @@ var PushClient = class _PushClient extends EventEmitter12 {
26873
26877
  });
26874
26878
  socket.on("data", (d) => this.parser.handleData(d));
26875
26879
  socket.on("close", () => this.onClose());
26876
- socket.on("error", (e) => this.emit("error", e));
26880
+ socket.on("error", (e) => {
26881
+ this.logger.warn(`[push] socket error: ${e.message}`);
26882
+ this.emit("error", e);
26883
+ });
26877
26884
  }
26878
26885
  buildLoginRequest() {
26879
26886
  const LoginRequest = mcsRoot().lookupType("mcs_proto.LoginRequest");