Skip to main content

Roborock

PyPI Version Supported Python versions License Code Coverage

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 like status, consumables, and maps. Use the command trait 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_properties using query_values() and set_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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_roborock-6.1.0.tar.gz (193.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_roborock-6.1.0-py3-none-any.whl (252.1 kB view details)

Uploaded Python 3

File details

Details for the file python_roborock-6.1.0.tar.gz.

File metadata

  • Download URL: python_roborock-6.1.0.tar.gz
  • Upload date:
  • Size: 193.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for python_roborock-6.1.0.tar.gz
Algorithm Hash digest
SHA256 c1a14bed463e04a396f8f7b55047ca0d2f735cd2100d14974d0e58d898a62875
MD5 775be0ef93a44ca80126a7e9f3082843
BLAKE2b-256 cba2cfe67cee3a44f484606abc2f880bf7d58d5ad98cb223ebac3fcd03633126

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_roborock-6.1.0.tar.gz:

Publisher: ci.yml on Python-roborock/python-roborock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file python_roborock-6.1.0-py3-none-any.whl.

File metadata

  • Download URL: python_roborock-6.1.0-py3-none-any.whl
  • Upload date:
  • Size: 252.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for python_roborock-6.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 11cf642908b4b4be78be8a3e753a7dd8c13b074200f491f851a2c0a7ec40664c
MD5 cd143109f8c1e88e9ca6af00f48a9c98
BLAKE2b-256 d2bab6a48b47a52ac1861e974d30463ddaf7ed0b7a970a2d96c51f6b813eb679

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_roborock-6.1.0-py3-none-any.whl:

Publisher: ci.yml on Python-roborock/python-roborock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page