Cloud replacement for vacuum robots enabling local-only operation
This release includes, SSDP and Zeroconf advertisement, an Event/Notification feature some bugfixes and lowmem optimizations.
To make using Valetudo a bit easier and more straight-forward, advertisement of the Service via both SSDP/UPnP as well as Zeroconf was added.
If you're on Windows, opening "Network" in the File Explorer should look similar to this:
If you're on a Mac, I'm sure that there's also something.
Furthermore, Valetudo will log the .local
domain it's using, which might be useful in some setups.
Starting with this release, we now have something that will deal with everything that would've been a push notification when using the regular app. Utilizing this, the "Bin Full" notification on roborock vacuum robots may finally happen.
There's no UI for it just yet, however it will be implemented eventually.
As storage space can be quite limited on these devices, it is now possible to use the NodeJS runtime bundled with Valetudo for other things as well.
This can be helpful if one would e.g. want to implement a Microservice, which also runs on the Robot, talks to Valetudo and provides Telegram connectivity.
Just add the --ignore-payload
flag plus another JS file:
./valetudo --ignore-payload repl.js
The baked-in v8 options will still apply when reusing the runtime. That however shouldn't be an issue for most use-cases.
Apparently, the Map Reset on the S5 Max never worked. That might explain some issues users of this Robot were seeing. It should be fixed now.
During the development of 2021.07.0, a lot of time was spent optimizing Valetudo for use in lowmem environments such as the Roborock S5 Max or Dreame D9.
It was discovered that there were issues with the SSE Map update feature, which lead to Valetudo being killed by the Kernel OOM killer. This was the cause of the confusing "Hey my Valetudo is just.. gone" reports.
While this was fixed by introducing limits there, Valetudo was also extended to watch its own Memory usage and shut down if it exceeds 1/3 of system memory. This should provide an additional failsafe.
Furthermore, Valetudo will also set its OOM score to a rather high value by itself, so that the Kernel OOM killer will always kill Valetudo and nothing else.
Still, if you can, please buy a 512mb or more RAM robot.
This release features Swagger UI for proper REST API Documentation. Also bugfixes and stability + performance improvements like the changelog of every single android app you have installed.
In a tedious and brain-melting process, OpenAPI documentation was added to Valetudo.
By navigating to ROBOT_IP/swagger/
you now have an interactive overview for the REST API, which directly lets you interface with the robot.
The schemas made for this are also used by the backend to validate every incoming request.
Since staring at JSON Schemas all day is a pretty mind-numbing task, I didn't manage to also add examples for all responses and requests.
I did however add examples for the Timers Endpoint, meaning that it is now easier to use those again.
UI support of course coming soon.
The new schemas are also used to validate the configuration file loaded by Valetudo. If any errors arise, Valetudo will backup the config and create a new one using the defaults. This will prevent issues with Valetudo not starting due to invalid configuration data.
The log will tell you what exactly was wrong in your config and where you can find the backup.
The Runtime was upgraded to v16.4.0 which brings v8 9.1 including the new Sparkplug thingy, which may result in CPU performance improvements.
A common rookie mistake is that command MQTT messages are sent with the retain flag causing the robot to receive them on every reconnect. This effectively executed a cleanup on each reboot at 4am.
To combat this, Valetudo will now simply ignore all retained messages received and complain about them in the logfile.
There are new REST Endpoints providing system statistics such as Memory or CPU usage.
/api/v2/system/host/info
{
"hostname": "rockrobo",
"arch": "arm",
"mem": {
"total": 522792960,
"free": 358219776,
"valetudo_current": 59215872,
"valetudo_max": 59699200
},
"uptime": 61036,
"load": [
0.255,
0.2725,
0.28
]
}
Due to the switch to vercel/pkg
5.3.0, Valetudo now uses the code compression feature, which results in smaller binaries.
MQTT Map compression is now streamed, which may or may not improve memory usage on 256mb ram robots.
This release features mostly bugfixes, unfinished features and a hostile takeover.
Due to the scale of the MQTT rewrite that happened with 2021.04.0, some new bugs were introduced, which have been fixed with this release.
Furthermore, this release removes the migration logic of the old mqtt config format so if you're planning on upgrading from something other than 2021.04.0, make sure to upgrade to that before installing 2021.05.0.
As always, reading all the release notes is strongly recommended during upgrades.
Not everything in this section is already part of this release.
@jomik is still working on the rewrite of the Valetudo UI. It's already looking fantastic:
If you're a frontend dev, a design person etc., feel free to join in. :) We'll definitely need some design input, custom icons and much more stuff.
A simple scheduler feature has been added to the backend for setups where a full-blown home automation system isn't required. These shall be understood as WIP and can currently only be controlled via REST API calls.
Public root coming soon™, again.
The beta test has been expanded to more users. If you want to take part in that, make sure to join the Telegram Dreame Usergroup and check out the pinned form. Currently, the announcement of the Dreame W10 and Z10 is delaying the release of the rooting method.
As you might've heard, Freenode, the FOSS IRC network has been taken over by the crown prince of korea, who decided to have some fun with it.
Today, the #Valetudo Freenode channel was also taken over:
There are other and much more popular victims of this:
I've left the network and strongly advice you to do the same. https://libera.chat/ is the continuation of Freenode with a different name, but the same Team that has been running Freenode for the last 20 years.
Freenode on the other hand is just the same name but with completely different people.
Stick to the community. Not to the brand.
For more information, check out some of the resignation letters of the former freenode and current libera staff:
There's also a neat FAQ by @joepie91: https://gist.github.com/joepie91/df80d8d36cd9d1bde46ba018af497409
This release features a complete rewrite of the MQTT interface, which brings superior OpenHAB support by fully implementing the Homie specification, Segment renaming, Water Usage Controls, No-Mop-Zones, UI improvements and better stability in low-mem environments such as the Roborock S5 Max
To answer common questions newcomers or people that haven't actively been following the project may have, there's now the Valetudo Newcomer Guide Early 2021 Edition in the docs.
@depau has spent countless hours completely rewriting the MQTT Interface of Valetudo. Note that this is a breaking change and will require additional attention from you on upgrade.
We're now fully Homie-compatible which brings much better support for Home Automation systems other than Home Assistant such as OpenHAB which has recently been completely overhauled. Make sure to check out their new demo as well as the Valetudo OpenHAB integration docs.
If you're using something else such as FHEM or ioBroker, the new Homie MQTT implementation should also be much easier to work with. Documentation on the new MQTT schema can be found in the MQTT Docs.
Davide also went the extra mile and wrote an excellent developer documentation for the new MQTT feature which is a must-read if you want to contribute to that part of Valetudo.
Valetudo will try its best to auto-migrate your configuration file and Home Assistant configuration. However, the latter may not work 100% all the time. Therefore, here's an FAQ for Home Assistant users migrating to Valetudo 2021.04.0
Q: Home Assistant now shows everything as unavailable. A: Refresh the page
Q: The consumables do not update in Home Assistant A: Wait one minute, or open valetudo and navigate to the consumables page
Q: ICBINV does not seem to be retrieving the map A: The map topic changed, it is now TOPIC_PREFIX/IDENTIFIER/MapData/map-data, update your ICBINV config and ICBINV to 2021.04.0
Q: Some stuff is still not detected by Home Assistant A: Reset the autodiscovery configuration by performing the following:
Q: vacuum.send_command
doesn't work anymore
A: Yep. The docs will be updated shortly with information on how to achieve the same stuff now
Valetudo now supports (re-)naming segments and cleaning them from the UI Homepage in the same way you'd trigger a ZonePreset cleanup.
It is now possible to control the water grades of your robot using Valetudo, which is a completely new feature that never appeared elsewhere before :^)
Furthermore, no-mop-zones are back as well.
As it turns out, running nodejs in very resource-limited embedded environments such as vacuum robots isn't exactly the intended core use-case of the runtime, which is why we seem to be pushing the limits especially on devices with only 256mb ob ram such as the Roborock S5 Max.
Another surprising discovery is that Nodejs Buffers are not part of the configured heap, which is why even though we've set the maximum heap size to under 40mb, in some cases, the rss of Valetudo grew to over 100mb, which then caused some robots to go out of memory.
For some reason, the garbage collector simply doesn't care about old and unused Buffers even if the memory pressure rises. Therefore, for now, we're forcing a manual garbage collection if the memory usage seems odd.
This significantly improved the stability on the S5 Max and is now enabled for all builds. Still, I'd recommend choosing the lowmem build for 256mb ram roborock robots.
Stuff such as Virtual Walls will now snap to reasonable angles on creation so that you don't get virtual walls that are infuriatingly almost straight but not quite.
Thanks to recent changes in vercel/pkg, the nodejs base binaries used are now statically linked against musl instead of glibc, which apart from being neat enables us to drop the DNSHack.
Also, we've upgraded the runtime to Node v14.16.1
The Dreame 1c support has been greatly improved thanks to the help of @frankZZ
Public root coming soon™
This release features segment editing, SVG path and icon rendering, and a cool new companion service.
Yep. It's finally here.
Starting with this release, you can split and merge your Segments, which you might also refer to as Rooms.
If this was the only thing holding you back from switching back to Valetudo: Welcome back.
The map rendering was reworked. It's still a canvas but everything that isn't pixel-based is now drawn as an SVG, which results in greatly improved visual fidelity. See for yourself:
Furthermore, this might also improve performance. In any case, I'm quite happy with how good zooming in looks now.
@ccoors built a companion service which connects to Valetudo and generates a Wifi signal strength heatmap.
You should definitely check that out. It's great!
Its repo can be found here: https://github.com/ccoors/Valeronoi
I'm looking forward to seeing more companion services appear in the near future.
Starting with this release, there's more than one Valetudo binary available for download in the releases section.
The regular valetudo
binary has been renamed to valetudo-armv7
so just take that one if you're upgrading.
There's also a valetudo-armv7-lowmem
with a slightly decreased heap size. I haven't testet that very much yet so feel free to do that
especially if your robot only has 256mb or less of ram available.
And finally there's now a valetudo-aarch64
binary to support robots with that cpu architecture.
While doing that, I've also upgraded the Valetudo nodejs base binaries to v14.16.0
which should include performance, stability and security improvements.
@depau added a way to install new VoicePacks. There's no UI support for that and the request required might vary from vendor to vendor.
Usually, it should be sufficient to provide an URL to the VoicePack + its hash and it should install fine.
@alexkn added a MockRobot
to make development easier and enable you to contribute to Valetudo even if you don't have a robot around.
Furthermore, I've added an ID button to the Zone and Location Preset map edit view, which shows you the ID of the preset you're editing so that you can use it via MQTT. It's pretty much a hack but that's better than nothing ¯_(ツ)_/¯
The info section of the UI will now also contain your currently running git commit id, which should make debugging a bit easier in certain situations.
The Docs at valetudo.cloud have been improved and now feature an autogenerated overview of all supported robots plus a page that explains all available capabilities.
This release features Home Assistant MQTT Autoconfig for the Map Data, an NTP Client and more.
The Valetudo Map Data is now optionally (on by default) provided as embedded and compressed text of a PNG file.
This is not only easy due to the nature of the PNG file format but also 100% according to specs.
We're actually publishing a completely valid PNG to MQTT containing the full Map as a JSON.
This enables Valetudo to do Home Assistant Autoconfiguration for the Map as well since camera entities aren't persistent to the HA database and therefore no user interaction regarding the exclusion of the map entity from the recorder is needed.
I'm quite happy with this approach because there's no added CPU load to Valetudo since we're just sandwiching the deflated Map JSON between other PNG chunks. Furthermore, providing the raw map data instead of an image enables better interactions with the map such as
etc.
The lovelace-valetudo-map-card is required to extract and render the map data from the camera image.
If you were already using the Valetudo Map in Home Assistant, you will need to revise your setup.
No worries though. It is much easier now :)
During "normal" cloud operation, miio-based robots receive the time via the miio protocol. This of course resulted in the robots syncing their time to their time, which doesn't make much sense and may even interfere with some features.
Also, not all robot firmwares contain a build of ntpd
and cross-compiling can be hard.
Therefore, there's now a simple NTP Client integrated into Valetudo, which by default fetches the time from pool.ntp.org
on startup
and every 8 hours after a successful sync.
It can be disabled via the configuration file and doesn't do anything if Valetudo isn't running in embedded
-mode.
Of course, you can also change the ntp server to a different one in the configuration file if you happen to own a stratum-0 cesium atomic clock or even a fritzbox with an integrated ntp server.
Thanks to @ccoors, you will now find the contents of your Valetudo logfile under Settings > Info in the Web UI. No need for SSH anymore.
It is also possible to temporarily increase the Loglevel there until the next reboot.
If you're looking for stuff like the firmware version or your local token, the log viewer is the right place for you.
@bensweet86 ported even more capabilities over to the new capabilities system. Starting with this release, Valetudo is now able to both control the volume and the carpet mode setting again.
Furthermore, he also fixed a long outstanding bug regarding pinch to zoom on iOS devices.
Dreame support has been improved as well. Public root for those is still TBA.
There were also quite a few changes regarding the cloud redirection in this release. Please make sure to follow the official upgrade instructions so that you don't run into any issues.
Be advised: This release will break (almost) everything that you're currently using.
Config format, HTTP API and MQTT have changed significantly in this release.
You will need to recreate your Zone presets as well as your Home Assistant Robot entity.
Make sure to disable any Timers you might've configured before upgrading, since there's no way to delete/configure them in this release anymore!
Also, note that this release comes with fewer features than the previous, because not everything has been ported to the new structures yet.
To support a growing number of Vacuum Robots with different feature sets made by different Vendors, the core infrastructure of Valetudo was completely rewritten.
Now, instead of having robots that inherit from other robots, there are so-called capabilities
as an abstraction of features.
There's always a generic base class for each feature (e.g. GoToLocationCapability
) which is extended by multiple vendor-specific
implementations (e.g. RoborockGoToLocationCapability
, ViomiGoToLocationCapability
etc).
This approach completely encapsulates vendor-specific implementation details and makes them invisible for e.g. the webinterface or other users of the HTTP API which has also been rewritten.
Overall, I'm quite happy with how it turned out. Time will tell whether this abstraction was generic enough to deal with all possible vendor-specific differences.
As mentioned, the REST interface was rewritten and is now an official way of communicating with Valetudo.
All endpoints are dynamically generated according to which capabilities are available for the robot implementation Valetudo is using.
For example basic controls such as "start", "stop" or "home" are done via a PUT request to /api/v2/robot/capabilities/BasicControlCapability
.
To find out more about all possible endpoints for your Valetudo instance, a meta-endpoint has also been added.
At /api/v2/
you will get JSON containing all endpoints as well as their accepted methods.
The MQTT interface was also rewritten to support different subsets of capabilities. Instead of having a single topic, which contains all the information available, data is now split up onto different topics based on capabilities.
This also means that you will have multiple entities for your robot in Home Assistant:
Furthermore, Wi-Fi information is now also available over MQTT so in theory, one could build a microservice which subscribes to both map and Wi-Fi data updates and build a Wi-Fi heatmap of their home by mapping the measurements to the position in the map.
Note that the default identifier changed from rockrobo
to robot
, since Valetudo is not just dealing with Roborock anymore.
Therefore when reconfiguring this release, you may want to change that back to the old value if your setup relies on it.
To support different robots with different folder structures (some of them being read-only), the configuration location had to be made configurable, which is a chicken/egg problem, because the information on where to find the configuration would be configured within the configuration.
To solve this, Valetudo is now using the environment variable VALETUDO_CONFIG_PATH
and defaults to os.tmpdir()
if it isn't set.
Due to the fact that the configuration schema also changed significantly, you will need to reconfigure Valetudo on upgrade.
You will also need to update your means of running valetudo to include this ENV variable since otherwise your configuration will vanish on each reboot. This can be done either by building a new firmware image or copying the changes required from these commits
With the launch of the Dreame D9, there's now a promising successor to the Roborock S5 regarding both pricing and ease of installation. This release already contains support for basic controls, Map Rendering, Segment Cleaning and Zoned Cleaning.
Rooting instructions will follow soon-ish. :)
It looks like this code should also be adaptable to the F9. We'll see about that if/when I get my hands on one
Viomi note: If you're upgrading on a Viomi, make sure to change the cloud IP used for redirection to 203.0.113.1
which is now hardcoded.
The docs have been updated to reflect that.
Valetudo is now using the CalVer versioning scheme, because it better fits the constantly changing scope of the project.
I'd like to especially thank @depau for his port of the Viomi robot to the new infrastructure using only the half-finished capabilities branch and no documentation whatsoever as a reference.
Furthermore, thanks to @bensweet86 for porting more capabilities to the new framework.
Be advised: This release will break (almost) everything that you're currently using.
Config format, HTTP API and MQTT have changed significantly in this release.
You will need to recreate your Zone presets as well as your Home Assistant Robot entity.
Make sure to disable any Timers you might've configured before upgrading, since there's no way to delete/configure them in this release anymore!
Also, note that this release comes with fewer features than the previous, because not everything has been ported to the new structures yet.
To support a growing number of Vacuum Robots with different feature sets made by different Vendors, the core infrastructure of Valetudo was completely rewritten.
Now, instead of having robots that inherit from other robots, there are so-called capabilities
as an abstraction of features.
There's always a generic base class for each feature (e.g. GoToLocationCapability
) which is extended by multiple vendor-specific
implementations (e.g. RoborockGoToLocationCapability
, ViomiGoToLocationCapability
etc).
This approach completely encapsulates vendor-specific implementation details and makes them invisible for e.g. the webinterface or other users of the HTTP API which has also been rewritten.
Overall, I'm quite happy with how it turned out. Time will tell whether this abstraction was generic enough to deal with all possible vendor-specific differences.
As mentioned, the REST interface was rewritten and is now an official way of communicating with Valetudo.
All endpoints are dynamically generated according to which capabilities are available for the robot implementation Valetudo is using.
For example basic controls such as "start", "stop" or "home" are done via a PUT request to /api/v2/robot/capabilities/BasicControlCapability
.
To find out more about all possible endpoints for your Valetudo instance, a meta-endpoint has also been added.
At /api/v2/
you will get JSON containing all endpoints as well as their accepted methods.
The MQTT interface was also rewritten to support different subsets of capabilities. Instead of having a single topic, which contains all the information available, data is now split up onto different topics based on capabilities.
This also means that you will have multiple entities for your robot in Home Assistant:
Furthermore, Wi-Fi information is now also available over MQTT so in theory, one could build a microservice which subscribes to both map and Wi-Fi data updates and build a Wi-Fi heatmap of their home by mapping the measurements to the position in the map.
Note that the default identifier changed from rockrobo
to robot
, since Valetudo is not just dealing with Roborock anymore.
Therefore when reconfiguring this release, you may want to change that back to the old value if your setup relies on it.
To support different robots with different folder structures (some of them being read-only), the configuration location had to be made configurable, which is a chicken/egg problem, because the information on where to find the configuration would be configured within the configuration.
To solve this, Valetudo is now using the environment variable VALETUDO_CONFIG_PATH
and defaults to os.tmpdir()
if it isn't set.
Due to the fact that the configuration schema also changed significantly, you will need to reconfigure Valetudo on upgrade.
You will also need to update your means of running valetudo to include this ENV variable since otherwise your configuration will vanish on each reboot. This can be done either by building a new firmware image or copying the changes required from these commits
Viomi note: If you're upgrading on a Viomi, make sure to change the cloud IP used for redirection to 203.0.113.1
which is now hardcoded.
The docs have been updated to reflect that.
Valetudo is now using the CalVer versioning scheme, because it better fits the constantly changing scope of the project.
I'd like to especially thank @depau for his port of the Viomi robot to the new infrastructure using only the half-finished capabilities branch and no documentation whatsoever as a reference.
This is merely a small fix release.
With 0.6.1, valetudo doesn't segfault anymore when using a domain name as the mqtt host. Furthermore, zones are now back to being cleaned once instead of ten times.
If you've arrived at this release and haven't seen the 0.6.0 release notes yet, I strongly encourage you to do so now.
Autogenerated changelog:
I've finally found the time to rework the Map Data format as well as the robot state format. Both previously being heavily influenced by roborock, the new and improved formats are a huge step for easier adaption of Valetudo to new Vacuums as well as implementation of new features.
In fact it has already proven itself in other work that has been done for this release and decreased memory pressure quite a bit.
This change is also of course a breaking change. Make sure to update any dependant applications/integrations/etc. as well.
The list of technically supported roborock vacuums has grown quite a bit. Especially since Dennis released his guide on how to root the S6 which you can find here.
Furthermore, Valetudo has also received initial support for a dreame-made xiaomi vacuum robot: Xiaomi MiJia 1C
There's no map parsing yet though. Contributions much appreciated.
Please note that there's no dreame rooting guide available yet. These release notes will be updated when it becomes available.
Owners of room-cleaning capable roborock vacuums can now use Valetudo to do so.
Simply select the segments you want to clean and start the cleanup like you would start a zoned cleanup. Currently cleaned segments are denoted by a rotated icon.
If you zoom in on a segment marker, it will display both it's segment id as well as the segments' area in m²
.
The latter also being a benefit of the new Map Data format.
Segment cleaning is of course also available via MQTT. Check out the updated Home Assistant docs for an example on how to use it.
Since this is a generic implementation, support for other vacuum vendors will follow. You just need to open a PR for that.
Dynamic zones now display their size in meters which is also a helpful addition if you quickly want to measure something without leaving your desk.
Furthermore, it is now impossible for you to break the map by zooming out too far.
and of course there's the autogenerated changelog: