miio.integrations.roborock.vacuum.vacuum module
- class miio.integrations.roborock.vacuum.vacuum.RoborockVacuum(ip: str, token: str | None = None, start_id: int = 0, debug: int = 0, lazy_discover: bool = True, timeout: int | None = None, *, model=None)[source]
Bases:
Device
Main class for roborock vacuums (roborock.vacuum.*).
- actions() DescriptorCollection[ActionDescriptor]
Return device actions.
- add_timer(cron: str, command: str, parameters: str, timer_id: str)[source]
Add a timer.
- Parameters:
cron – schedule in cron format
command – ignored by the vacuum.
parameters – ignored by the vacuum.
- carpet_cleaning_mode() CarpetCleaningMode | None [source]
Get carpet cleaning mode/avoidance setting.
- carpet_mode() CarpetModeStatus [source]
Get carpet mode settings.
- clean_details(id_: int) CleaningDetails | None [source]
Return details about specific cleaning.
- clean_history() CleaningSummary [source]
Return generic cleaning history.
- consumable_reset(consumable: Consumable)[source]
Reset consumable information.
- consumable_status() ConsumableStatus [source]
Return information about consumables.
- create_nogo_zone(x1, y1, x2, y2, x3, y3, x4, y4)[source]
Create a rectangular no-go zone (gen2 only?).
NOTE: Multiple nogo zones and barriers could be added by passing a list of them to save_map.
Requires new fw version. 3.3.9_001633+?
- create_software_barrier(x1, y1, x2, y2)[source]
Create software barrier (gen2 only?).
NOTE: Multiple nogo zones and barriers could be added by passing a list of them to save_map.
Requires new fw version. 3.3.9_001633+?
- delete_timer(timer_id: str)[source]
Delete a timer with given ID.
- Parameters:
timer_id (str) – Timer ID
- descriptors() DescriptorCollection[Descriptor]
Return a collection containing all descriptors for the device.
- dust_collection_mode() DustCollectionMode | None [source]
Get the dust collection mode setting.
- enable_lab_mode(enable)[source]
Enable persistent maps and software barriers.
This is required to use create_nogo_zone and create_software_barrier commands.
- firmware_features() List[int] [source]
Return a list of available firmware features.
Information: https://github.com/marcelrv/XiaomiRobotVacuumProtocol/blob/master/fw_features.md Feel free to contribute information from your vacuum if it is not yet listed.
- get_properties(properties, *, property_getter='get_prop', max_properties=None)
Request properties in slices based on given max_properties.
This is necessary as some devices have limitation on how many properties can be queried at once.
If max_properties is None, all properties are requested at once.
- info(*, skip_cache=False) DeviceInfo
Get (and cache) miIO protocol information from the device.
This includes information about connected wlan network, and hardware and software versions.
- Parameters:
bool (skip_cache) – Skip the cache
- last_clean_details() CleaningDetails | None [source]
Return details from the last cleaning.
Returns None if there has been no cleanups.
- load_map(map_enum: Enum | None = None, map_id: int | None = None)[source]
Change the current map used.
- manual_control(rotation: int, velocity: float, duration: int = 1500)[source]
Give a command over manual control interface.
- manual_control_once(rotation: int, velocity: float, duration: int = 1500)[source]
Starts the remote control mode and executes the action once before deactivating the mode.
- mop_dryer_settings() MopDryerSettings [source]
Get mop dryer settings.
- mop_intensity() MopIntensity [source]
Get mop scrub intensity setting.
- raw_command(command, parameters)
Send a raw command to the device. This is mostly useful when trying out commands which are not implemented by a given device instance.
- segment_clean(segments: List, repeat: int = 1)[source]
Clean segments.
- Parameters:
segments (List) – List of segments to clean: [16,17,18]
repeat (int) – Count of iterations
- send(command: str, parameters: Any | None = None, retry_count: int | None = None, *, extra_parameters=None) Any [source]
Send command to the device.
This is overridden to raise an exception on unknown methods.
- send_handshake()
Send initial handshake to the device.
- sensors() DescriptorCollection[PropertyDescriptor]
Return read-only properties.
- set_carpet_cleaning_mode(mode: CarpetCleaningMode)[source]
Set carpet cleaning mode/avoidance setting.
- set_carpet_mode(enabled: bool, stall_time: int = 10, low: int = 400, high: int = 500, integral: int = 450)[source]
Set the carpet mode.
- set_dust_collection_mode(mode: DustCollectionMode) bool [source]
Set dust collection mode setting.
- set_mop_intensity(mop_intensity: MopIntensity)[source]
Set mop scrub intensity setting.
- settings() DescriptorCollection[PropertyDescriptor]
Return settable properties.
- status() DeviceStatus [source]
Return status of the vacuum.
- stop()[source]
Stop cleaning.
Note, prefer ‘pause’ instead of this for wider support. Some newer vacuum models do not support this command.
- supports_miot() bool
Return True if the device supports miot commands.
This requests a single property (siid=1, piid=1) and returns True on success.
- update_state()
Return current update state.
- update_timer(timer_id: str, mode: TimerState)[source]
Update a timer with given ID.
- Parameters:
timer_id (str) – Timer ID
mode (TimerState) – either On or Off
- vacuum_status() VacuumStatus [source]
Return only status of the vacuum.
- zoned_clean(zones: List)[source]
Clean zones.
- Parameters:
zones (List) – List of zones to clean: [[x1,y1,x2,y2, iterations],[x1,y1,x2,y2, iterations]]
- MANUAL_DURATION_DEFAULT = 1500
- MANUAL_ROTATION_MAX = 180
- MANUAL_ROTATION_MIN = -180
- MANUAL_VELOCITY_MAX = 0.3
- MANUAL_VELOCITY_MIN = -0.3
- retry_count = 3
- supported_models = ['rockrobo.vacuum.v1', 'roborock.vacuum.s4', 'roborock.vacuum.a19', 'roborock.vacuum.a01', 'roborock.vacuum.s5', 'roborock.vacuum.s5e', 'roborock.vacuum.s6', 'roborock.vacuum.t6', 'roborock.vacuum.a08', 'roborock.vacuum.a11', 'roborock.vacuum.a14', 'roborock.vacuum.a23', 'roborock.vacuum.a15', 'roborock.vacuum.a27', 'roborock.vacuum.a62', 'roborock.vacuum.a70', 'roborock.vacuum.a34', 'roborock.vacuum.a38', 'roborock.vacuum.a40', 'roborock.vacuum.a75', 'roborock.vacuum.a29', 'roborock.vacuum.a46', 'roborock.vacuum.a10', 'roborock.vacuum.e2', 'roborock.vacuum.m1s', 'roborock.vacuum.c1', 'roborock.vacuum.*']
- timeout = 5