In my search to add sensors to my budget Smart-Home set up, I wanted to find something that was affordable, easy to use, and had a good build quality. I thought about Z-Wave but the start up cost was off-putting. A Z-Wave stick and a couple of sensors would easily set me back $100. Plus, dropping $30-60 dollars for each additional sensor just can’t happen on my budget. There had to be a cheaper way. Then I stumbled on the Xiaomi Aqara Gateway. Xiaomi makes some great quality, affordable Smart-Home devices and their Gateway is the perfect place to start. This post will:

Introduce you to Xiaomi, the Xiaomi Aqara Gateway, and compatible sensors.

Show you how to set up your gateway.

Show you how to connect and control your Gateway with Home Assistant (Hass.io).

Show you the different Gateway kits available.

Notice:

This post has been marked as a legacy post and has been flagged to be updated.

If you would like to receive updates from Smart Home Hobby, please subscribe below.

Xiaomi

Pronounced “sh-ow-me” (Think of ‘show me’, and then pronounce the first word as if it was ‘shower.’), Xiaomi is a fast growing tech company in China and the 5th largest smartphone maker in the world. Xiaomi has been called the Chinese Apple and currently makes smartphones, computers, smart TVs, entertainment boxes, and most importantly for this post, affordable Smart-Home devices.

The Xiaomi Gateway has a speaker that can replay ringtones (can be useful as a doorbell or alarm), a light that can be adjusted between 16 million different colors, and most importantly it works as a Zigbee hub to connect to other Xiaomi sensors. Be aware that currently the Zigbee communication protocol is all over the place and can vary from manufacturer to manufacturer. This means that many Zigbee devices can only connect to their own supported hub. So, while the Xiaomi Gateway uses Zigbee signals, it will not be compatible with non-Xiaomi Zigbee devices. According to their documentation, Home Assistant currently supports these Xiaomi Gateway compatible devices and they’re all crazy affordable:

So far, I am very impressed with the Xiaomi devices I have. I purchased the Gateway along with a Button and 2 Door/Window Sensors. The pieces feel well made and are very responsive. The app isn’t great, mostly due to the language barrier, but when using Home Assistant you will only need to use the app to set the Gateway up.

Set up the Gateway

First, you will need to download the MiHome App from the Play Store.

NOTES:

You may have reoccurring notifications asking you to switch to the Singapore servers. Ignore these. After getting the gateway’s IP address, you should give it a static IP address on your router.

Connect & Control the Gateway with Home Assistant

Connect the Gateway

Open up your configuration.yaml file.

Add the xiaomi_aqara component to your configuration.

https://gist.github.com/smarthomehobby/7019359bc678ba93fcacabe4f166be95

Only the mac and key are required, but adding the host will make Home Assistant find the Gateway at that location instead of trying to discover it on its own.

After adding the component be sure to save, check your configuration, and restart Home Assistant.

After Home Assistant restarts, you will find 2 new devices. The gateway light and the gateway light sensor.

Currently, the light sensor is not very quick to update. It seems to only update when the Gateway light is turned on or off and occasionally in between.

Now that the Gateway is connected, you can give it a friendly name in your customize.yaml file and add it to a group.

https://gist.github.com/smarthomehobby/ca14923e56ba4582528ea812dc220a5e

Remember to check your configuration before restarting Home Assistant.

Controlling the Gateway Light

Now you should see the Gateway Light in your front end.

You can turn the Gateway light on and off by using the switch, or you can click on the bulb icon to change the brightness or color of the light.

At this point, you can tell Alexa to discover devices.

Alexa can turn the Gateway light on and off, on command. You will need to change the color manually.

Different Gateway Kits Available

I purchased my Gateway with the Smart Home Aqara Security Kit. This came with the Gateway, a Button, and 2 Door/Window Sensors (as pictured above), but there are other kits available.



The Xiaomi 5 in 1 Smart Home Security Kit includes the Gateway, a Button, a Door/Window Sensor, a Motion Sensor, and the Outlet (Zigbee Version).

Lastly, there’s the Xiaomi mijia 6 in 1 Smart Home Security Kit, which includes The Gateway, a Button, a Door/Window Sensor, a Motion Sensor, an Outlet (Zigbee Version), and a Temperature Humidity Sensor.

All of the parts can also be purchased individually. I recommend starting with a kit. It was very satisfying to receive all of my devices at once since the shipping from China took a couple of weeks to arrive.

I made the mistake of adding an adapter (on the left) to my order from GearBest. It was shipped separately and took an extra week to arrive. It also broke as soon as I tried to use it. The insides bent and I wasn’t even able to plug the Gateway all the way into it. I couldn’t find any adapters near me besides the $14 full fledged worldwide adapters, so if you’re going to need a US adapter and have Amazon Prime

, I recommend grabbing the one on the right (be sure to pick up 2 if you’re getting a kit with a Zigbee outlet).