Blog
In this article, I want to show you how you can install the custom firmware Valetudo on your Roborock S5 (Max) using your Mac.
Usually, when you buy a Roborock S5, it is expected that you use the Xiaomi Home App. However, this app sends all its data (including your floor data or Wi-Fi passwords!) to the cloud and servers located in China. When you are uncomfortable with this (like I am), then there is Valetudo to the rescue. Basically, Valetudo is a custom firmware that you can flash on your robot vacuum (not just the Roborock, there are many vacuums supported) which then stops the robot from sending its data to the cloud. Instead, it runs a web server from which you can control the robot.
DISCLAIMER
The following steps must be performed at your own risk. They can potentially brick your device and I will not take responsibility for that. If unsure, have a look at the Valetudo Rooting Instruction on what you should be comfortable with before rooting your device.
Fortunately for us, there is a wonderful project that you can use to create a firmware image for your robot vacuum called Dustbuilder. Simply navigate to the website, choose your robot and fill out the form. You can leave almost all fields as is, just enter your email address, select if you want to have an SSH key pair generated or simply upload an existing public key.
Next, select the option Build update package (for installation with python-miio/RRCC) and choose the version S5 (ver 2008, 12/2019, stripped-Ubuntu) update to this version first, if your current is < 2008.
Finally, complete the form and wait for Dustbuilder to create the firmware image for you. If it is ready to download, you will get notified via the email address you entered before.
We now reset our robot completely in order to prepare it for flashing our custom firmware. For this, perform the following steps:
When your firmware image is ready to download and the robot is reset to its original state, we can finally flash Valetudo. For this, perform the following steps (python3
must be installed on your Mac):
python3 -m pip install --upgrade pip
pip3 install python-miio
mirobo
binary to your PATHmirobo -d discover --handshake true
. Look in the output for the token (32char length)mirobo -d --token <TOKEN> --ip 192.168.8.1 update-firmware <FIRMWARE_PKG_FILE>
Now wait for the flashing to complete, this will take some time but you should see the progress in your terminal. If it is finished, the LEDs on your robot will start to blink. Wait for them to continuously glow again, the robot should then state that the update has successfully finished.
Connect to the Wi-Fi of the robot again and open http://192.168.8.1 in your Web Browser. You should see a page prompting you to enter the Wi-Fi credentials your robot should connect to. Fill out the form and connect to your regular Wi-Fi again. From now on, Valetudo on your robot can be accessed via the IP your router assigned it.
This is it. I hope you managed to set up Valetudo on your robot vacuum and everything works as expected :)