python-roborock 5.37.1__tar.gz → 6.1.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 (129) hide show
  1. {python_roborock-5.37.1 → python_roborock-6.1.0}/PKG-INFO +1 -1
  2. {python_roborock-5.37.1 → python_roborock-6.1.0}/pyproject.toml +1 -1
  3. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/data/code_mappings.py +19 -2
  4. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/data/dyad/dyad_code_mappings.py +1 -1
  5. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/data/v1/v1_code_mappings.py +32 -32
  6. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/data/v1/v1_containers.py +2 -2
  7. python_roborock-6.1.0/roborock/data/zeo/zeo_code_mappings.py +320 -0
  8. python_roborock-6.1.0/roborock/data/zeo/zeo_containers.py +140 -0
  9. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/roborock_message.py +83 -30
  10. python_roborock-5.37.1/roborock/data/zeo/zeo_code_mappings.py +0 -142
  11. python_roborock-5.37.1/roborock/data/zeo/zeo_containers.py +0 -0
  12. {python_roborock-5.37.1 → python_roborock-6.1.0}/.gitignore +0 -0
  13. {python_roborock-5.37.1 → python_roborock-6.1.0}/LICENSE +0 -0
  14. {python_roborock-5.37.1 → python_roborock-6.1.0}/README.md +0 -0
  15. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/__init__.py +0 -0
  16. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/broadcast_protocol.py +0 -0
  17. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/callbacks.py +0 -0
  18. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/cli.py +0 -0
  19. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/const.py +0 -0
  20. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/data/__init__.py +0 -0
  21. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/data/b01_q10/__init__.py +0 -0
  22. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/data/b01_q10/b01_q10_code_mappings.py +0 -0
  23. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/data/b01_q10/b01_q10_containers.py +0 -0
  24. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/data/b01_q7/__init__.py +0 -0
  25. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/data/b01_q7/b01_q7_code_mappings.py +0 -0
  26. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/data/b01_q7/b01_q7_containers.py +0 -0
  27. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/data/containers.py +0 -0
  28. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/data/dyad/__init__.py +0 -0
  29. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/data/dyad/dyad_containers.py +0 -0
  30. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/data/mower/__init__.py +0 -0
  31. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/data/mower/mower_containers.py +0 -0
  32. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/data/v1/__init__.py +0 -0
  33. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/data/v1/v1_clean_modes.py +0 -0
  34. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/data/zeo/__init__.py +0 -0
  35. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/device_features.py +0 -0
  36. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/README.md +0 -0
  37. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/__init__.py +0 -0
  38. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/cache.py +0 -0
  39. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/device.py +0 -0
  40. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/device_manager.py +0 -0
  41. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/file_cache.py +0 -0
  42. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/rpc/__init__.py +0 -0
  43. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/rpc/a01_channel.py +0 -0
  44. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/rpc/b01_q10_channel.py +0 -0
  45. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/rpc/b01_q7_channel.py +0 -0
  46. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/rpc/v1_channel.py +0 -0
  47. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/__init__.py +0 -0
  48. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/a01/__init__.py +0 -0
  49. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/b01/__init__.py +0 -0
  50. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/b01/q10/__init__.py +0 -0
  51. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/b01/q10/button_light.py +0 -0
  52. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/b01/q10/child_lock.py +0 -0
  53. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/b01/q10/clean_history.py +0 -0
  54. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/b01/q10/command.py +0 -0
  55. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/b01/q10/common.py +0 -0
  56. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/b01/q10/consumable.py +0 -0
  57. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/b01/q10/do_not_disturb.py +0 -0
  58. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/b01/q10/dust_collection.py +0 -0
  59. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/b01/q10/map.py +0 -0
  60. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/b01/q10/network_info.py +0 -0
  61. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/b01/q10/remote.py +0 -0
  62. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/b01/q10/status.py +0 -0
  63. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/b01/q10/vacuum.py +0 -0
  64. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/b01/q10/volume.py +0 -0
  65. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/b01/q7/__init__.py +0 -0
  66. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/b01/q7/clean_summary.py +0 -0
  67. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/b01/q7/map.py +0 -0
  68. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/b01/q7/map_content.py +0 -0
  69. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/common.py +0 -0
  70. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/traits_mixin.py +0 -0
  71. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/v1/__init__.py +0 -0
  72. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/v1/child_lock.py +0 -0
  73. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/v1/clean_summary.py +0 -0
  74. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/v1/command.py +0 -0
  75. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/v1/common.py +0 -0
  76. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/v1/consumeable.py +0 -0
  77. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/v1/device_features.py +0 -0
  78. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/v1/do_not_disturb.py +0 -0
  79. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/v1/dust_collection_mode.py +0 -0
  80. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/v1/flow_led_status.py +0 -0
  81. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/v1/home.py +0 -0
  82. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/v1/led_status.py +0 -0
  83. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/v1/map_content.py +0 -0
  84. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/v1/maps.py +0 -0
  85. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/v1/network_info.py +0 -0
  86. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/v1/obstacle_photos.py +0 -0
  87. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/v1/rooms.py +0 -0
  88. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/v1/routines.py +0 -0
  89. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/v1/smart_wash_params.py +0 -0
  90. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/v1/status.py +0 -0
  91. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/v1/valley_electricity_timer.py +0 -0
  92. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/v1/volume.py +0 -0
  93. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/traits/v1/wash_towel_mode.py +0 -0
  94. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/transport/__init__.py +0 -0
  95. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/transport/channel.py +0 -0
  96. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/transport/local_channel.py +0 -0
  97. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/devices/transport/mqtt_channel.py +0 -0
  98. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/diagnostics.py +0 -0
  99. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/exceptions.py +0 -0
  100. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/map/__init__.py +0 -0
  101. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/map/b01_grid_layers.py +0 -0
  102. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/map/b01_map_parser.py +0 -0
  103. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/map/b01_q10_map_parser.py +0 -0
  104. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/map/b01_q10_overlays.py +0 -0
  105. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/map/b01_q10_render.py +0 -0
  106. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/map/map_parser.py +0 -0
  107. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/map/proto/__init__.py +0 -0
  108. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/map/proto/b01_scmap.proto +0 -0
  109. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/map/proto/b01_scmap_pb2.py +0 -0
  110. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/mqtt/__init__.py +0 -0
  111. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/mqtt/health_manager.py +0 -0
  112. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/mqtt/roborock_session.py +0 -0
  113. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/mqtt/session.py +0 -0
  114. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/protocol.py +0 -0
  115. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/protocols/__init__.py +0 -0
  116. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/protocols/a01_protocol.py +0 -0
  117. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/protocols/b01_q10_protocol.py +0 -0
  118. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/protocols/b01_q7_protocol.py +0 -0
  119. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/protocols/v1_protocol.py +0 -0
  120. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/py.typed +0 -0
  121. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/roborock_typing.py +0 -0
  122. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/testing/__init__.py +0 -0
  123. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/testing/b01_q10_simulator.py +0 -0
  124. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/testing/channel.py +0 -0
  125. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/testing/cloud.py +0 -0
  126. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/testing/simulator.py +0 -0
  127. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/testing/v1_simulator.py +0 -0
  128. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/util.py +0 -0
  129. {python_roborock-5.37.1 → python_roborock-6.1.0}/roborock/web_api.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-roborock
3
- Version: 5.37.1
3
+ Version: 6.1.0
4
4
  Summary: A package to control Roborock vacuums.
5
5
  Project-URL: Repository, https://github.com/python-roborock/python-roborock
6
6
  Project-URL: Documentation, https://python-roborock.readthedocs.io/
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "python-roborock"
3
- version = "5.37.1"
3
+ version = "6.1.0"
4
4
  description = "A package to control Roborock vacuums."
5
5
  authors = [{ name = "humbertogontijo", email = "humbertogontijo@users.noreply.github.com" }, {name="Lash-L"}, {name="allenporter"}]
6
6
  requires-python = ">=3.11, <4"
@@ -10,10 +10,22 @@ completed_warnings = set()
10
10
  class RoborockEnum(IntEnum):
11
11
  """Roborock Enum for codes with int values"""
12
12
 
13
+ _display_name_: str | None
14
+
15
+ def __new__(cls, value: int, display_name: str | None = None) -> Self:
16
+ member = int.__new__(cls, value)
17
+ member._value_ = value
18
+ member._display_name_ = display_name
19
+ return member
20
+
13
21
  @property
14
22
  def name(self) -> str:
15
23
  return super().name.lower()
16
24
 
25
+ @property
26
+ def display_name(self) -> str:
27
+ return self._display_name_ or self.name
28
+
17
29
  @classmethod
18
30
  def _missing_(cls: type[Self], key) -> Self:
19
31
  if hasattr(cls, "unknown"):
@@ -30,8 +42,13 @@ class RoborockEnum(IntEnum):
30
42
  return default_value
31
43
 
32
44
  @classmethod
33
- def as_dict(cls: type[Self]):
34
- return {i.name: i.value for i in cls if i.name != "missing"}
45
+ def as_dict(cls: type[Self]) -> dict[str, int]:
46
+ result: dict[str, int] = {}
47
+ for item in cls:
48
+ if item.name == "missing":
49
+ continue
50
+ result.setdefault(item.display_name, item.value)
51
+ return result
35
52
 
36
53
  @classmethod
37
54
  def as_enum_dict(cls: type[Self]):
@@ -95,7 +95,7 @@ class DyadError(RoborockEnum):
95
95
  battery_temperature_protection = (
96
96
  20007 # Battery temperature protection. Wait for the temperature to return to a normal range.
97
97
  )
98
- battery_temperature_protection_2 = 20008
98
+ battery_temperature_protection_2 = (20008, "battery_temperature_protection")
99
99
  power_adapter_error = 20009 # Check if the power adapter is working properly.
100
100
  dirty_charging_contacts = 10007 # Disconnection between the device and dock. Wipe charging contacts.
101
101
  low_battery = 20017 # Low battery level. Charge before starting self-cleaning.
@@ -8,40 +8,40 @@ class RoborockFinishReason(RoborockEnum):
8
8
  manual_interrupt = 21 # Cleaning interrupted by user
9
9
  cleanup_interrupted = 24 # Cleanup interrupted
10
10
  manual_interrupt_2 = 21
11
- manual_interrupt_12 = 29
11
+ manual_interrupt_12 = (29, "manual_interrupt")
12
12
  breakpoint = 32 # Could not continue cleaning
13
- breakpoint_2 = 33
14
- cleanup_interrupted_2 = 34
15
- manual_interrupt_3 = 35
16
- manual_interrupt_4 = 36
17
- manual_interrupt_5 = 37
18
- manual_interrupt_6 = 43
13
+ breakpoint_2 = (33, "breakpoint")
14
+ cleanup_interrupted_2 = (34, "cleanup_interrupted")
15
+ manual_interrupt_3 = (35, "manual_interrupt")
16
+ manual_interrupt_4 = (36, "manual_interrupt")
17
+ manual_interrupt_5 = (37, "manual_interrupt")
18
+ manual_interrupt_6 = (43, "manual_interrupt")
19
19
  locate_fail = 45 # Positioning Failed
20
- cleanup_interrupted_3 = 64
21
- locate_fail_2 = 65
22
- manual_interrupt_7 = 48
23
- manual_interrupt_8 = 49
24
- manual_interrupt_9 = 50
25
- cleanup_interrupted_4 = 51
20
+ cleanup_interrupted_3 = (64, "cleanup_interrupted")
21
+ locate_fail_2 = (65, "locate_fail")
22
+ manual_interrupt_7 = (48, "manual_interrupt")
23
+ manual_interrupt_8 = (49, "manual_interrupt")
24
+ manual_interrupt_9 = (50, "manual_interrupt")
25
+ cleanup_interrupted_4 = (51, "cleanup_interrupted")
26
26
  finished_cleaning = 52 # Finished cleaning
27
- finished_cleaning_2 = 54
28
- finished_cleaning_3 = 55
29
- finished_cleaning_4 = 56
30
- finished_clenaing_5 = 57
31
- manual_interrupt_10 = 60
27
+ finished_cleaning_2 = (54, "finished_cleaning")
28
+ finished_cleaning_3 = (55, "finished_cleaning")
29
+ finished_cleaning_4 = (56, "finished_cleaning")
30
+ finished_clenaing_5 = (57, "finished_cleaning")
31
+ manual_interrupt_10 = (60, "manual_interrupt")
32
32
  area_unreachable = 61 # Area unreachable
33
- area_unreachable_2 = 62
33
+ area_unreachable_2 = (62, "area_unreachable")
34
34
  washing_error = 67 # Washing error
35
35
  back_to_wash_failure = 68 # Failed to return to the dock
36
- cleanup_interrupted_5 = 101
37
- breakpoint_4 = 102
38
- manual_interrupt_11 = 103
39
- cleanup_interrupted_6 = 104
40
- cleanup_interrupted_7 = 105
41
- cleanup_interrupted_8 = 106
42
- cleanup_interrupted_9 = 107
43
- cleanup_interrupted_10 = 109
44
- cleanup_interrupted_11 = 110
36
+ cleanup_interrupted_5 = (101, "cleanup_interrupted")
37
+ breakpoint_4 = (102, "breakpoint")
38
+ manual_interrupt_11 = (103, "manual_interrupt")
39
+ cleanup_interrupted_6 = (104, "cleanup_interrupted")
40
+ cleanup_interrupted_7 = (105, "cleanup_interrupted")
41
+ cleanup_interrupted_8 = (106, "cleanup_interrupted")
42
+ cleanup_interrupted_9 = (107, "cleanup_interrupted")
43
+ cleanup_interrupted_10 = (109, "cleanup_interrupted")
44
+ cleanup_interrupted_11 = (110, "cleanup_interrupted")
45
45
  patrol_success = 114 # Cruise completed
46
46
  patrol_fail = 115 # Cruise failed
47
47
  pet_patrol_success = 116 # Pet found
@@ -159,7 +159,7 @@ class ClearWaterBoxStatus(RoborockDssCodes):
159
159
 
160
160
  okay = 0
161
161
  out_of_water = 1
162
- out_of_water_2 = 38
162
+ out_of_water_2 = (38, "out_of_water")
163
163
  refill_error = 48
164
164
 
165
165
 
@@ -168,7 +168,7 @@ class DirtyWaterBoxStatus(RoborockDssCodes):
168
168
 
169
169
  okay = 0
170
170
  full_not_installed = 1
171
- full_not_installed_2 = 39
171
+ full_not_installed_2 = (39, "full_not_installed")
172
172
  drain_error = 49
173
173
 
174
174
 
@@ -232,7 +232,7 @@ class RoborockErrorCode(RoborockEnum):
232
232
  clear_brush_exception = 42 # Check that the water filter has been correctly installed
233
233
  clear_brush_exception_2 = 43 # Positioning button error
234
234
  filter_screen_exception = 44 # Clean the dock water filter
235
- mopping_roller_2 = 45 # Wash roller may be jammed
235
+ mopping_roller_2 = (45, "mopping_roller_1") # Wash roller may be jammed
236
236
  up_water_exception = 48
237
237
  drain_water_exception = 49
238
238
  temperature_protection = 51 # Unit temperature protection
@@ -421,7 +421,7 @@ class RoborockStateCode(RoborockEnum):
421
421
  segment_cleaning = 18
422
422
  emptying_the_bin = 22 # on s7+
423
423
  washing_the_mop = 23 # on a46
424
- washing_the_mop_2 = 25
424
+ washing_the_mop_2 = (25, "washing_the_mop")
425
425
  going_to_wash_the_mop = 26 # on a46
426
426
  in_call = 28
427
427
  mapping = 29
@@ -144,11 +144,11 @@ class StatusV2(RoborockBase):
144
144
 
145
145
  @property
146
146
  def error_code_name(self) -> str | None:
147
- return self.error_code.name if self.error_code is not None else None
147
+ return self.error_code.display_name if self.error_code is not None else None
148
148
 
149
149
  @property
150
150
  def state_name(self) -> str | None:
151
- return self.state.name if self.state is not None else None
151
+ return self.state.display_name if self.state is not None else None
152
152
 
153
153
  @property
154
154
  def current_map(self) -> int | None:
@@ -0,0 +1,320 @@
1
+ """Zeo (washing machine) device enums.
2
+
3
+ Member-level comments show the manufacturer's official identifiers
4
+ extracted from the React Native app plugin bundle.
5
+
6
+ For enums that map between protocol-level positions and physical units
7
+ (e.g. spin speed, temperature), the comment format is
8
+ ``# L<N>, <physical-value>`` where ``L<N>`` is the protocol position
9
+ and ``<physical-value>`` is the user-facing display value
10
+ (RPM, degrees Celsius, minutes, etc.).
11
+
12
+ Enums commented out at the bottom of this file are App-internal lookup
13
+ tables and UI state machines — they are not DP protocol enums and are
14
+ never sent to the device.
15
+ """
16
+
17
+ from ..code_mappings import RoborockEnum
18
+
19
+
20
+ class ZeoFeatureBits(RoborockEnum):
21
+ """Bit positions in DP 237 (FEATURE_BITS).
22
+
23
+ Extracted from the official Roborock Washer app plugin bundle
24
+ (index.ios.bundle, module 726). Each member's integer value
25
+ is the exact bit offset the device reports at DP 237.
26
+ """
27
+
28
+ smart_hosting = 0
29
+ silent_mode = 1
30
+ new_custom_program = 2
31
+ dry_care = 3
32
+ set_uvc_in_appointment = 4
33
+ detect_door_status = 5
34
+ expand_softener = 6
35
+ set_params_in_working = 7
36
+ thirty_min_soak = 8
37
+ smile_light = 9
38
+ set_uvc_in_pause = 10
39
+ concentrated_detergent = 11
40
+ wool_detergent = 12
41
+ voice_assistant = 13
42
+ adapted_custom_program = 14
43
+ voice_assistant_record = 15
44
+ fluff_clean_notification = 16
45
+ power_button_indicator_light = 17
46
+ dirt_detection = 18
47
+ deep_self_clean = 19
48
+ save_panel_program_params = 20
49
+ steam_care = 21
50
+ wash_dry_linkage = 22
51
+ ion_deodorization = 23
52
+
53
+
54
+ class ZeoMode(RoborockEnum):
55
+ null = 0 # (not found in app bundle)
56
+ wash = 1
57
+ wash_and_dry = 2
58
+ dry = 3
59
+ treatment = 4
60
+
61
+
62
+ class ZeoState(RoborockEnum):
63
+ standby = 1
64
+ weighing = 2 # Checking
65
+ soaking = 3
66
+ washing = 4
67
+ rinsing = 5
68
+ spinning = 6 # Dewatering
69
+ drying = 7
70
+ cooling = 8
71
+ under_delay_start = 9 # Appointment
72
+ done = 10 # Complete
73
+ updating = 11
74
+ aftercare = 12 # SmartHosting
75
+ waiting_for_aftercare = 13 # SmartHostingWaiting
76
+ steam_caring = 14
77
+ descaling = 15
78
+ cloth_ready = 16
79
+ waiting_for_drying = 17
80
+ pre_heating = 18
81
+ pre_heat_complete = 19
82
+ in_care = 20
83
+
84
+
85
+ class ZeoProgram(RoborockEnum):
86
+ null = 0 # (not found in app bundle)
87
+ standard = 1 # Mixed
88
+ quick = 2
89
+ sanitize = 3 # Sterilization
90
+ wool = 4
91
+ air_refresh = 5 # Air
92
+ custom = 6 # CloudProgram
93
+ bedding = 7 # HomeTextile
94
+ down = 8
95
+ silk = 9
96
+ rinse_and_spin = 10 # RinseAndDehydrate
97
+ spin = 11 # Dehydrate
98
+ down_clean = 12 # SelfClean
99
+ baby_care = 13 # Baby
100
+ anti_allergen = 14 # MitesRemoval
101
+ sportswear = 15 # Sports
102
+ night = 16
103
+ new_clothes = 17 # New
104
+ shirts = 18 # Shirt
105
+ synthetics = 19 # ChemicalFiber
106
+ underwear = 20
107
+ gentle = 21 # Soft
108
+ intensive = 22 # Strong
109
+ cotton_linen = 23 # CottonOrLinen
110
+ season = 24
111
+ warming = 25 # Warm
112
+ bra = 26
113
+ panties = 27 # Underpants
114
+ boiling_wash = 28 # Boiling
115
+ soaking = 29
116
+ socks = 30
117
+ towels = 31 # Towel
118
+ anti_mite = 32 # MitesRemoval2
119
+ exo_40_60 = 33 # Eco
120
+ twenty_c = 34 # TwentyDegrees
121
+ t_shirts = 35 # TShirt
122
+ stain_removal = 36 # Dirt
123
+ small_things = 37
124
+ mixing = 39
125
+ bath_towel = 40
126
+ jeans = 41
127
+ outdoors = 42
128
+ timed_drying = 43
129
+ outdoor_jackets = 44
130
+ yoga = 45
131
+ quilt_drying = 46
132
+ flax = 47
133
+ suit = 48
134
+ sport_shoes = 49
135
+ rack_drying = 50
136
+ summer_quilt = 51
137
+ wind_breaker = 52
138
+ steam_care = 53
139
+ descaling = 54
140
+ deep_self_clean = 55
141
+ pet_care = 56
142
+ small_things_drying = 57
143
+
144
+
145
+ class ZeoSoak(RoborockEnum):
146
+ normal = 0 # L0, 0min
147
+ low = 1 # L1, 5min
148
+ medium = 2 # L2, 10min
149
+ high = 3 # L3, 15min
150
+ max = 4 # L4, 20min
151
+ very_max = 5 # L5, 30min
152
+
153
+
154
+ class ZeoTemperature(RoborockEnum):
155
+ normal = 1 # L1, 0 C
156
+ low = 2 # L2, 30 C
157
+ medium = 3 # L3, 40 C
158
+ high = 4 # L4, 60 C
159
+ max = 5 # L5, 90 C
160
+ twenty_c = 6 # L6, 20 C
161
+ ninety_c = 7 # L7, 95 C
162
+
163
+
164
+ class ZeoRinse(RoborockEnum):
165
+ none = 0 # L0, None
166
+ min = 1 # L1, Min
167
+ low = 2 # L2, Low
168
+ mid = 3 # L3, Mid
169
+ high = 4 # L4, High
170
+ max = 5 # L5, Max
171
+
172
+
173
+ class ZeoSpin(RoborockEnum):
174
+ null = 0 # (not found in app bundle)
175
+ none = 1 # L1, 0 RPM
176
+ very_low = 2 # L2, 400 RPM
177
+ low = 3 # L3, 600 RPM
178
+ mid = 4 # L4, 800 RPM
179
+ high = 5 # L5, 1000 RPM
180
+ very_high = 6 # L6, 1200 RPM
181
+ max = 7 # L7, 1400 RPM
182
+
183
+
184
+ class ZeoDryingMode(RoborockEnum):
185
+ none = 0
186
+ quick = 1 # Quick, Mid
187
+ iron = 2 # Iron, Low
188
+ store = 3 # Store, High
189
+
190
+
191
+ class ZeoDetergentType(RoborockEnum):
192
+ empty = 0 # T0
193
+ low = 1 # T1
194
+ medium = 2 # T2
195
+ high = 3 # T3
196
+
197
+
198
+ class ZeoSoftenerType(RoborockEnum):
199
+ empty = 0 # T0
200
+ low = 1 # T1
201
+ medium = 2 # T2
202
+ high = 3 # T3
203
+
204
+
205
+ class ZeoDetergentExpansionType(RoborockEnum):
206
+ concentrated_detergent = 1
207
+ detergent = 2
208
+
209
+
210
+ class ZeoSoftenerExpansionType(RoborockEnum):
211
+ softener = 1
212
+ softener_expansion = 2
213
+ wool_detergent = 3
214
+
215
+
216
+ class ZeoDirtDetectionStatus(RoborockEnum):
217
+ idle = 0
218
+ detecting = 1
219
+ detection_completed = 2
220
+
221
+
222
+ class ZeoError(RoborockEnum):
223
+ none = 0 # No error
224
+ refill_error = 1 # Refill error (E1). Check if the water tap is turned on.
225
+ drain_error = 2 # Drain error (E2). Check the drain hose.
226
+ door_lock_error = 3 # Door lock error (E3). Close the door properly.
227
+ water_level_error = 4 # Drum water level error (E4).
228
+ inverter_error = 5 # DD motor variable-frequency drive error (E5).
229
+ heating_error = 6 # Water heater error (E6).
230
+ temperature_error = 7 # Drum water temperature error (E7).
231
+ communication_error = 10 # Communication error (E10).
232
+ drying_error = 11 # Temperature error (E11).
233
+ drying_error_e_12 = 12 # Temperature error (E12).
234
+ drying_error_e_13 = 13 # Temperature error (E13).
235
+ drying_error_e_14 = 14 # Temperature error (E14).
236
+ drying_error_e_15 = 15 # Drying air heater error (E15).
237
+ drying_error_e_16 = 16 # Fan RPM error (E16).
238
+ drying_error_water_flow = 17 # Drying temperature protection (E17).
239
+ drying_error_restart = 18 # Fan RPM error (E18).
240
+ spin_error = 19 # Balance error (Unb).
241
+
242
+
243
+ class ZeoDryingMethod(RoborockEnum):
244
+ l1 = 1 # L1, Saving
245
+ l2 = 2 # L2, Standard
246
+ l3 = 3 # L3, SuperFast
247
+
248
+
249
+ class ZeoSteamVolume(RoborockEnum):
250
+ none = 0 # L0, None
251
+ low = 1 # L1, Min
252
+ medium = 2 # L2, Low
253
+ high = 3 # L3, Mid
254
+ max = 4 # L4, High
255
+
256
+
257
+ class ZeoDryAndCare(RoborockEnum):
258
+ soft = 1
259
+ normal = 2
260
+
261
+
262
+ class ZeoDryerStartError(RoborockEnum):
263
+ dryer_running = 1 # Washer-Dryer Pairing cannot start: Dryer is running.
264
+ dryer_error = 2 # Washer-Dryer Pairing cannot start: Dryer has an error.
265
+ dryer_done = 3 # Dryer drying is complete, please remove the clothes first.
266
+ dryer_waiting_hosting = 4 # Dryer is waiting for smart hosting.
267
+ dryer_smart_hosting = 5 # Dryer is in smart hosting mode.
268
+ dryer_countdown = 6 # Dryer is in preset countdown.
269
+ dryer_network_fail = 7 # Please check the dryer network connection.
270
+
271
+
272
+ # The following are App-internal lookup tables extracted from the bundle.
273
+ # They are NOT DP protocol enums — the device never receives these values.
274
+ # They control how the official app adjusts recommended dosages or UI visibility.
275
+ #
276
+ # class Cleanser(RoborockEnum):
277
+ # detergent = 0
278
+ # additions = 1
279
+ #
280
+ # class Detergents(RoborockEnum):
281
+ # concentrated = 1
282
+ # regular = 2
283
+ # baby = 3
284
+ #
285
+ # class Additions(RoborockEnum):
286
+ # softener = 1
287
+ # disinfectant = 2
288
+ # fragrance = 3
289
+ #
290
+ # The following are App UI state enums — internal state machines used by the
291
+ # official app for page rendering and progress display.
292
+ #
293
+ # class HomePageStatus(RoborockEnum):
294
+ # updating = 0
295
+ # loading = 1
296
+ # load_failed = 2
297
+ # idle = 3
298
+ # working = 4
299
+ # smart_hosting = 5
300
+ # preset = 6
301
+ # descaling = 7
302
+ # cloth_ready = 8
303
+ # wait_to_dry = 9
304
+ #
305
+ # class Progress(RoborockEnum):
306
+ # soak = 0
307
+ # wash = 1
308
+ # rinse = 2
309
+ # spin = 3
310
+ # dry = 4
311
+ # steam_care = 5
312
+ #
313
+ # class ProgressStatus(RoborockEnum):
314
+ # done = 0
315
+ # doing = 1
316
+ # will_do = 2
317
+ #
318
+ # class SmartHostStatus(RoborockEnum):
319
+ # smart_host_waiting = 0
320
+ # smart_hosting = 1
@@ -0,0 +1,140 @@
1
+ """Data containers for Zeo (washing machine / dryer) devices."""
2
+
3
+ from dataclasses import dataclass
4
+
5
+ from ..containers import RoborockBase
6
+ from .zeo_code_mappings import (
7
+ ZeoDryAndCare,
8
+ ZeoDryingMethod,
9
+ ZeoDryingMode,
10
+ ZeoMode,
11
+ ZeoProgram,
12
+ ZeoRinse,
13
+ ZeoSoak,
14
+ ZeoSpin,
15
+ ZeoSteamVolume,
16
+ ZeoTemperature,
17
+ )
18
+
19
+
20
+ @dataclass
21
+ class ZeoStartParams(RoborockBase):
22
+ """Parameters that must be bundled with a START command.
23
+
24
+ All Zeo devices require ``mode`` and ``program`` to be sent together
25
+ with the start signal. The remaining fields are optional and only
26
+ included when the device reports a non-None value.
27
+ """
28
+
29
+ mode: ZeoMode
30
+ program: ZeoProgram
31
+ temperature: ZeoTemperature | None = None
32
+ rinse: ZeoRinse | None = None
33
+ spin: ZeoSpin | None = None
34
+ drying_mode: ZeoDryingMode | None = None
35
+
36
+
37
+ # ── DP 222 (LoadCloudProgram) bitfield decoder ──────────────────────────
38
+ # The official app packs all custom-program parameters into a single
39
+ # 32-bit integer at DP 222. This mirrors WasherDpsCache.customMode in
40
+ # module 725 of the React Native plugin bundle.
41
+
42
+
43
+ @dataclass
44
+ class ZeoCustomMode(RoborockBase):
45
+ """Decoded custom programme parameters from DP 222 (LoadCloudProgram).
46
+
47
+ Null / absent fields are represented as ``0`` which matches the
48
+ official app's behaviour (the right-shifted-and-masked value is
49
+ always non-negative).
50
+ """
51
+
52
+ program: ZeoProgram
53
+ """Wash program (bits 0-7)."""
54
+
55
+ mode: ZeoMode
56
+ """Wash mode (bits 8-9)."""
57
+
58
+ temperature: ZeoTemperature
59
+ """Temperature (bits 10-12)."""
60
+
61
+ rinse: ZeoRinse
62
+ """Rinse cycle (bits 13-15)."""
63
+
64
+ spin: ZeoSpin
65
+ """Spin speed (bits 16-18)."""
66
+
67
+ drying_mode: ZeoDryingMode
68
+ """Drying mode (bits 19-21)."""
69
+
70
+ soak: ZeoSoak
71
+ """Soak (bits 22-24)."""
72
+
73
+ dry_and_care: ZeoDryAndCare
74
+ """Dry-care mode (bits 25-27)."""
75
+
76
+ steam_volume: ZeoSteamVolume
77
+ """Steam volume (bits 28-30)."""
78
+
79
+ total_time_min: int = 0
80
+ """Total programme time in minutes (from DP 239)."""
81
+
82
+ @classmethod
83
+ def from_raw(cls, raw: int, total_time_min: int | None = None) -> "ZeoCustomMode":
84
+ """Decode a raw 32-bit custom-programme value."""
85
+ return cls(
86
+ program=ZeoProgram(raw & 0xFF),
87
+ mode=ZeoMode((raw >> 8) & 0x3),
88
+ temperature=ZeoTemperature((raw >> 10) & 0x7),
89
+ rinse=ZeoRinse((raw >> 13) & 0x7),
90
+ spin=ZeoSpin((raw >> 16) & 0x7),
91
+ drying_mode=ZeoDryingMode((raw >> 19) & 0x7),
92
+ soak=ZeoSoak((raw >> 22) & 0x7),
93
+ dry_and_care=ZeoDryAndCare((raw >> 25) & 0x7),
94
+ steam_volume=ZeoSteamVolume((raw >> 28) & 0x7),
95
+ total_time_min=total_time_min or 0,
96
+ )
97
+
98
+
99
+ @dataclass
100
+ class ZeoDryerCustomMode(RoborockBase):
101
+ """Decoded custom programme from DP 222 for a standalone dryer.
102
+
103
+ Dryers pack a different (shorter) bitfield than washers — only 5
104
+ fields after program/mode. Mirrors ``WasherDpsCache.dryerCustomMode``
105
+ in module 725 of the plugin bundle.
106
+ """
107
+
108
+ program: ZeoProgram
109
+ """Drying program (bits 0-7)."""
110
+
111
+ mode: ZeoMode
112
+ """Drying mode (bits 8-10)."""
113
+
114
+ drying_mode: ZeoDryingMode
115
+ """Drying level (bits 11-13)."""
116
+
117
+ drying_method: ZeoDryingMethod
118
+ """Drying method (bits 14-16)."""
119
+
120
+ steam_volume: ZeoSteamVolume
121
+ """Steam volume (bits 17-19)."""
122
+
123
+ total_time_min: int = 0
124
+ """Total programme time in minutes (from DP 239)."""
125
+
126
+ @classmethod
127
+ def from_raw(cls, raw: int, total_time_min: int | None = None) -> "ZeoDryerCustomMode":
128
+ """Decode a raw 32-bit dryer custom-programme value."""
129
+ return cls(
130
+ program=ZeoProgram(raw & 0xFF),
131
+ # Dryer mode spans bits 8-10 (0x700, 3 bits) because the
132
+ # temperature field is absent from the dryer bitfield and
133
+ # bit 10 is re-allocated to mode. Washer uses 2 bits
134
+ # (0x300, bits 8-9) to make room for temperature at 10-12.
135
+ mode=ZeoMode((raw >> 8) & 0x7),
136
+ drying_mode=ZeoDryingMode((raw >> 11) & 0x7),
137
+ drying_method=ZeoDryingMethod((raw >> 14) & 0x7),
138
+ steam_volume=ZeoSteamVolume((raw >> 17) & 0x7),
139
+ total_time_min=total_time_min or 0,
140
+ )