Roborock is one of the most popular robot vacuums, but not necessarily the easiest one to integrate into different home automation platforms. In general, most Chinese home automation manufacturers make you jump through several hoops to get the right token and take control of the device. Here is a short manual that worked for me with Roborock vacuums, but should apply to others as well (I also tested this with a Eufy vacuum, assuming you get the respective app).
What is required:
- BlueStacks Android emulator (download here)
- Older version of the MiHome app – tested with 5.4.49 (download here)
- Roborock vacuum paired with your MiHome app (if you have previously paired your vacuum with Roborock app, you will have to reset it and pair it again)
How to get your local token:
- Install BlueStacks on your computer and make sure it starts properly the first time (it will ask you to confirm a number of system permissions).
- Open the downloaded MiHome app in BlueStacks. After you log in with your credentials, you should be able to see and control your vacuum.
- Now go back to the BlueStacks app screen and open Media Manager. Select
Explore
from the left side menu, then go intosdcard > SmartHome > logs
and open the text file log in that folder (it should be named using the current date). - Search for the term “token” and copy the string of numbers and letters that follow. This will be your local token used to control the vacuum as long as it remains paired with the MiHome app (note: there is currently no way to do this using the Roborock app).
Where do you use it:
- Exposing Roborock vacuum to HomeKit – Even though HomeKit still does not support vacuums as a device category, you still expose Roborock using Homebridge either as a fan or a switch. This will allow you to control basic functionality (start/stop, power, go to dock) and use it in HomeKit automations (e.g., start Roborock when I leave home on a weekday). You will need Homebridge installed alongside the right Roborock plugin.
- Exposing Roborock to Home Assistant – Home Assistant supports Roborock vacuums natively using the xiaomi_miio integration. This platform is excellent and exposes pretty much everything including vacuum sensors, status, zones, and history.
- Exposing Roborock to Google Assistant – At this time, the Mi Home app does not support vacuums as a category in Google Assistant (unlike the Roborock app which does support Google Assistant natively). There is a solution though – you can expose Roborock using Home Assistant with Google Assistant enabled (this is really easy if you are using Nabu Casa cloud services with your Home Assistant installation). Once you expose it, Google Assistant will treat it as any other vacuum and allow several standard commands. If you are ready to go beyond that, you can even build custom commands and tell Roborock to vacuum specific rooms using this great tutorial.