# rytilahti/python-miio

Python library & console tool for controlling Xiaomi smart appliances

Repository: https://github.com/rytilahti/python-miio
Canonical: https://ross.abutalabs.com/products/python-miio
Homepage: https://python-miio.readthedocs.io
Language: Python
License: GPL-3.0
License Family: copyleft
Topics: xiaomi, python, home-assistant, miio, home-automation, smart-home, miot, miot-spec
Last push: 2026-07-25T16:54:41+00:00

## Health v2 (maintenance only)
Score: 65/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 94, release rhythm 8, longevity 100
- inputs: {"age_days": 3468, "days_push": 39, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4294, forks 602 (observed 2026-08-28T04:08:41.495008+00:00)

## What it is
A Python library and accompanying miiocli console tool for controlling Xiaomi smart home appliances over the miIO and MIoT protocols. It supports device discovery, cloud token retrieval, and integration with projects like Home Assistant.

## Use cases
- control xiaomi smart devices from python
- get xiaomi device tokens from cloud account
- control mi vacuum or air purifier from command line
- integrate xiaomi appliances with home assistant
- send commands to miot devices on local network
- discover xiaomi devices on lan

## When to choose
- you need to programmatically control Xiaomi miIO/MIoT devices
- you want a CLI to interact with Xiaomi appliances
- you are building a Home Assistant integration for Xiaomi devices

## When to avoid
- you need official vendor support or cloud API guarantees
- your device is not Xiaomi or uses a different protocol
- you need a stable 0.6 release for modern MIoT devices (still in pre-release refactoring)

## Facets
- artifact type: library
- maturity: active
- function: sdk, cli, developer-tools
- domain: iot, developer-tools
- platform: python, cli, windows, cross-platform
- tags: xiaomi, miio, miot, home-automation, smart-home, home-assistant, miiocli, automation, linux, macos

## Member repositories
- rytilahti/python-miio (main) score 65

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:41.495008+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:21:53.040045+00:00, confidence not recorded.
  - readme: https://github.com/rytilahti/python-miio (fetched 2026-08-28T04:08:41.495008+00:00, sha 47cf591fd82f)
  - registry_pypi: https://pypi.org/pypi/python-miio/json (fetched 2026-08-29T09:11:35.747304+00:00, sha 6e1900782aa6)
- Data as of 2026-08-30T08:39:29.467469+00:00.
