homebridge-roborock-vacuum 0.1.0

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.
Files changed (45) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/LICENSE +21 -0
  3. package/README.md +37 -0
  4. package/config.schema.json +31 -0
  5. package/dist/index.js +10 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/logger.js +39 -0
  8. package/dist/logger.js.map +1 -0
  9. package/dist/platform.js +167 -0
  10. package/dist/platform.js.map +1 -0
  11. package/dist/settings.js +8 -0
  12. package/dist/settings.js.map +1 -0
  13. package/dist/types.js +3 -0
  14. package/dist/types.js.map +1 -0
  15. package/dist/vacuum_accessory.js +152 -0
  16. package/dist/vacuum_accessory.js.map +1 -0
  17. package/package.json +66 -0
  18. package/roborockLib/data/UserData +4 -0
  19. package/roborockLib/data/clientID +4 -0
  20. package/roborockLib/i18n/de/translations.json +188 -0
  21. package/roborockLib/i18n/en/translations.json +208 -0
  22. package/roborockLib/i18n/es/translations.json +188 -0
  23. package/roborockLib/i18n/fr/translations.json +188 -0
  24. package/roborockLib/i18n/it/translations.json +188 -0
  25. package/roborockLib/i18n/nl/translations.json +188 -0
  26. package/roborockLib/i18n/pl/translations.json +188 -0
  27. package/roborockLib/i18n/pt/translations.json +188 -0
  28. package/roborockLib/i18n/ru/translations.json +188 -0
  29. package/roborockLib/i18n/uk/translations.json +188 -0
  30. package/roborockLib/i18n/zh-cn/translations.json +188 -0
  31. package/roborockLib/lib/RRMapParser.js +447 -0
  32. package/roborockLib/lib/deviceFeatures.js +995 -0
  33. package/roborockLib/lib/localConnector.js +249 -0
  34. package/roborockLib/lib/map/map.html +110 -0
  35. package/roborockLib/lib/map/zones.js +713 -0
  36. package/roborockLib/lib/mapCreator.js +692 -0
  37. package/roborockLib/lib/message.js +223 -0
  38. package/roborockLib/lib/messageQueueHandler.js +87 -0
  39. package/roborockLib/lib/roborockPackageHelper.js +116 -0
  40. package/roborockLib/lib/roborock_mqtt_connector.js +349 -0
  41. package/roborockLib/lib/sniffing/mitmproxy_roborock.py +300 -0
  42. package/roborockLib/lib/vacuum.js +636 -0
  43. package/roborockLib/roborockAPI.js +1365 -0
  44. package/roborockLib/test.js +31 -0
  45. package/roborockLib/userdata.json +24 -0
@@ -0,0 +1,31 @@
1
+ const Roborock = require('./roborockAPI.js').Roborock;
2
+
3
+ var roborock = new Roborock({username: "tasict@gmail.com", password: "tasict690629", debug: true});
4
+
5
+ roborock.setDeviceNotify(function(id, homeData){
6
+ console.info(`${id} deviceNotify:${JSON.stringify(homeData)}`);
7
+ });
8
+
9
+ roborock.startService(function(){
10
+
11
+ if(roborock.isInited()){
12
+
13
+
14
+ roborock.getVacuumList().forEach(function(device){
15
+ var duid = device.duid;
16
+ var name = device.name;
17
+ var battery = roborock.getVacuumDeviceStatus(duid, "battery");
18
+ console.error("Name: " + name + " Battery: " + battery);
19
+
20
+
21
+ //polling status every 10 seconds
22
+ setInterval(function(){
23
+ roborock.getStatus(duid);
24
+ console.info("polling status every 10 seconds");
25
+ }, 10000);
26
+
27
+ });
28
+
29
+
30
+ }
31
+ });
@@ -0,0 +1,24 @@
1
+ {
2
+ "uid": 1466357,
3
+ "tokentype": "",
4
+ "token": "d23f4a8b14d34fb9b1dbae6c36778b7c-6DLl6x7HW8TjEYdXLipfLA==",
5
+ "rruid": "rr6238c899155830",
6
+ "region": "us",
7
+ "countrycode": "886",
8
+ "country": "TW",
9
+ "nickname": "tasict",
10
+ "rriot": {
11
+ "u": "1RQsQJ2o8bxMCo6F45pICu",
12
+ "s": "RHsYyP",
13
+ "h": "XeItWF64Ik",
14
+ "k": "VR1VI17T",
15
+ "r": {
16
+ "r": "US",
17
+ "a": "https://api-us.roborock.com",
18
+ "m": "ssl://mqtt-us.roborock.com:8883",
19
+ "l": "https://wood-us.roborock.com"
20
+ }
21
+ },
22
+ "tuyaDeviceState": 0,
23
+ "avatarurl": "https://files.roborock.com/iottest/default_avatar.png"
24
+ }