[AI Router] Adding Xiaomi Devices to Home Assistant

This article uses Xiaomi devices as an example to explain how to add IoT devices to Home Assistant, as well as basic setup and control.

 

 

1. Prerequisites

  • Register a Xiaomi account and complete the initial setup of your IoT device in the official Xiaomi app, ensuring it works properly.
  • Go to https://www.openhab.org/addons/bindings/miio/#country-servers and check the Country Servers section to find the server address for your country. Note it down for later use.
  • HACS is already installed in Home Assistant. You can refer to the HACS Installation Guide.
  • Make sure you can access the Home Assistant web interface via http://homeassistant.local:8123. The Xiaomi integration will use this URL. If you cannot connect, please update your router and AI board firmware, or refer to the AdGuard Home Installation and Setup Guide to rewrite DNS (DNS rewrites) and point homeassistant.local to your AI board IP.

 

2. Install the Xiaomi Home Integration

    2-1. In HACS, search for [Xiaomi Home], select the community integration, and install it.

 

    2-2. Read the integration description, then click [Download] in the bottom right corner.

 

    2-3. After downloading, go back to the [Settings] page and restart Home Assistant as prompted.

 Click [System], then click the restart button in the top right corner of the system settings page.

 

3. Add the Xiaomi Home Integration

    3-1. In the Home Assistant sidebar, go to [Settings] > [Devices & Services], then click [Add Integration] in the bottom right corner.

    3-2. Search for [Xiaomi Home] and select it.

 

4. Configure Xiaomi Home

    4-1. Enter the server country you found earlier.

 

    4-2. Click the login link.

 

    4-3. In the pop-up window, enter your Xiaomi account and password to log in. The language of the window will depend on your app settings.

 

    4-4. After logging in successfully, the system will automatically search for Xiaomi devices under your account. Select the devices you want to add and complete the setup.

 

 

5. Integration Complete

    Once setup is complete, you can see the integrated Xiaomi devices on the Home Assistant device overview page, and further configure automations or controls.

    It is recommended to add the devices to your dashboard for easier daily control.

 

 

6. Notes

    1. How to set up the dashboard?

        Refer to the Home Assistant Theme Setup Guide.

 

    2. Can't see the authentication window?

        If you cannot connect, please update your router and AI board firmware, or refer to the AdGuard Home Installation and Setup Guide to rewrite DNS (DNS rewrites) and point homeassistant.local to your AI board IP.

 

 

 

 

How to get the (Utility / Firmware)?

You can download the latest drivers, software, firmware and user manuals in the ASUS Download Center.

If you need more information about the ASUS Download Center, please refer this link.