eyaeya / xiaomi-central-hub-gateway-cli
PublicCLI for Xiaomi Central Hub Gateway Geek Edition (小米中枢网关极客版) — drive your gateway with Codex/Claude/other AI agents for vibe-coding automation rules. Unofficial.
This is an open-source command-line tool that lets you control and automate a Xiaomi Central Hub Geek Edition smart home gateway. It provides commands to view devices, create automation rules (combining triggers like button presses with actions like turning on lights), manage variables for complex logic, and backup/restore your configuration. The tool communicates with your hub over your local network using secure encrypted connections. It's designed for power users who want more control than the official app provides.
How It Works
You discover there's a way to create custom automations for your Xiaomi gateway that go beyond what the app offers.
The tool comes as a simple program you run in your terminal. You follow easy instructions to get it set up.
Your hub shows a 6-digit code that acts like a key. You enter it once and your computer remembers your hub for future sessions.
The tool shows you all your devices - lights, sensors, buttons - with clear names and whether they're online.
You build rules like 'when this button is pressed, turn on that light' by combining small building blocks
You can see values that your automations use, like whether a light is on or what temperature it is
You save a copy of all your rules and settings so you can restore them later
Your custom automations run automatically on your hub. You can export them to share with others or recreate on another hub.
Star Growth
Repurpose is a Pro feature
Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.
Unlock RepurposeSimilar repos coming soon.