roborock.data.v1.v1_code_mappings
1from enum import StrEnum 2from typing import Self 3 4from ..code_mappings import RoborockEnum 5 6 7class RoborockFinishReason(RoborockEnum): 8 manual_interrupt = 21 # Cleaning interrupted by user 9 cleanup_interrupted = 24 # Cleanup interrupted 10 manual_interrupt_2 = 21 11 manual_interrupt_12 = 29 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 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 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 32 area_unreachable = 61 # Area unreachable 33 area_unreachable_2 = 62 34 washing_error = 67 # Washing error 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 45 patrol_success = 114 # Cruise completed 46 patrol_fail = 115 # Cruise failed 47 pet_patrol_success = 116 # Pet found 48 pet_patrol_fail = 117 # Pet found failed 49 50 51class RoborockInCleaning(RoborockEnum): 52 complete = 0 53 global_clean_not_complete = 1 54 zone_clean_not_complete = 2 55 segment_clean_not_complete = 3 56 57 58class RoborockCleanType(RoborockEnum): 59 all_zone = 1 60 draw_zone = 2 61 select_zone = 3 62 quick_build = 4 63 video_patrol = 5 64 pet_patrol = 6 65 66 67class RoborockChargeStatus(RoborockEnum): 68 """Describes the charging status of the device.""" 69 70 unknown = -1 71 charge_waiting = 0 72 charging = 1 73 74 75class RoborockDockState(StrEnum): 76 """Synthesized high-level dock and power state of the device. 77 78 This enum represents a unified "UI-level" state that combines multiple raw 79 device data points (`state`, `charge_status`, `battery`) into a single, 80 human-readable status that accurately reflects what the vacuum is doing 81 relative to the dock. 82 83 It is highly recommended for consumers of this API 84 to use this synthesized state to determine if the vacuum is charging or 85 docked, rather than attempting to parse the raw integer data points, as 86 this safely handles backward compatibility for older models that lack 87 explicit off-peak schedule reporting. 88 """ 89 90 unknown = "unknown" 91 """The dock state could not be determined or is unmapped.""" 92 93 idle = "idle" 94 """The vacuum is away from the dock (e.g., cleaning, paused, or errored). 95 In the official app, this state presents the 'Return to Dock' or 'Recharge' action.""" 96 97 returning = "returning" 98 """The vacuum is actively navigating its way back to the dock. 99 In the official app, this state presents the 'Stop' or 'Pause' action.""" 100 101 charging = "charging" 102 """The vacuum is on the dock and actively receiving electricity. 103 In the official app, this state is displayed as 'Charging'.""" 104 105 off_peak_waiting = "off_peak_waiting" 106 """The vacuum is on the dock but charging is paused. It is waiting for the 107 user's scheduled 'Valley Electricity' off-peak hours to begin before 108 drawing power. 109 In the official app, this state is displayed as 'Charging paused during peak hours'.""" 110 111 full = "full" 112 """The vacuum is on the dock and the battery is at 100% capacity. 113 In the official app, this state is displayed as 'Fully charged'.""" 114 115 dusting = "dusting" 116 """The vacuum is on the dock and is currently being evacuated by the 117 auto-empty base. 118 In the official app, this state is displayed as 'Emptying dustbin'.""" 119 120 121class RoborockStartType(RoborockEnum): 122 button = 1 123 app = 2 124 schedule = 3 125 mi_home = 4 126 quick_start = 5 127 voice_control = 13 128 routines = 101 129 alexa = 801 130 google = 802 131 ifttt = 803 132 yandex = 804 133 homekit = 805 134 xiaoai = 806 135 tmall_genie = 807 136 duer = 808 137 dingdong = 809 138 siri = 810 139 clova = 811 140 wechat = 901 141 alipay = 902 142 aqara = 903 143 hisense = 904 144 huawei = 905 145 widget_launch = 820 146 smart_watch = 821 147 148 149class RoborockDssCodes(RoborockEnum): 150 @classmethod 151 def _missing_(cls: type[Self], key) -> Self: 152 # If the calculated value is not provided, then it should be viewed as okay. 153 # As the math will sometimes result in you getting numbers that don't matter. 154 return cls.okay # type: ignore 155 156 157class ClearWaterBoxStatus(RoborockDssCodes): 158 """Status of the clear water box.""" 159 160 okay = 0 161 out_of_water = 1 162 out_of_water_2 = 38 163 refill_error = 48 164 165 166class DirtyWaterBoxStatus(RoborockDssCodes): 167 """Status of the dirty water box.""" 168 169 okay = 0 170 full_not_installed = 1 171 full_not_installed_2 = 39 172 drain_error = 49 173 174 175class DustBagStatus(RoborockDssCodes): 176 """Status of the dust bag.""" 177 178 okay = 0 179 not_installed = 1 180 full = 34 181 182 183class CleanFluidStatus(RoborockDssCodes): 184 """Status of the cleaning fluid container.""" 185 186 empty_not_installed = 1 187 okay = 2 188 189 190class RoborockErrorCode(RoborockEnum): 191 none = 0 192 lidar_blocked = 1 193 bumper_stuck = 2 194 wheels_suspended = 3 195 cliff_sensor_error = 4 196 main_brush_jammed = 5 197 side_brush_jammed = 6 198 wheels_jammed = 7 199 robot_trapped = 8 200 no_dustbin = 9 201 strainer_error = 10 # Filter is wet or blocked 202 compass_error = 11 # Strong magnetic field detected 203 low_battery = 12 204 charging_error = 13 205 battery_error = 14 206 wall_sensor_dirty = 15 207 robot_tilted = 16 208 side_brush_error = 17 209 fan_error = 18 210 dock = 19 # Dock not connected to power 211 optical_flow_sensor_dirt = 20 212 vertical_bumper_pressed = 21 213 dock_locator_error = 22 214 return_to_dock_fail = 23 215 nogo_zone_detected = 24 216 visual_sensor = 25 # Camera error 217 light_touch = 26 # Wall sensor error 218 vibrarise_jammed = 27 219 robot_on_carpet = 28 220 filter_blocked = 29 221 invisible_wall_detected = 30 222 cannot_cross_carpet = 31 223 internal_error = 32 224 collect_dust_error_3 = 34 # Clean auto-empty dock 225 collect_dust_error_4 = 35 # Auto empty dock voltage error 226 mopping_roller_1 = 36 # Wash roller may be jammed 227 mopping_roller_error_2 = 37 # wash roller not lowered properly 228 clear_water_box_hoare = 38 # Check the clean water tank 229 dirty_water_box_hoare = 39 # Check the dirty water tank 230 sink_strainer_hoare = 40 # Reinstall the water filter 231 clear_water_box_exception = 41 # Clean water tank empty 232 clear_brush_exception = 42 # Check that the water filter has been correctly installed 233 clear_brush_exception_2 = 43 # Positioning button error 234 filter_screen_exception = 44 # Clean the dock water filter 235 mopping_roller_2 = 45 # Wash roller may be jammed 236 up_water_exception = 48 237 drain_water_exception = 49 238 temperature_protection = 51 # Unit temperature protection 239 clean_carousel_exception = 52 240 clean_carousel_water_full = 53 241 water_carriage_drop = 54 242 check_clean_carouse = 55 243 audio_error = 56 244 245 246class RoborockFanPowerCode(RoborockEnum): 247 """Describes the fan power of the vacuum cleaner.""" 248 249 # Fan speeds should have the first letter capitalized - as there is no way to change the name in translations as 250 # far as I am aware 251 252 253class RoborockFanSpeedV1(RoborockFanPowerCode): 254 silent = 38 255 standard = 60 256 medium = 77 257 turbo = 90 258 259 260class RoborockFanSpeedV2(RoborockFanPowerCode): 261 silent = 101 262 balanced = 102 263 turbo = 103 264 max = 104 265 gentle = 105 266 auto = 106 267 268 269class RoborockFanSpeedV3(RoborockFanPowerCode): 270 silent = 38 271 standard = 60 272 medium = 75 273 turbo = 100 274 275 276class RoborockFanSpeedE2(RoborockFanPowerCode): 277 gentle = 41 278 silent = 50 279 standard = 68 280 medium = 79 281 turbo = 100 282 283 284class RoborockFanSpeedS7(RoborockFanPowerCode): 285 off = 105 286 quiet = 101 287 balanced = 102 288 turbo = 103 289 max = 104 290 custom = 106 291 292 293class RoborockFanSpeedS7MaxV(RoborockFanPowerCode): 294 off = 105 295 quiet = 101 296 balanced = 102 297 turbo = 103 298 max = 104 299 custom = 106 300 max_plus = 108 301 302 303class RoborockFanSpeedS6Pure(RoborockFanPowerCode): 304 gentle = 105 305 quiet = 101 306 balanced = 102 307 turbo = 103 308 max = 104 309 custom = 106 310 311 312class RoborockFanSpeedQ7Max(RoborockFanPowerCode): 313 quiet = 101 314 balanced = 102 315 turbo = 103 316 max = 104 317 318 319class RoborockFanSpeedQRevoMaster(RoborockFanPowerCode): 320 off = 105 321 quiet = 101 322 balanced = 102 323 turbo = 103 324 max = 104 325 custom = 106 326 max_plus = 108 327 smart_mode = 110 328 329 330class RoborockFanSpeedQRevoCurv(RoborockFanPowerCode): 331 quiet = 101 332 balanced = 102 333 turbo = 103 334 max = 104 335 off = 105 336 custom = 106 337 max_plus = 108 338 smart_mode = 110 339 340 341class RoborockFanSpeedQRevoMaxV(RoborockFanPowerCode): 342 off = 105 343 quiet = 101 344 balanced = 102 345 turbo = 103 346 max = 104 347 custom = 106 348 max_plus = 108 349 smart_mode = 110 350 351 352class RoborockFanSpeedP10(RoborockFanPowerCode): 353 off = 105 354 quiet = 101 355 balanced = 102 356 turbo = 103 357 max = 104 358 custom = 106 359 max_plus = 108 360 smart_mode = 110 361 362 363class RoborockFanSpeedS8MaxVUltra(RoborockFanPowerCode): 364 off = 105 365 quiet = 101 366 balanced = 102 367 turbo = 103 368 max = 104 369 custom = 106 370 max_plus = 108 371 smart_mode = 110 372 373 374class RoborockFanSpeedSaros10(RoborockFanPowerCode): 375 off = 105 376 quiet = 101 377 balanced = 102 378 turbo = 103 379 max = 104 380 custom = 106 381 max_plus = 108 382 smart_mode = 110 383 384 385class RoborockFanSpeedSaros10R(RoborockFanPowerCode): 386 off = 105 387 quiet = 101 388 balanced = 102 389 turbo = 103 390 max = 104 391 custom = 106 392 max_plus = 108 393 smart_mode = 110 394 395 396class RoborockMopModeCode(RoborockEnum): 397 """Describes the mop mode of the vacuum cleaner.""" 398 399 400class RoborockMopModeQRevoCurv(RoborockMopModeCode): 401 standard = 300 402 deep = 301 403 custom = 302 404 deep_plus = 303 405 fast = 304 406 smart_mode = 306 407 408 409class RoborockMopModeS7(RoborockMopModeCode): 410 """Describes the mop mode of the vacuum cleaner.""" 411 412 standard = 300 413 deep = 301 414 custom = 302 415 deep_plus = 303 416 417 418class RoborockMopModeS8ProUltra(RoborockMopModeCode): 419 standard = 300 420 deep = 301 421 deep_plus = 303 422 fast = 304 423 custom = 302 424 smart_mode = 306 425 426 427class RoborockMopModeS8MaxVUltra(RoborockMopModeCode): 428 standard = 300 429 deep = 301 430 custom = 302 431 deep_plus = 303 432 fast = 304 433 deep_plus_pearl = 305 434 smart_mode = 306 435 436 437class RoborockMopModeSaros10R(RoborockMopModeCode): 438 standard = 300 439 deep = 301 440 custom = 302 441 deep_plus = 303 442 fast = 304 443 smart_mode = 306 444 445 446class RoborockMopModeQRevoMaster(RoborockMopModeCode): 447 standard = 300 448 deep = 301 449 custom = 302 450 deep_plus = 303 451 fast = 304 452 smart_mode = 306 453 454 455class RoborockMopModeQRevoMaxV(RoborockMopModeCode): 456 standard = 300 457 deep = 301 458 custom = 302 459 deep_plus = 303 460 fast = 304 461 smart_mode = 306 462 463 464class RoborockMopModeSaros10(RoborockMopModeCode): 465 standard = 300 466 deep = 301 467 custom = 302 468 deep_plus = 303 469 fast = 304 470 smart_mode = 306 471 472 473class RoborockMopIntensityCode(RoborockEnum): 474 """Describes the mop intensity of the vacuum cleaner.""" 475 476 477class RoborockMopIntensityS7(RoborockMopIntensityCode): 478 """Describes the mop intensity of the vacuum cleaner.""" 479 480 off = 200 481 mild = 201 482 moderate = 202 483 intense = 203 484 custom = 204 485 486 487class RoborockMopIntensityV2(RoborockMopIntensityCode): 488 """Describes the mop intensity of the vacuum cleaner.""" 489 490 off = 200 491 low = 201 492 medium = 202 493 high = 203 494 custom = 207 495 496 497class RoborockMopIntensityQRevoMaster(RoborockMopIntensityCode): 498 """Describes the mop intensity of the vacuum cleaner.""" 499 500 off = 200 501 low = 201 502 medium = 202 503 high = 203 504 custom = 204 505 custom_water_flow = 207 506 smart_mode = 209 507 508 509class RoborockMopIntensityQRevoCurv(RoborockMopIntensityCode): 510 off = 200 511 low = 201 512 medium = 202 513 high = 203 514 custom = 204 515 custom_water_flow = 207 516 smart_mode = 209 517 518 519class RoborockMopIntensityQRevoMaxV(RoborockMopIntensityCode): 520 off = 200 521 low = 201 522 medium = 202 523 high = 203 524 custom = 204 525 custom_water_flow = 207 526 smart_mode = 209 527 528 529class RoborockMopIntensityP10(RoborockMopIntensityCode): 530 """Describes the mop intensity of the vacuum cleaner.""" 531 532 off = 200 533 low = 201 534 medium = 202 535 high = 203 536 custom = 204 537 custom_water_flow = 207 538 smart_mode = 209 539 540 541class RoborockMopIntensityS8MaxVUltra(RoborockMopIntensityCode): 542 off = 200 543 low = 201 544 medium = 202 545 high = 203 546 custom = 204 547 max = 208 548 smart_mode = 209 549 custom_water_flow = 207 550 551 552class RoborockMopIntensitySaros10(RoborockMopIntensityCode): 553 off = 200 554 mild = 201 555 standard = 202 556 intense = 203 557 extreme = 208 558 custom = 204 559 smart_mode = 209 560 561 562class RoborockMopIntensitySaros10R(RoborockMopIntensityCode): 563 off = 200 564 low = 201 565 medium = 202 566 high = 203 567 custom = 204 568 extreme = 250 569 vac_followed_by_mop = 235 570 smart_mode = 209 571 572 573class RoborockMopIntensityS5Max(RoborockMopIntensityCode): 574 """Describes the mop intensity of the vacuum cleaner.""" 575 576 off = 200 577 low = 201 578 medium = 202 579 high = 203 580 custom = 204 581 custom_water_flow = 207 582 583 584class RoborockMopIntensityS6MaxV(RoborockMopIntensityCode): 585 """Describes the mop intensity of the vacuum cleaner.""" 586 587 off = 200 588 low = 201 589 medium = 202 590 high = 203 591 custom = 204 592 custom_water_flow = 207 593 594 595class RoborockMopIntensityQ7Max(RoborockMopIntensityCode): 596 """Describes the mop intensity of the vacuum cleaner.""" 597 598 off = 200 599 low = 201 600 medium = 202 601 high = 203 602 custom_water_flow = 207 603 604 605class RoborockDockErrorCode(RoborockEnum): 606 """Describes the error code of the dock.""" 607 608 ok = 0 609 """No error condition.""" 610 611 no_dustbin_or_filter = 32 612 """No dock dustbin or filter installed. 613 614 This error message applies to auto-empty docks. 615 """ 616 617 auto_empty_dock_fan_error = 33 618 """Auto-Empty Dock fan error: Dock dustbin or filter out of place.""" 619 620 duct_blockage = 34 621 """Auto-Empty Dock jammed: Dock dustbin, filter, or air duct jammed, check and clean it.""" 622 623 auto_empty_dock_voltage_error = 35 624 """Auto-Empty Dock voltage error: Unable to empty the dustbin.""" 625 626 water_empty = 38 627 """Clean water tank empty: Check tank placement or refill as required.""" 628 629 waste_water_tank_full = 39 630 """Check the dirty water tank: Check tank placement or empty as required.""" 631 632 maintenance_brush_jammed = 42 633 """Self-cleaning roller error: Maintenance brush jammed. Remove and clean.""" 634 635 dirty_tank_latch_open = 44 636 """Water filter blocked: Clean and reinstall. 637 638 Make sure that the dirty water tank cover is closed and the latch is secured. 639 """ 640 641 no_dustbin = 46 642 """Dustbin not installed (Standard error for missing dustbin). 643 644 This error message applies to larger wash docks. 645 """ 646 647 cleaning_tank_full_or_blocked = 53 648 """Cleaning tank full or blocked (Water filter or sink strainer blocked/not installed).""" 649 650 651class RoborockDockTypeCode(RoborockEnum): 652 unknown = -9999 653 no_dock = 0 654 auto_empty_dock = 1 655 empty_wash_fill_dock = 3 656 auto_empty_dock_pure = 5 657 s7_max_ultra_dock = 6 658 s8_dock = 7 659 p10_dock = 8 660 p10_pro_dock = 9 661 s8_maxv_ultra_dock = 10 662 qrevo_master_dock = 14 663 qrevo_s_dock = 15 664 saros_r10_dock = 16 665 qrevo_curv_dock = 17 666 saros_10_dock = 18 667 668 669class RoborockDockDustCollectionModeCode(RoborockEnum): 670 """Describes the dust collection mode of the vacuum cleaner.""" 671 672 # TODO: Get the correct values for various different docks 673 unknown = -9999 674 smart = 0 675 light = 1 676 balanced = 2 677 max = 4 678 679 680class RoborockStateCode(RoborockEnum): 681 unknown = 0 682 starting = 1 683 charger_disconnected = 2 684 idle = 3 685 remote_control_active = 4 686 cleaning = 5 687 returning_home = 6 688 manual_mode = 7 689 charging = 8 690 charging_problem = 9 691 paused = 10 692 spot_cleaning = 11 693 error = 12 694 shutting_down = 13 695 updating = 14 696 docking = 15 697 going_to_target = 16 698 zoned_cleaning = 17 699 segment_cleaning = 18 700 emptying_the_bin = 22 # on s7+ 701 washing_the_mop = 23 # on a46 702 washing_the_mop_2 = 25 703 going_to_wash_the_mop = 26 # on a46 704 in_call = 28 705 mapping = 29 706 egg_attack = 30 707 patrol = 32 708 attaching_the_mop = 33 # on g20s ultra 709 detaching_the_mop = 34 # on g20s ultra 710 charging_complete = 100 711 device_offline = 101 712 locked = 103 713 air_drying_stopping = 202 714 robot_status_mopping = 6301 715 clean_mop_cleaning = 6302 716 clean_mop_mopping = 6303 717 segment_mopping = 6304 718 segment_clean_mop_cleaning = 6305 719 segment_clean_mop_mopping = 6306 720 zoned_mopping = 6307 721 zoned_clean_mop_cleaning = 6308 722 zoned_clean_mop_mopping = 6309 723 back_to_dock_washing_duster = 6310
8class RoborockFinishReason(RoborockEnum): 9 manual_interrupt = 21 # Cleaning interrupted by user 10 cleanup_interrupted = 24 # Cleanup interrupted 11 manual_interrupt_2 = 21 12 manual_interrupt_12 = 29 13 breakpoint = 32 # Could not continue cleaning 14 breakpoint_2 = 33 15 cleanup_interrupted_2 = 34 16 manual_interrupt_3 = 35 17 manual_interrupt_4 = 36 18 manual_interrupt_5 = 37 19 manual_interrupt_6 = 43 20 locate_fail = 45 # Positioning Failed 21 cleanup_interrupted_3 = 64 22 locate_fail_2 = 65 23 manual_interrupt_7 = 48 24 manual_interrupt_8 = 49 25 manual_interrupt_9 = 50 26 cleanup_interrupted_4 = 51 27 finished_cleaning = 52 # Finished cleaning 28 finished_cleaning_2 = 54 29 finished_cleaning_3 = 55 30 finished_cleaning_4 = 56 31 finished_clenaing_5 = 57 32 manual_interrupt_10 = 60 33 area_unreachable = 61 # Area unreachable 34 area_unreachable_2 = 62 35 washing_error = 67 # Washing error 36 back_to_wash_failure = 68 # Failed to return to the dock 37 cleanup_interrupted_5 = 101 38 breakpoint_4 = 102 39 manual_interrupt_11 = 103 40 cleanup_interrupted_6 = 104 41 cleanup_interrupted_7 = 105 42 cleanup_interrupted_8 = 106 43 cleanup_interrupted_9 = 107 44 cleanup_interrupted_10 = 109 45 cleanup_interrupted_11 = 110 46 patrol_success = 114 # Cruise completed 47 patrol_fail = 115 # Cruise failed 48 pet_patrol_success = 116 # Pet found 49 pet_patrol_fail = 117 # Pet found failed
Roborock Enum for codes with int values
Inherited Members
52class RoborockInCleaning(RoborockEnum): 53 complete = 0 54 global_clean_not_complete = 1 55 zone_clean_not_complete = 2 56 segment_clean_not_complete = 3
Roborock Enum for codes with int values
Inherited Members
59class RoborockCleanType(RoborockEnum): 60 all_zone = 1 61 draw_zone = 2 62 select_zone = 3 63 quick_build = 4 64 video_patrol = 5 65 pet_patrol = 6
Roborock Enum for codes with int values
Inherited Members
68class RoborockChargeStatus(RoborockEnum): 69 """Describes the charging status of the device.""" 70 71 unknown = -1 72 charge_waiting = 0 73 charging = 1
Describes the charging status of the device.
Inherited Members
76class RoborockDockState(StrEnum): 77 """Synthesized high-level dock and power state of the device. 78 79 This enum represents a unified "UI-level" state that combines multiple raw 80 device data points (`state`, `charge_status`, `battery`) into a single, 81 human-readable status that accurately reflects what the vacuum is doing 82 relative to the dock. 83 84 It is highly recommended for consumers of this API 85 to use this synthesized state to determine if the vacuum is charging or 86 docked, rather than attempting to parse the raw integer data points, as 87 this safely handles backward compatibility for older models that lack 88 explicit off-peak schedule reporting. 89 """ 90 91 unknown = "unknown" 92 """The dock state could not be determined or is unmapped.""" 93 94 idle = "idle" 95 """The vacuum is away from the dock (e.g., cleaning, paused, or errored). 96 In the official app, this state presents the 'Return to Dock' or 'Recharge' action.""" 97 98 returning = "returning" 99 """The vacuum is actively navigating its way back to the dock. 100 In the official app, this state presents the 'Stop' or 'Pause' action.""" 101 102 charging = "charging" 103 """The vacuum is on the dock and actively receiving electricity. 104 In the official app, this state is displayed as 'Charging'.""" 105 106 off_peak_waiting = "off_peak_waiting" 107 """The vacuum is on the dock but charging is paused. It is waiting for the 108 user's scheduled 'Valley Electricity' off-peak hours to begin before 109 drawing power. 110 In the official app, this state is displayed as 'Charging paused during peak hours'.""" 111 112 full = "full" 113 """The vacuum is on the dock and the battery is at 100% capacity. 114 In the official app, this state is displayed as 'Fully charged'.""" 115 116 dusting = "dusting" 117 """The vacuum is on the dock and is currently being evacuated by the 118 auto-empty base. 119 In the official app, this state is displayed as 'Emptying dustbin'."""
Synthesized high-level dock and power state of the device.
This enum represents a unified "UI-level" state that combines multiple raw
device data points (state, charge_status, battery) into a single,
human-readable status that accurately reflects what the vacuum is doing
relative to the dock.
It is highly recommended for consumers of this API to use this synthesized state to determine if the vacuum is charging or docked, rather than attempting to parse the raw integer data points, as this safely handles backward compatibility for older models that lack explicit off-peak schedule reporting.
The dock state could not be determined or is unmapped.
The vacuum is away from the dock (e.g., cleaning, paused, or errored). In the official app, this state presents the 'Return to Dock' or 'Recharge' action.
The vacuum is actively navigating its way back to the dock. In the official app, this state presents the 'Stop' or 'Pause' action.
The vacuum is on the dock and actively receiving electricity. In the official app, this state is displayed as 'Charging'.
The vacuum is on the dock but charging is paused. It is waiting for the user's scheduled 'Valley Electricity' off-peak hours to begin before drawing power. In the official app, this state is displayed as 'Charging paused during peak hours'.
The vacuum is on the dock and the battery is at 100% capacity. In the official app, this state is displayed as 'Fully charged'.
The vacuum is on the dock and is currently being evacuated by the auto-empty base. In the official app, this state is displayed as 'Emptying dustbin'.
122class RoborockStartType(RoborockEnum): 123 button = 1 124 app = 2 125 schedule = 3 126 mi_home = 4 127 quick_start = 5 128 voice_control = 13 129 routines = 101 130 alexa = 801 131 google = 802 132 ifttt = 803 133 yandex = 804 134 homekit = 805 135 xiaoai = 806 136 tmall_genie = 807 137 duer = 808 138 dingdong = 809 139 siri = 810 140 clova = 811 141 wechat = 901 142 alipay = 902 143 aqara = 903 144 hisense = 904 145 huawei = 905 146 widget_launch = 820 147 smart_watch = 821
Roborock Enum for codes with int values
Inherited Members
150class RoborockDssCodes(RoborockEnum): 151 @classmethod 152 def _missing_(cls: type[Self], key) -> Self: 153 # If the calculated value is not provided, then it should be viewed as okay. 154 # As the math will sometimes result in you getting numbers that don't matter. 155 return cls.okay # type: ignore
Roborock Enum for codes with int values
Inherited Members
158class ClearWaterBoxStatus(RoborockDssCodes): 159 """Status of the clear water box.""" 160 161 okay = 0 162 out_of_water = 1 163 out_of_water_2 = 38 164 refill_error = 48
Status of the clear water box.
Inherited Members
167class DirtyWaterBoxStatus(RoborockDssCodes): 168 """Status of the dirty water box.""" 169 170 okay = 0 171 full_not_installed = 1 172 full_not_installed_2 = 39 173 drain_error = 49
Status of the dirty water box.
Inherited Members
176class DustBagStatus(RoborockDssCodes): 177 """Status of the dust bag.""" 178 179 okay = 0 180 not_installed = 1 181 full = 34
Status of the dust bag.
Inherited Members
184class CleanFluidStatus(RoborockDssCodes): 185 """Status of the cleaning fluid container.""" 186 187 empty_not_installed = 1 188 okay = 2
Status of the cleaning fluid container.
Inherited Members
191class RoborockErrorCode(RoborockEnum): 192 none = 0 193 lidar_blocked = 1 194 bumper_stuck = 2 195 wheels_suspended = 3 196 cliff_sensor_error = 4 197 main_brush_jammed = 5 198 side_brush_jammed = 6 199 wheels_jammed = 7 200 robot_trapped = 8 201 no_dustbin = 9 202 strainer_error = 10 # Filter is wet or blocked 203 compass_error = 11 # Strong magnetic field detected 204 low_battery = 12 205 charging_error = 13 206 battery_error = 14 207 wall_sensor_dirty = 15 208 robot_tilted = 16 209 side_brush_error = 17 210 fan_error = 18 211 dock = 19 # Dock not connected to power 212 optical_flow_sensor_dirt = 20 213 vertical_bumper_pressed = 21 214 dock_locator_error = 22 215 return_to_dock_fail = 23 216 nogo_zone_detected = 24 217 visual_sensor = 25 # Camera error 218 light_touch = 26 # Wall sensor error 219 vibrarise_jammed = 27 220 robot_on_carpet = 28 221 filter_blocked = 29 222 invisible_wall_detected = 30 223 cannot_cross_carpet = 31 224 internal_error = 32 225 collect_dust_error_3 = 34 # Clean auto-empty dock 226 collect_dust_error_4 = 35 # Auto empty dock voltage error 227 mopping_roller_1 = 36 # Wash roller may be jammed 228 mopping_roller_error_2 = 37 # wash roller not lowered properly 229 clear_water_box_hoare = 38 # Check the clean water tank 230 dirty_water_box_hoare = 39 # Check the dirty water tank 231 sink_strainer_hoare = 40 # Reinstall the water filter 232 clear_water_box_exception = 41 # Clean water tank empty 233 clear_brush_exception = 42 # Check that the water filter has been correctly installed 234 clear_brush_exception_2 = 43 # Positioning button error 235 filter_screen_exception = 44 # Clean the dock water filter 236 mopping_roller_2 = 45 # Wash roller may be jammed 237 up_water_exception = 48 238 drain_water_exception = 49 239 temperature_protection = 51 # Unit temperature protection 240 clean_carousel_exception = 52 241 clean_carousel_water_full = 53 242 water_carriage_drop = 54 243 check_clean_carouse = 55 244 audio_error = 56
Roborock Enum for codes with int values
Inherited Members
247class RoborockFanPowerCode(RoborockEnum): 248 """Describes the fan power of the vacuum cleaner.""" 249 250 # Fan speeds should have the first letter capitalized - as there is no way to change the name in translations as 251 # far as I am aware
Describes the fan power of the vacuum cleaner.
Inherited Members
254class RoborockFanSpeedV1(RoborockFanPowerCode): 255 silent = 38 256 standard = 60 257 medium = 77 258 turbo = 90
Describes the fan power of the vacuum cleaner.
Inherited Members
261class RoborockFanSpeedV2(RoborockFanPowerCode): 262 silent = 101 263 balanced = 102 264 turbo = 103 265 max = 104 266 gentle = 105 267 auto = 106
Describes the fan power of the vacuum cleaner.
Inherited Members
270class RoborockFanSpeedV3(RoborockFanPowerCode): 271 silent = 38 272 standard = 60 273 medium = 75 274 turbo = 100
Describes the fan power of the vacuum cleaner.
Inherited Members
277class RoborockFanSpeedE2(RoborockFanPowerCode): 278 gentle = 41 279 silent = 50 280 standard = 68 281 medium = 79 282 turbo = 100
Describes the fan power of the vacuum cleaner.
Inherited Members
285class RoborockFanSpeedS7(RoborockFanPowerCode): 286 off = 105 287 quiet = 101 288 balanced = 102 289 turbo = 103 290 max = 104 291 custom = 106
Describes the fan power of the vacuum cleaner.
Inherited Members
294class RoborockFanSpeedS7MaxV(RoborockFanPowerCode): 295 off = 105 296 quiet = 101 297 balanced = 102 298 turbo = 103 299 max = 104 300 custom = 106 301 max_plus = 108
Describes the fan power of the vacuum cleaner.
Inherited Members
304class RoborockFanSpeedS6Pure(RoborockFanPowerCode): 305 gentle = 105 306 quiet = 101 307 balanced = 102 308 turbo = 103 309 max = 104 310 custom = 106
Describes the fan power of the vacuum cleaner.
Inherited Members
313class RoborockFanSpeedQ7Max(RoborockFanPowerCode): 314 quiet = 101 315 balanced = 102 316 turbo = 103 317 max = 104
Describes the fan power of the vacuum cleaner.
Inherited Members
320class RoborockFanSpeedQRevoMaster(RoborockFanPowerCode): 321 off = 105 322 quiet = 101 323 balanced = 102 324 turbo = 103 325 max = 104 326 custom = 106 327 max_plus = 108 328 smart_mode = 110
Describes the fan power of the vacuum cleaner.
Inherited Members
331class RoborockFanSpeedQRevoCurv(RoborockFanPowerCode): 332 quiet = 101 333 balanced = 102 334 turbo = 103 335 max = 104 336 off = 105 337 custom = 106 338 max_plus = 108 339 smart_mode = 110
Describes the fan power of the vacuum cleaner.
Inherited Members
342class RoborockFanSpeedQRevoMaxV(RoborockFanPowerCode): 343 off = 105 344 quiet = 101 345 balanced = 102 346 turbo = 103 347 max = 104 348 custom = 106 349 max_plus = 108 350 smart_mode = 110
Describes the fan power of the vacuum cleaner.
Inherited Members
353class RoborockFanSpeedP10(RoborockFanPowerCode): 354 off = 105 355 quiet = 101 356 balanced = 102 357 turbo = 103 358 max = 104 359 custom = 106 360 max_plus = 108 361 smart_mode = 110
Describes the fan power of the vacuum cleaner.
Inherited Members
364class RoborockFanSpeedS8MaxVUltra(RoborockFanPowerCode): 365 off = 105 366 quiet = 101 367 balanced = 102 368 turbo = 103 369 max = 104 370 custom = 106 371 max_plus = 108 372 smart_mode = 110
Describes the fan power of the vacuum cleaner.
Inherited Members
375class RoborockFanSpeedSaros10(RoborockFanPowerCode): 376 off = 105 377 quiet = 101 378 balanced = 102 379 turbo = 103 380 max = 104 381 custom = 106 382 max_plus = 108 383 smart_mode = 110
Describes the fan power of the vacuum cleaner.
Inherited Members
386class RoborockFanSpeedSaros10R(RoborockFanPowerCode): 387 off = 105 388 quiet = 101 389 balanced = 102 390 turbo = 103 391 max = 104 392 custom = 106 393 max_plus = 108 394 smart_mode = 110
Describes the fan power of the vacuum cleaner.
Inherited Members
Describes the mop mode of the vacuum cleaner.
Inherited Members
401class RoborockMopModeQRevoCurv(RoborockMopModeCode): 402 standard = 300 403 deep = 301 404 custom = 302 405 deep_plus = 303 406 fast = 304 407 smart_mode = 306
Describes the mop mode of the vacuum cleaner.
Inherited Members
410class RoborockMopModeS7(RoborockMopModeCode): 411 """Describes the mop mode of the vacuum cleaner.""" 412 413 standard = 300 414 deep = 301 415 custom = 302 416 deep_plus = 303
Describes the mop mode of the vacuum cleaner.
Inherited Members
419class RoborockMopModeS8ProUltra(RoborockMopModeCode): 420 standard = 300 421 deep = 301 422 deep_plus = 303 423 fast = 304 424 custom = 302 425 smart_mode = 306
Describes the mop mode of the vacuum cleaner.
Inherited Members
428class RoborockMopModeS8MaxVUltra(RoborockMopModeCode): 429 standard = 300 430 deep = 301 431 custom = 302 432 deep_plus = 303 433 fast = 304 434 deep_plus_pearl = 305 435 smart_mode = 306
Describes the mop mode of the vacuum cleaner.
Inherited Members
438class RoborockMopModeSaros10R(RoborockMopModeCode): 439 standard = 300 440 deep = 301 441 custom = 302 442 deep_plus = 303 443 fast = 304 444 smart_mode = 306
Describes the mop mode of the vacuum cleaner.
Inherited Members
447class RoborockMopModeQRevoMaster(RoborockMopModeCode): 448 standard = 300 449 deep = 301 450 custom = 302 451 deep_plus = 303 452 fast = 304 453 smart_mode = 306
Describes the mop mode of the vacuum cleaner.
Inherited Members
456class RoborockMopModeQRevoMaxV(RoborockMopModeCode): 457 standard = 300 458 deep = 301 459 custom = 302 460 deep_plus = 303 461 fast = 304 462 smart_mode = 306
Describes the mop mode of the vacuum cleaner.
Inherited Members
465class RoborockMopModeSaros10(RoborockMopModeCode): 466 standard = 300 467 deep = 301 468 custom = 302 469 deep_plus = 303 470 fast = 304 471 smart_mode = 306
Describes the mop mode of the vacuum cleaner.
Inherited Members
474class RoborockMopIntensityCode(RoborockEnum): 475 """Describes the mop intensity of the vacuum cleaner."""
Describes the mop intensity of the vacuum cleaner.
Inherited Members
478class RoborockMopIntensityS7(RoborockMopIntensityCode): 479 """Describes the mop intensity of the vacuum cleaner.""" 480 481 off = 200 482 mild = 201 483 moderate = 202 484 intense = 203 485 custom = 204
Describes the mop intensity of the vacuum cleaner.
Inherited Members
488class RoborockMopIntensityV2(RoborockMopIntensityCode): 489 """Describes the mop intensity of the vacuum cleaner.""" 490 491 off = 200 492 low = 201 493 medium = 202 494 high = 203 495 custom = 207
Describes the mop intensity of the vacuum cleaner.
Inherited Members
498class RoborockMopIntensityQRevoMaster(RoborockMopIntensityCode): 499 """Describes the mop intensity of the vacuum cleaner.""" 500 501 off = 200 502 low = 201 503 medium = 202 504 high = 203 505 custom = 204 506 custom_water_flow = 207 507 smart_mode = 209
Describes the mop intensity of the vacuum cleaner.
Inherited Members
510class RoborockMopIntensityQRevoCurv(RoborockMopIntensityCode): 511 off = 200 512 low = 201 513 medium = 202 514 high = 203 515 custom = 204 516 custom_water_flow = 207 517 smart_mode = 209
Describes the mop intensity of the vacuum cleaner.
Inherited Members
520class RoborockMopIntensityQRevoMaxV(RoborockMopIntensityCode): 521 off = 200 522 low = 201 523 medium = 202 524 high = 203 525 custom = 204 526 custom_water_flow = 207 527 smart_mode = 209
Describes the mop intensity of the vacuum cleaner.
Inherited Members
530class RoborockMopIntensityP10(RoborockMopIntensityCode): 531 """Describes the mop intensity of the vacuum cleaner.""" 532 533 off = 200 534 low = 201 535 medium = 202 536 high = 203 537 custom = 204 538 custom_water_flow = 207 539 smart_mode = 209
Describes the mop intensity of the vacuum cleaner.
Inherited Members
542class RoborockMopIntensityS8MaxVUltra(RoborockMopIntensityCode): 543 off = 200 544 low = 201 545 medium = 202 546 high = 203 547 custom = 204 548 max = 208 549 smart_mode = 209 550 custom_water_flow = 207
Describes the mop intensity of the vacuum cleaner.
Inherited Members
553class RoborockMopIntensitySaros10(RoborockMopIntensityCode): 554 off = 200 555 mild = 201 556 standard = 202 557 intense = 203 558 extreme = 208 559 custom = 204 560 smart_mode = 209
Describes the mop intensity of the vacuum cleaner.
Inherited Members
563class RoborockMopIntensitySaros10R(RoborockMopIntensityCode): 564 off = 200 565 low = 201 566 medium = 202 567 high = 203 568 custom = 204 569 extreme = 250 570 vac_followed_by_mop = 235 571 smart_mode = 209
Describes the mop intensity of the vacuum cleaner.
Inherited Members
574class RoborockMopIntensityS5Max(RoborockMopIntensityCode): 575 """Describes the mop intensity of the vacuum cleaner.""" 576 577 off = 200 578 low = 201 579 medium = 202 580 high = 203 581 custom = 204 582 custom_water_flow = 207
Describes the mop intensity of the vacuum cleaner.
Inherited Members
585class RoborockMopIntensityS6MaxV(RoborockMopIntensityCode): 586 """Describes the mop intensity of the vacuum cleaner.""" 587 588 off = 200 589 low = 201 590 medium = 202 591 high = 203 592 custom = 204 593 custom_water_flow = 207
Describes the mop intensity of the vacuum cleaner.
Inherited Members
596class RoborockMopIntensityQ7Max(RoborockMopIntensityCode): 597 """Describes the mop intensity of the vacuum cleaner.""" 598 599 off = 200 600 low = 201 601 medium = 202 602 high = 203 603 custom_water_flow = 207
Describes the mop intensity of the vacuum cleaner.
Inherited Members
606class RoborockDockErrorCode(RoborockEnum): 607 """Describes the error code of the dock.""" 608 609 ok = 0 610 """No error condition.""" 611 612 no_dustbin_or_filter = 32 613 """No dock dustbin or filter installed. 614 615 This error message applies to auto-empty docks. 616 """ 617 618 auto_empty_dock_fan_error = 33 619 """Auto-Empty Dock fan error: Dock dustbin or filter out of place.""" 620 621 duct_blockage = 34 622 """Auto-Empty Dock jammed: Dock dustbin, filter, or air duct jammed, check and clean it.""" 623 624 auto_empty_dock_voltage_error = 35 625 """Auto-Empty Dock voltage error: Unable to empty the dustbin.""" 626 627 water_empty = 38 628 """Clean water tank empty: Check tank placement or refill as required.""" 629 630 waste_water_tank_full = 39 631 """Check the dirty water tank: Check tank placement or empty as required.""" 632 633 maintenance_brush_jammed = 42 634 """Self-cleaning roller error: Maintenance brush jammed. Remove and clean.""" 635 636 dirty_tank_latch_open = 44 637 """Water filter blocked: Clean and reinstall. 638 639 Make sure that the dirty water tank cover is closed and the latch is secured. 640 """ 641 642 no_dustbin = 46 643 """Dustbin not installed (Standard error for missing dustbin). 644 645 This error message applies to larger wash docks. 646 """ 647 648 cleaning_tank_full_or_blocked = 53 649 """Cleaning tank full or blocked (Water filter or sink strainer blocked/not installed)."""
Describes the error code of the dock.
No dock dustbin or filter installed.
This error message applies to auto-empty docks.
Auto-Empty Dock fan error: Dock dustbin or filter out of place.
Auto-Empty Dock jammed: Dock dustbin, filter, or air duct jammed, check and clean it.
Auto-Empty Dock voltage error: Unable to empty the dustbin.
Clean water tank empty: Check tank placement or refill as required.
Check the dirty water tank: Check tank placement or empty as required.
Self-cleaning roller error: Maintenance brush jammed. Remove and clean.
Water filter blocked: Clean and reinstall.
Make sure that the dirty water tank cover is closed and the latch is secured.
Dustbin not installed (Standard error for missing dustbin).
This error message applies to larger wash docks.
Cleaning tank full or blocked (Water filter or sink strainer blocked/not installed).
Inherited Members
652class RoborockDockTypeCode(RoborockEnum): 653 unknown = -9999 654 no_dock = 0 655 auto_empty_dock = 1 656 empty_wash_fill_dock = 3 657 auto_empty_dock_pure = 5 658 s7_max_ultra_dock = 6 659 s8_dock = 7 660 p10_dock = 8 661 p10_pro_dock = 9 662 s8_maxv_ultra_dock = 10 663 qrevo_master_dock = 14 664 qrevo_s_dock = 15 665 saros_r10_dock = 16 666 qrevo_curv_dock = 17 667 saros_10_dock = 18
Roborock Enum for codes with int values
Inherited Members
670class RoborockDockDustCollectionModeCode(RoborockEnum): 671 """Describes the dust collection mode of the vacuum cleaner.""" 672 673 # TODO: Get the correct values for various different docks 674 unknown = -9999 675 smart = 0 676 light = 1 677 balanced = 2 678 max = 4
Describes the dust collection mode of the vacuum cleaner.
Inherited Members
681class RoborockStateCode(RoborockEnum): 682 unknown = 0 683 starting = 1 684 charger_disconnected = 2 685 idle = 3 686 remote_control_active = 4 687 cleaning = 5 688 returning_home = 6 689 manual_mode = 7 690 charging = 8 691 charging_problem = 9 692 paused = 10 693 spot_cleaning = 11 694 error = 12 695 shutting_down = 13 696 updating = 14 697 docking = 15 698 going_to_target = 16 699 zoned_cleaning = 17 700 segment_cleaning = 18 701 emptying_the_bin = 22 # on s7+ 702 washing_the_mop = 23 # on a46 703 washing_the_mop_2 = 25 704 going_to_wash_the_mop = 26 # on a46 705 in_call = 28 706 mapping = 29 707 egg_attack = 30 708 patrol = 32 709 attaching_the_mop = 33 # on g20s ultra 710 detaching_the_mop = 34 # on g20s ultra 711 charging_complete = 100 712 device_offline = 101 713 locked = 103 714 air_drying_stopping = 202 715 robot_status_mopping = 6301 716 clean_mop_cleaning = 6302 717 clean_mop_mopping = 6303 718 segment_mopping = 6304 719 segment_clean_mop_cleaning = 6305 720 segment_clean_mop_mopping = 6306 721 zoned_mopping = 6307 722 zoned_clean_mop_cleaning = 6308 723 zoned_clean_mop_mopping = 6309 724 back_to_dock_washing_duster = 6310
Roborock Enum for codes with int values