Dreame L40 Ultra
The Dreame L40 Ultra is a robot vacuum and mop cleaner. I purchased this off Amazon in early November 2025 for about $580 CAD.
Running Valetudo
The Dreame L40 Ultra robot will need the Dreame App to function. This requires the robot to have a constant internet network connection to Dreame's servers. If this doesn't sound appleaing, you can root and then install Valetudo on the robot. Valetudo serves a web-interface right from the robot itself and offers most of the functionality of the Dreame App. It is able to make the necessary calls to the underlying firmware such that you do not need to rely on Dreame's cloud services for the robot to function, thereby making the robot completely self-sufficient on your home network.
Be aware of the downsides with Valetudo:
- Controlling it from outside your home network or sharing it with multiple people requires more work (a reverse proxy or tailscale should do the trick). If you're using HomeAssistant, this might not be a huge issue as there's a HA integration with Valetudo.
- Some of the more niche features from Dreame is not available (CleanGenius is not available, so things like auto-recleaning, or auto-rewashing won't be available. There is no way to do the washboard base cleaning in Valetudo either)
- No multi-level / multi-map support (you can sort of hack this by replacing the map directory when you switch the robot)
- No camera view (but you can install rtc2go in addition to Valetudo and watch the camera stream it that way)
- Map view is good, but there's no way to hide/delete rooms.
- Because you've rooted the device and divorced it from the cloud, there won't be any more firmware / security updates or new (anti-)features.
Rooting and installing Valetudo
You can root and install Valetudo on the Dreame L40 Ultra without needing to disassemble the vacuum cleaner by using the exposed debug headers. The steps on how to do this is documented on Valetudo's installation page (https://valetudo.cloud/pages/installation/dreame.html) and ideally requires the Dreame breakout PCB because you will need to use the FEL / fastboot installation method for this model. The UART Shell method is not available for this model due to secure boot. The installation instructions is somewhat scattered across multiple different pages and websites and I am documenting everything here for this specific model so it's all together.
Trusting random people on the internet
Pretty much everything below requires trusting that Dennis Giese (the person behind rooting the robot) isn't doing something malicous.The FEL boot images that we'll be running is entirely generated by the dustbuilder service that Dennis is providing and it isn't completely open source at the time of writing.
Once you gain root access, you can look around for anything suspicious. At the time of writing, I was able to get a robot that, after changing the NTP server to one hosted locally, was absolutely network-silent.
But then again... you did get a Chinese robot vacuum cleaner that requires constant Internet access...
Prerequsites
Things you need to root and install Valetudo:
- Dreame Breakout PCB - https://github.com/Hypfer/valetudo-dreameadapter
- You can order the PCB from JLCPCB and it'll come in about 2 weeks (~$7 CAD).
- You will need to make sure you have 2mm headers ($2 CAD), some 2.4mm female headers ($1 CAD), a DIP button, a vertical micro USB header that fits the PCB layout ($2 CAD for 10), and a USB 2.0 type A female port ($2 CAD for 20, optional for this device/installation process).
- A 3.3v USB serial adapter and some dupont wires (optional, but is nice to have if you want to connect to the robot via serial)
- A computer running Linux (Ubuntu or Debian is preferable because we need to run Hypfer's fork of the LiveSuit program which was targeted for those distros). Ideally, this computer shouldn't be used for something important because you'll need to download/install a kernel module (which I don't really know where the source is from)
- Install Livesuit (https://github.com/Hypfer/valetudo-sunxi-livesuit). Follow the instructions in the README
- A rooted FEL firmware from https://builder.dontvacuum.me/_dreame_r2492.html (more on this in the instructions below).
- You will need to use the dustbuilder tool to generate FEL image that allows us to run the robot without secure boot. The tools to do this doesn't seem to be fully open source, possibly because Dennis (the author) wants to delay Dreame from patching this issue.
Installation
- Pry off the front of the robot to expose the debug headers. Your Dreame Breakout PCB with the 2mm headers should fit and the top of the breakout board should be facing the LIDAR.
- Download https://builder.dontvacuum.me/nextgen/dust-livesuit-mr813-ddr4.img and then run LiveSuit. Set the image to dust-livesuit-mr813-ddr4.img
- Factory reset the vacuum cleaner by pressing the reset button next to the wifi light for 10 seconds (it's next to the dust compartment). Once it comes back up, press and hold the power button until the vacuum is off
- While pressing the boot sel button the breakout PCB, press and hold power button on the vacuum cleaner for 5 seconds until the vacuum indicator lights are flashing. You can release the boot sel button once this happens.
- Plug a USB micro cable from your computer to the breakout port
- LiveSuit will ask to format the partition. Press No.
- In a terminal, you should be able to run:
# fastboot devices # fastboot getvar dustversion # fastboot getvar config
- Go to the dustbuilder page (https://builder.dontvacuum.me/_dreame_r2492.html) and enter your device serial number (the QR code next to the dust compartment or the serial number under the dust compartment), the config value from the command above, and ensure you check off 'Create FEL image'. The dustbuilder took about 20 minutes for me before it generated a FEL image I can download. While that's being generated, we can continue...
- Backup the boot stages in case we need it. Keep the bin files somewhere safe. They should all be approximately 400MB.
# fastboot get_staged dustx100.bin # fastboot oem stage1 # fastboot get_staged dustx101.bin # fastboot oem stage2 # fastboot get_staged dustx102.bin
- Download the firmware image from the dustbuilder. You should have received a dreame.vacuum.r2492_1680_fel.zip file in the package. Extract the contents.
- Open LiveSuit and set the image to the _dreame.vacuum.r2492_phoenixsuit.img image file.
- Make a note of the contents in check.txt. You need this ready for the next step.
- Reboot the vacuum cleaner and re-enter fastboot again. We do this because there is a 160 second watchdog that reboots the robot and we want as much time as we can get to avoid having it reboot on us before we're done.
- Run:
# fastboot getvar config ## Confirm fastboot works # fastboot oem dust xxxxxxx ## Replace xxxx with the contents in check.txt # fastboot oem prep ## If this fails, don't proceed. Ensure LiveSuit has the correct img file set ## Ensure that everything below can run before the watchdog resets the device. If you took too long above, reset and try again. # fastboot flash toc1 toc1.img ## Should return OKAY. Stop otherwise and re-assess. # fastboot flash boot1 boot.img # fastboot flash rootfs1 rootfs.img # fastboot flash boot2 boot.img # fastboot flash rootfs2 rootfs.img
- Once all the flash commands succeed, you can run
fastboot reboot. - Press the outer buttons together for 3 seconds so that the robot starts its WiFi access point. Connect your computer to the robot's WiFi network.
- Confirm that you can SSH to the robot at root@192.168.5.1 using the SSH key that you selected (or were provided) in dustbuilder. If you don't have a working key, you can always connect to the robot via serial (there's a root shell running there)
- Backup all the calibration data from the robot.
robot# tar -czf /tmp/calibration.tar.gz /mnt ## on your computer, scp it out, or if dropbear utils aren't available, you can just do: computer# ssh -i *rsa root@192.168.5.1 cat /tmp/calibration.tar.gz > calibration.tar.gz
- Download Valetudo's latest release from https://github.com/Hypfer/Valetudo and copy it into the robot to
/data/valetudo.robot# scp leo@computer:~/valetudo /data/valetudo robot# chmod +x /data/valetudo robot# cp /misc/_root_postboot.sh.tpl /data/_root_postboot.sh robot# chmod +x /data/_root_postboot.sh
- Reboot and once the robot comes back up, you should see the Valetudo web interface on the robot at http://192.168.5.1. Complete the robot setup using Valetudo (such as connecting it to your home's WiFi network).
Camera Streaming
The camera on the vacuum cleaner can be seen via go2rtc. Anthony Zhang's blog talks more about this (https://anthony-zhang.me/blog/offline-robot-vacuum/) and it requires installing tihmstar's vacuumstreamer repo and the official go2rtc binary:
Trusting random people on the internet... part 2
The vacuumstreamer repo has a video_monitor binary which seems to have come from another AVA powered vacuum cleaner. The source of this binary isn't clear. You're running someone's binary blob at this point.## on the robot, make /data/vacuumstramer
robot# mkdir /data/vacuumstreamer
## on your computer, download vacuumstreamer packages and the go2rtc binary and copy it to the robot
computer# git clone https://github.com/tihmstar/vacuumstreamer
computer# scp vacuumstreamer/vacuumstreamer.so root@vacuum:/data/vacuumstreamer/
computer# scp vacuumstreamer/dist/usr/bin/video_monitor root@vacuum:/data/vacuumstreamer/
computer# scp -r vacuumstreamer/dist/ava/conf/video_monitor root@vacuum:/data/vacuumstreamer/ava_conf_video_monitor
computer# wget https://github.com/AlexxIT/go2rtc/releases/download/v1.9.13/go2rtc_linux_arm64
computer# scp go2rtc_linux_arm64 root@vacuum:/data/vacuumstreamer/go2rtc
## back on the robot, set up the streamer
robot# cp -r /mnt/private /data/vacuumstreamer/mnt_private_copy
robot# touch /data/vacuumstreamer/mnt_private_copy/certificate.bin # workaround for missing certificate bug, see https://github.com/tihmstar/vacuumstreamer/issues/1 for details
robot# cat <<EOF >> /data/_root_postboot.sh
if [[ -f /data/vacuumstreamer/video_monitor ]]; then
mount --bind /data/vacuumstreamer/ava_conf_video_monitor /ava/conf/video_monitor
mount --bind /data/vacuumstreamer/mnt_private_copy /mnt/private
LD_PRELOAD=/data/vacuumstreamer/vacuumstreamer.so /data/vacuumstreamer/video_monitor > /dev/null 2>&1 &
/data/vacuumstreamer/go2rtc -c '{"streams": {"tcp_magic": "tcp://127.0.0.1:6969"}}' > /dev/null 2>&1 &
fi
EOF
Reboot. You should see the video stream at http://robot:1984.