I do have root access to my vacuum cleaner

When I started this IoT journey, my goal was using always free open source hardware and software. At least, as much as I could, given the available possibilities.

The next stage in the journey was the vacuum cleaner

There is clearly a challenge in this stage: would I find free/open source hardware in the vacuum cleaner world? There are some projects of DIY hardware for vacuum cleaners. But they seem to be in very early stages. I wanted something more finished and production ready


Luckily, like with my former experiences with the thermostat or the thermometer, I found an amazing project that frees your robot from the cloud: Valetudo

When I discovered Valetudo several months ago, it was in a very early stage. It is amazing what this project has achieved within this year, as you can see in this release: Recap 0.6.1 to 2021.11.0. Valetudo is now a real alternative to managing robots without the proprietary clouds. It is pretty usable with most of the features you will expect from a modern robot: home map, zone and room cleaning, manual move, timers. And of course, the required capabilities for your home hub: MQTT support, a REST API, OpenHAB and Home Assistant integration. And more.

Valetudo screenshot from 2021.11.0 release

Valetudo runs in several vacuum cleaner models and brands. That was my only issue to consider when we bought the new vacuum cleaner: the hackability of the robot. At the end of 2020, my choice was a Viomi STYTJ02YM. However, they seem to be changes in recent Viomi V8 products that make rooting harder. If I had to choose a model today, I would follow the Valetudo section Which robot should I buy in 2021 to use it with Valetudo?

Rooting the robot

The first step to gain control of the robot was obtaining root access. Luckily, there is this awesome blog post from rumpeltux, Rooting the Xiaomi STYJ02YM (viomi-v7) Vacuum Robot where the rooting process is explained to the detail. There is even a shell script to automatize the rooting process. In a nutshell, the process consists on:

  • connect the computer to the robot USB, under the battery
  • fixing the adb shell, which is killed shortly after the robot is booted
  • install ssh
  • install Valetudo

The process was easy in my case. I only found an issue USB cable, and it was because I was using a USB cable without data capabilities. Beware of cables that are change only!

The vacuum cleaner USB terminal

Once you get root access to the robot, you can see it uses Tina Linux, a distribution based on OpenWrt. So there is plenty of documentation on how it works

But the last dilemma was about configuring the WiFi. This is usually achieved using the official Xiaomi app, which also connects to Xiaomi’s servers in the cloud. The alternative was configuring the WiFi in OpenWrt. However, I could see there were also other Viomi’s files involved in the WiFi configuration. I didn’t want to mess things up. so I installed the Xiaomi app and configured the WiFi. I kept the app installed, but I will uninstall it. I never used it again. When installing Valetudo, you setup the robot to talk to you localhost instead of the Xiaomi’s cloud. No more communication with Xiaomi’s servers anymore!

So this is not open source hardware. But we have a liberated device from the proprietary cloud, running free open source software with lots of possibilities. Next step will be connecting to the home hub and the kitchen dashboard!