This guide applies to the following robot models
If your roborock model is newer or not listed here, there’s no point in following this guide since the instructions will be different.
Valetudo is not a custom firmware.
It is simply an alternative App implementation + mock cloud which runs on the robot itself.
To do that, some secret data is required. Those being the
cloudKey and the current
Running on the robot itself enables Valetudo to access those as well as work while in AP mode.
It’s also very neat to have a completely self-contained appliance with a web interface.
Therefore, installing Valetudo simply means taking the stock firmware and injecting Valetudo into it.
Sadly though, this process has to be done by each user individually because hosting firmware images with Valetudo preinstalled would probably be copyright infringement.
For this step, a Linux based operating system is required, since we need to mount the ext4 file System image of the stock firmware.
Sadly, neither OSX nor WSL (the Windows Subsystem for Linux) contain ext4 drivers so you definitely need some kind of Linux installation. A VM should be sufficient to build the firmware image, though.
If you don’t have a Linux based operating system at hand or you don’t want to build the image yourself, you can skip the Image Building steps here by using Dennis’s Dustbuilder: https://builder.dontvacuum.me/
There are a few dependencies required for building the image. Please refer to your Linux distributions documentation to find out how to install them.
If you plan on being able to connect to the robot via SSH, you will need a public/private ssh keypair. This is not required to run valetudo. It’s useful to fetch logs and assist the development if you encounter any bugs, though.
If you do not have a keypair yet, you can generate one with the following command
ssh-keygen -C "firstname.lastname@example.org"
Per default, the generated keys will be created in
If you choose to create the keys in another location, remember your chosen location for later.
It is recommended to fetch the firmware from the official sources.
https://cdn.awsbj0.fds.api.mi-img.com/updpkg/[package name] https://cdn.awsde0.fds.api.mi-img.com/updpkg/[package name] Example: https://cdn.awsbj0.fds.api.mi-img.com/updpkg/v11_004004.amhd98763.fullos.pkg
https://cdn.awsbj0.fds.api.mi-img.com/rubys/updpkg/[package name] https://cdn.cnbj2.fds.api.mi-img.com/rubys/updpkg/[package name] https://cdn.cnbj0.fds.api.mi-img.com/rubys/updpkg/[package name] https://cdn.awsde0.fds.api.mi-img.com/rubys/updpkg/[package name] Example: https://cdn.awsde0.fds.api.mi-img.com/rubys/updpkg/v11_002008.fullos.fd043420-6ddb-4e54-bdb7-a8deec19f0fd.pkg
It is recommended to use https://github.com/zvldz/vacuum to build the image.
--valetudo-path expects a path to a folder containing two things:
valetudo. Refer to https://github.com/Hypfer/Valetudo/releases to fetch the latest valetudo binary.
You can create a folder with all the needed things with the commands like:
git clone https://github.com/Hypfer/Valetudo.git cd ./Valetudo wget https://github.com/Hypfer/Valetudo/releases/latest/download/valetudo
Please refer to this command-line example and edit it according to your setup:
./builder_vacuum.sh --run-custom-script=ALL \ --timezone=Europe/Berlin \ --ntpserver=pool.ntp.org \ --public-key=~/.ssh/id_rsa.pub \ --enable-greeting \ --disable-logs \ --replace-adbd \ --valetudo-path=./Valetudo \ --replace-miio \ --enable-dns-catcher \ --fix-reset \ -f path_to_firmware.pkg
Make sure to use the
--fix-reset option to not suffer from random firmware resets as seen in issue #206.
To flash the image we’ve just build we are going to use mirobo - a tool to control a vacuum cleaner from a terminal.
First, we need to get it and for this we recommend to create a python virtual environment for it.
cd .. mkdir flasher cd flasher python3 -m venv venv
Now, when the virtual environment is ready we are going to activate it and install miio python package which provides
source venv/bin/activate pip3 install wheel pip3 install python-miio cd ..
Flashing an image requires providing your robot’s token.
To acquire it, connect to your robot’s WiFi Access Point and run the following command:
mirobo --debug discover --handshake true
You’re looking for a similar line:
INFO:miio.miioprotocol: IP 192.168.8.1 (ID: 0f90319a) - token: b'ffffffffffffffffffffffffffffffff'
If your robot doesn’t show up check if you have multiple connected network interfaces. Either disable all other (those not connected to your robot’s WiFi) or use a VM which you explicitly connect to your host’s WiFi interface. Another possibility is an internal firewall blocking it. On RedHat-based Linux systems using Firewalld (CentOS, Fedora, etc.), make sure the firewall zone for your connection to the robot’s WiFi Access Point is set to “trusted” instead of “public”. In case all of the above failed, check mirobo’s “finding-the-token”
With token in out hand we can upload the firmware to the robot:
mirobo --token XXXXXXXXXXXXXXXX --ip ROBOT_IP_ADDRESS update-firmware path/to/built/image.pkg
192.168.8.1 by default but if you’re upgrading Valetudo to a new version, you need to replace it with the robot’s current IP address.
Also please keep the distance between your WiFi antenna and your robot as short as possible or the connection might get lost.
After the successful transfer of the image to the robot, the robot will start flashing the image. This will take about 5~10 minutes. After the process is done, the robot will state that the update was successful.
You should then reboot the Robot either via ssh command
ssh email@example.com and typing
reboot or simply by taking it out of dock and push the ON switch to prevent valetudo stuck on LOADING STATE???
To connect the robot to your home Wifi, just connect to http://192.168.8.1 and use Valetudos settings dialog to enter your wifi credentials. Please note that only WPA2-PSK is supported. After updating the Wifi settings, you should reboot your robot.
You need to get the IP of your robot (e.g. from your router) and connect to it using your browser e.g. http://192.168.Y.Z