python-roborock 2.61.0__tar.gz → 3.0.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 (93) hide show
  1. {python_roborock-2.61.0 → python_roborock-3.0.0}/PKG-INFO +1 -1
  2. {python_roborock-2.61.0 → python_roborock-3.0.0}/pyproject.toml +1 -1
  3. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/__init__.py +3 -11
  4. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/api.py +1 -1
  5. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/broadcast_protocol.py +1 -1
  6. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/cli.py +1 -1
  7. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/cloud_api.py +1 -1
  8. python_roborock-3.0.0/roborock/data/__init__.py +9 -0
  9. python_roborock-3.0.0/roborock/data/b01_q10/__init__.py +2 -0
  10. python_roborock-3.0.0/roborock/data/b01_q10/b01_q10_code_mappings.py +213 -0
  11. python_roborock-3.0.0/roborock/data/b01_q10/b01_q10_containers.py +53 -0
  12. python_roborock-3.0.0/roborock/data/b01_q7/__init__.py +2 -0
  13. python_roborock-2.61.0/roborock/b01_containers.py → python_roborock-3.0.0/roborock/data/b01_q7/b01_q7_code_mappings.py +1 -130
  14. python_roborock-3.0.0/roborock/data/b01_q7/b01_q7_containers.py +130 -0
  15. python_roborock-3.0.0/roborock/data/code_mappings.py +146 -0
  16. python_roborock-3.0.0/roborock/data/containers.py +436 -0
  17. python_roborock-3.0.0/roborock/data/dyad/__init__.py +2 -0
  18. python_roborock-3.0.0/roborock/data/dyad/dyad_code_mappings.py +102 -0
  19. python_roborock-3.0.0/roborock/data/dyad/dyad_containers.py +28 -0
  20. python_roborock-3.0.0/roborock/data/v1/__init__.py +3 -0
  21. python_roborock-2.61.0/roborock/clean_modes.py → python_roborock-3.0.0/roborock/data/v1/v1_clean_modes.py +6 -2
  22. python_roborock-2.61.0/roborock/code_mappings.py → python_roborock-3.0.0/roborock/data/v1/v1_code_mappings.py +147 -528
  23. python_roborock-2.61.0/roborock/containers.py → python_roborock-3.0.0/roborock/data/v1/v1_containers.py +39 -489
  24. python_roborock-3.0.0/roborock/data/zeo/__init__.py +2 -0
  25. python_roborock-3.0.0/roborock/data/zeo/zeo_code_mappings.py +136 -0
  26. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/device_features.py +3 -2
  27. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/cache.py +1 -1
  28. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/device.py +1 -1
  29. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/device_manager.py +1 -1
  30. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/mqtt_channel.py +1 -1
  31. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/traits/a01/__init__.py +1 -1
  32. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/traits/v1/__init__.py +2 -2
  33. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/traits/v1/child_lock.py +1 -1
  34. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/traits/v1/clean_record.py +1 -1
  35. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/traits/v1/clean_summary.py +1 -1
  36. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/traits/v1/common.py +1 -1
  37. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/traits/v1/consumeable.py +1 -1
  38. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/traits/v1/device_features.py +1 -1
  39. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/traits/v1/do_not_disturb.py +1 -1
  40. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/traits/v1/dust_collection_mode.py +1 -1
  41. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/traits/v1/flow_led_status.py +1 -1
  42. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/traits/v1/home.py +2 -2
  43. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/traits/v1/led_status.py +1 -1
  44. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/traits/v1/map_content.py +1 -1
  45. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/traits/v1/maps.py +1 -1
  46. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/traits/v1/rooms.py +1 -1
  47. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/traits/v1/smart_wash_params.py +1 -1
  48. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/traits/v1/status.py +1 -1
  49. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/traits/v1/valley_electricity_timer.py +1 -1
  50. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/traits/v1/wash_towel_mode.py +1 -1
  51. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/v1_channel.py +1 -1
  52. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/v1_rpc_channel.py +1 -1
  53. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/protocol.py +1 -1
  54. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/protocols/v1_protocol.py +1 -1
  55. python_roborock-3.0.0/roborock/py.typed +0 -0
  56. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/roborock_typing.py +1 -1
  57. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/version_1_apis/roborock_client_v1.py +1 -1
  58. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/version_1_apis/roborock_mqtt_client_v1.py +1 -1
  59. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/version_a01_apis/roborock_client_a01.py +4 -2
  60. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/version_a01_apis/roborock_mqtt_client_a01.py +1 -1
  61. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/web_api.py +1 -1
  62. {python_roborock-2.61.0 → python_roborock-3.0.0}/.gitignore +0 -0
  63. {python_roborock-2.61.0 → python_roborock-3.0.0}/LICENSE +0 -0
  64. {python_roborock-2.61.0 → python_roborock-3.0.0}/README.md +0 -0
  65. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/callbacks.py +0 -0
  66. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/command_cache.py +0 -0
  67. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/const.py +0 -0
  68. /python_roborock-2.61.0/roborock/py.typed → /python_roborock-3.0.0/roborock/data/zeo/zeo_containers.py +0 -0
  69. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/README.md +0 -0
  70. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/__init__.py +0 -0
  71. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/a01_channel.py +0 -0
  72. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/b01_channel.py +0 -0
  73. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/channel.py +0 -0
  74. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/local_channel.py +0 -0
  75. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/traits/__init__.py +0 -0
  76. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/traits/b01/__init__.py +0 -0
  77. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/traits/traits_mixin.py +0 -0
  78. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/traits/v1/command.py +0 -0
  79. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/devices/traits/v1/volume.py +0 -0
  80. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/exceptions.py +0 -0
  81. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/map/__init__.py +0 -0
  82. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/map/map_parser.py +0 -0
  83. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/mqtt/__init__.py +0 -0
  84. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/mqtt/roborock_session.py +0 -0
  85. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/mqtt/session.py +0 -0
  86. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/protocols/a01_protocol.py +0 -0
  87. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/protocols/b01_protocol.py +0 -0
  88. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/roborock_future.py +0 -0
  89. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/roborock_message.py +0 -0
  90. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/util.py +0 -0
  91. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/version_1_apis/__init__.py +0 -0
  92. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/version_1_apis/roborock_local_client_v1.py +0 -0
  93. {python_roborock-2.61.0 → python_roborock-3.0.0}/roborock/version_a01_apis/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-roborock
3
- Version: 2.61.0
3
+ Version: 3.0.0
4
4
  Summary: A package to control Roborock vacuums.
5
5
  Project-URL: Repository, https://github.com/humbertogontijo/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 = "2.61.0"
3
+ version = "3.0.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"
@@ -3,19 +3,14 @@
3
3
  .. include:: ../README.md
4
4
  """
5
5
 
6
- from roborock.b01_containers import *
7
- from roborock.code_mappings import *
8
- from roborock.containers import *
6
+ from roborock.data import *
9
7
  from roborock.exceptions import *
10
8
  from roborock.roborock_typing import *
11
9
 
12
10
  from . import (
13
- b01_containers,
14
- clean_modes,
15
11
  cloud_api,
16
- code_mappings,
17
12
  const,
18
- containers,
13
+ data,
19
14
  exceptions,
20
15
  roborock_typing,
21
16
  version_1_apis,
@@ -27,13 +22,10 @@ __all__ = [
27
22
  "web_api",
28
23
  "version_1_apis",
29
24
  "version_a01_apis",
30
- "containers",
31
- "b01_containers",
32
25
  "const",
33
26
  "cloud_api",
34
- "clean_modes",
35
- "code_mappings",
36
27
  "roborock_typing",
37
28
  "exceptions",
29
+ "data",
38
30
  # Add new APIs here in the future when they are public e.g. devices/
39
31
  ]
@@ -8,7 +8,7 @@ import time
8
8
  from abc import ABC, abstractmethod
9
9
  from typing import Any
10
10
 
11
- from .containers import (
11
+ from .data import (
12
12
  DeviceData,
13
13
  )
14
14
  from .exceptions import (
@@ -19,7 +19,7 @@ from construct import ( # type: ignore
19
19
  from Crypto.Cipher import AES
20
20
 
21
21
  from roborock import RoborockException
22
- from roborock.containers import BroadcastMessage
22
+ from roborock.data import BroadcastMessage
23
23
  from roborock.protocol import EncryptionAdapter, Utils, _Parser
24
24
 
25
25
  _LOGGER = logging.getLogger(__name__)
@@ -42,7 +42,7 @@ from pyshark.capture.live_capture import LiveCapture, UnknownInterfaceException
42
42
  from pyshark.packet.packet import Packet # type: ignore
43
43
 
44
44
  from roborock import SHORT_MODEL_TO_ENUM, RoborockCommand
45
- from roborock.containers import CombinedMapInfo, DeviceData, HomeData, NetworkInfo, RoborockBase, UserData
45
+ from roborock.data import CombinedMapInfo, DeviceData, HomeData, NetworkInfo, RoborockBase, UserData
46
46
  from roborock.device_features import DeviceFeatures
47
47
  from roborock.devices.cache import Cache, CacheData
48
48
  from roborock.devices.device import RoborockDevice
@@ -14,7 +14,7 @@ from paho.mqtt.enums import MQTTErrorCode
14
14
  from paho.mqtt.reasoncodes import ReasonCode # type: ignore
15
15
 
16
16
  from .api import KEEPALIVE, RoborockClient
17
- from .containers import DeviceData, UserData
17
+ from .data import DeviceData, UserData
18
18
  from .exceptions import RoborockException, VacuumError
19
19
  from .protocol import (
20
20
  Decoder,
@@ -0,0 +1,9 @@
1
+ """This module is meant to hold dataclasses and codemappings for various devices and protocols."""
2
+
3
+ from .b01_q7 import *
4
+ from .b01_q10 import *
5
+ from .code_mappings import *
6
+ from .containers import *
7
+ from .dyad import *
8
+ from .v1 import *
9
+ from .zeo import *
@@ -0,0 +1,2 @@
1
+ from .b01_q10_code_mappings import *
2
+ from .b01_q10_containers import *
@@ -0,0 +1,213 @@
1
+ from ..code_mappings import RoborockModeEnum
2
+
3
+
4
+ class B01_Q10_DP(RoborockModeEnum):
5
+ CLEAN_TIME = ("dpCleanTime", 6)
6
+ CLEAN_AREA = ("dpCleanArea", 7)
7
+ SEEK = ("dpSeek", 11)
8
+ REMOTE = ("dpRemote", 12)
9
+ MAP_RESET = ("dpMapReset", 13)
10
+ REQUEST = ("dpRequest", 16)
11
+ RESET_SIDE_BRUSH = ("dpResetSideBrush", 18)
12
+ RESET_MAIN_BRUSH = ("dpResetMainBrush", 20)
13
+ RESET_FILTER = ("dpResetFilter", 22)
14
+ RAG_LIFE = ("dpRagLife", 23)
15
+ RESET_RAG_LIFE = ("dpResetRagLife", 24)
16
+ NOT_DISTURB = ("dpNotDisturb", 25)
17
+ VOLUME = ("dpVolume", 26)
18
+ BEAK_CLEAN = ("dpBeakClean", 27)
19
+ TOTAL_CLEAN_AREA = ("dpTotalCleanArea", 29)
20
+ TOTAL_CLEAN_COUNT = ("dpTotalCleanCount", 30)
21
+ TOTAL_CLEAN_TIME = ("dpTotalCleanTime", 31)
22
+ TIMER = ("dpTimer", 32)
23
+ NOT_DISTURB_DATA = ("dpNotDisturbData", 33)
24
+ DEVICE_INFO = ("dpDeviceInfo", 34)
25
+ VOICE_PACKAGE = ("dpVoicePackage", 35)
26
+ VOICE_LANGUAGE = ("dpVoiceLanguage", 36)
27
+ DUST_SWITCH = ("dpDustSwitch", 37)
28
+ CUSTOM_MODE = ("dpCustomMode", 39)
29
+ MOP_STATE = ("dpMopState", 40)
30
+ UNIT = ("dpUnit", 42)
31
+ CARPET_CLEAN_PREFER = ("dpCarpetCleanPrefer", 44)
32
+ AUTO_BOOST = ("dpAutoBoost", 45)
33
+ CHILD_LOCK = ("dpChildLock", 47)
34
+ DUST_SETTING = ("dpDustSetting", 50)
35
+ MAP_SAVE_SWITCH = ("dpMapSaveSwitch", 51)
36
+ CLEAN_RECORD = ("dpCleanRecord", 52)
37
+ RECEND_CLEAN_RECORD = ("dpRecendCleanRecord", 53)
38
+ RESTRICTED_ZONE = ("dpRestrictedZone", 54)
39
+ RESTRICTED_ZONE_UP = ("dpRestrictedZoneUp", 55)
40
+ VIRTUAL_WALL = ("dpVirtualWall", 56)
41
+ VIRTUAL_WALL_UP = ("dpVirtualWallUp", 57)
42
+ ZONED = ("dpZoned", 58)
43
+ ZONED_UP = ("dpZonedUp", 59)
44
+ MULTI_MAP_SWITCH = ("dpMultiMapSwitch", 60)
45
+ MULTI_MAP = ("dpMultiMap", 61)
46
+ CUSTOMER_CLEAN = ("dpCustomerClean", 62)
47
+ CUSTOMER_CLEAN_REQUEST = ("dpCustomerCleanRequest", 63)
48
+ GET_CARPET = ("dpGetCarpet", 64)
49
+ CARPET_UP = ("dpCarpetUp", 65)
50
+ SELF_IDENTIFYING_CARPET = ("dpSelfIdentifyingCarpet", 66)
51
+ SENSOR_LIFE = ("dpSensorLife", 67)
52
+ RESET_SENSOR = ("dpResetSensor", 68)
53
+ REQUEST_TIMER = ("dpRequestTimer", 69)
54
+ REMOVE_ZONED = ("dpRemoveZoned", 70)
55
+ REMOVE_ZONED_UP = ("dpRemoveZonedUp", 71)
56
+ ROOM_MERGE = ("dpRoomMerge", 72)
57
+ ROOM_SPLIT = ("dpRoomSplit", 73)
58
+ RESET_ROOM_NAME = ("dpResetRoomName", 74)
59
+ REQUSET_NOT_DISTURB_DATA = ("dpRequsetNotDisturbData", 75)
60
+ CARPET_CLEAN_TYPE = ("dpCarpetCleanType", 76)
61
+ BUTTON_LIGHT_SWITCH = ("dpButtonLightSwitch", 77)
62
+ CLEAN_LINE = ("dpCleanLine", 78)
63
+ TIME_ZONE = ("dpTimeZone", 79)
64
+ AREA_UNIT = ("dpAreaUnit", 80)
65
+ NET_INFO = ("dpNetInfo", 81)
66
+ CLEAN_ORDER = ("dpCleanOrder", 82)
67
+ ROBOT_TYPE = ("dpRobotType", 83)
68
+ LOG_SWITCH = ("dpLogSwitch", 84)
69
+ FLOOR_MATERIAL = ("dpFloorMaterial", 85)
70
+ LINE_LASER_OBSTACLE_AVOIDANCE = ("dpLineLaserObstacleAvoidance", 86)
71
+ CLEAN_PROGESS = ("dpCleanProgess", 87)
72
+ GROUND_CLEAN = ("dpGroundClean", 88)
73
+ IGNORE_OBSTACLE = ("dpIgnoreObstacle", 89)
74
+ FAULT = ("dpFault", 90)
75
+ CLEAN_EXPAND = ("dpCleanExpand", 91)
76
+ NOT_DISTURB_EXPAND = ("dpNotDisturbExpand", 92)
77
+ TIMER_TYPE = ("dpTimerType", 93)
78
+ CREATE_MAP_FINISHED = ("dpCreateMapFinished", 94)
79
+ ADD_CLEAN_AREA = ("dpAddCleanArea", 95)
80
+ ADD_CLEAN_STATE = ("dpAddCleanState", 96)
81
+ RESTRICTED_AREA = ("dpRestrictedArea", 97)
82
+ RESTRICTED_AREA_UP = ("dpRestrictedAreaUp", 98)
83
+ SUSPECTED_THRESHOLD = ("dpSuspectedThreshold", 99)
84
+ SUSPECTED_THRESHOLD_UP = ("dpSuspectedThresholdUp", 100)
85
+ COMMON = ("dpCommon", 101)
86
+ JUMP_SCAN = ("dpJumpScan", 101)
87
+ REQUETDPS = ("dpRequetdps", 102) # NOTE: THIS TYPO IS FOUND IN SOURCE CODE
88
+ CLIFF_RESTRICTED_AREA = ("dpCliffRestrictedArea", 102)
89
+ CLIFF_RESTRICTED_AREA_UP = ("dpCliffRestrictedAreaUp", 103)
90
+ BREAKPOINT_CLEAN = ("dpBreakpointClean", 104)
91
+ VALLEY_POINT_CHARGING = ("dpValleyPointCharging", 105)
92
+ VALLEY_POINT_CHARGING_DATA_UP = ("dpValleyPointChargingDataUp", 106)
93
+ VALLEY_POINT_CHARGING_DATA = ("dpValleyPointChargingData", 107)
94
+ VOICE_VERSION = ("dpVoiceVersion", 108)
95
+ ROBOT_COUNTRY_CODE = ("dpRobotCountryCode", 109)
96
+ HEARTBEAT = ("dpHeartbeat", 110)
97
+ STATUS = ("dpStatus", 121)
98
+ BATTERY = ("dpBattery", 122)
99
+ FUN_LEVEL = ("dpfunLevel", 123)
100
+ WATER_LEVEL = ("dpWaterLevel", 124)
101
+ MAIN_BRUSH_LIFE = ("dpMainBrushLife", 125)
102
+ SIDE_BRUSH_LIFE = ("dpSideBrushLife", 126)
103
+ FILTER_LIFE = ("dpFilterLife", 127)
104
+ TASK_CANCEL_IN_MOTION = ("dpTaskCancelInMotion", 132)
105
+ OFFLINE = ("dpOffline", 135)
106
+ CLEAN_COUNT = ("dpCleanCount", 136)
107
+ CLEAN_MODE = ("dpCleanMode", 137)
108
+ CLEAN_TASK_TYPE = ("dpCleanTaskType", 138)
109
+ BACK_TYPE = ("dpBackType", 139)
110
+ CLEANING_PROGRESS = ("dpCleaningProgress", 141)
111
+ FLEEING_GOODS = ("dpFleeingGoods", 142)
112
+ START_CLEAN = ("dpStartClean", 201)
113
+ START_BACK = ("dpStartBack", 202)
114
+ START_DOCK_TASK = ("dpStartDockTask", 203)
115
+ PAUSE = ("dpPause", 204)
116
+ RESUME = ("dpResume", 205)
117
+ STOP = ("dpStop", 206)
118
+ USER_PLAN = ("dpUserPlan", 207)
119
+
120
+
121
+ class YXFanLevel(RoborockModeEnum):
122
+ UNKNOWN = "unknown", -1
123
+ CLOSE = "close", 0
124
+ QUITE = "quite", 1
125
+ NORMAL = "normal", 2
126
+ STRONG = "strong", 3
127
+ MAX = "max", 4
128
+ SUPER = "super", 5
129
+
130
+
131
+ class YXWaterLevel(RoborockModeEnum):
132
+ UNKNOWN = "unknown", -1
133
+ CLOSE = "close", 0
134
+ LOW = "low", 1
135
+ MIDDLE = "middle", 2
136
+ HIGH = "high", 3
137
+
138
+
139
+ class YXCleanLine(RoborockModeEnum):
140
+ FAST = "fast", 0
141
+ DAILY = "daily", 1
142
+ FINE = "fine", 2
143
+
144
+
145
+ class YXRoomMaterial(RoborockModeEnum):
146
+ HORIZONTAL_FLOOR_BOARD = "horizontalfloorboard", 0
147
+ VERTICAL_FLOOR_BOARD = "verticalfloorboard", 1
148
+ CERAMIC_TILE = "ceramictile", 2
149
+ OTHER = "other", 255
150
+
151
+
152
+ class YXCleanType(RoborockModeEnum):
153
+ UNKNOWN = "unknown", -1
154
+ BOTH_WORK = "bothwork", 1
155
+ ONLY_SWEEP = "onlysweep", 2
156
+ ONLY_MOP = "onlymop", 3
157
+
158
+
159
+ class YXDeviceState(RoborockModeEnum):
160
+ UNKNOWN = "unknown", -1
161
+ SLEEP_STATE = "sleepstate", 2
162
+ STANDBY_STATE = "standbystate", 3
163
+ CLEANING_STATE = "cleaningstate", 5
164
+ TO_CHARGE_STATE = "tochargestate", 6
165
+ REMOTEING_STATE = "remoteingstate", 7
166
+ CHARGING_STATE = "chargingstate", 8
167
+ PAUSE_STATE = "pausestate", 10
168
+ FAULT_STATE = "faultstate", 12
169
+ UPGRADE_STATE = "upgradestate", 14
170
+ DUSTING = "dusting", 22
171
+ CREATING_MAP_STATE = "creatingmapstate", 29
172
+ MAP_SAVE_STATE = "mapsavestate", 99
173
+ RE_LOCATION_STATE = "relocationstate", 101
174
+ ROBOT_SWEEPING = "robotsweeping", 102
175
+ ROBOT_MOPING = "robotmoping", 103
176
+ ROBOT_SWEEP_AND_MOPING = "robotsweepandmoping", 104
177
+ ROBOT_TRANSITIONING = "robottransitioning", 105
178
+ ROBOT_WAIT_CHARGE = "robotwaitcharge", 108
179
+
180
+
181
+ class YXBackType(RoborockModeEnum):
182
+ UNKNOWN = "unknown", -1
183
+ IDLE = "idle", 0
184
+ BACK_DUSTING = "backdusting", 4
185
+ BACK_CHARGING = "backcharging", 5
186
+
187
+
188
+ class YXDeviceWorkMode(RoborockModeEnum):
189
+ UNKNOWN = "unknown", -1
190
+ BOTH_WORK = "bothwork", 1
191
+ ONLY_SWEEP = "onlysweep", 2
192
+ ONLY_MOP = "onlymop", 3
193
+ CUSTOMIZED = "customized", 4
194
+ SAVE_WORRY = "saveworry", 5
195
+ SWEEP_MOP = "sweepmop", 6
196
+
197
+
198
+ class YXDeviceCleanTask(RoborockModeEnum):
199
+ UNKNOWN = "unknown", -1
200
+ IDLE = "idle", 0
201
+ SMART = "smart", 1
202
+ ELECTORAL = "electoral", 2
203
+ DIVIDE_AREAS = "divideareas", 3
204
+ CREATING_MAP = "creatingmap", 4
205
+ PART = "part", 5
206
+
207
+
208
+ class YXDeviceDustCollectionFrequency(RoborockModeEnum):
209
+ DAILY = "daily", 0
210
+ INTERVAL_15 = "interval_15", 15
211
+ INTERVAL_30 = "interval_30", 30
212
+ INTERVAL_45 = "interval_45", 45
213
+ INTERVAL_60 = "interval_60", 60
@@ -0,0 +1,53 @@
1
+ from ..containers import RoborockBase
2
+
3
+
4
+ class dpCleanRecord(RoborockBase):
5
+ op: str
6
+ result: int
7
+ id: str
8
+ data: list
9
+
10
+
11
+ class dpMultiMap(RoborockBase):
12
+ op: str
13
+ result: int
14
+ data: list
15
+
16
+
17
+ class dpGetCarpet(RoborockBase):
18
+ op: str
19
+ result: int
20
+ data: str
21
+
22
+
23
+ class dpSelfIdentifyingCarpet(RoborockBase):
24
+ op: str
25
+ result: int
26
+ data: str
27
+
28
+
29
+ class dpNetInfo(RoborockBase):
30
+ wifiName: str
31
+ ipAdress: str
32
+ mac: str
33
+ signal: int
34
+
35
+
36
+ class dpNotDisturbExpand(RoborockBase):
37
+ disturb_dust_enable: int
38
+ disturb_light: int
39
+ disturb_resume_clean: int
40
+ disturb_voice: int
41
+
42
+
43
+ class dpCurrentCleanRoomIds(RoborockBase):
44
+ room_id_list: list
45
+
46
+
47
+ class dpVoiceVersion(RoborockBase):
48
+ version: int
49
+
50
+
51
+ class dpTimeZone(RoborockBase):
52
+ timeZoneCity: str
53
+ timeZoneSec: int
@@ -0,0 +1,2 @@
1
+ from .b01_q7_code_mappings import *
2
+ from .b01_q7_containers import *
@@ -1,7 +1,4 @@
1
- from dataclasses import dataclass, field
2
-
3
- from .code_mappings import RoborockModeEnum
4
- from .containers import RoborockBase
1
+ from ..code_mappings import RoborockModeEnum
5
2
 
6
3
 
7
4
  class WorkStatusMapping(RoborockModeEnum):
@@ -125,64 +122,6 @@ class CarpetModeMapping(RoborockModeEnum):
125
122
  OFF = ("off", 2)
126
123
 
127
124
 
128
- @dataclass
129
- class NetStatus(RoborockBase):
130
- """Represents the network status of the device."""
131
-
132
- rssi: str
133
- loss: int
134
- ping: int
135
- ip: str
136
- mac: str
137
- ssid: str
138
- frequency: int
139
- bssid: str
140
-
141
-
142
- @dataclass
143
- class OrderTotal(RoborockBase):
144
- """Represents the order total information."""
145
-
146
- total: int
147
- enable: int
148
-
149
-
150
- @dataclass
151
- class Privacy(RoborockBase):
152
- """Represents the privacy settings of the device."""
153
-
154
- ai_recognize: int
155
- dirt_recognize: int
156
- pet_recognize: int
157
- carpet_turbo: int
158
- carpet_avoid: int
159
- carpet_show: int
160
- map_uploads: int
161
- ai_agent: int
162
- ai_avoidance: int
163
- record_uploads: int
164
- along_floor: int
165
- auto_upgrade: int
166
-
167
-
168
- @dataclass
169
- class PvCharging(RoborockBase):
170
- """Represents the photovoltaic charging status."""
171
-
172
- status: int
173
- begin_time: int
174
- end_time: int
175
-
176
-
177
- @dataclass
178
- class Recommend(RoborockBase):
179
- """Represents cleaning recommendations."""
180
-
181
- sill: int
182
- wall: int
183
- room_id: list[int] = field(default_factory=list)
184
-
185
-
186
125
  class B01Fault(RoborockModeEnum):
187
126
  """B01 fault codes and their descriptions."""
188
127
 
@@ -347,71 +286,3 @@ class B01Fault(RoborockModeEnum):
347
286
  F_2113 = ("fault_2113", 2113)
348
287
  F_2114 = ("fault_2114", 2114)
349
288
  F_2115 = ("fault_2115", 2115)
350
-
351
-
352
- @dataclass
353
- class B01Props(RoborockBase):
354
- """
355
- Represents the complete properties and status for a Roborock B01 model.
356
- This dataclass is generated based on the device's status JSON object.
357
- """
358
-
359
- status: WorkStatusMapping
360
- fault: B01Fault
361
- wind: SCWindMapping
362
- water: int
363
- mode: int
364
- quantity: int
365
- alarm: int
366
- volume: int
367
- hypa: int
368
- main_brush: int
369
- side_brush: int
370
- mop_life: int
371
- main_sensor: int
372
- net_status: NetStatus
373
- repeat_state: int
374
- tank_state: int
375
- sweep_type: int
376
- clean_path_preference: int
377
- cloth_state: int
378
- time_zone: int
379
- time_zone_info: str
380
- language: int
381
- cleaning_time: int
382
- real_clean_time: int
383
- cleaning_area: int
384
- custom_type: int
385
- sound: int
386
- work_mode: WorkModeMapping
387
- station_act: int
388
- charge_state: int
389
- current_map_id: int
390
- map_num: int
391
- dust_action: int
392
- quiet_is_open: int
393
- quiet_begin_time: int
394
- quiet_end_time: int
395
- clean_finish: int
396
- voice_type: int
397
- voice_type_version: int
398
- order_total: OrderTotal
399
- build_map: int
400
- privacy: Privacy
401
- dust_auto_state: int
402
- dust_frequency: int
403
- child_lock: int
404
- multi_floor: int
405
- map_save: int
406
- light_mode: int
407
- green_laser: int
408
- dust_bag_used: int
409
- order_save_mode: int
410
- manufacturer: str
411
- back_to_wash: int
412
- charge_station_type: int
413
- pv_cut_charge: int
414
- pv_charging: PvCharging
415
- serial_number: str
416
- recommend: Recommend
417
- add_sweep_status: int
@@ -0,0 +1,130 @@
1
+ from dataclasses import dataclass, field
2
+
3
+ from ..containers import RoborockBase
4
+ from .b01_q7_code_mappings import B01Fault, SCWindMapping, WorkModeMapping, WorkStatusMapping
5
+
6
+
7
+ @dataclass
8
+ class NetStatus(RoborockBase):
9
+ """Represents the network status of the device."""
10
+
11
+ rssi: str
12
+ loss: int
13
+ ping: int
14
+ ip: str
15
+ mac: str
16
+ ssid: str
17
+ frequency: int
18
+ bssid: str
19
+
20
+
21
+ @dataclass
22
+ class OrderTotal(RoborockBase):
23
+ """Represents the order total information."""
24
+
25
+ total: int
26
+ enable: int
27
+
28
+
29
+ @dataclass
30
+ class Privacy(RoborockBase):
31
+ """Represents the privacy settings of the device."""
32
+
33
+ ai_recognize: int
34
+ dirt_recognize: int
35
+ pet_recognize: int
36
+ carpet_turbo: int
37
+ carpet_avoid: int
38
+ carpet_show: int
39
+ map_uploads: int
40
+ ai_agent: int
41
+ ai_avoidance: int
42
+ record_uploads: int
43
+ along_floor: int
44
+ auto_upgrade: int
45
+
46
+
47
+ @dataclass
48
+ class PvCharging(RoborockBase):
49
+ """Represents the photovoltaic charging status."""
50
+
51
+ status: int
52
+ begin_time: int
53
+ end_time: int
54
+
55
+
56
+ @dataclass
57
+ class Recommend(RoborockBase):
58
+ """Represents cleaning recommendations."""
59
+
60
+ sill: int
61
+ wall: int
62
+ room_id: list[int] = field(default_factory=list)
63
+
64
+
65
+ @dataclass
66
+ class B01Props(RoborockBase):
67
+ """
68
+ Represents the complete properties and status for a Roborock B01 model.
69
+ This dataclass is generated based on the device's status JSON object.
70
+ """
71
+
72
+ status: WorkStatusMapping
73
+ fault: B01Fault
74
+ wind: SCWindMapping
75
+ water: int
76
+ mode: int
77
+ quantity: int
78
+ alarm: int
79
+ volume: int
80
+ hypa: int
81
+ main_brush: int
82
+ side_brush: int
83
+ mop_life: int
84
+ main_sensor: int
85
+ net_status: NetStatus
86
+ repeat_state: int
87
+ tank_state: int
88
+ sweep_type: int
89
+ clean_path_preference: int
90
+ cloth_state: int
91
+ time_zone: int
92
+ time_zone_info: str
93
+ language: int
94
+ cleaning_time: int
95
+ real_clean_time: int
96
+ cleaning_area: int
97
+ custom_type: int
98
+ sound: int
99
+ work_mode: WorkModeMapping
100
+ station_act: int
101
+ charge_state: int
102
+ current_map_id: int
103
+ map_num: int
104
+ dust_action: int
105
+ quiet_is_open: int
106
+ quiet_begin_time: int
107
+ quiet_end_time: int
108
+ clean_finish: int
109
+ voice_type: int
110
+ voice_type_version: int
111
+ order_total: OrderTotal
112
+ build_map: int
113
+ privacy: Privacy
114
+ dust_auto_state: int
115
+ dust_frequency: int
116
+ child_lock: int
117
+ multi_floor: int
118
+ map_save: int
119
+ light_mode: int
120
+ green_laser: int
121
+ dust_bag_used: int
122
+ order_save_mode: int
123
+ manufacturer: str
124
+ back_to_wash: int
125
+ charge_station_type: int
126
+ pv_cut_charge: int
127
+ pv_charging: PvCharging
128
+ serial_number: str
129
+ recommend: Recommend
130
+ add_sweep_status: int