Open Source

Xiaomi Home Integration: Official Open-Source Home Assistant Plugin

Xiaomi Home is the official Home Assistant integration by Xiaomi for controlling Xiaomi IoT smart devices with local and cloud control options.

Keeping this site alive takes effort — your support means everything.
無程式碼也能輕鬆打造專業LINE官方帳號!一鍵導入模板,讓AI助你行銷加分! 無程式碼也能輕鬆打造專業LINE官方帳號!一鍵導入模板,讓AI助你行銷加分!
Xiaomi Home Integration: Official Open-Source Home Assistant Plugin

Home Assistant has become the de facto standard for open-source home automation, unifying devices from dozens of manufacturers into a single control interface. But integrating with any specific ecosystem has historically depended on community-developed plugins that reverse-engineer protocols and break when the manufacturer updates their firmware. Xiaomi Home (ha_xiaomi_home) changes this dynamic dramatically: it is the official Home Assistant integration developed and maintained by Xiaomi itself.

This official backing means the integration receives direct support from Xiaomi’s engineering team, access to official APIs, and guaranteed compatibility with current and future Xiaomi IoT devices. For the millions of Xiaomi and Mijia smart home users, this integration bridges the gap between Xiaomi’s affordable and extensive device ecosystem and Home Assistant’s powerful automation engine.

The integration supports two operational modes: local control via Mi Home protocol over the local network, and cloud control through Xiaomi’s servers. Local mode offers lower latency and works even when internet connectivity is down, while cloud mode enables remote access and devices that require cloud intermediaries.


How Does the Xiaomi Home Integration Work?

The integration connects Home Assistant to the Xiaomi IoT ecosystem through a multi-layer architecture.

flowchart TD
    A[Home Assistant\nAutomation Engine] --> B[ha_xiaomi_home\nIntegration Layer]

    B --> C{Device Discovery\nMi Home Protocol}
    C --> D[Local Network\nDirect UDP/ TCP]
    C --> E[Cloud API\nXiaomi Servers]

    D --> F[Local Devices\nVacuums / Lights / Sensors]
    E --> G[Cloud Devices\nCameras / Some Switches]

    F --> H[Entity Registry\nHome Assistant Devices]
    G --> H

    H --> I[Automations\nHA Scripts & Scenes]
    H --> J[Dashboard\nHA Lovelace UI]
    H --> K[Voice Assistants\nAlexa / Google Home]

During setup, the integration discovers Xiaomi devices on the local network and authenticates with Xiaomi’s cloud API. Devices are then registered as Home Assistant entities, and each device’s capabilities are mapped to appropriate Home Assistant domains (light, sensor, switch, vacuum, etc.).


What Devices Are Supported and What Features Are Available?

The integration supports the majority of Xiaomi’s extensive IoT product line.

Device CategoryExamplesSupported Features
LightsMijia LED bulbs, Ceiling lights, Light stripsOn/off, brightness, color temperature, RGB
SensorsMotion, door/window, temp/humidity, lightState monitoring, battery level
Switches & PlugsSmart plugs, Wireless switches, Wall switchesOn/off, power monitoring, timer
VacuumsRoborock, Mijia robot vacuumsStart/stop, return to dock, zone cleaning
Air PurifiersMijia air purifiersOn/off, fan speed, filter status
CurtainsMijia smart curtainsOpen/close, position percentage
ClimateMijia heaters, fans, dehumidifiersOn/off, mode, temperature settings

Device support is continuously expanding through integration updates, and because the integration is officially maintained, new Xiaomi product releases are typically supported more quickly than community alternatives.


What Are the Setup and Configuration Options?

The integration is available through multiple installation paths, catering to different user preferences.

Installation MethodDifficultyUpdate MechanismNotes
HACSEasyAutomatic via HACSRecommended for most users
Manual DownloadModerateManual replacementFor users without HACS
Home Assistant Add-onEasyAutomaticVia dedicated add-on repository

Configuration requires a Xiaomi account and knowledge of which Xiaomi server region your devices are registered under. The integration supports China, Europe, India, Russia, Singapore, and the United States servers. During initial setup, the integration auto-detects the server region from network characteristics, but users can manually override this.


What Are the Advantages of the Official Integration Over Community Alternatives?

Before Xiaomi released its official integration, Home Assistant users relied on community-developed components like Xiaomi Gateway (Aqara) and Xiaomi Miot. The official integration offers several advantages.

AspectOfficial Integration (ha_xiaomi_home)Community Integrations
MaintenanceXiaomi engineering teamCommunity volunteers
API AccessOfficial, documented APIsReverse-engineered protocols
Device SupportGuaranteed for current Xiaomi devicesDepends on contributor interest
Update LagDays to weeks after new device launchWeeks to months
Breaking ChangesCoordinated with firmware updatesUnexpected breakages
AuthenticationStandard Xiaomi accountMay require device tokens

For users committed to the Xiaomi ecosystem within Home Assistant, the official integration provides the most reliable and future-proof path forward.


FAQ

What is Xiaomi Home (ha_xiaomi_home)? Xiaomi Home is the official Home Assistant integration developed by Xiaomi that enables control of Xiaomi and Mijia smart home devices directly from the Home Assistant platform, supporting both local network and cloud control.

What installation methods are available? The integration can be installed via Home Assistant Community Store (HACS), manual installation by copying the custom component directory, or direct download from the GitHub repository.

What Xiaomi devices are supported? The integration supports a wide range of Xiaomi and Mijia smart devices including lights, sensors, switches, plugs, vacuums, air purifiers, curtains, and more, with ongoing updates adding new device support.

Does the integration support regional servers? Yes, the integration supports all Xiaomi regional servers including China, Europe, India, Russia, Singapore, and the United States, automatically detecting the server region during setup.

What is the difference between local and cloud control? Local control communicates with Xiaomi devices directly over the local network for lower latency and offline operation, while cloud control routes commands through Xiaomi’s servers and requires internet connectivity.


Further Reading

TAG
CATEGORIES