Zum Hauptinhalt springen

Xiaomi Home Smart-Home-Integration, kostenlos und Open Source

Xiaomi Home-Integration für Gladys Assistant

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

Info

Die Dokumentation dieser Integration wird von ihrem Autor geschrieben und ist bisher nur auf Englisch verfügbar.

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.

Konfigurationseinstellungen​

Diese Einstellungen fragt Xiaomi Home in seinem Konfigurationsbildschirm in Gladys ab.

EinstellungTypPflichtfeldBeschreibung
Xiaomi accountoauth2NeinClick 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.

So installierst du Xiaomi Home in Gladys​

  1. Öffne in Gladys Integrationen: Xiaomi Home erscheint im Katalog neben den nativen Integrationen, mit einem Community-Badge.
  2. Klicke auf Installieren. Gladys lädt das Docker-Image (ghcr.io/callemand/gladys-xiaomi-home:1.2.0) herunter, startet es in einer vom Kern isolierten Sandbox und erzeugt die Oberfläche der Integration (Geräte, Erkennung und Konfiguration).
  3. Öffne den Bildschirm Konfiguration der Integration, fülle die Einstellungen aus und speichere.
  4. Du kannst sie auch direkt über die URL ihres Repositorys installieren: https://github.com/callemand/gladys-xiaomi-home.

Xiaomi Home benötigt Gladys >=4.86.0. Der Katalog in Gladys wird stündlich aktualisiert, eine neue Version ist also spätestens eine Stunde nach ihrer Veröffentlichung verfügbar.

Du nutzt Gladys noch nicht? Es ist kostenlos und Open Source: folge der Installationsanleitung, um loszulegen.

Über externe Integrationen​

Xiaomi Home ist eine externe Integration: eine Community-Integration, die als Docker-Container verpackt und auf GitHub veröffentlicht wird. Gladys installiert sie mit einem Klick und führt sie in einer vom Kern isolierten Sandbox aus. Sie wird von callemand veröffentlicht und gepflegt, nicht vom Gladys-Kernteam.

Abonniere den Newsletter von Gladys Assistant

Ein paar E-Mails im Monat zu neuen Releases und Neuigkeiten aus dem Projekt. Verschickt von Pierre-Gilles Leymarie, dem Gründer des Projekts. Jederzeit abbestellbar 🙂