Valetudo

Cloud-free control webinterface for vacuum robots

View the Project on GitHub Hypfer/Valetudo

General

Upgrading

Installation

Roborock Legacy Viomi

Integrations

MQTT Home Assistant

Misc

FAQ Frequently requested features Files to backup Troubleshooting

Development

Building and Modifying Valetudo Valetudo core concepts

Knowledge Base

Supported Roborock Devices Supported 3irobotix Devices Supported Dreame Devices

Viomi

These pages guide you through the installation steps for viomi robots. Support is still somewhat experimental, see below for details.

The default settings here will be for running Valetudo on the robot itself. If you want to develop as well, check out the Local Development section.

There’s a tool that aims to automate rooting and Valetudo installation at https://github.com/rumpeltux/viomi-rooting/. Please give it a try and file any issues that you encounter there.

Current state of viomi support

As end users you can start using this, but beware of rough edges.

Remaining Items (TODOs)

The follow are nice to have additions:

Robot setup

First, you need to get root access to your Robot.

If you decide to install Valetudo manually, you’ll need to set up the robot to talk to your host instead of the xiaomi cloud:

ssh root@vacuum
for domain in "" de. ea. in. pv. ru. sg. st. tw. us.; do
  echo "110.43.0.83 ${domain}ot.io.mi.com ${domain}ott.io.mi.com" >> /etc/hosts
done
cat >/etc/rc.d/S51valetudo <<EOF
#!/bin/sh
iptables         -F OUTPUT
iptables  -t nat -F OUTPUT
# for local development enter your local development host here
# and change port to 8080
dest=127.0.0.1
port=80
for host in 110.43.0.83 110.43.0.85; do
  iptables  -t nat -A OUTPUT -p tcp --dport 80   -d $host -j DNAT --to-destination $dest:$port
  iptables  -t nat -A OUTPUT -p udp --dport 8053 -d $host -j DNAT --to-destination $dest:8053
  iptables         -A OUTPUT                     -d $host/32  -j REJECT
done
EOF
chmod +x /etc/rc.d/S51valetudo
reboot

Note: To temporarily revert this while needing to use the Mi Home App, you can do a iptables -F; iptables -F -t nat and comment out the line in /etc/hosts.

Deploying

Run

npm run build

And deploy the valetudo binary to your robot:

scp valetudo root@vacuum:/mnt/UDISK/

# Setup init scripts (only needed once and only if not already done by rooting script)
(cd deployment/viomi; tar cv . | ssh root@vacuum "cd /; tar x")

Local Development Setup

Follow the development guide in spirit, but note that path names etc. may be different. You can get the required "model" and "config" settings by doing cat /etc/miio/device.conf and cat /etc/miio/device.token on the robot.

type has to be viomi.vacuum.v7 or viomi.vacuum.v8.

Furthermore, you need to customize these settings in the local/config.json:

"dummycloud": {
  "spoofedIP": "110.43.0.83",
  "bindIP": "0.0.0.0"
},
"map_upload_host": "http://110.43.0.83",

Firmware updates

You can perform firmware updates up to v3.5.3_0047 without risking root (see the firmware update analysis for details).

Important: Make sure you use ssh-keys and don’t rely on password login otherwise your root access may be lost.

To perform a firmware upgrade you currently need to:

Uninstall Valetudo

This will remove Valetudo, free the diskspace and re-enable the cloud interface.

ssh root@vacuum
/etc/init.d/valetudo stop
rm /etc/rc.d/S51valetudo /etc/init.d/valetudo /mnt/UDISK/valetudo

Enable logging

Add the following to the system section in /etc/config/system (adjust ip and port as necessary):

option log_ip 192.168.1.10
option log_port 8054
option log_proto tcp

After a reboot you can receive logs using netcat:

netcat -l4 8054

See the OpenWrt Runtime Logging Guide for details.