homebridge-roborock-vacuum 0.1.2 → 0.1.3
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/config.schema.json +1 -0
- package/package.json +1 -1
- package/roborockLib/roborockAPI.js +0 -30
package/config.schema.json
CHANGED
package/package.json
CHANGED
|
@@ -443,8 +443,6 @@ class Roborock {
|
|
|
443
443
|
|
|
444
444
|
await this.vacuums[duid].getCleanSummary(duid);
|
|
445
445
|
|
|
446
|
-
// get map once at start of adapter
|
|
447
|
-
await this.vacuums[duid].getMap(duid);
|
|
448
446
|
}
|
|
449
447
|
}
|
|
450
448
|
|
|
@@ -522,28 +520,6 @@ class Roborock {
|
|
|
522
520
|
}
|
|
523
521
|
}
|
|
524
522
|
|
|
525
|
-
async startMapUpdater(duid) {
|
|
526
|
-
if (!this.vacuums[duid].mapUpdater) {
|
|
527
|
-
this.log.debug(`Started map updater on robot: ${duid}`);
|
|
528
|
-
this.vacuums[duid].mapUpdater = this.setInterval(() => {
|
|
529
|
-
this.vacuums[duid].getMap(duid);
|
|
530
|
-
}, this.config.map_creation_interval * 1000);
|
|
531
|
-
} else {
|
|
532
|
-
this.log.debug(`Map updater on robot: ${duid} already running!`);
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
async stopMapUpdater(duid) {
|
|
537
|
-
this.log.debug(`Stopping map updater on robot: ${duid}`);
|
|
538
|
-
|
|
539
|
-
if (this.vacuums[duid].mapUpdater) {
|
|
540
|
-
this.clearInterval(this.vacuums[duid].mapUpdater);
|
|
541
|
-
this.vacuums[duid].mapUpdater = null;
|
|
542
|
-
|
|
543
|
-
await this.vacuums[duid].getCleanSummary(duid);
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
|
|
547
523
|
getProductAttribute(duid, attribute) {
|
|
548
524
|
const products = this.products;
|
|
549
525
|
const productID = this.devices.find((device) => device.duid == duid).productId;
|
|
@@ -642,7 +618,6 @@ class Roborock {
|
|
|
642
618
|
if (!onlineState && this.vacuums[duid].mainUpdateInterval) {
|
|
643
619
|
this.clearInterval(this.vacuums[duid].getStatusIntervall);
|
|
644
620
|
this.clearInterval(this.vacuums[duid].mainUpdateInterval);
|
|
645
|
-
this.clearInterval(this.vacuums[duid].mapUpdater);
|
|
646
621
|
} else if (!this.vacuums[duid].mainUpdateInterval) {
|
|
647
622
|
this.vacuums[duid].getStatusIntervall();
|
|
648
623
|
this.startMainUpdateInterval(duid, onlineState);
|
|
@@ -722,7 +697,6 @@ class Roborock {
|
|
|
722
697
|
for (const duid in this.vacuums) {
|
|
723
698
|
this.clearInterval(this.vacuums[duid].getStatusIntervall);
|
|
724
699
|
this.clearInterval(this.vacuums[duid].mainUpdateInterval);
|
|
725
|
-
this.clearInterval(this.vacuums[duid].mapUpdater);
|
|
726
700
|
}
|
|
727
701
|
|
|
728
702
|
this.messageQueue.forEach(({ timeout102, timeout301 }) => {
|
|
@@ -1110,10 +1084,6 @@ class Roborock {
|
|
|
1110
1084
|
this.vacuums[duid].command(duid, command, parameters);
|
|
1111
1085
|
break;
|
|
1112
1086
|
|
|
1113
|
-
case "getMap":
|
|
1114
|
-
this.vacuums[duid].getMap(duid);
|
|
1115
|
-
break;
|
|
1116
|
-
|
|
1117
1087
|
case "get_photo":
|
|
1118
1088
|
this.vacuums[duid].getParameter(duid, "get_photo", parameters);
|
|
1119
1089
|
break;
|