skillfed

python-roborock

A package to control Roborock vacuums.

python-roborock v6.2.1 138.2K downloads/30d#11,341 on PyPI222
Permissive license Apache-2.0 Active released

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-roborock

uv

uv add python-roborock

poetry

poetry add python-roborock

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersNatural Language :: EnglishOperating System :: OS IndependentTopic :: Software Development :: Libraries

Tags

roborock vacuum control pythonrobot vacuum api libraryhome automation vacuumroborock device managementvacuum cleaner integrationiot vacuum control
home-automationiot-devicesasync-io

More Libraries packages