I recently splurged and got myself a robot vacuum and I think it’s been the best purchase I’ve made in my adult life. I work full time and go to school, so the fewer chores I have to do, the better. Now, I can just dust the counters and flat surfaces off onto the floor and when I get back from work I come home to a cleaner apartment. While this purchase cost more than the rest of my gadgets combined, that’s not saying too much since I am using my $200 Smart-Home set up. It is arguably the most useful of any of my Smart-Home devices.
There are so many Robo-vacuums available right now, that it was hard sifting through the different options. I had to do a fair amount of homework searching for the right one and I think I found it in the Xiaomi Mi Robot Vacuum. I have been very impressed with the Xiaomi brand since I started using their Smart-Home Gateway and Sensors; my experience with their vacuum is no different. It is user friendly, it feels like a solid piece of technology, it looks sleek and clean, and it works like a champ! Most importantly, it is compatible with Home Assistant, an open source Home Automation platform that I use.
This guide includes:
- Unboxing the Xiaomi Mi Robot Vacuum
- Setting the vacuum up with the Mi Home App
- Making the vacuum speak English, and changing the vacuum’s name
- Getting the vacuum’s Access Token using Windows and an Android device
- Integrating the Xiaomi Vacuum component in Home Assistant
- Adding the vacuum to Home Assistant’s front end & configuring it to work with Alexa
- Extra Parts and Accessories
Unboxing the Xiaomi Mi Robot Vacuum
Unboxing the vacuum is easy. It comes ready to use, you’ll just want to charge it up a little more before attempting a full vacuum. There was enough juice in it to mess around with it for a little bit first, though, which was fun.
The box contains:
- The Xiaomi Mi Robot Vacuum
- The Charging Station
- A Brush Cleaner
- Set up Instructions
Setting Up the Vaccuum
- The first thing you’ll want to do, is get the vacuum connected using the Mi Home App.
- The current app does not make the Access Token available to us.
- You will need to download an older version of the app.
- Mi Home 5.0.0 is what I used, and can be found here.
- Use the Mainland China servers
- Log in to the app or create a new account.
- The app may discover the vacuum on it’s own, if not, select the “+” in the top right corner, select the vacuum from the options, and follow the instructions.
Now that your Xiaomi Mi Robot Vacuum is set up, you can use it from the app. Click on the Vacuum from your app and agree to the terms provided. The blue area will populate with a map as the vacuum uses its IR sensor to scan the area.
The bottom of the screen has 3 buttons:
- Dock- Will send the vacuum back to the dock to charge
- Clean – Will begin the cleaning process
- Speed- You can cycle through 4 different settings
- Full Speed
- When doing a cleaning, you can follow along in the app.
- The vacuum will create a map and show you what has been cleaned.
- It will create a new map each time it runs and show you where it has cleaned.
- This vacuum requires a 4″ clearance to fit underneath any furniture.
Make the Vacuum Speak English & Change its Name
Now, it’s likely that the vacuum has been speaking Chinese to you throughout the setup process. You can easily change the vacuum’s voice pack to English.
- From the vacuum screen, click the settings icon in the top right corner
- Choose “Vacuum Settings”
- Select “Voice Pack”
- On the bottom of this page you should be able to choose “English: female voice”
- Go back to the “Settings” page. While you’re here in the settings, it would be a good time to change the name of the vacuum.
- Choose “General Settings”
- Select, “Rename.”
Get the Vacuum’s Access Token, Using Windows and An Android device
Since my last post, my computer died. Up until this point I had been using an old MacBook that I’ve had forever. I’ve switched over to Windows, and it turns out to have been good timing. What seems to be the easiest method for grabbing the vacuum’s token is done with Windows and an android device. Other methods can be found on the Xiaomi Mi Robot Vacuum’s Home Assistant component page.
- The first step in accessing the vacuum’s token is to download MiTookKit.zip.
- Unzip this file and open MiToolKit.
- Once opened, you’ll notice it is in German, you can click on the little flag at the bottom to switch it to English.
- Click the Extract Token button.
- There are a couple of requirements you’ll notice that need to be fulfilled before you can use this application.
- Now, extract the token from your Android.
- Your token MUST have numbers and letters. If it is only numbers, it will not work. To get a new token, just delete the vacuum from the app and re-add it in.
- I used the Mainland China server in the Mi Home App
- If you are only getting the IP address for the vacuum, you are using an updated version of the app. Make sure to use the 5.0.0 version.
- Don’t set a password for the backup being created
- You can see the application pulled all of the tokens from my other Xiaomi and Yeelight devices.
Connect the Xiaomi Vacuum to Home Assistant
**Be Aware, Home Assistant 0.62 broke the Miio platform used for the vacuum, which was fixed in version 63.3. Make sure you are using an appropriate version of Home assistant. I used 65.5 when I made this post.**
So, you’ve snagged your token… now what? Start by opening your configuration.yaml file.
- Add this to your configuration file and save.
- The name is optional.
- Be sure to check your configuration in the configuration tab before restarting Home Assistant.
- Now you should be able to see your Xiaomi Mi Robot Vacuum in the States page.
- Notice mine says “vacuum.robovac” based on the name I used in my configuration.
- By default, this would be “vacuum.xiaomi_vacuum_cleaner”
- Notice mine says “vacuum.robovac” based on the name I used in my configuration.
Adding the Vacuum to the Home Assistant Front End
- You can add your vacuum to your front end by adding “vacuum.YOUR_ROBOT_NAME” to any of your groups.
- You can use any of the attributes on the “States” page as individual sensors. You can do this with a sensor template added to your sensors.yaml, like this:
- I started going this route, then realized if you click on the vacuum component, it’ll show you all the good stuff and give you some extra control beyond the on/off switch.
- This card gives you Start/Pause, Stop, Spot Clean, Locate Vacuum, and Return Home
- You can also control the fan speed from here
- The ‘do not disturb’ times, are ones that I set from within the Xiaomi Mi Home app
- Main brush left, side brush left, and filter left refer to how much longer (in cleaning hours) before that part needs to be replaced
- Be aware, the Mi Home app also has a countdown to when it is necessary to clean the sensors, this is not included here, but should be considered in order to maintain your vacuum.
- Now you’re all set… right? NO! Well, not me anyway. I wanted to also be able to control the vacuum through Alexa. Unfortunately, adding the vacuum to the rest of the switches did not work because it is a vacuum component and not a switch component. So I had to make a switch that Alexa CAN control using the switch template.
- Open your configuration.yaml or switches.yaml; wherever you keep your switch components.
- Add this switch to your configuration, be sure to replace “robovac” with the name of your vacuum.
- Now add “switch.vacuum” to the rest of your Alexa accessible entities.
- Make Alexa find your devices, and you should see the new vacuum switch!
- The on command will start the cleanup and off will return it to the dock.
- One more addition I did for fun was a script to find the vacuum.
- Add “script.find_vacuum” to the rest of your Alexa accessible entities.
- After it’s added, you can create an Alexa Routine inside the Alexa app to find the vacuum!
We’ve covered how to connect the Xiaomi Mi Robot Vacuum to the (older version) Mi Home app, extract the Token from the app, and add the Xiaomi Vacuum to Home assistant. You can now also control the vacuum through the app, Home Assistant, and Alexa (by using a switch template). Lastly, you can also find the vacuum by asking Alexa, “where’s the vacuum?” I’ve really enjoyed my short time with the Xiaomi Mi Robot Vacuum and think you will too. My Smart-Home feels so much smarter now! If these guides have been helpful to you, please share them! If you have any questions, please reach out to me in the comments. Thank you for visiting!
Extra Parts & Accessories
The vacuum’s consumable pieces (main brush, side brush, and filters) can be purchased in different kits or individually. The only extra accessory for the vacuum that doesn’t come with the vacuum is the Mi Invisible Wall. Some options are available on Amazon, some Gearbest, and some on both. The vacuum itself is also available from both sellers. I’ve provided some links below.