Integración domótica Xiaomi Home, gratuita y de código abierto

Robot vacuums paired in the Xiaomi Home app: state, start/stop, fan power, dock, battery.
La documentación de esta integración la escribe su autor y, por ahora, solo está disponible en inglés.
Control the robot vacuums of your Xiaomi Home account from Gladys Assistant.
This integration targets robots paired in the Xiaomi Home (Mi Home) app. It talks to them directly over your local network, with an automatic fallback to the Xiaomi cloud when a robot is not reachable.
If your robot is paired in the Roborock app, it answers on an entirely different service: the Roborock integration is the one you need. Both can be installed at once if you use both apps.
Features
For every robot of your account:
- State — the operational state of the robot (cleaning, paused, returning to the dock, charging, docked, error…).
- Run mode — start or stop a cleaning cycle.
- Clean mode — the suction level (silent, balanced, turbo, max, gentle).
- Dock — send the robot back to its charging dock.
- Battery — the current battery level, in percent.
Configuration
- Click Connect: the Xiaomi sign-in page opens.
- Approve it (you can also scan it with the Xiaomi Home app).
- The badge turns green on its own.
- Open the Discovery screen and start a scan: your robots appear and can be added to Gladys.
You never type your Xiaomi password into Gladys, and this is only needed once: the session is stored and reused automatically after a restart.
There is nothing to configure: the Xiaomi server region, your robots, their local encryption keys and their IP addresses are all discovered automatically.
How it works
The integration discovers your robots through the Xiaomi cloud, along with their local encryption key and IP address. Commands and state readings then go through the local network first (encrypted miIO protocol), falling back to the cloud when a robot is unreachable. The transport in use is shown as a badge on the device.
Turn off Prefer the local (LAN) connection when available in the integration settings to send commands through the Xiaomi cloud first instead, with the local network as the fallback.
Limitations
- Robot vacuums only. The name matches the app, but a Xiaomi Home account carries many other device types and none of them is handled here.
- Suction-level codes vary across model generations. If your model behaves
differently, open an issue with the
fan_powervalue visible in the debug logs.
Parámetros de configuración
Estos son los parámetros que Xiaomi Home te pide en su pantalla de configuración en Gladys.
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| Xiaomi account | account_link | No | Click Connect and approve the sign-in on the Xiaomi page that opens. Your robot vacuums are then detected automatically — there is nothing else to fill in. |
Cómo instalar Xiaomi Home en Gladys
- En Gladys, abre Integraciones: Xiaomi Home aparece en el catálogo junto a las integraciones nativas, con una insignia de comunidad.
- Haz clic en Instalar. Gladys descarga la imagen Docker (
ghcr.io/callemand/gladys-xiaomi-home:1.2.1), la ejecuta en un entorno aislado del núcleo y genera la interfaz de la integración (dispositivos, descubrimiento y configuración). - Abre la pantalla de Configuración de la integración, rellena los parámetros y guarda.
- También puedes instalarla directamente desde la URL de su repositorio: https://github.com/callemand/gladys-xiaomi-home.
Xiaomi Home requiere Gladys >=4.86.0. El catálogo de Gladys se actualiza cada hora, así que una nueva versión está disponible como máximo una hora después de publicarse.
¿Todavía no usas Gladys? Es gratuito y de código abierto: sigue la guía de instalación para empezar.
Sobre las integraciones externas
Xiaomi Home es una integración externa: una integración comunitaria empaquetada como contenedor Docker y publicada en GitHub. Gladys la instala con un clic y la ejecuta en un entorno aislado del núcleo. La publica y mantiene callemand, no el equipo principal de Gladys.
- Explorar todas las integraciones externas
- Descubrir las integraciones nativas incluidas en Gladys
- Crear y publicar tu propia integración externa
- Código fuente en GitHub — fuente de esta documentación