@mega-yfue/eufy-sdk 0.5.0-beta.64 → 0.5.0-beta.65
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/client/eufy-mega.d.ts +7 -2
- package/dist/index.js +14 -10
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
|
@@ -253,8 +253,8 @@ export declare class EufyMega extends EventEmitter {
|
|
|
253
253
|
*/
|
|
254
254
|
private mqttScopesInUse;
|
|
255
255
|
/**
|
|
256
|
-
* Read every Tuya clean-line device's DPs from the Tuya cloud and deliver them as realtime state
|
|
257
|
-
* failed read is reported, not fatal, and leaves that device's state as it was.
|
|
256
|
+
* Read every Tuya clean-line device's DPs from the Tuya cloud and deliver them as realtime state,
|
|
257
|
+
* concurrently. A failed read is reported, not fatal, and leaves that device's state as it was.
|
|
258
258
|
*/
|
|
259
259
|
private readTuyaDevices;
|
|
260
260
|
/**
|
|
@@ -619,6 +619,11 @@ export declare class EufyMega extends EventEmitter {
|
|
|
619
619
|
* an unchanged VALUE, which is no state change to report but is fresh proof the device is alive. A
|
|
620
620
|
* device absent from the previous pass is skipped — first sight is discovery, not a transition;
|
|
621
621
|
* {@link deviceState} answers an initial reading.
|
|
622
|
+
*
|
|
623
|
+
* Then re-reads every Tuya clean-line robot from the Tuya cloud ({@link readTuyaDevices}): its state
|
|
624
|
+
* is not in the cloud record this pass diffs and no live channel carries it, so the poll is where it
|
|
625
|
+
* stays fresh. That read runs after the `try`, not inside it, so a cloud error on the list diff does
|
|
626
|
+
* not skip it; it reports its own failures and never rejects.
|
|
622
627
|
*/
|
|
623
628
|
private pollOnce;
|
|
624
629
|
/**
|
package/dist/index.js
CHANGED
|
@@ -28472,16 +28472,14 @@ var EufyMega = class extends EventEmitter13 {
|
|
|
28472
28472
|
];
|
|
28473
28473
|
}
|
|
28474
28474
|
/**
|
|
28475
|
-
* Read every Tuya clean-line device's DPs from the Tuya cloud and deliver them as realtime state
|
|
28476
|
-
* failed read is reported, not fatal, and leaves that device's state as it was.
|
|
28475
|
+
* Read every Tuya clean-line device's DPs from the Tuya cloud and deliver them as realtime state,
|
|
28476
|
+
* concurrently. A failed read is reported, not fatal, and leaves that device's state as it was.
|
|
28477
28477
|
*/
|
|
28478
|
-
readTuyaDevices() {
|
|
28479
|
-
|
|
28480
|
-
|
|
28481
|
-
|
|
28482
|
-
|
|
28483
|
-
}).catch((e) => this.reportError(e));
|
|
28484
|
-
}
|
|
28478
|
+
async readTuyaDevices() {
|
|
28479
|
+
await Promise.all(this.getMqttDevices().filter(isTuyaVacuum).map((d) => this.tuya.fetchDps(d.sn).then((dps) => {
|
|
28480
|
+
if (dps)
|
|
28481
|
+
this.tuyaDpRouter.deliver(d.sn, dps);
|
|
28482
|
+
}).catch((e) => this.reportError(e))));
|
|
28485
28483
|
}
|
|
28486
28484
|
/**
|
|
28487
28485
|
* Emit a semantic capability event whose name is only known at runtime (`decodeCapabilityEvent`
|
|
@@ -29224,7 +29222,7 @@ var EufyMega = class extends EventEmitter13 {
|
|
|
29224
29222
|
await this.getDevices();
|
|
29225
29223
|
if (epoch !== this.realtimeEpoch)
|
|
29226
29224
|
return this.settleRealtimeGeneration(generation, "superseded");
|
|
29227
|
-
this.readTuyaDevices();
|
|
29225
|
+
void this.readTuyaDevices();
|
|
29228
29226
|
const scopes = this.mqttScopesInUse();
|
|
29229
29227
|
readiness.mqtt = createPlaneReadiness(scopes.length);
|
|
29230
29228
|
let push;
|
|
@@ -29358,6 +29356,11 @@ var EufyMega = class extends EventEmitter13 {
|
|
|
29358
29356
|
* an unchanged VALUE, which is no state change to report but is fresh proof the device is alive. A
|
|
29359
29357
|
* device absent from the previous pass is skipped — first sight is discovery, not a transition;
|
|
29360
29358
|
* {@link deviceState} answers an initial reading.
|
|
29359
|
+
*
|
|
29360
|
+
* Then re-reads every Tuya clean-line robot from the Tuya cloud ({@link readTuyaDevices}): its state
|
|
29361
|
+
* is not in the cloud record this pass diffs and no live channel carries it, so the poll is where it
|
|
29362
|
+
* stays fresh. That read runs after the `try`, not inside it, so a cloud error on the list diff does
|
|
29363
|
+
* not skip it; it reports its own failures and never rejects.
|
|
29361
29364
|
*/
|
|
29362
29365
|
async pollOnce() {
|
|
29363
29366
|
try {
|
|
@@ -29377,6 +29380,7 @@ var EufyMega = class extends EventEmitter13 {
|
|
|
29377
29380
|
} catch (e) {
|
|
29378
29381
|
this.reportError(e);
|
|
29379
29382
|
}
|
|
29383
|
+
await this.readTuyaDevices();
|
|
29380
29384
|
}
|
|
29381
29385
|
/**
|
|
29382
29386
|
* Land a poll pass's CHANGES on every live {@link Device} and announce what moved, BEFORE anything
|