Xiaomi Roborock Vacuum Cleaner software
Python 3.5+, Windows,MacOs or Linux.
A public or private MQTT broker like Mosquitto.
We now have a ready-made control program for this via mqtt. The program has the following features that are not found in the app:
1. zone based cleaning – eg clean kitchen.
2. Multi zone based eg clean living room and kitchen.
3. Waypoints eg goto livingroom
It is possible to define up to 10 zones and 10 waypoints in the cfg file.
Otherwise, the software has most of the commands that are also in the app (see below).
And best of all, the program allows Roborock to be controlled from whichever automation system via the MQTT protocol.
To obtain the code (the token) for this we had to follow this recipe. And when we got connected we received the status from it. 🙂
We also have another method to get the token, and this is described in the doc file including with the installation file.
Commands via mqtt. examples:
miio/set/vaccum/192.168.100.145/start = 1 – start cleaning of whole house
miio/set/vaccum/192.168.100.145/home = 1 –go to docking station
miio/set/vaccum/192.168.100.145/multi = kitchen, livingroom, hall – clean these zones
miio/set/vaccum/192.168.100.145/waypoint = hallway – goto hallway
.The following commands are available:
home = 1 – go to docking stationpause =
start = 1
clean = 1 (clean house-all zones)
speed = 1 -100 (%)
setvol = 1-100 (%)
stop = 1
spot = 1 – spot cleaning
soundtest = 1 – it says ‘Starting the cleanup!’ Resume_zoned_clean = 1
resume_or_start = 1
goto = x, y-coordinate
multi = section1, section3, section5 (defined in cfg file) – clean -clean multiple zones i
n one command
waypoint =xxx like ‘kitchen’ (x, y defined in cfg file) –
find = 1 (say “Hi, I’m over here”)
Waypoint the command is based on the setup in the cfg file where you can define up to 10 waypoints.
It provides an opportunity to connect to a voice-controlled system such as Google Home or Alexa. one say e.g. ‘Hey Google, waypoint kitchen (or’ go to kitchen ‘if you want) and the robot goes to the point on the map you have predefined as kitchen in the cfg file.
The same applies to zone-based cleaning. All zones must be defined in the cfg file in advance .
After this is done, the voice command ‘Hey Google, clean the living room!’ cause the robot to do just that. 🙂
The zones defined are also used in Multisone cleaning where you can ask the robot to clean several zones in the order you choose.
Then the command ‘Hey Google, clean the living room and kitchen!’ cause it to be spotlessly clean there.
The Find command can be used either if one wants company or if one wants to drive away any unauthorized person with a female voice calling “Hey, I am over here!”
We hope to do manual control with voice control via Alexa or Google Home.
Then you will theoretically be able to have Roborock in your heels. 🙂
You need unit id and token also to get to communicate.This can be done by installing a command line tool called miio with following command:
npm install -g mii
Then run the Miio discover command from a command window. All your Miio devices will then print in this format on the screen as they are found on your network:
Device ID: 48765421
Model info: zhimi.airpurifier.m1
Token: token-as-hex-here via auto-token
Support: At least basic
More info about this tool here..
Take care of this data, you will need it the later …