$npx skillfedfor your agent

python-miio

Python library for interfacing with Xiaomi smart appliances

With conditionsPyPI Home AutomationReleased Jul 2022329.4K downloads / moGPL-3.0-onlyPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — python_miio-0.5.12-py3-none-any.whl
v0.5.12 · released 2022-07-18 · Python >=3.7,<4.0 · 15 runtime deps: PyYAML, android_backup, appdirs, attrs, click, construct, croniter, cryptography

Yes, if you own Xiaomi smart devices and want programmatic or CLI control without relying on cloud services or proprietary apps. The library is stable, actively maintained, and widely used. The copyleft GPL-3.0-only license is a consideration if you plan to distribute derivative work. No known security vulnerabilities as of the query date.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires a valid device token and network connectivity to the target Xiaomi device.
  • Low install friction with a pure Python wheel.
  • Active maintenance as of 2026-07-25 with 4285 repository stars.

License · maintenance · safety

GPL-3.0-only (copyleft) — Licensed under GPL-3.0-only (copyleft). Any derivative work or bundled distribution must also be open-source under compatible terms.

last release 2022-07-18 (1488 days) · last repo commit 2026-07-25 · 4,285 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 329,400 downloads/mo, #7,546 on PyPI

Verify before relying

pip install python-miio

from miio import RoborockVacuum

vac = RoborockVacuum("", "")
vac.start()
  • Whether all 15 runtime dependencies are truly required for basic operation or if some are optional for specific device types.
  • Current maintenance status beyond the last commit date—whether active development continues or the project is in maintenance-only mode.
  • Specific IP address and token format requirements for device connection.
Same gist for agents: .md · .json

What it is and what it does

python-miio is a Python library and command-line tool for communicating with Xiaomi smart home devices using their proprietary miIO and MIoT protocols. It provides both a programmatic API (via classes like RoborockVacuum and Device) and a CLI tool (miiocli) for discovering devices, querying their status, and sending control commands. The library abstracts away protocol details and handles device model detection automatically.

The package supports a wide range of Xiaomi and compatible devices—robot vacuums, air purifiers, fans, smart plugs, lights, humidifiers, and others—each exposed through a dedicated module. It is actively used by Home Assistant for official device integration. Installation is straightforward with low friction, though operation requires obtaining a device token and network access to the target device.

Use it for

  • Control a Xiaomi robot vacuum from Python or the command line without proprietary apps.
  • Automate Xiaomi smart home devices in a home automation system.
  • Query device status and execute device-specific commands via miiocli.
  • Build custom integrations for unsupported Xiaomi devices by extending the Device or MiotDevice base classes.
  • Monitor and control air purifiers, humidifiers, and environmental devices on a local network.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you own Xiaomi smart devices and want programmatic or CLI control without relying on cloud services or proprietary apps.

The library is stable, actively maintained, and widely used. The copyleft GPL-3.0-only license is a consideration if you plan to distribute derivative work. No known security vulnerabilities as of the query date.

Install

python-miio on PyPI

Before you install

Low install friction with a pure Python wheel. Active maintenance as of 2026-07-25 with 4285 repository stars. Supports Python 3.7 through 3.10.

Requires a valid device token and network connectivity to the target Xiaomi device.

License in practice

Licensed under GPL-3.0-only (copyleft). Any derivative work or bundled distribution must also be open-source under compatible terms.

Quickstart

pip install python-miio

from miio import RoborockVacuum

vac = RoborockVacuum("", "")
vac.start()

Verify before relying

  • Whether all 15 runtime dependencies are truly required for basic operation or if some are optional for specific device types.
  • Current maintenance status beyond the last commit date—whether active development continues or the project is in maintenance-only mode.
  • Specific IP address and token format requirements for device connection.

Package facts

LicenseGPL-3.0-only copyleft
Python supportSupports the current Python release >=3.7,<4.0
Install frictionLow. Pure-Python wheel
Runtime dependencies
15 packages
PyYAMLandroid_backupappdirsattrsclickconstructcronitercryptographydefusedxmlimportlib_metadatamicloudnetifacespytztqdmzeroconf
MaintenanceActively maintained 1,488 days since the last release
Last repo commit
First released
Downloads329,400 / month, #7,546 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: End Users/DesktopLicense :: OSI Approved :: GNU General Public License v3 (GPLv3)Operating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Home AutomationTopic :: System :: Hardware

Evidence: python_miio-0.5.12-py3-none-any.whl

Tags

Capabilities
xiaomi smart home controlmiio protocol interfacexiaomi device automationsmart appliance command linexiaomi vacuum robot controlmiot device managementhome automation xiaomi
Topics
smart-homeiot-controlxiaomi-devices
PyPI keywords
xiaomimiiomiotsmart home

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “xiaomi smart home control”

  • python-miioPython library and CLI tool for controlling Xiaomi smart devices…
  • xiaomi-bleManages Xiaomi BLE (Bluetooth Low Energy) devices by providing a…
  • zigpy-znpAdds support for Texas Instruments ZNP Zigbee radio modules to the…

Give your agent the search over MCP, or paste the wish link into any chat.

More Home Automation packages

netaddr Worth it
PyPI · Software Development · released May 2024

Represents and manipulates IPv4, IPv6, MAC addresses and related network objects; supports CIDR notation, subnetting, set operations, IANA lookups, and DNS reverse generation.

BSD-3-Clausepure Python · 3.7+dormant
14.0Mdownloads / mo
homeassistant Worth it
PyPI · Home Automation · released Aug 2026

Home Assistant is an open-source home automation platform that centralizes control of smart home devices and automations on a local server or Raspberry Pi, prioritizing local control and privacy over cloud dependency.

Apache-2.0pure Python · 3.14.2+
2.1Mdownloads / mo
python-statemachine Worth it
PyPI · Libraries · released Aug 2026

Defines finite state machines and statecharts with a declarative Python API, supporting flat states, compound hierarchies, parallel regions, history states, guards, and both sync and async callbacks.

Install it if you need to model workflows, control logic, or any system with discrete states and event-driven transitions — from simple state machines to complex…

MITpure Python · 3.10+
1.3Mdownloads / mo
btsocket With conditions
PyPI · Home Automation · released Jun 2024

A Python library for controlling BlueZ Bluetooth adapters on Linux via the Management API, supporting both synchronous and event-driven command patterns.

MITpure Pythonaging
625.5Kdownloads / mo
aiohomematic Worth it
PyPI · Python Modules · released Aug 2026

An async Python library for controlling and monitoring Homematic and HomematicIP devices through multiple backend systems (CCU3, OpenCCU, Homegear, CUxD, CCU-Jack) using XML-RPC and JSON-RPC protocols.

Install it if you need to control Homematic devices from Python; the only constraint is a requirement for Python 3.14 or later and network access to a compatible…

MITpure Python · 3.14+
621.2Kdownloads / mo
hass-web-proxy-lib With conditions
PyPI · Home Automation · released May 2026

Provides base classes and utilities for Home Assistant integrations to proxy HTTP and WebSocket traffic through Home Assistant's web server.

Install only if you are building a custom Home Assistant integration; it is not useful as a standalone package.

MITpure Python
606.7Kdownloads / mo

See also nmcli · xiaomi-ble · broadlink · roombapy · micloud · tinytuya · python-roborock · pymiele · wiim · pywemo