Skip to content

Installation process

rinlt edited this page Dec 17, 2021 · 18 revisions
  1. Overview
  2. Getting the token
  3. Downloading pre-rooted firmware
  4. Flashing firmware
  5. Installing Valetudo
  6. Installation complete
  7. (Optional) Install different language sound pack

Overview

The only supported by Valetudo RE devices are Xiaomi Mi Robot Vacuum v1 (Gen.1) and Roborock S5 series (S50,S51,S55 - Gen.2). All newer devices like S5-Max, S6, 1S etc are not supported.

To install Valetudo, you need to have root access to the vacuum, and to get it the most appropriate way is to flash a pre-rooted firmware. Obviously, some pre-rooted firmware may also include Valetudo app being preinstalled. To be able to flash firmware, in mosts cases it's required to know device's token - that is a long hex number. However some flashing methods (notably XVacuum Firmware app for Android and iOS smartphones) are able to automatically get it before flashing.

This guide will try to describe some important parts of an installation process.

Getting the token

The simplest way to get the token is to install a modified version of Mi Home app if you happen to have an Android smartphone. There are a few different mods you can find on the Internet, i.e. you can get a mod by vevs here. It can not only setup the device to connect to your Wi-Fi network as a genuine Mi Home, but also shows the token.

Here you can get an qt gui for windows roborock-token.

If you are not an Android user, you may want to try using BlueStacks Android emulator and installing Mi Home mod there.

After you've successfully got the token, you may want to uninstall this app since you won't need it anymore.

macOS and Linux users may use python-miio: mirobo discover --handshake 1

Downloading pre-rooted firmware

There are several locations where you can download a pre-rooted firmware.

Some links are provided on the firmware downloads page.

If you use vacuumz.info images, you may choose between modded firmware or just pre-rooted ones: they both have pre-set password cleaner for user root on SSH.

If you use images from Valetudo RE github repository, they use username ruby with a random password available with the image file. To get root access, just print sudo su - to the console and repeat the password.

Some may want to use dustBuilder service to get a firmware with injected crypto key for passwordless SSH connection. And for sure it is possible to build your own firmware image yourself using dustcloud imagebuilder script, though you'll need a linux-based VM in this case.

Flashing firmware

Flashing from Windows PC

To flash the firmware under Windows there's a tool called WIN-MIROBO. To use it, unzip to any folder and edit file called win-mirobo.ini. You need to specify the IP-address of the vacuum (that it got from Wi-Fi router) and its token.

Next you need to put firmware image file to firmwares folder. Then just run win-mirobo.bat (it doesn't require admin permissions). It will run a console application, all the menu options are self-explanatory.

To successfully begin firmware installation you may need to temporary disable any firewall software on the computer. This is required since it is the vacuum which connects to the PC to get the image file, not vise versa, thus requirements to allow incoming connections.

Also you can flash custom sound packs using this tool.

Flashing from macOS or Linux

With python-miio we can simply flash the firmware with the following command:

mirobo --ip ROBO_IP_ADRDESS --token ROBO_TOKEN update-firmware --ip YOUR_IP_ADDRESS FILENAME.pkg

Replace ROBO_IP_ADRDESS, ROBO_TOKEN, YOUR_IP_ADDRESS and FILENAME.pkg with your credentials.

Flashing from Mobile Device

It is also possible to flash firmware using XVacuum Firmware app from your smartphone. This app is obviously not available from the official stores, it can be installed manually from the xda-developers.com site. Root access on the smartphone is not required for using it.

Installing valetudo

As long as you have rooted firmware on the vacuum, now you just need to place some files into the right places on the device. You will need any SCP-based (or SFTP) file manager for that (or be an experienced SSH console user). Freeware WinSCP will do for Windows PC, something like ES File Explorer will be fine for an Android device.

If you're OK with using pre-built binary, start with downloading latest valetudo release from releases section. If not, just proceed to deployment section and follow the README there.

Install from deb package

If you have used a pre-rooted firmware that included Valetudo, you can skip this step and continue continue to "Installation complete".

This is the fastest way, you need to download a *.deb file and put it onto the device. After that just do SSH login as root and issue the dpkg -i /path/to/file.deb command. This will install the required files to correct places. Next you just need to restart the vacuum either by issuing reboot command or by physical button on the device.

Install from binary archive

In this case you need to download a valetudo.tar.gz file.

If you are to use GUI file manager, you'll need to unpack downloaded file since current releases are compressed. Then upload valetudo binary to /usr/local/bin path on the vacuum and make sure it has the executable permissions (744) set.

Or, if you're comfortable with SSH console, you can upload packed binary to the vacuum and unpack it on the device itself by using tar zxf valetudo.tar.gz command, followed by moving the unpacked file into the aforementioned location.

Next copy valetudo.conf file to upstart scripts directory at /etc/init, this will make valetudo app start on the device's boot.

Then you need to insert into existing files the next two files contents:

  • hosts append to the end of /etc/hosts file;
  • rc.local insert just before exit 0 line in the /etc/rc.local file.

When finished, just reboot the device either by long pressing "ON" physical button on the device itself until it shuts down and then quick clicking it again for device to boot, or by issuing reboot command into SSH console.

Installation complete

After device reboots, you should be able to see Valetudo webGUI at http://your-vacuum-ip-address/ in your browser. Probably the first thing you want to configure is the wifi settings. Please note that after that the ip address of your vacuum will probably change.

(Optional) Install different language sound pack

You can install a different language pack within the webGUI on the "Sound & Voice" page.