Home Assistant Initialization and Xiaomi Plugin Installation

Environment: Home Assistant installed via SD card image (OS installation method), running on a Raspberry Pi 4 (8GB).
Note: During the entire configuration process, ensure that your PC and Home Assistant device are on the same local network.


1. Enable Command Line Access

After completing the initial Home Assistant setup, click on your User Profile (bottom-left corner) and enable Advanced Mode under General.


2. Install Terminal & SSH Add-on

In Settings → Add-ons, open the Add-on Store and locate Terminal & SSH, then install it.


Installation Issue: Docker Restrictions

Due to Docker restrictions in some environments, installation might fail. In my case, since I already have an OpenWrt bypass router at home, I simply changed the Gateway and DNS addresses in the network settings to point to my bypass router’s IP, which allowed the installation to proceed.


3. Install HACS

Since I’m using the OS installation method, I can use the official “My Link” to install GET HACS directly.
If you are using Docker or another installation method, you can install it via the SSH terminal we just set up.

Click the official documentation’s My Link to go to the installation page.

Follow the prompts to install any missing components, then install GET HACS.

Note: This step only installs the ability to download HACS, not HACS itself.

Restart Home Assistant after this step.


4. Enable HACS

After restarting, you should now be able to find HACS in Integrations.

Follow the prompts to add your device to GitHub. Once completed, restart Home Assistant again.


5. Install Xiaomi Home Integration

After restarting, you can find Xiaomi Home in HACS.

Although the official documentation recommends installing via command line (which makes version upgrades easier), you can also install it through HACS. In my case, I chose the command line installation method.

After following the official installation instructions, restart Home Assistant. Once restarted, you should see Xiaomi Home in the integrations list.


6. Add and Configure Xiaomi Home

When adding the Xiaomi Home integration, a network test will be performed. It’s recommended to temporarily disable any proxy to avoid detection issues.

Once the test is successful, log in to your Xiaomi account, select your Home and Devices, and finish the setup.

Now you can control your Xiaomi devices directly from Home Assistant.


References:

By 船长

Leave a Reply