← 返回 Skills 市场
yiqiezhenxi

Xiaomi

作者 yiqiezhenxi · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
1406
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install home-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 设备的属性调优。
使用说明 (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. 下达指令:对着机器人喊:“打开热水器”或“查看加湿器状态”。

安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install home-xiaomi
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /home-xiaomi 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
Slug home-xiaomi
版本 1.0.0
许可证
累计安装 1
当前安装数 1
历史版本数 1
常见问题

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 设备的属性调优。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1406 次。

如何安装 Xiaomi?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install home-xiaomi」即可一键安装,无需额外配置。

Xiaomi 是免费的吗?

是的,Xiaomi 完全免费(开源免费),可自由下载、安装和使用。

Xiaomi 支持哪些平台?

Xiaomi 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Xiaomi?

由 yiqiezhenxi(@yiqiezhenxi)开发并维护,当前版本 v1.0.0。

💬 留言讨论