
from clawdbot-cn39
Control and monitor Xiaomi Mijia smart home devices via bundled Python scripts — list devices, toggle power, adjust brightness, and run automation scenes.
Adds direct smart-home control to an agent by wrapping a local mijiaAPI driver. The skill lets an agent list paired Mijia devices, query their real-time status, send on/off and parameter adjustments (brightness, temperature, etc.), and trigger pre-defined automation scenes. Operational guardrails are built in for risky devices (locks, curtains, HVAC) requiring verbal confirmation before execution.
Use when a user asks the assistant to inspect or control Xiaomi Mijia devices on the same network: e.g., 'Which lights are on?', 'Turn off bedroom lamp', 'Set living room brightness to 40%', or 'Run Good Night scene'. Designed for on-premises automation flows where scripts can reach local device APIs.
scripts/ directory with setup_env.py, list_devices.py, control_device.py, and login helpers (has_scripts=true).instructions.md and reference/device_catalogs.md for device-to-command mapping.Agents that can execute local Python/CLI scripts: Claude Code, Codex-style agents, self-hosted assistants with shell access, and OpenClaw-based setups.
Mijia Control is a Chinese-language skill for controlling Xiaomi smart home devices via the mijiaAPI Python library. All three scripts ran cleanly: setup_env.py correctly reported the missing library and environment state, list_devices.py gracefully handled the missing dependency with a JSON error, and control_device.py showed proper argparse usage requiring action/prop arguments. The skill has sensible guardrails (oral confirmation for safety-critical devices, no token leakage) and clear decision logic, though the Chinese-only documentation limits its audience.
mijiaAPIWell-structured smart home skill targeting a real ecosystem. Security is solid — no credential leakage patterns, proper guardrails, no remote code execution vectors. Code quality is above average with structured JSON output and error handling. Main limitations: Chinese-only docs, heavy setup dependency on mijiaAPI library and Xiaomi auth flow, and list_devices.py exits 0 even on error which could mask failures in automation pipelines.