Roborock
Roborock library for online and offline control of your vacuums.
Installation
Install this via pip (or your favourite package manager):
pip install python-roborock
To use the roborock command line tool, install the cli extra, which pulls in
its additional dependencies (click, pyyaml, pyshark):
pip install python-roborock[cli]
Example Usage
See examples/example.py for a more full featured example, or the API documentation for more details.
Here is a basic example:
import asyncio
from roborock.web_api import RoborockApiClient
from roborock.devices.device_manager import create_device_manager, UserParams
async def main():
email_address = "youremailhere@example.com"
web_api = RoborockApiClient(username=email_address)
# Send a login code to the above email address
await web_api.request_code()
# Prompt the user to enter the code
code = input("What is the code?")
user_data = await web_api.code_login(code)
# Create a device manager that can discover devices.
user_params = UserParams(username=email_address, user_data=user_data)
device_manager = await create_device_manager(user_params)
devices = await device_manager.get_devices()
# Get all vacuum devices. Each device generation has different capabilities
# and APIs available so to find vacuums we filter by the v1 PropertiesApi.
for device in devices:
if not device.v1_properties:
continue
# The PropertiesAPI has traits different device commands such as getting
# status, sending clean commands, etc. For this example we send a
# command to refresh the current device status.
status_trait = device.v1_properties.status
await status_trait.refresh()
print(status_trait)
asyncio.run(main())
Functionality
The library interacts with devices through specific API properties based on the device protocol:
- Standard Vacuums (V1 Protocol): Most robot vacuums use this. Interaction is done through
device.v1_properties, which contains traits likestatus,consumables, andmaps. Use thecommandtrait for actions like starting or stopping cleaning. - Wet/Dry Vacuums & Washing Machines (A01 Protocol): Devices like the Dyad and Zeo use this. Interaction is done through
device.a01_propertiesusingquery_values()andset_value().
You can find detailed documentation for Devices and Traits.
Supported devices
You can find what devices are supported here. Please note this may not immediately contain the latest devices.
Acknowledgements
- Thanks to @rovo89 for Login APIs gist.
- Thanks to @PiotrMachowski for Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor.
Release files for python-roborock 7.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python_roborock-7.4.1.tar.gz | 207.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_roborock-7.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 476.5 kB
Release files / python_roborock-7.4.1.tar.gz
| Download URL | python_roborock-7.4.1.tar.gz |
|---|---|
| Size | 207.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8dd4ced7ff3c3de9858533de74e091ac11df1ddea47e7fafb10bd20bd4f2accc
|
|
BLAKE2b-256 checksum How to use checksums |
5a026eed17d2f7116e091e6a64f36a4b573c645d38c89aaececb88e92765d699
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 7, 2026.
Transparency logRelease files / python_roborock-7.4.1-py3-none-any.whl
| Download URL | python_roborock-7.4.1-py3-none-any.whl |
|---|---|
| Size | 269.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0b556cf74e1b86831c15ba5d6a42b803ba825aec0d8681eb4933fda1093edf1e
|
|
BLAKE2b-256 checksum How to use checksums |
18d7631fd0a50275de4ead5fc2803cec29832e58794a187a18bb5d2564c0ba74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 7, 2026.
Transparency log