eufy-security-client 3.8.0-dev.10 → 3.8.0-dev.11

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.
@@ -61,6 +61,7 @@ export declare class EufySecurity extends TypedEmitter<EufySecurityEvents> {
61
61
  private handleHubs;
62
62
  private refreshP2PData;
63
63
  private onStationConnect;
64
+ private onHubNotifyUpdate;
64
65
  private onStationConnectionError;
65
66
  private onStationClose;
66
67
  private handleDevices;
@@ -40,6 +40,7 @@ exports.EufySecurity = void 0;
40
40
  const tiny_typed_emitter_1 = require("tiny-typed-emitter");
41
41
  const fs_1 = require("fs");
42
42
  const path = __importStar(require("path"));
43
+ const util = __importStar(require("util"));
43
44
  const events_1 = __importDefault(require("events"));
44
45
  const api_1 = require("./http/api");
45
46
  const station_1 = require("./http/station");
@@ -558,6 +559,7 @@ class EufySecurity extends tiny_typed_emitter_1.TypedEmitter {
558
559
  station.on("sensor status", (station, channel, status) => this.onStationSensorStatus(station, channel, status));
559
560
  station.on("garage door status", (station, channel, doorId, status) => this.onStationGarageDoorStatus(station, channel, doorId, status));
560
561
  station.on("storage info hb3", (station, channel, storageInfo) => this.onStorageInfoHb3(station, channel, storageInfo));
562
+ station.on("hub notify update", (station) => this.onHubNotifyUpdate(station));
561
563
  this.addStation(station);
562
564
  station.initialize();
563
565
  }
@@ -617,6 +619,12 @@ class EufySecurity extends tiny_typed_emitter_1.TypedEmitter {
617
619
  this.refreshP2PData(station);
618
620
  }, this.P2P_REFRESH_INTERVAL_MIN * 60 * 1000);
619
621
  }
622
+ onHubNotifyUpdate(station) {
623
+ logging_1.rootMainLogger.info("Hub notify update received, refreshing cloud data", {
624
+ stationSN: station.getSerial(),
625
+ });
626
+ this.refreshCloudData();
627
+ }
620
628
  onStationConnectionError(station, error) {
621
629
  this.emit("station connection error", station, error);
622
630
  }
@@ -638,6 +646,7 @@ class EufySecurity extends tiny_typed_emitter_1.TypedEmitter {
638
646
  }
639
647
  handleDevices(devices) {
640
648
  logging_1.rootMainLogger.debug("Got devices", { devices: devices });
649
+ logging_1.rootMainLogger.debug("Got devices - extended logging", { devices: util.inspect(devices, { depth: null }) });
641
650
  const deviceSNs = Object.keys(this.devices);
642
651
  const newDeviceSNs = Object.keys(devices);
643
652
  const promises = [];