python-roborock 2.18.2__tar.gz → 2.20.0__tar.gz

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 (31) hide show
  1. {python_roborock-2.18.2 → python_roborock-2.20.0}/PKG-INFO +1 -1
  2. {python_roborock-2.18.2 → python_roborock-2.20.0}/pyproject.toml +1 -1
  3. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/api.py +1 -1
  4. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/code_mappings.py +34 -0
  5. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/containers.py +11 -1
  6. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/mqtt/roborock_session.py +2 -2
  7. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/web_api.py +6 -1
  8. {python_roborock-2.18.2 → python_roborock-2.20.0}/LICENSE +0 -0
  9. {python_roborock-2.18.2 → python_roborock-2.20.0}/README.md +0 -0
  10. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/__init__.py +0 -0
  11. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/cli.py +0 -0
  12. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/cloud_api.py +0 -0
  13. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/command_cache.py +0 -0
  14. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/const.py +0 -0
  15. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/exceptions.py +0 -0
  16. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/local_api.py +0 -0
  17. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/mqtt/__init__.py +0 -0
  18. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/mqtt/session.py +0 -0
  19. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/protocol.py +0 -0
  20. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/py.typed +0 -0
  21. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/roborock_future.py +0 -0
  22. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/roborock_message.py +0 -0
  23. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/roborock_typing.py +0 -0
  24. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/util.py +0 -0
  25. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/version_1_apis/__init__.py +0 -0
  26. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/version_1_apis/roborock_client_v1.py +0 -0
  27. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/version_1_apis/roborock_local_client_v1.py +0 -0
  28. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/version_1_apis/roborock_mqtt_client_v1.py +0 -0
  29. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/version_a01_apis/__init__.py +0 -0
  30. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/version_a01_apis/roborock_client_a01.py +0 -0
  31. {python_roborock-2.18.2 → python_roborock-2.20.0}/roborock/version_a01_apis/roborock_mqtt_client_a01.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-roborock
3
- Version: 2.18.2
3
+ Version: 2.20.0
4
4
  Summary: A package to control Roborock vacuums.
5
5
  Home-page: https://github.com/humbertogontijo/python-roborock
6
6
  License: GPL-3.0-only
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "python-roborock"
3
- version = "2.18.2"
3
+ version = "2.20.0"
4
4
  description = "A package to control Roborock vacuums."
5
5
  authors = ["humbertogontijo <humbertogontijo@users.noreply.github.com>"]
6
6
  license = "GPL-3.0-only"
@@ -85,7 +85,7 @@ class RoborockClient(ABC):
85
85
 
86
86
  async def validate_connection(self) -> None:
87
87
  if not self.should_keepalive():
88
- self._logger.info("Resetting Roborock connection due to kepalive timeout")
88
+ self._logger.info("Resetting Roborock connection due to keepalive timeout")
89
89
  await self.async_disconnect()
90
90
  await self.async_connect()
91
91
 
@@ -267,6 +267,17 @@ class RoborockFanSpeedQRevoCurv(RoborockFanPowerCode):
267
267
  smart_mode = 110
268
268
 
269
269
 
270
+ class RoborockFanSpeedQRevoMaxV(RoborockFanPowerCode):
271
+ off = 105
272
+ quiet = 101
273
+ balanced = 102
274
+ turbo = 103
275
+ max = 104
276
+ custom = 106
277
+ max_plus = 108
278
+ smart_mode = 110
279
+
280
+
270
281
  class RoborockFanSpeedP10(RoborockFanPowerCode):
271
282
  off = 105
272
283
  quiet = 101
@@ -275,6 +286,7 @@ class RoborockFanSpeedP10(RoborockFanPowerCode):
275
286
  max = 104
276
287
  custom = 106
277
288
  max_plus = 108
289
+ smart_mode = 110
278
290
 
279
291
 
280
292
  class RoborockFanSpeedS8MaxVUltra(RoborockFanPowerCode):
@@ -316,6 +328,7 @@ class RoborockMopModeS8ProUltra(RoborockMopModeCode):
316
328
  deep_plus = 303
317
329
  fast = 304
318
330
  custom = 302
331
+ smart_mode = 306
319
332
 
320
333
 
321
334
  class RoborockMopModeS8MaxVUltra(RoborockMopModeCode):
@@ -337,6 +350,15 @@ class RoborockMopModeQRevoMaster(RoborockMopModeCode):
337
350
  smart_mode = 306
338
351
 
339
352
 
353
+ class RoborockMopModeQRevoMaxV(RoborockMopModeCode):
354
+ standard = 300
355
+ deep = 301
356
+ custom = 302
357
+ deep_plus = 303
358
+ fast = 304
359
+ smart_mode = 306
360
+
361
+
340
362
  class RoborockMopIntensityCode(RoborockEnum):
341
363
  """Describes the mop intensity of the vacuum cleaner."""
342
364
 
@@ -383,6 +405,16 @@ class RoborockMopIntensityQRevoCurv(RoborockMopIntensityCode):
383
405
  smart_mode = 209
384
406
 
385
407
 
408
+ class RoborockMopIntensityQRevoMaxV(RoborockMopIntensityCode):
409
+ off = 200
410
+ low = 201
411
+ medium = 202
412
+ high = 203
413
+ custom = 204
414
+ custom_water_flow = 207
415
+ smart_mode = 209
416
+
417
+
386
418
  class RoborockMopIntensityP10(RoborockMopIntensityCode):
387
419
  """Describes the mop intensity of the vacuum cleaner."""
388
420
 
@@ -392,6 +424,7 @@ class RoborockMopIntensityP10(RoborockMopIntensityCode):
392
424
  high = 203
393
425
  custom = 204
394
426
  custom_water_flow = 207
427
+ smart_mode = 209
395
428
 
396
429
 
397
430
  class RoborockMopIntensityS8MaxVUltra(RoborockMopIntensityCode):
@@ -465,6 +498,7 @@ class RoborockDockTypeCode(RoborockEnum):
465
498
  qrevo_s_dock = 15
466
499
  saros_r10_dock = 16
467
500
  qrevo_curv_dock = 17
501
+ saros_10_dock = 18
468
502
 
469
503
 
470
504
  class RoborockDockDustCollectionModeCode(RoborockEnum):
@@ -22,6 +22,7 @@ from .code_mappings import (
22
22
  RoborockFanSpeedQ7Max,
23
23
  RoborockFanSpeedQRevoCurv,
24
24
  RoborockFanSpeedQRevoMaster,
25
+ RoborockFanSpeedQRevoMaxV,
25
26
  RoborockFanSpeedS6Pure,
26
27
  RoborockFanSpeedS7,
27
28
  RoborockFanSpeedS7MaxV,
@@ -33,6 +34,7 @@ from .code_mappings import (
33
34
  RoborockMopIntensityQ7Max,
34
35
  RoborockMopIntensityQRevoCurv,
35
36
  RoborockMopIntensityQRevoMaster,
37
+ RoborockMopIntensityQRevoMaxV,
36
38
  RoborockMopIntensityS5Max,
37
39
  RoborockMopIntensityS6MaxV,
38
40
  RoborockMopIntensityS7,
@@ -40,6 +42,7 @@ from .code_mappings import (
40
42
  RoborockMopModeCode,
41
43
  RoborockMopModeQRevoCurv,
42
44
  RoborockMopModeQRevoMaster,
45
+ RoborockMopModeQRevoMaxV,
43
46
  RoborockMopModeS7,
44
47
  RoborockMopModeS8MaxVUltra,
45
48
  RoborockMopModeS8ProUltra,
@@ -599,6 +602,13 @@ class QRevoCurvStatus(Status):
599
602
  mop_mode: RoborockMopModeQRevoCurv | None = None
600
603
 
601
604
 
605
+ @dataclass
606
+ class QRevoMaxVStatus(Status):
607
+ fan_power: RoborockFanSpeedQRevoMaxV | None = None
608
+ water_box_mode: RoborockMopIntensityQRevoMaxV | None = None
609
+ mop_mode: RoborockMopModeQRevoMaxV | None = None
610
+
611
+
602
612
  @dataclass
603
613
  class S6MaxVStatus(Status):
604
614
  fan_power: RoborockFanSpeedS7MaxV | None = None
@@ -672,7 +682,7 @@ ModelStatus: dict[str, type[Status]] = {
672
682
  # but i am currently unable to do my typical reverse engineering/ get any data from users on this,
673
683
  # so this will be here in the mean time.
674
684
  ROBOROCK_QREVO_S: P10Status,
675
- ROBOROCK_QREVO_MAXV: P10Status,
685
+ ROBOROCK_QREVO_MAXV: QRevoMaxVStatus,
676
686
  ROBOROCK_QREVO_PRO: P10Status,
677
687
  ROBOROCK_S8_MAXV_ULTRA: S8MaxvUltraStatus,
678
688
  }
@@ -118,7 +118,7 @@ class RoborockMqttSession(MqttSession):
118
118
  if start_future:
119
119
  _LOGGER.debug("MQTT loop was cancelled")
120
120
  start_future.set_exception(err)
121
- _LOGGER.debug("MQTT loop was cancelled whiel starting")
121
+ _LOGGER.debug("MQTT loop was cancelled while starting")
122
122
  return
123
123
  # Catch exceptions to avoid crashing the loop
124
124
  # and to allow the loop to retry.
@@ -160,7 +160,7 @@ class RoborockMqttSession(MqttSession):
160
160
  async with self._client_lock:
161
161
  self._client = client
162
162
  for topic in self._listeners:
163
- _LOGGER.debug("Re-establising subscription to topic %s", topic)
163
+ _LOGGER.debug("Re-establishing subscription to topic %s", topic)
164
164
  # TODO: If this fails it will break the whole connection. Make
165
165
  # this retry again in the background with backoff.
166
166
  await client.subscribe(topic)
@@ -68,11 +68,12 @@ class RoborockApiClient:
68
68
  raise RoborockUrlException("get url by email returned None")
69
69
  response_code = response.get("code")
70
70
  if response_code != 200:
71
+ _LOGGER.info("Get base url failed for %s with the following context: %s", self._username, response)
71
72
  if response_code == 2003:
72
73
  raise RoborockInvalidEmail("Your email was incorrectly formatted.")
73
74
  elif response_code == 1001:
74
75
  raise RoborockMissingParameters(
75
- "You are missing parameters for this request, are you sure you " "entered your username?"
76
+ "You are missing parameters for this request, are you sure you entered your username?"
76
77
  )
77
78
  elif response_code == 9002:
78
79
  raise RoborockTooManyRequest("Please temporarily disable making requests and try again later.")
@@ -214,6 +215,7 @@ class RoborockApiClient:
214
215
  raise RoborockException("Failed to get a response from send email code")
215
216
  response_code = code_response.get("code")
216
217
  if response_code != 200:
218
+ _LOGGER.info("Request code failed for %s with the following context: %s", self._username, code_response)
217
219
  if response_code == 2008:
218
220
  raise RoborockAccountDoesNotExist("Account does not exist - check your login and try again.")
219
221
  elif response_code == 9002:
@@ -243,6 +245,7 @@ class RoborockApiClient:
243
245
  if login_response is None:
244
246
  raise RoborockException("Login response is none")
245
247
  if login_response.get("code") != 200:
248
+ _LOGGER.info("Login failed for %s with the following context: %s", self._username, login_response)
246
249
  raise RoborockException(f"{login_response.get('msg')} - response code: {login_response.get('code')}")
247
250
  user_data = login_response.get("data")
248
251
  if not isinstance(user_data, dict):
@@ -282,6 +285,7 @@ class RoborockApiClient:
282
285
  raise RoborockException("Login request response is None")
283
286
  response_code = login_response.get("code")
284
287
  if response_code != 200:
288
+ _LOGGER.info("Login failed for %s with the following context: %s", self._username, login_response)
285
289
  if response_code == 2018:
286
290
  raise RoborockInvalidCode("Invalid code - check your code and try again.")
287
291
  if response_code == 3009:
@@ -308,6 +312,7 @@ class RoborockApiClient:
308
312
  if home_id_response is None:
309
313
  raise RoborockException("home_id_response is None")
310
314
  if home_id_response.get("code") != 200:
315
+ _LOGGER.info("Get Home Id failed with the following context: %s", home_id_response)
311
316
  if home_id_response.get("code") == 2010:
312
317
  raise RoborockInvalidCredentials(
313
318
  f"Invalid credentials ({home_id_response.get('msg')}) - check your login and try again."