qmetrics.net

Python miIO

Python library and CLI for Xiaomi miIO and MIoT

Python miIO screenshot

python-miio talks to Xiaomi smart appliances over miIO and MIoT. The miiocli tool and DeviceFactory API control devices from the shell or from code.

Overview

python-miio is a community library for Xiaomi ecosystem hardware. It sends miIO and MIoT protocol commands so scripts and integrations can read sensors, change settings, and invoke device actions when you know each unit IP address and token.

The miiocli entry point lists cloud-discovered devices, prints firmware metadata, and routes control through device-specific modules or genericmiot. The generic path downloads miot spec files per model, then exposes status, set, and call commands that mirror available properties and actions.

Python code imports DeviceFactory to auto-detect models and introspect sensors, settings, and actions through descriptor objects. Dozens of named device classes cover vacuums, purifiers, plugs, fans, and cameras, while newer MIoT products fall back to the generic integration in the git and pre-release lines.

Simulators for miIO and MIoT ship with miiocli so developers can test integrations without physical hardware. Home Assistant is listed as a consumer of the library for several platforms.

Key features

  • miIO and MIoT protocol support
  • miiocli shell control for devices
  • genericmiot auto spec downloads
  • DeviceFactory model auto-detection
  • Built-in miIO and MIoT simulators
  • Cloud token lookup via miiocli cloud
  • Descriptor introspection for features
  • Many named Xiaomi device integrations

Use cases

  • Scripting Xiaomi vacuums and air purifiers
  • Building Home Assistant device integrations
  • Debugging MIoT devices without vendor apps
  • Teaching miIO protocol clients with simulators

Tags

Similar software

MQTT.js

JavaScript MQTT client for Node.js and browsers

MQTT.js is a client library for the MQTT protocol in JavaScript. It targets Node.js and browser environments and can connect to brokers over TCP, TLS, and WebSockets.

  • MQTT client for Node.js and browsers
  • TCP, TLS, and WebSocket transports
  • Automatic reconnection with tunable options
TypeScriptWeb, CLIDetails →
★ 9.1k⟳ 4 days agoMIT

Hass Xiaomi Miot

Home Assistant integration for Xiaomi MIoT devices

This Home Assistant custom integration connects Xiaomi Wi-Fi, BLE, and Zigbee devices via the MIoT specification, with UI-based setup and optional cloud or local control modes.

  • MIoT-spec protocol integration
  • HACS and manual install paths
  • Mi account or host token pairing
PythonDetails →
★ 6.3k⟳ 15 days agoApache-2.0

Node SerialPort

Serial port access from JavaScript

node-serialport lets JavaScript and TypeScript talk to hardware over serial ports on Linux, macOS, and Windows. It targets robots, IoT gadgets, and desktop tools that need USB serial links.

  • Serial read and write from Node.js
  • Linux, macOS, and Windows support
  • Electron-compatible workflows
TypeScriptLinux, macOS, WindowsDetails →
★ 6k⟳ 11 months agoMIT

FastBle

Android Bluetooth Low Energy development library

FastBle simplifies Android BLE scanning, connection, read, write, notify, RSSI, and MTU handling with filtering, multi-connection support, and modern ScanCallback APIs.

  • Filtered BLE scanning
  • Multi-device connections
  • Read write notify indicate
JavaAndroidDetails →
★ 5.5k⟳ 7 months agoApache-2.0

Lovelace Mushroom

Home Assistant Lovelace dashboard card collection

Mushroom is a set of custom Lovelace cards for Home Assistant dashboards. Each card is configured in the UI editor with icon and color pickers and no extra card dependencies.

  • Custom Lovelace cards for many entity types
  • Full UI editor for every card option
  • Built-in icon and color pickers
TypeScriptWebDetails →
★ 5.3k⟳ 3 days agoApache-2.0

Blinker

Arduino and ESP IoT client library for Blinker cloud

The Blinker library links embedded boards to the Blinker IoT platform over Wi-Fi, BLE, or MQTT from Arduino, ESP8266, and ESP32 firmware.

  • Arduino and ESP board support
  • Wi-Fi, BLE, and MQTT transports
  • Blinker mobile app integration
C++Details →
★ 5.2k⟳ 1 year agoMIT
IoT, Hardware & FirmwareNo commits in 18+ months