python-roborock
A package to control Roborock vacuums.
What it is and what it does
python-roborock is a Python library for controlling Roborock vacuum cleaners and related appliances through both online (cloud) and offline (local) connections. It abstracts the different communication protocols used by different device generations—V1 for standard vacuums and A01 for wet/dry vacuums and washing machines—into a unified interface. The library handles authentication via email code login, device discovery through a device manager, and provides trait-based access to device capabilities like status queries, cleaning commands, and map data.
The library is built on async/await patterns using aiohttp and aiomqtt for network communication, with protobuf and cryptographic libraries handling protocol encoding and security. It's designed primarily for home automation integration (notably Home Assistant) and targets developers building smart home applications. The library requires Python 3.11 or later and has no known security vulnerabilities.
Use it for:
- Integrate Roborock vacuums into a Home Assistant or custom home automation system for scheduled or remote cleaning
- Build a monitoring dashboard that queries vacuum status, battery level, and cleaning history across multiple devices
- Automate vacuum commands based on external triggers (e.g., start cleaning when household leaves, stop when someone returns)
- Extract and process vacuum-generated maps and cleaning data for analysis or visualization
- Control wet/dry vacuums or washing machines via the A01 protocol in multi-device smart home setups
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Control Roborock vacuum cleaners online and offline through a Python library supporting multiple device protocols (V1 for standard vacuums, A01 for wet/dry and washing machines).
Yes. The library is actively maintained, has no known vulnerabilities, uses a permissive license, and offers low installation friction. It's well-suited for anyone building home automation integrations with Roborock devices. The async-first design and support for multiple device protocols make it flexible for both simple control and complex multi-device scenarios.
Install
python-roborock on PyPI
pip
pip install python-roborockuv
uv add python-roborockpoetry
poetry add python-roborockInstalling python-roborock
Before you install
Low friction installation as a pure-Python wheel. Actively maintained with a recent release (12 days old) and steady repository activity. Nine runtime dependencies including aiohttp, aiomqtt, and protobuf are all established packages.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions, making it suitable for integration into proprietary home automation systems.
Quickstart
pip install python-roborock
import asyncio
from roborock.web_api import RoborockApiClient
from roborock.devices.device_manager import create_device_manager, UserParams
async def main():
web_api = RoborockApiClient(username="user@example.com")
await web_api.request_code()
code = input("Enter code: ")
user_data = await web_api.code_login(code)
device_manager = await create_device_manager(UserParams(username="user@example.com", user_data=user_data))
devices = await device_manager.get_devices()
asyncio.run(main())
Requires Python 3.11 or later; email-based login requires receiving a code sent to the registered email address.
Verify before relying
- Whether all listed supported devices remain compatible with version 6.2.1 or if some require older versions
- Performance characteristics when controlling multiple vacuums simultaneously
- Offline control mode requirements and limitations compared to online mode
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (<4,>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 9 — aiohttp, aiomqtt, construct, paho-mqtt, protobuf, pycryptodomex, pycryptodome, pyrate-limiter, vacuum-map-parser-roborock |
| Maintenance | actively maintained — 12 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 138,155/month — #11,341 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: python_roborock-6.2.1-py3-none-any.whl
Keywords: homeassistant, roborock, vacuum
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
pybotvacpybotvac provides an unofficial Python API to…
permissive · top 15,000 on PyPI
vacuum-map-parser-roborockParses map data generated by Roborock vacuum…
permissive · top 15,000 on PyPI
deebot-clientA Python client library for controlling Ecovacs…
copyleft · top 15,000 on PyPI
vacuum-map-parser-baseProvides base classes and utilities for parsing…
permissive · top 15,000 on PyPI
python-miioPython library and CLI tool for controlling…
copyleft · top 15,000 on PyPI
librouteroslibrouteros is a Python client library for the…
copyleft · top 15,000 on PyPI
meross-iotA Python library for controlling Meross IoT…
permissive · top 15,000 on PyPI
switchbot-apiAn async Python library for controlling…
permissive · top 15,000 on PyPI
fjaraskupanControl Fjäråskupan kitchen fans over Bluetooth…
permissive · top 15,000 on PyPI
aioairzone-cloudAsync Python library for controlling Airzone…
permissive · top 15,000 on PyPI