← Back to Skills Marketplace
yiqiezhenxi

Xiaomi

by yiqiezhenxi · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
1406
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install home-xiaomi
Description
[English] Control Xiaomi Home devices via local LAN using miiocli. Supports status checks, toggling power, and MIOT property manipulation for devices like smart plugs, humidifiers, and rice cookers. | [中文] 通过局域网利用 miiocli 控制米家智能设备。支持查看状态、开关控制以及对智能插座、加湿器、电饭煲等 MIOT 设备的属性调优。
README (SKILL.md)

Xiaomi Home Control小米家居控制

[English] | 中文


English

Enable code-level control of Xiaomi (Mi Home) devices over the local network.

🚀 Features

  • Local Network Control: Fast, direct communication without relying on heavy cloud APIs.
  • Built-in Token Extractor: Includes a script to easily fetch your device IPs and Tokens from Xiaomi Cloud.
  • Pre-configured Workflows: Ready-to-use commands for smart plugs (e.g., water heaters), humidifiers, and rice cookers.
  • Automatic Dependency Fix: Solves common library conflicts (like the click version issue) automatically.

🛠️ Setup & Device Inventory

  1. Tokens: Obtain device IPs and Tokens using the bundled script:
    python3 scripts/token_extractor.py
    
  2. Registry: Store your device details in references/devices.md or references/my_private_devices.md.

🤖 Natural Language Intents

When the user gives a command, map it to the corresponding miiocli operation:

User Intent Device Type Action Technical Command (Example)
"Turn on water heater" Smart Plug Power ON miiocli miotdevice --ip \x3CIP> --token \x3CTOKEN> raw_command set_properties '[{"siid": 2, "piid": 1, "value": true}]'
"Turn off water heater" Smart Plug Power OFF miiocli miotdevice --ip \x3CIP> --token \x3CTOKEN> raw_command set_properties '[{"siid": 2, "piid": 1, "value": false}]'
"Humidifier to max" Humidifier Set Mode miiocli miotdevice --ip \x3CIP> --token \x3CTOKEN> set_property_by 2 5 3
"Is rice cooked?" Rice Cooker Check Status miiocli cooker --ip \x3CIP> --token \x3CTOKEN> status

中文说明

实现在局域网内对小米(米家)智能家居设备的代码级直接控制。

🚀 核心特性

  • 本地化控制:直接在局域网内通信,响应极快,不完全依赖复杂的云端 API。
  • 内置 Token 提取器:自带提取脚本,轻松从小米账号同步所有设备的 IP 和 32 位 Token 密钥。
  • 预设工作流:支持智能插座(如热水器控制)、加湿器、米家小饭煲等多种常见设备。
  • 自动环境优化:安装时自动处理 Python 依赖冲突(如 click 版本问题),确保开箱即用。

🛠️ 快速开始

  1. 获取钥匙:运行内置的提取脚本:
    python3 scripts/token_extractor.py
    
  2. 配置列表:将您的设备信息填入 references/devices.md
  3. 下达指令:对着机器人喊:“打开热水器”或“查看加湿器状态”。

Usage Guidance
This skill appears to describe useful local control via miiocli, but the package is instruction-only: it references a token_extractor script and other files that are not included. Before installing or running anything: 1) Ask the publisher for the missing scripts or source code and inspect them (token-extraction code can handle sensitive credentials). 2) If you must fetch device tokens, do so manually or with trusted tools — do not hand over Xiaomi account credentials to unknown scripts. 3) If you run the provided pipx install, be aware the command assumes a specific pipx venv path and will modify your Python environment; prefer installing python-miio yourself and verify the click version change. 4) Only proceed if you trust the skill source and have verified the token extraction method and storage location for your device tokens.
Capability Analysis
Type: OpenClaw Skill Name: home-xiaomi Version: 1.0.0 The skill is classified as suspicious primarily due to its handling of sensitive Xiaomi device tokens. It explicitly instructs the agent to execute `python3 scripts/token_extractor.py` to obtain these tokens, which are then used in `miiocli` commands. While obtaining tokens is necessary for the skill's stated purpose of local device control, the content of `scripts/token_extractor.py` is not provided for review, making its behavior an unknown and high-risk factor. The installation command in `SKILL.md` uses `pipx` and addresses a known dependency issue, and the agent instructions do not exhibit signs of prompt injection or other malicious intent beyond the skill's stated purpose.
Capability Assessment
Purpose & Capability
The README claims a "built-in Token Extractor" script (scripts/token_extractor.py), pre-configured workflows, and an automatic dependency fix. The published bundle contains no code files—only SKILL.md—so the claimed scripts/resources are missing. The skill does correctly declare it requires the miiocli binary, which matches the stated purpose, but the advertised bundled tooling is absent.
Instruction Scope
Instructions tell the user/agent to run a token extractor to fetch device IPs and 32‑byte device tokens from Xiaomi Cloud, and to store device details in local reference files. The SKILL.md does not explain how Xiaomi account credentials are provided, and the extractor script it references is not present—so the runtime instructions cannot be followed as written and implicitly require credentials or browser cookies that are not declared.
Install Mechanism
The SKILL.md metadata suggests installing python-miio via pipx and then forcing a click<8.1.0 install inside the pipx venv. Installing python-miio from PyPI via pipx is a reasonable approach, not high risk, but the install command hardcodes a user-specific path (/Users/$(whoami)/.local/pipx/venvs/...), which is platform-specific and brittle. There is no arbitrary URL download or archive extraction.
Credentials
The skill declares no required environment variables or credentials, yet its instructions refer to extracting tokens from Xiaomi Cloud (which normally requires Xiaomi account credentials, cookies, or other secrets). The absence of any declared credential requirements is a mismatch and leaves unclear how sensitive credentials would be supplied or handled.
Persistence & Privilege
The skill does not request always:true or any persistent privileged configuration. It is user-invocable and allows autonomous invocation (default), which is normal; there is no evidence it modifies other skills or system-wide settings.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install home-xiaomi
  3. After installation, invoke the skill by name or use /home-xiaomi
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: - Control Xiaomi Home devices locally over LAN using miiocli. - Supports status checks, power toggling, and MIOT property control for smart plugs, humidifiers, and rice cookers. - Includes a built-in script for extracting device IPs and tokens from Xiaomi Cloud. - Provides pre-configured command workflows for commonly used devices. - Installs dependencies and handles common library conflicts automatically. - Offers documentation and natural language command examples in both English and Chinese.
Metadata
Slug home-xiaomi
Version 1.0.0
License
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is Xiaomi?

[English] Control Xiaomi Home devices via local LAN using miiocli. Supports status checks, toggling power, and MIOT property manipulation for devices like smart plugs, humidifiers, and rice cookers. | [中文] 通过局域网利用 miiocli 控制米家智能设备。支持查看状态、开关控制以及对智能插座、加湿器、电饭煲等 MIOT 设备的属性调优。 It is an AI Agent Skill for Claude Code / OpenClaw, with 1406 downloads so far.

How do I install Xiaomi?

Run "/install home-xiaomi" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Xiaomi free?

Yes, Xiaomi is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Xiaomi support?

Xiaomi is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Xiaomi?

It is built and maintained by yiqiezhenxi (@yiqiezhenxi); the current version is v1.0.0.

💬 Comments