Skip to main content

Xiaomi Home integration for Gladys Assistant

Xiaomi Home integration for Gladys Assistant

Robot vacuums paired in the Xiaomi Home app: state, start/stop, fan power, dock, battery.

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

  1. Click Connect: the Xiaomi sign-in page opens.
  2. Approve it (you can also scan it with the Xiaomi Home app).
  3. The badge turns green on its own.
  4. 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.

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_power value visible in the debug logs.

Configuration settings

These are the settings Xiaomi Home asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
Xiaomi accountoauth2NoClick 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.

How to install Xiaomi Home in Gladys

  1. In Gladys, open Integrations: Xiaomi Home appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/callemand/gladys-xiaomi-home:1.0.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration).
  3. Open the Configuration screen of the integration, fill in the settings, and save.
  4. You can also install it directly from its repository URL: https://github.com/callemand/gladys-xiaomi-home.

Xiaomi Home requires Gladys >=4.62.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.

Not running Gladys yet? It is free and open source: follow the installation guide to get started.

About external integrations

Xiaomi Home is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by callemand, not by the Gladys core team.

Subscribe to the Gladys Assistant newsletter

A few emails per month about new releases and project news. Sent by Pierre-Gilles Leymarie, founder of the project. Unsubscribe anytime 🙂