I’ve been building my smart home over the last few years and was in the market to add sensors everywhere in an effort to improve the automations that I was able to achieve.

I previously had a couple of Philips Hue Motion sensors, and Elgato Eve Door & Window sensors, but at £35 a piece, adding these to all rooms and door would get very expensive. I was introduced to the Xiaomi ecosystem and decided to give it a try. Interestingly this is the first time that I’ve opted to buy some non native devices and rely on Homebridge for the integration. Prior to this, I’ve used HomeBridge as a way to integrate tech that I already owned.

Purchase

I got all of my kit from a site called Lightinthebox.com. This was the only site that I found that shipped to the UK and had a wide range stocked. I initially opted for:

I was that impressed with the kit that I purchased some more:

Door and Window sensor; another 5

Motion Sensor (currently £8.12 each)

Smart Button (currently £5.27 each)

One thing to note is that the website quoted 5–8 days for shipping — this was actually more like 19, but for the price I can’t really complain.

Setup

The setup was fairly trivial. I did however need to upgrade my version of node running on my RPi3 to work with the plugin. As to not waste countless hours in node dependency hell, I’d recommend a fresh install of everything. I took a copy of my config.json file, made a note of installed plugins and completely wiped my SD card.

Follow these steps to get going (this assumes you’re on an iPhone, running iOS 11 or later)

Download the MiHome app and setup the gateway and configure your accessories. It doesn’t really matter what rooms the devices are placed in.

Open the MiHome app, tap on the gateway, then tap on the 3 dots in the top right corner.

Select about and then repeatedly (and quickly) tap on the blank space until three additional menu options in Chinese appear.

Tap the second option. This allows you to turn on local access mode. A password should appear. Make a note as you’ll need that soon.

Tap back and select the 3rd option. Make a note of the MAC address of the gateway. There’s a couple listed, one of the router that the gateway is connected to and one for the gateway itself. If it’s unclear which is which, try both. (If you run homebridge with the -D flag, you’ll get debug info which will let you know if you’ve connected to the gateway correctly).

Install the homebridge-mi-aqara plugin and input the MAC and password from the steps above into your config.json file.

Restart HomeBridge and your accessories should now appear.

Usage

The first thing to note is how tiny the door sensors are. Here’s an image with the Elgato Eve as a comparison. Due to the size of the Eve device and the trim around my doors, I’ve had to be creative with how I mount it.