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.
- package/build/eufysecurity.d.ts +1 -0
- package/build/eufysecurity.js +9 -0
- package/build/eufysecurity.js.map +1 -1
- package/build/http/device.js.map +1 -1
- package/build/http/interfaces.d.ts +1 -0
- package/build/http/station.d.ts +1 -0
- package/build/http/station.js +4 -0
- package/build/http/station.js.map +1 -1
- package/build/p2p/interfaces.d.ts +1 -0
- package/build/p2p/session.js +20 -2
- package/build/p2p/session.js.map +1 -1
- package/build/p2p/types.d.ts +1 -0
- package/build/p2p/types.js +1 -0
- package/build/p2p/types.js.map +1 -1
- package/coverage/clover.xml +6196 -6182
- package/coverage/coverage-final.json +6 -6
- package/coverage/lcov-report/index.html +27 -27
- package/coverage/lcov.info +11824 -11798
- package/package.json +1 -1
package/build/eufysecurity.d.ts
CHANGED
|
@@ -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;
|
package/build/eufysecurity.js
CHANGED
|
@@ -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 = [];
|