Cloud replacement for vacuum robots enabling local-only operation
New Robot, new Firmware, Various UX improvements and MQTT changes
Starting with this release, the Dreame W10 (not-pro!) is supported by Valetudo. Because I got pretty annoyed by the lack of proper mopping robots supported by Valetudo, I've finally just bought one myself to check if it is rootable and suitable for Valetudo.
Turns out: It is. Looks like it always was. We were just misinformed because we never had bought one ourselves due to its pricing and people on the internet told us incorrect information about it. The lesson here is that we absolutely have to buy all robots ourselves or else we go nowhere.
Anyway, rooting is possible with the catch that you will need a new custom PCB to do so. I do have ~250 of them lying here waiting to be soldered and used, however the logistical issue of me getting those to you yet remains to be solved.
Because I got pretty annoyed by the lack of firmware updates for the D9 Pro, I've finally just bought one myself to check if I can do anything about it.
It seemed pretty wrong that the older D9 has a recent 2022 firmware while the newer D9 Pro is stuck with a firmware from early 2021. Thus, I wondered how different those robots really are and if it would be possible to port the D9 firmware over to it.
Turns out: They're pretty similar but not entirely.
And so with a few changes, you can now upgrade your D9 Pro to a much more recent firmware using the Dustbuilder. Gone should be the days of the robot bumping into everything and its map slowly deteriorating over time.
You're welcome :)
Reminder: Do not try to install a regular D9 firmware on your D9 Pro. It will brick your robot. You absolutely need to select the customized D9 Pro version in the dustbuilder.
This release features a few MQTT improvements.
Valetudo's MQTT client has gotten a bit more flexible with this release.
To avoid additional load and traffic for features that aren't required in 90% of setups, not every capability is exposed to MQTT. This unfortunately meant that 10% of people had to also use the REST API to solve their automation needs.
With optional exposed capabilities, it is possible to cater to those needs without polluting the MQTT broker of people that don't require the functionality. For now, the only option to select is the SpeakerVolumeControlCapability. Others may follow if someone makes a solid case for why it should be controllable via MQTT.
Please only enable optional exposed capabilities that you actually plan on using as each additional one adds system load due to periodic polling.
The error mapping improvements that have been implemented in the last release are now also being published to MQTT.
It should make building reliable automations based on the error state much easier
Please note that this could be a breaking change if you've hardcoded the MQTT error topic somewhere. Users of Home Assistant should not notice anything changing as the autoconfiguration payload change should take care of everything.
If you've created automations based on the value of the error topic, this will be a breaking change for those as well.
The process of getting the Valetudo Map into Home Assistant always has been challenging for newcomers as it is not straightforward. Therefore, the image displayed in Home Assistant was changed and a new docs microsite was created.
If you navigate to hass.valetudo.cloud, you'll find a step-by-step walkthrough to get the map integrated. Furthermore, there is also an explanation why things are that complicated.
The Mop Attachment Reminder event now gets dismissed automatically when you detach the Mop Attachment from the robot.
If the user attempts to start a full cleanup after selecting something in the map view, they will now see a warning dialog.
The Wi-Fi configuration settings are now hidden and replaced by an info box if the robot does not support reconfiguration while provisioned.
This release features support for changing the operation mode of the robot.
This enables you to e.g., tell your new W10 that it should only mop.
After staring at Ghidra for a while, I've managed to discover the meaning of a few more hardware error codes of dreame robots. Furthermore, roborock hardware error code mappings were updated as well.
As you've seen at the beginning of these release notes, we do have to buy all robots ourselves if we want stuff to happen.
Thus, if you want to see Valetudo on more robots and/or like this release, you might want to consider donating if you haven't done so already:
https://github.com/sponsors/Hypfer
https://builder.dontvacuum.me/donations.txt
da6994a
a06a86d
aefa436
ffbcb73
0081cba
3f31186
685227b
6da6556
bc6a4ce
892cc09
19f96a2
67f600a
c9bc1b8
19ce6aa
8b6643c
93fdfb9
fbcfd47
d1ad1af
5877381
0deff82
3c884f5
9fa98df
dd49ecc
d27b189
4dbb745
38fb6e4
c3de7e5
cefd3a7
263774b
0fdec0c
a96501f
cd3b75f
An interesting newly supported robot plus security and usability improvements
Thanks to generous user donations, I was able to buy a Mijia Ultra Slim Robot to take a look at. As you can see, it is very small, measuring only 5.5cm in height and 32.3cm in diameter. For comparison: The Z10 next to it measures a height of 9.6cm and a diameter of 35cm.
This makes the ultra slim a very interesting robot as it fills a niche that no other supported one did previously. Apart from that, it's a decent vSLAM robot that - thanks to the ToF sensor in the front - doesn't bump into every wall that it can find.
Fortunately it turned out that even the latest available firmware is rootable via the very easy debug UART rooting method :) Thus, there's now support for it in Valetudo.
Unfortunately however, it is a china-exclusive model, meaning that both it and any spare part have to be imported to wherever you live (unless you live in china that is). Because of its size, it also uses completely different consumables than other dreames. Do keep that in mind if you're thinking about buying one.
Nonetheless, I am very happy to have it supported, as it is a proper solution to a problem that previously was unsolvable without outright replacing your furniture. There is simply nothing else like it in the market. Thus, if you've ever wanted to use Valetudo but couldn't as all supported robots were too large for your scenario, then now there's an option for you.
I do want to stress again that this would not have been possible if it weren't for user donations. There simply is no way to pay for all those robots out of our own pocket... especially considering the pricing of some upcoming models and even more so since we'll need at least two of them
Thank you for your ongoing support!
One thing that slightly annoyed me for a long time now was the fact that Wi-Fi provisioning was done via an unencrypted connection over an unencrypted Wi-Fi Access Point, meaning that anyone passively sniffing Wi-Fi traffic during the provisioning process could've in theory gained access to your Wi-Fi credentials.
To solve this unlikely scenario, the Valetudo frontend now requests an RSA-Key from the backend and encrypts the provisioning payload with it, before it is sent over the Wi-Fi. This slight improvement in security does not prevent MITM-attacks, however that wasn't ever the goal to begin with as those are even less plausible than the passive Wi-Fi sniffing attack.
If you want to know more about the reasoning behind this, feel free to take a look at this very extensive code comment further explaining things.
It should now be easier to interact with the map on mobile as the hitbox size of various things has been increased.
Based on user feedback, the coverage map now renders the coverage and the robots' path.
There's now a button that allows the user to download a ValetudoMap JSON e.g., for use with the ValetudoMap to Minecraft Map converter. Previously, users had to manually call the REST API route and save the JSON.
In some setups with MQTT brokers that don't have any persistence enabled, a broker restart or a loss of connectivity could lead to Valetudo not reacting to any MQTT commands anymore as all subscriptions were gone. It would still continue publishing status updates though, leading to even more confusion.
This issue should now be solved.
The Swagger UI now only displays routes that are supported by the currently running ValetudoRobot implementation.
If you want to see Valetudo on more robots and/or like this release, you might want to consider donating if you haven't done so already:
https://github.com/sponsors/Hypfer
https://builder.dontvacuum.me/donations.txt
f1aea85
22419f4
2b6dd04
e8715cb
6179e19
3ab4033
4ac2928
6e87ba3
be33e12
4c21394
ee6a60d
dbbd0f0
afac067
922aece
03d22dc
81809f1
b9bcbe3
b198b10
4f05dcd
New firmwares for dreame robots and some bugfixes
It took quite a lot of time and work, but now we're proud to announce that we've managed to get newer dreame firmwares to work rooted and with Valetudo. A big thank you to everyone who helped during the beta test!
Important: That does not mean that these newer firmwares have become rootable. You will need to have an already rooted robot to install these latest rooted firmwares.
To update, head over to the dustbuilder at https://builder.dontvacuum.me/ to build and install a new image. Make sure to update Valetudo before updating the firmware.
Starting today, every firmware image built with the dustbuilder will contain a fix for the vanishing Valetudo issue, which occasionally left people with a rooted robot but no Valetudo.
If a user starts a new mapping pass, the fresh map should now appear instantly. Furthermore, issues with frozen maps either during cleanups or when editing segments were fixed as well.
The UI has been extended with a view displaying a much thicker path. This can be used to better see which areas of the map have been cleaned.
Whether this view will stick around long-term is yet to be decided. It was pretty easy to implement though. Feel free to leave your feedback in the comments.
If you want to see Valetudo on more robots and/or like this release, you might want to consider donating if you haven't done so already:
https://github.com/sponsors/Hypfer
https://builder.dontvacuum.me/donations.txt
This changelog features artworks generated by DALL-E 2 because I thought it would be neat to have something to look at. Unfortunately, it doesn't like generating artworks featuring lidar-based vacuum robots (yet?)
I hope they've nonetheless enhanced your changelog reading experience. Feel free to leave feedback on that as well.
17c0d27
39d72f4
a9661a0
a33afe3
7ce4abe
b74c281
dc72ef0
99aad7b
bfb96c0
6e26374
3b5743b
8c1ba9e
8aab94f
5ecf7fa
0dfb4ba
5f67103
f106735
839310a
6e2d2e1
1d2ad47
214b5c0
9356ba8
15eee37
4ae1d03
7bf3c87
b3843f8
e10313d
a7e6920
66712f9
05a6b89
cebca05
Another maintenance release featuring upgraded dependencies, refactoring and some bugfixes
Users can now discover multiple robots of the same model in their home network:
Apparently, the Bonjour service name needs to be unique or else some bonjour implementations will deduplicate it. Because of this, the companion app only displayed one robot even though there were multiple ones on the network.
The nightly update provider will now display a changelog of all changes since the last release.
You can switch to the nightly update provider by changing the updater.updateProvider.type
in your valetudo_config.json
to github_nightly
.
Please keep in mind that nightly builds might be unstable. They should only be used by people that know what they're doing and are willing to handle occasional breakage.
Multiple issues that caused the live map to stop refreshing have been fixed.
Checking back on the Valetudo UI after having it in a background tab for a while during a cleanup will now display the latest map data. Also, running Valetudo behind a flaky reverse proxy should not interfere with the SSE connection anymore.
This release features plenty of dependency upgrades, the migration to create-react-app 5 and more. It also contains a lot of refactorings that should further improve the code quality.
While all that doesn't offer any directly noticeable benefits to the user, it is worth noting nonetheless, as keeping the project well-maintained is vital to its longevity.
The exciting stuff will hopefully happen later this year :-)
Apart from code changes, I've been busy figuring out how to build statically linked recent versions of common tools that might be added to our robot firmware images. It's all done using dockerfiles to make it easy to understand, document and reproduce. Interestingly, information on the internet do to just that is rather sparse so this might also be useful to someone with a different embedded use-case.
You can find that stuff here: https://github.com/Hypfer/valetudo-misc If you're missing a tool there please let me know
As mentioned in the previous release notes, we're currently still pretty busy figuring out how to root new robots and/or firmware versions. Since that worked well in the past, I shall continue mentioning it here.
If you want to see Valetudo on more robots and/or like this release, you might want to consider donating if you haven't done so already:
https://github.com/sponsors/Hypfer
https://builder.dontvacuum.me/donations.txt
The autogenerated changelog generation has been updated to be even better and less of a hassle to use. Enjoy
9c57f0c
3a874db
269aa30
956487e
6793c67
d84efd5
271e53c
bd77d2e
bae09ab
a47f3b9
9b75974
84de0ef
5ca525e
560a50e
6c1b126
d17b66d
9548012
212e4f5
96ba8cf
412a65a
356d144
3504a4a
2c73de3
3c3c561
0becd44
5176cce
8ae420c
643dcc5
881f717
41055d1
A small incremental release featuring a few UI/UX improvements
This release adds an easy way of getting the payload to automate zoned cleanups, segment cleanups and go-to commands via MQTT or REST.
Simply set up your zones/select your presets as you'd usually do but instead of just clicking the cleanup button, long-press it, and you will receive a dialog containing the copy-pastable payload for MQTT/REST. ctrl + a
also works :)
This release adds a shadow to zones drawn onto the map to improve visibility especially when using the light theme.
Before:
After:
Furthermore, NoGoAreas and VirtualWalls now are slightly less transparent to improve visibility on orange segments.
At some point for some reason, the map renderer canvas lost the image-rendering: crisp-edges
css property, which caused occasional blurry maps.
This has been fixed. We can now all again enjoy crisp edges :)
Uncrisp edges:
Crisp edges:
The base binaries have been upgraded to the latest NodeJS v18.1.0.
They're also now built with -Os
, which decreased our binary size by a few percent.
As mentioned in the previous release notes, we're currently still pretty busy figuring out how to root new robots and/or firmware versions. Since that worked well the last time, I shall continue mentioning it here.
If you want to see Valetudo on more robots and/or like this release, you might want to consider donating if you haven't done so already:
https://github.com/sponsors/Hypfer
https://builder.dontvacuum.me/donations.txt
Spring-cleaning 2022: Usability improvements, bugfixes and the removal of zone/goto presets + the old UI
Valetudo 2022.05.0 removes the Zone Preset/GoTo Location feature that has been deprecated since more than six months now.
As a replacement for this feature, the MQTT interface now accepts coordinates instead of preset IDs. Thus, users can just change the place where they store their coordinates from the Valetudo config file to e.g., the Home Assistant config files.
Please head over to the MQTT docs to find out how to use it. It's the same payload that is used by the REST API. No surprises there.
Still, it has to be done once in a while to keep a clean codebase and focus on what is most important. Without these kinds of cleanups, projects eventually grow to a point when they start suffocating under their own weight.
If you've ever worked with larger legacy enterprise codebases, you should understand the issue. They tend to be torn apart by
and
See also this anecdote on Oracle 12.2 found on Hackernews.
As avid listeners of my ramblings have likely been aware, I've been very unhappy with that preset feature for more much more than just half a year now. It was always a very fragile feature to begin with, given that Valetudo itself would store these coordinates without knowing anything about the underlying map. The robot might've decided to rotate the map, leading to them pointing to a completely different location without Valetudo being able to catch that.
At the time when it was added, it was the best we had, given that map segments simply weren't invented just yet. We didn't even have persistent maps, which is very strange to look back to.
That however was almost four years ago. Since then, the market changed a lot as you can tell. Basically every robot now supports not only persistent maps but also the map segmentation, which is handled by the firmware and not Valetudo. Those are objectively superior to some rectangles that are drawn onto the map, which is why it was finally time to remove this hack.
I know that this may be bad news for V1 owners who do not have segments support and also don't want to use something like Home Assistant. However, I'd like to point out that there is nothing forcing anyone to upgrade to a newer Valetudo version. There is no automatic update check that periodically annoys the user. There is no cloud that will change its API. It just works and will continue to do so.
Therefore, for those who want to continue using zone presets and goto locations, it is recommended to stick with Valetudo 2022.03.1.
It also shouldn't be too hard to backport changes to that version. I however simply can't provide that kind of support.
I hope that you will all understand that.
With the presets gone, we can finally remove the old frontend entirely, which reduced the binary size by around 1MiB. While this doesn't sound like much given that it's "only" 3%, it's important to note that currently, 24MiB of the armv7 build consist of the bundled nodejs runtime. This means that with this update, the size of Valetudo itself shrunk by 15%!
The menu opening thingy of the mobile UI now always stays at the bottom of the screen to improve user experience when using long phones.
The live map now renders virtual restrictions with more opacity and less bright colors as they were pretty obstructive previously. The edit map remains unchanged.
The log viewer now uses the jetbrains mono font.
Your robot will now only report and display attachments whose state it is able to track. No more always attached dustbins confusing users.
Over the last weeks, a few new companion applications were built:
A tray icon that allows easy access to Valetudo instances on your network. It's mostly handy when dealing with 4+ robots
A standalone all-in-one firmware update flasher tool for roborock v1 and s5. The docs have been updated to suggest using it
A standalone self-contained utility webserver currently most useful for rooting dreames. The docs have been updated to suggest using it
A standalone self-contained utility to send raw miio commands. Useful for development of valetudo or other software interacting via miio
A WIP tool to help with Voicepacks
These should make installation and usage of Valetudo even easier than before.
We're currently pretty busy figuring out how to root new robots and/or firmware versions. These endeavors are partly funded by your donations. Thank you!
If you want to see Valetudo on more robots, you might want to consider donating:
https://github.com/sponsors/Hypfer
https://builder.dontvacuum.me/donations.txt
Ordered segment cleanups via the UI, MQTT deduplication and a lot of internal refactoring
The UI now tracks the order in which segments were selected, meaning that if your robots' firmware supports it, they will be cleaned in the order you've specified.
If supported, the order will be displayed as a roman numeral above the segment label triangle.
The MQTT connectivity feature now reports a state to the UI. Furthermore, it also collects some statistics.
By watching those stats, you will notice that this release also causes less traffic, as most outgoing messages are deduplicated.
Initially, I didn't want to do that as the solution proposed was to just store every payload in memory and then compare on each mqtt publish. That would work, however it comes with a hefty ram overhead as you now have to constantly keep 300+ somewhat long string payloads in memory. With each character taking up 2 byte, this approach isn't feasible with the ram budget we have (32 Mbyte or less).
To reduce the amount of ram required, we could use a hash function such as md5, however that would still be too much. As they'd be saved as hex strings, that would mean 32 characters each with each character taking up 2 bytes, resulting in each pair of topic and payload using 128 byte or more.
Thus, instead we're now using 32-bit CRC32. With object keys being strings, I'd think that these pairs should use around 20 byte each. The downside of CRC32 is that the risk of collisions is much higher. However, I highly doubt that that could actually happen in this application.
To save CPU time, which is also quite limited on our robots, the (in comparison) huge map data is not being deduplicated.
Ordered segment cleanups via the UI, MQTT deduplication and a lot of internal refactoring
The UI now tracks the order in which segments were selected, meaning that if your robots' firmware supports it, they will be cleaned in the order you've specified.
If supported, the order will be displayed as a roman numeral above the segment label triangle.
The MQTT connectivity feature now reports a state to the UI. Furthermore, it also collects some statistics.
By watching those stats, you will notice that this release also causes less traffic, as most outgoing messages are deduplicated.
Initially, I didn't want to do that as the solution proposed was to just store every payload in memory and then compare on each mqtt publish. That would work, however it comes with a hefty ram overhead as you now have to constantly keep 300+ somewhat long string payloads in memory. With each character taking up 2 byte, this approach isn't feasible with the ram budget we have (32 Mbyte or less).
To reduce the amount of ram required, we could use a hash function such as md5, however that would still be too much. As they'd be saved as hex strings, that would mean 32 characters each with each character taking up 2 bytes, resulting in each pair of topic and payload using 128 byte or more.
Thus, instead we're now using 32-bit CRC32. With object keys being strings, I'd think that these pairs should use around 20 byte each. The downside of CRC32 is that the risk of collisions is much higher. However, I highly doubt that that could actually happen in this application.
To save CPU time, which is also quite limited on our robots, the (in comparison) huge map data is not being deduplicated.
Lots of UI changes and more polishing
This release adds the quirks concept, which shall be understood as a catch-all and/or staging area containing vendor-specific toggles that don't fit the generic abstraction that is Valetudo (yet). This should make it fairly easy to quickly implement (some of the) exciting new vendor features without jeopardizing the architecture of Valetudo in the long run.
Here's an example taken from the Dreame Z10:
Robot, Map and Connectivity settings have been reorganized/redone.
Wi-Fi and NTP state display has been redone as well:
A lot of help text sections and dialogs have been added all around the application to make usage of Valetudo even easier. They should also answer a lot of common support questions, so make sure to read them before asking questions.
Furthermore, all password fields have been updated to feature a plain-text-display toggle.
Because displaying three numbers is boring, @ccoors had the great idea of adding gamification the total statistics feature. After some iteration on that idea, we've ended up with this:
There's also an overview of all achievements:
I'm very happy with how this turned out. Now we just need to think of more achievements. If you have any ideas, feel free to leave them down in the comments.
There are now automated nightly builds, which you can install using the updater.
As this is meant for people willing to accept and capable of handling breakage, there is no UI toggle to switch to nightly builds.
To enable them, ssh into your robot and change the update provider to github_nightly
.
Quality of life improvements, bugfixes and more polishing. Also, Happy New Year :)
The map management feature has been restructured to be easier to understand especially for newcomers. Furthermore, there are now help texts available in the editor, which should answer common questions.
The updater now auto-refreshes its state and provides more feedback. It will also display the latest changelog if there's no update available.
Valetudo now requires Home Assistant 2021.12 or newer as that release introduced the object_id
field for
MQTT autodiscovery. This allows us to influence the entity_id
so that the days of camera.map_data_3
are gone.
You might have to delete the device in HA and let it be rediscovered for these changes to be applied.
It is worth it though:
Multiple issues regarding MQTT stability and reliability have been identified and fixed with this release, hopefully solving connectivity issues in situations with bad Wi-Fi signal coverage.
Valetudo now attempts to block access from public-routable IPs to its REST-Interface by default. This was necessary, because publicly-accessible Valetudo instances kept appearing on Shodan.io.
It is certainly no foolproof solution, but it might at least help a little. You can also disable the filter if you absolutely have to, however I'd strongly recommend not doing that.
As it turns out, nodes os.getNetworkInterfaces()
does not return all network interfaces, which led to the unique
system identifier randomly changing depending on whether or not the robot had an IP address.
This has been fixed by the use of the mighty sysfs
.
Moreover, Valetudo now polls the network state every 30s in an attempt to catch network changes and restart
the network advertisement so that the companion app doesn't display 192.168.5.1
right after provisioning.