xiaomi-vacuum
Local control for Xiaomi and Dreame robot vacuums via the MIoT protocol.
If your vacuum gives you user ack timeout when you try to control it locally — this library fixes that. Newer models (2023+) dropped the classic miio protocol. This uses MIoT instead, the same protocol the Mi Home app uses.
Install
pip install xiaomi-vacuum
Usage
Python
from xiaomi_vacuum import XiaomiVacuum
vac = XiaomiVacuum("192.168.1.100", "your_32char_token", "xiaomi.vacuum.d109gl")
vac.start()
vac.stop()
vac.home()
status = vac.status()
print(status)
CLI
xiaomi-vacuum --ip 192.168.1.100 --token YOUR_TOKEN --model xiaomi.vacuum.d109gl status
xiaomi-vacuum --ip 192.168.1.100 --token YOUR_TOKEN --model xiaomi.vacuum.d109gl start
Setup
Get your token
Use Xiaomi Cloud Tokens Extractor to get your device token.
Configuration
Create ~/.xiaomi-vacuum.json:
{
"token": "your_32char_token",
"model": "xiaomi.vacuum.d109gl"
}
Or set environment variables:
export XIAOMI_VACUUM_TOKEN=*** XIAOMI_VACUUM_MODEL="xiaomi.vacuum.d109gl"
Supported Devices
Any Xiaomi/Dreame vacuum with a MIoT spec on miot-spec.org. The library fetches the spec automatically.
Tested:
- Xiaomi Robot Vacuum X20 Max (
xiaomi.vacuum.d109gl)
How It Works
Newer Xiaomi vacuums dropped support for the classic miio RPC protocol. Commands like get_status and get_prop timeout with user ack timeout.
This library uses the MIoT action protocol instead — the same one the Mi Home app uses internally. It fetches the device spec from Xiaomi's official spec database and maps service/property IDs automatically.
License
MIT
Metadata
Release files for xiaomi-vacuum 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xiaomi_vacuum-0.1.0.tar.gz | 6.0 kB | Without provenance | Details for xiaomi_vacuum-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xiaomi_vacuum-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for xiaomi_vacuum-0.1.0-py3-none-any.whl |
Total release size: 12.7 kB
Release files / xiaomi_vacuum-0.1.0.tar.gz
| Download URL | xiaomi_vacuum-0.1.0.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0bf9166109b116f76d799ce541747f6f582b5e69338ec62cdf236aa891b8808d
|
|
BLAKE2b-256 checksum How to use checksums |
02572ffbec07f73c26a03a804bd485df941b55c149e999525c4effbd7d480f35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Release files / xiaomi_vacuum-0.1.0-py3-none-any.whl
| Download URL | xiaomi_vacuum-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2fcc648d7a2ab23dfd37a3622207a8cd5e10e8e78780b3ced9baa8c93bc38db9
|
|
BLAKE2b-256 checksum How to use checksums |
6aaa800bee414566127e97ffae687d68432b09178aac044a84724fd93a8bfa09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Security for xiaomi-vacuum 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.