homebridge-roborock-vacuum 1.0.5 → 1.0.6
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/README.md +24 -0
- package/package.json +1 -1
- package/roborockLib/data/UserData +1 -1
- package/roborockLib/lib/deviceFeatures.js +101 -5
- package/roborockLib/test.js +2 -0
package/README.md
CHANGED
|
@@ -15,6 +15,30 @@ This plugin is inspired by and adapted from the [ioBroker.roborock](https://gith
|
|
|
15
15
|
- **Automatic Device Detection**: No need to manually find or enter your vacuum's device ID.
|
|
16
16
|
- **Start/Stop Cleaning**: Begin or end cleaning sessions.
|
|
17
17
|
|
|
18
|
+
## The supported robots are:
|
|
19
|
+
|
|
20
|
+
Roborock S4
|
|
21
|
+
Roborock S4 Max
|
|
22
|
+
Roborock S5 Max
|
|
23
|
+
Roborock S6
|
|
24
|
+
Roborock S6 Pure
|
|
25
|
+
Roborock S6 MaxV
|
|
26
|
+
Roborock S7
|
|
27
|
+
Roborock S7 MaxV (Ultra)
|
|
28
|
+
Roborock Q7
|
|
29
|
+
Roborock Q7 Max
|
|
30
|
+
Roborock S7 Pro Ultra
|
|
31
|
+
Roborock S7 Max Ultra
|
|
32
|
+
Roborock S8
|
|
33
|
+
Roborock S8 Pro Ultra
|
|
34
|
+
Roborock Q Revo
|
|
35
|
+
Roborock Q8 Max
|
|
36
|
+
Roborock Q5 Pro
|
|
37
|
+
Roborock Q Revo Pro
|
|
38
|
+
Roborock Qrevo S
|
|
39
|
+
Roborock Qrevo Curve
|
|
40
|
+
|
|
41
|
+
|
|
18
42
|
## Requirements
|
|
19
43
|
|
|
20
44
|
Before installing, ensure you have:
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"val": "{\"uid\":1466357,\"tokentype\":\"\",\"token\":\"d8fe0bd712334ee585bc2145140f07d1-1JZxT5AINkUhb5JDyL8S+w==\",\"rruid\":\"rr6238c899155830\",\"region\":\"us\",\"countrycode\":\"886\",\"country\":\"TW\",\"nickname\":\"tasict\",\"rriot\":{\"u\":\"1RQsQJ2o8bxMCo6F45pICu\",\"s\":\"
|
|
2
|
+
"val": "{\"uid\":1466357,\"tokentype\":\"\",\"token\":\"d8fe0bd712334ee585bc2145140f07d1-1JZxT5AINkUhb5JDyL8S+w==\",\"rruid\":\"rr6238c899155830\",\"region\":\"us\",\"countrycode\":\"886\",\"country\":\"TW\",\"nickname\":\"tasict\",\"rriot\":{\"u\":\"1RQsQJ2o8bxMCo6F45pICu\",\"s\":\"6Eal6s\",\"h\":\"Sqe4jIyU54\",\"k\":\"2g5hPu4v\",\"r\":{\"r\":\"US\",\"a\":\"https://api-us.roborock.com\",\"m\":\"ssl://mqtt-us.roborock.com:8883\",\"l\":\"https://wood-us.roborock.com\"}},\"tuyaDeviceState\":0,\"avatarurl\":\"https://files.roborock.com/iottest/default_avatar.png\"}",
|
|
3
3
|
"ack": true
|
|
4
4
|
}
|
|
@@ -590,16 +590,18 @@ class deviceFeatures {
|
|
|
590
590
|
"roborock.vacuum.a87", // Qrevo MaxV
|
|
591
591
|
"roborock.vacuum.a101", // Q Revo Pro
|
|
592
592
|
"roborock.vacuum.a97", // S8 MaxV (Ultra)
|
|
593
|
+
"roborock.vacuum.a104", // Roborock Qrevo S
|
|
594
|
+
"roborock.vacuum.a135", // Qrevo Curv
|
|
595
|
+
"roborock.vacuum.a117", // Qrevo Master
|
|
596
|
+
"roborock.vacuum.a21", // Qrevo Slim
|
|
593
597
|
].includes(robotModel),
|
|
594
598
|
// isShakeMopStrengthSupported: p.DMM.currentProduct == p.Products.TanosS || p.DMM.currentProduct == p.Products.TanosSPlus || p.DMM.isGarnet || p.DMM.isTopazSV || p.DMM.isPearlPlus || p.DMM.isCoral || p.DMM.isTopazS || p.DMM.isTopazSPlus || p.DMM.isTopazSC || p.DMM.isTopazSV || p.DMM.isPearlPlus || p.DMM.isTanosSMax || p.DMM.isUltron || p.DMM.isUltronSPlus || p.DMM.isUltronSMop || p.DMM.isUltronSV || p.DMM.isPearl
|
|
595
599
|
isShakeMopStrengthSupported: [
|
|
596
600
|
"roborock.vacuum.a08", // S6 Pure
|
|
597
601
|
"roborock.vacuum.a10", // S6 MaxV
|
|
598
|
-
"roborock.vacuum.s6", // S6
|
|
599
602
|
"roborock.vacuum.a62", // S7 Pro Ultra
|
|
600
603
|
"roborock.vacuum.a51", // S8
|
|
601
604
|
"roborock.vacuum.a15", // S7
|
|
602
|
-
"roborock.vacuum.a72", // Q5 Pro
|
|
603
605
|
"roborock.vacuum.a27", // S7 MaxV (Ultra)
|
|
604
606
|
"roborock.vacuum.a19", // S4 Max
|
|
605
607
|
"roborock.vacuum.a40", // Q7
|
|
@@ -615,6 +617,7 @@ class deviceFeatures {
|
|
|
615
617
|
// isWaterBoxSupported: [p.Products.Tanos_CE, p.Products.Tanos_CN].hasElement(p.DMM.currentProduct)
|
|
616
618
|
isWaterBoxSupported: [
|
|
617
619
|
"roborock.vacuum.s5e", // S5 Max
|
|
620
|
+
"roborock.vacuum.s6", // S6
|
|
618
621
|
"roborock.vacuum.a08", // S6 Pure
|
|
619
622
|
"roborock.vacuum.a10", // S6 MaxV
|
|
620
623
|
"roborock.vacuum.a15", // S7
|
|
@@ -631,6 +634,10 @@ class deviceFeatures {
|
|
|
631
634
|
"roborock.vacuum.a87", // Qrevo MaxV
|
|
632
635
|
"roborock.vacuum.a101", // Q Revo Pro
|
|
633
636
|
"roborock.vacuum.a97", // S8 MaxV (Ultra)
|
|
637
|
+
"roborock.vacuum.a104", // Roborock Qrevo S
|
|
638
|
+
"roborock.vacuum.a135", // Qrevo Curv
|
|
639
|
+
"roborock.vacuum.a117", // Qrevo Master
|
|
640
|
+
"roborock.vacuum.a21", // Qrevo Slim
|
|
634
641
|
].includes(robotModel),
|
|
635
642
|
isCustomWaterBoxDistanceSupported: !!(2147483648 & this.features),
|
|
636
643
|
isBackChargeAutoWashSupported: this.featuresStr && !!(4096 & parseInt("0x" + this.featuresStr.slice(-8))),
|
|
@@ -638,7 +645,6 @@ class deviceFeatures {
|
|
|
638
645
|
"roborock.vacuum.a10", // S6 MaxV
|
|
639
646
|
"roborock.vacuum.a40", // Q7
|
|
640
647
|
"roborock.vacuum.s6", // S6
|
|
641
|
-
"roborock.vacuum.a72", // Q5 Pro
|
|
642
648
|
"roborock.vacuum.a73", // Q8 Max
|
|
643
649
|
"roborock.vacuum.a38", // Q7 Max
|
|
644
650
|
"roborock.vacuum.a51", // S8
|
|
@@ -651,6 +657,9 @@ class deviceFeatures {
|
|
|
651
657
|
"roborock.vacuum.a87", // Qrevo MaxV
|
|
652
658
|
"roborock.vacuum.a101", // Q Revo Pro
|
|
653
659
|
"roborock.vacuum.a97", // S8 MaxV (Ultra)
|
|
660
|
+
"roborock.vacuum.a104", // Roborock Qrevo S
|
|
661
|
+
"roborock.vacuum.a135", // Qrevo Curv
|
|
662
|
+
"roborock.vacuum.a117" // Qrevo Master
|
|
654
663
|
].includes(robotModel),
|
|
655
664
|
// this isn't the correct way to use this. This code must be from a different robot
|
|
656
665
|
// isVoiceControlSupported: !!(parseInt(`0x${this.featuresStr || "0"}`.slice(-10, -9)) & 2),
|
|
@@ -664,6 +673,9 @@ class deviceFeatures {
|
|
|
664
673
|
"roborock.vacuum.a27", // S7 MaxV (Ultra)
|
|
665
674
|
"roborock.vacuum.a97", // S8 MaxV (Ultra)
|
|
666
675
|
"roborock.vacuum.a87", // Qrevo MaxV
|
|
676
|
+
"roborock.vacuum.a135", // Qrevo Curv
|
|
677
|
+
"roborock.vacuum.a117", // Qrevo Master
|
|
678
|
+
"roborock.vacuum.a21", // Qrevo Slim
|
|
667
679
|
].includes(robotModel),
|
|
668
680
|
};
|
|
669
681
|
}
|
|
@@ -708,6 +720,7 @@ class deviceFeatures {
|
|
|
708
720
|
"set_charge_status",
|
|
709
721
|
"set_clean_percent",
|
|
710
722
|
"set_switch_status",
|
|
723
|
+
"set_cleaned_area"
|
|
711
724
|
],
|
|
712
725
|
// S7 Pro Ultra
|
|
713
726
|
"roborock.vacuum.a62": ["setCleaningRecordsString", "setConsumablesInt", "set_dss", "set_rss", "set_map_flag", "set_charge_status", "set_clean_percent"],
|
|
@@ -737,8 +750,8 @@ class deviceFeatures {
|
|
|
737
750
|
"set_back_type",
|
|
738
751
|
"set_charge_status",
|
|
739
752
|
"set_switch_status",
|
|
740
|
-
|
|
741
753
|
"set_clean_percent",
|
|
754
|
+
"set_custom_mode_max_plus",
|
|
742
755
|
],
|
|
743
756
|
// Q5 Pro
|
|
744
757
|
"roborock.vacuum.a72": [
|
|
@@ -751,6 +764,10 @@ class deviceFeatures {
|
|
|
751
764
|
"set_back_type",
|
|
752
765
|
"set_charge_status",
|
|
753
766
|
"set_clean_percent",
|
|
767
|
+
"set_cleaned_area",
|
|
768
|
+
"set_switch_status",
|
|
769
|
+
"set_common_status",
|
|
770
|
+
"set_in_warmup",
|
|
754
771
|
],
|
|
755
772
|
// Q8 Max
|
|
756
773
|
"roborock.vacuum.a73": [
|
|
@@ -764,6 +781,7 @@ class deviceFeatures {
|
|
|
764
781
|
"set_map_flag",
|
|
765
782
|
"set_charge_status",
|
|
766
783
|
"set_clean_percent",
|
|
784
|
+
"set_switch_status",
|
|
767
785
|
],
|
|
768
786
|
// Q Revo
|
|
769
787
|
"roborock.vacuum.a75": [
|
|
@@ -781,13 +799,14 @@ class deviceFeatures {
|
|
|
781
799
|
"set_clean_percent",
|
|
782
800
|
"set_rdt",
|
|
783
801
|
"set_switch_status",
|
|
802
|
+
"set_cleaned_area",
|
|
784
803
|
],
|
|
785
804
|
// S4
|
|
786
805
|
"roborock.vacuum.s4": ["setCleaningRecordsInt", "setConsumablesString"],
|
|
787
806
|
// S5 Max
|
|
788
807
|
"roborock.vacuum.s5e": ["setCleaningRecordsMixed", "setConsumablesInt"],
|
|
789
808
|
// S6
|
|
790
|
-
"roborock.vacuum.s6": ["setCleaningRecordsMixed", "
|
|
809
|
+
"roborock.vacuum.s6": ["setCleaningRecordsMixed", "setConsumablesString"],
|
|
791
810
|
// Qrevo MaxV
|
|
792
811
|
"roborock.vacuum.a87": [
|
|
793
812
|
"setCleaningRecordsString",
|
|
@@ -840,7 +859,83 @@ class deviceFeatures {
|
|
|
840
859
|
"set_in_warmup",
|
|
841
860
|
"set_map_flag",
|
|
842
861
|
"set_task_id",
|
|
862
|
+
"set_dss",
|
|
863
|
+
],
|
|
864
|
+
// Roborock Qrevo S
|
|
865
|
+
"roborock.vacuum.a104": [
|
|
866
|
+
"setCleaningRecordsString",
|
|
867
|
+
"setConsumablesInt",
|
|
868
|
+
"set_in_warmup",
|
|
869
|
+
"set_charge_status",
|
|
870
|
+
"set_clean_percent",
|
|
871
|
+
"set_rss",
|
|
872
|
+
"set_dss",
|
|
873
|
+
"set_common_status",
|
|
874
|
+
"set_kct",
|
|
875
|
+
"set_switch_status",
|
|
876
|
+
"set_map_flag",
|
|
877
|
+
"set_cleaned_area",
|
|
878
|
+
|
|
879
|
+
],
|
|
880
|
+
// Roborock Qrevo Curv
|
|
881
|
+
"roborock.vacuum.a135": [
|
|
882
|
+
"setCleaningRecordsString",
|
|
883
|
+
"setConsumablesInt",
|
|
884
|
+
"set_monitor_status",
|
|
885
|
+
"set_in_warmup",
|
|
886
|
+
"set_clean_percent",
|
|
887
|
+
"set_extra_time",
|
|
888
|
+
"set_rss",
|
|
889
|
+
"set_common_status",
|
|
890
|
+
"set_kct",
|
|
891
|
+
"set_switch_status",
|
|
892
|
+
"set_last_clean_t",
|
|
893
|
+
"set_cleaning_info",
|
|
894
|
+
"set_exit_dock",
|
|
895
|
+
"set_charge_status",
|
|
896
|
+
"set_map_flag",
|
|
897
|
+
"set_cleaned_area",
|
|
898
|
+
"set_task_id",
|
|
899
|
+
"set_dss",
|
|
900
|
+
],
|
|
901
|
+
// Roborock Qrevo Master
|
|
902
|
+
"roborock.vacuum.a117": [
|
|
903
|
+
"setCleaningRecordsString",
|
|
904
|
+
"setConsumablesInt",
|
|
905
|
+
"set_last_clean_t",
|
|
906
|
+
"set_switch_status",
|
|
907
|
+
"set_kct",
|
|
908
|
+
"set_common_status",
|
|
909
|
+
"set_dss",
|
|
910
|
+
"set_rss",
|
|
911
|
+
"set_clean_percent",
|
|
912
|
+
"set_charge_status",
|
|
913
|
+
"set_in_warmup",
|
|
914
|
+
"set_monitor_status",
|
|
915
|
+
"set_task_id",
|
|
916
|
+
"set_cleaned_area",
|
|
917
|
+
"set_map_flag",
|
|
843
918
|
],
|
|
919
|
+
// Roborock Qrevo Slim
|
|
920
|
+
"roborock.vacuum.a21": [
|
|
921
|
+
"setCleaningRecordsString",
|
|
922
|
+
"setConsumablesInt",
|
|
923
|
+
"set_map_flag",
|
|
924
|
+
"set_cleaned_area",
|
|
925
|
+
"set_replenish_mode",
|
|
926
|
+
"set_clean_times",
|
|
927
|
+
"set_task_id",
|
|
928
|
+
"set_monitor_status",
|
|
929
|
+
"set_in_warmup",
|
|
930
|
+
"set_charge_status",
|
|
931
|
+
"set_clean_percent",
|
|
932
|
+
"set_dss",
|
|
933
|
+
"set_rss",
|
|
934
|
+
"set_common_status",
|
|
935
|
+
"set_kct",
|
|
936
|
+
"set_switch_status",
|
|
937
|
+
"set_last_clean_t",
|
|
938
|
+
]
|
|
844
939
|
};
|
|
845
940
|
|
|
846
941
|
// process modelConfig
|
|
@@ -913,6 +1008,7 @@ class deviceFeatures {
|
|
|
913
1008
|
}
|
|
914
1009
|
}
|
|
915
1010
|
|
|
1011
|
+
|
|
916
1012
|
processDockType(dockType) {
|
|
917
1013
|
switch (dockType) {
|
|
918
1014
|
case 0: // Charging dock
|
package/roborockLib/test.js
CHANGED
|
@@ -16,6 +16,8 @@ const Roborock = require('./roborockAPI.js').Roborock;
|
|
|
16
16
|
var name = device.name;
|
|
17
17
|
var battery = roborock.getVacuumDeviceStatus(duid, "battery");
|
|
18
18
|
console.error("Name: " + name + " Battery: " + battery);
|
|
19
|
+
|
|
20
|
+
roborock.set_clean_repeat_times(duid, null);
|
|
19
21
|
|
|
20
22
|
|
|
21
23
|
//polling status every 10 seconds
|