Releases: Hypfer/Valetudo
Valetudo 2022.05.1
A small incremental release featuring a few UI/UX improvements
MQTT/REST Segment/Zone/GoTo 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 :)
Client Map Structure Visibility
This release adds a shadow to zones drawn onto the map to improve visibility especially when using the light theme.
Furthermore, NoGoAreas and VirtualWalls now are slightly less transparent to improve visibility on orange segments.
Map Crispness
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 :)
Node V18
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.
Other news
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
Autogenerated changelog
Features
- ui: Get payload of segment/zone cleanup via long-press (52731bf)
- vendor.roborock: Add support for the M1S (f234925)
Bug Fixes
- miio: Limit the maximum fdsUpload filesize (c1de1c5)
- miio: process _async.stat, _otc.ncstat and _otc.ncinfo messages (#1488) (7cf1fe9)
- ui: Add shadow to some client structures for better visibility (d4e7f83)
- ui: Fix map crispness (e55a5dc)
- ui: Improve visibility of red virtual restrictions on orange segments (797143a)
- Work around Node v18 breaking os.networkInterfaces (226dae1)
- vendor.roborock: copy metadata from previous state on state update (#1489) (6ecc76b)
- vendor.roborock: Ignore event.fan_power_reduced (c56e7a2)
- vendor.roborock: Multiple fixes for Mijia 1S (#1485) (c66798d)
Valetudo 2022.05.0
Spring-cleaning 2022: Usability improvements, bugfixes and the removal of zone/goto presets + the old UI
Zone/GoTo Preset removal
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.
If you're unhappy and/or like to know more about why this change was done, feel free to click on this spoiler
Feature removal is delicate topic, since there always will be at least one person that is very upset and unhappy with whatever change was done to a project. See also: XKCD 1172.
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
- legacy features/behaviour having to stay like they are for existing customers/long-running support contracts
and
- management, sales and the market in general demanding newer features that no one could ever have predicted previously
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.
Removal of the old UI
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%!
UI improvements
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.
Attachments
Your robot will now only report and display attachments whose state it is able to track. No more always attached dustbins confusing users.
Companion apps
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.
Other news
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
Autogenerated changelog
Features
- mqtt: Provide attachment state attributes autodiscovery for home assistant (b7b6344)
- ui: Improve mobile controls for long screens (f7f3f0d)
- ui: Reduce live map obstructions caused by virtual restrictions (ddec0b3)
- ui: Use JetBrains Mono (5a7045c)
- vendor.dreame: 1C PendingMapChangeHandling (1b2f3bf)
- vendor.dreame: Add support for the STYTJO6ZHM (519c5b4)
- vendor.viomi: Fetch and display firmware version (7f08743)
- vendor.viomi: Raise zone count limit to 10 (8130e24)
- Provide list of attachments supported by the model of robot (fe65df3)
Bug Fixes
- mqtt: MqttController default state should be disconnected (137e630)
- networkadvertisement: Disabling the Network advertisement multiple times in a row should not cause any issues (789608f)
- ui: Allow closing of ValetudoEvents even if there are a lot (ec599b2)
- ui: Fix auto empty dock control loading state (7ec1e5d)
- ui: Handle timers with invalid actions (b467443)
- ui: use correct relative paths to allow hosting in a subdirectory (6129ec5)
- vendor.dreame: Fix 1C powersave state mapping (fdb51e7)
- vendor.roborock: Don't update state for attachments that we don't have (f27bbfd)
- vendor.roborock: Fix manual control for roborock v1 (abccee4)
- vendor.roborock: Fix obnoxious "no error" error event (f3b4a54)
- vendor.roborock: Remove confusing attachments that never get updated ([e4274d3](https://github.com/Hypfer/Valetudo...
Valetudo 2022.03.1
Ordered segment cleanups via the UI, MQTT deduplication and a lot of internal refactoring
Ordered segment cleanup
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.
MQTT
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.
Misc
- The system information page will now display the current robot firmware version if available
- The UI will now prevent the user from configuring invalid MQTT topic names (containing spaces, # or +)
- The UPnP/SSDP lib was dropped in favour of our own implementation, which should fix some unhandledRejections caused by the lib
- The log viewer now doesn't scroll back down automatically if the user scrolled up
- TotalStatistics should now also work for the Roborock S7
- It is now possible to disable network advertisement (bonjour/mDNS and UPnP/SSDP) via the UI if you so desire
- The nonsensical always-attached dustbin attachment has been removed
- It is now possible to have 50% more virtual restrictions on roborock robots
Autogenerated changelog
Features
- ui: Allow setting the order of segments cleaned if support by the robot (9eec3b6)
- NetworkAdvertisementManager UI control (bd5fa9c), closes #1168
- core: Remove outdated VirtualWallCapability and RestrictedZoneCapability (5e24783)
- core: Remove SensorCalibrationCapability (5b081a7)
- mqtt: Collect runtime metrics and provide them via REST (dcc1db4)
- ui: Display firmware version if available (e78e9b4)
- ui: Display MQTTClient status (c54ebc8)
- vendor.roborock: Support S7 total statistics (d1926a9)
Bug Fixes
- core: Fix free memory reporting on kernels >= 3.14 (dceea16)
- miio: Don't throw plain objects on error responses (e84fe8c)
- miio: Fix RetryWrapper never handshaking on stale stamp (326cb4b)
- mqtt: Deduplicate outgoing messages (b835336)
- networkadvertisement: Replace ssdp lib with custom implementation (f5e505a)
- ui: Disallow whitespaces, + and # for mqtt topic customization (8148736)
- ui: Make the logviewer only auto-scroll if it is already scrolled down (3c24eba)
- vendor.dreame: Mapping passes can only be done by lidar-based robots (411fab5)
- vendor.dreame: Re-enable custom order segment cleanups and hope for the best (744a4bb)
- vendor.roborock: Fix roborock virtual restrictions counting vertices incorrectly (cc5e37b), closes #1423
- vendor.roborock: Properly parse and handle lab_status and map_status (e158ac4), closes #1424
- Remove nonsensical always-attached dustbin attachment (b9bd959)
- SegmentIds should be strings (6325045)
- SegmentIds should be strings pt2 (a8d314d)
- ui: Fix customOrder flag for segmentActions (07c5281)
Valetudo 2022.03.0
Ordered segment cleanups via the UI, MQTT deduplication and a lot of internal refactoring
Ordered segment cleanup
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.
MQTT
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.
Misc
- The system information page will now display the current robot firmware version if available
- The UI will now prevent the user from configuring invalid MQTT topic names (containing spaces, # or +)
- The UPnP/SSDP lib was dropped in favour of our own implementation, which should fix some unhandledRejections caused by the lib
- The log viewer now doesn't scroll back down automatically if the user scrolled up
- TotalStatistics should now also work for the Roborock S7
- It is now possible to disable network advertisement (bonjour/mDNS and UPnP/SSDP) via the UI if you so desire
- The nonsensical always-attached dustbin attachment has been removed
- It is now possible to have 50% more virtual restrictions on roborock robots
Autogenerated changelog
Features
- ui: Allow setting the order of segments cleaned if support by the robot (9eec3b6)
- NetworkAdvertisementManager UI control (bd5fa9c), closes #1168
- core: Remove outdated VirtualWallCapability and RestrictedZoneCapability (5e24783)
- core: Remove SensorCalibrationCapability (5b081a7)
- mqtt: Collect runtime metrics and provide them via REST (dcc1db4)
- ui: Display firmware version if available (e78e9b4)
- ui: Display MQTTClient status (c54ebc8)
- vendor.roborock: Support S7 total statistics (d1926a9)
Bug Fixes
- core: Fix free memory reporting on kernels >= 3.14 (dceea16)
- miio: Don't throw plain objects on error responses (e84fe8c)
- miio: Fix RetryWrapper never handshaking on stale stamp (326cb4b)
- mqtt: Deduplicate outgoing messages (b835336)
- networkadvertisement: Replace ssdp lib with custom implementation (f5e505a)
- ui: Disallow whitespaces, + and # for mqtt topic customization (8148736)
- ui: Make the logviewer only auto-scroll if it is already scrolled down (3c24eba)
- vendor.dreame: Mapping passes can only be done by lidar-based robots (411fab5)
- vendor.dreame: Re-enable custom order segment cleanups and hope for the best (744a4bb)
- vendor.roborock: Fix roborock virtual restrictions counting vertices incorrectly (cc5e37b), closes #1423
- vendor.roborock: Properly parse and handle lab_status and map_status (e158ac4), closes #1424
- Remove nonsensical always-attached dustbin attachment (b9bd959)
- SegmentIds should be strings (6325045)
- SegmentIds should be strings pt2 (a8d314d)
Valetudo 2022.02.0
Lots of UI changes and more polishing
Quirks
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:
Settings
Robot, Map and Connectivity settings have been reorganized/redone.
Wi-Fi and NTP state display has been redone as well:
Quality of Life
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.
Total Statistics
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.
Nightly builds
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
.
Misc
Autogenerated changelog
Features
- core: WifiScanCapability (a4fe895)
- ui: Add general help (ec298dc)
- ui: Add help for dnd, voice packs and the updater (84c8c04)
- ui: Add Map Management Help (9d62c26)
- ui: Add quirks help (77183ed)
- ui: Add total statistics page (#1330) (8fd0b2e)
- ui: Allow display of Wi-Fi passwords entered (89624eb)
- ui: Allow newlines in confirmation dialog (df2ee4f)
- ui: Another achievement (0ffbef4)
- ui: Extend map management help (e1514bc)
- ValetudoWifiStatus may contain a bssid (86fe2f2)
- ui: Allow display of entered passwords for mqtt and basic auth (4e75531)
- ui: Disable edit map tap interaction while not docked to reduce confusion (b68e444)
- ui: Improve achievement badges (7eea13e)
- ui: Improve NTP client state display (0a265a7)
- ui: More achievements (892017e)
- ui: Move map-related features to map management page (ea45f01)
- ui: Move Wi-Fi settings to connectivity (dff909c)
- ui: Provide an overview of all achievements (381e3cd)
- ui: Rename about page to system information (ad1dd16)
- ui: Restructure connectivity settings (bfe33e4)
- ui: Restructure robot settings (5c71be4)
- ui: Restructure routers and add about page (e3a1f13)
- updater: Add nightly builds (d1a0d91)
- vendor.dreame: Add auto empty interval quirk (1b6205a)
- vendor.roborock: Add quirks (7fc584a)
- vendor.viomi: Add quirks (#1369) (b369e4d)
- QuirksCapability (79deeb1)
- webserver: Allow IPv6 requests from own network (#1342) (165deff)
Bug Fixes
- mqtt: Fix consumables not being polled by the autorefresh (58d6267), closes #1355
- networkadvertisement: Attempt to catch issues of the ssdp lib (ee3154b)
- ui: Allow refetching when there are zero quirks (7f3ed2b)
- ui: Allow user-selection of wifi IP addresses (33c9470)
- ui: Allow user-selection of wifi IP addresses... again (2bdcea4)
- ui: Disable updater buttons when busy (f82ae1a)
- ui: Don't display updater warning if state is busy (4d5c781)
- ui: Don't provide the wifi configuration route if there is no wifi configuration capability (82e954e)
- ui: Fix about title (67a9a05)
- ui: Fix display of text in conjunction with controls in Map Management (1cc76c5)
- ui: Fix logviewer timestamp display for chrome (56f5ba0)
- ui: Fix map management not using unique keys for all options (2305b52)
- ui: Fix menu drawer scrollbars (4a6c9fa)
- ui: fix minor typo (#1341) (77e07ec)
- ui: Properly implement newlines in ConfirmationDialog (b8f8eb0)
- ui: Sort total statistics data points (a568c03)
- ui: use relativ paths to allow hosting in a subdirectory .. again (3007dbb)
- updater: Add missing...
Valetudo 2022.01.0
Quality of life improvements, bugfixes and more polishing. Also, Happy New Year :)
UI/UX Changes
Map Management
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.
Updater
The updater now auto-refreshes its state and provides more feedback.
It will also display the latest changelog if there's no update available.
Misc
- The UI now auto-refreshes if the backend version changed
- Visual consistency has been improved
- The title is now updated based on the page you're on which makes your browser history actually useful
- Hovering over some unlabelled buttons/icons should now give you a tooltip clearing things up
- You can now hover over the progress bars in the about page to get a tooltip for the value as well
- Info boxes answering common questions have been added to the connectivity page
- It should now be possible to use Valetudo in a sub folder of a reverse proxy again
MQTT Changes
Home Assistant 2021.12
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:
Bugfixes
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.
External Access
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.
Misc
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.
Autogenerated changelog
Features
- core: Remove DebugCapability (78c84de)
- ui: Add hover labels to system ram and load information (62ed252)
- ui: Add info boxes answering common questions to the connectivity settings page (9eae3e3)
- ui: Add link to the docs (88b810c)
- ui: Automatically refresh the page when the backend version changed (905ada1)
- ui: Change infobox icon (a82e1df)
- ui: Consolidate paths to a single svg (82bc46b)
- ui: Improve first-time usability by adding titles to buttons and more minor changes (6126718)
- ui: Improve segment edit help (17e1d5f)
- ui: Improve visual consistency (006b94b)
- ui: More space for mobile (6a6ba65)
- ui: Rework map management (4f51935)
- ui: Use non-swipable drawer for better performance (25298a0)
- updater: Display changelog of latest release when in noUpdateRequired state (ce0c675)
- updater: Introduce busy state to provide better user feedback (4e9ed3d)
- webserver: Attempt to block external access to valetudo (10b1662)
Bug Fixes
- updater: fix(updater): Use busy state flag instead of busy state (d122efcb)
- core: Use sysfs to reliably determine the unique system identifier in all network conditions (8d74825)
- mqtt: Don't try to publish anything if there is no mqtt connection (9051ac0)
- mqtt: Fix mqtt getting stuck forever requiring a restart (42a5613)
- mqtt: Force disconnect if it takes longer than 1500ms (ced9ee1)
- mqtt: More .disconnect() fixes (322efcc)
- networkadvertisement: Attempt to watch for network state changes to fix advertisement after initial provisioning (7a2c3d1)
- ui: Redraw map on visibilityState change to fix map not being updated if the tab was invisible for too long (1c86152)
- ui: use relativ paths to allow hosting in a subdirectory (1e73947)
- vendor.dreame: Ignore more irrelevant property updates (9e4e202)
- webserver: Handle aborted connections gracefully (b3e8024)
Valetudo 2021.12.1
Map data format changes, quality of life improvements and bugfixes.
Changes in 2021.12.1
As expected, something would go wrong with the map data format change.
This is a bugfix release, so 98% of the previous changelog still apply.
In 2021.12.0, if you have rooms that aren't rectangular, it might happen that the triangle to select it vanishes, leading to you being unable to trigger a segment cleanup using the UI.
This happened because in those cases, the UI calculates the median pixel coordinates to properly place the triangle.
This value isn't calculated by the backend, because it is an expensive operation, and we're both RAM and CPU-limited there.
To calculate the median, the UI needs the decompressed pixel coordinate format.
This works exactly once during the initial render, because of the MapLayerRenderer doing the pixel decompression on the map passed by reference to it.
As soon as the WebWorker is available however, this doesn't happen anymore, as the worker only receives a copy of the data.
This means that there are now 0 pixels as far as the SegmentLabel is concerned, leading it to be placed at coordinates [NaN,NaN]
.
Since testing is done locally without constant map updates, everything seemed fine during development.
Another thing discovered due to this bug was that the GithubValetudoUpdateProvider did not filter out pre-releases or drafts.
Not a big issue though as it just requires you to update twice in a row.
Anyways, on with the 2021.12.0 changelog:
Map data format changes
This release features the first version increment of the ValetudoMap data format.
Initially, in version 1, pixel data such as walls or floor were stored as a huge array of coordinate pairs:
[x0, y0, x1, y1, ...]
. This was not a very efficient way of storing that data as most of it is redundant.
This resulted in map files that were over 1 MiB in size being pushed to your browser every 3 seconds.
To combat this, some thought was put into how the data is stored.
If you have a row of pixels, all of them will have the same y-coordinate, meaning that you only have to store that once.
People already figured that out in the 60s.
With Map V2, pixels are stored as [xStart0, y0, count0, xStart1, y1, count1, ...]
where [xStart, y]
is the starting point and count
represents additional pixels with the same y-coordinate to the right.
This resulted in V2 map files using between 5% and 15% of the size of the equivalent V1 map.
The huge testfile map for example was compressed from 847 kB to 75 kB.
While this is a breaking change, the breakage actually isn't that big of a change as V2 can easily be converted back to V1.
In fact, running JSON.parse()
on a V2 map and then converting it to a V1 one in memory is more than twice as fast as running JSON.parse()
on a V1 map.
Since this change drastically reduces the traffic caused by live maps, I expect to see general usability and reliability
improvements in situations where the Wi-Fi reception isn't that great.
LogViewer
The LogViewer has been greatly improved and now features a structured and color-coded view of your log.
You can use the text filter at the top to either filter for the loglevel or the message contents.
Just start typing.
UI Help
Both consumables and timers now feature a help button, which shall explain how to use these features.
Misc
- Map reset on newer roborock models should now be fixed thanks to @supersmile2009
- Zooming the map should now work much better if you zoom via a touchpad or trackpoint instead of a mousewheel
- MQTT current statistics now have a unit_of_measurement in HA
- Lowmem builds now have a reduced map poll rate to reduce memory pressure
- Valetudo now manages its logfile size to prevent it from growing indefinitely
Autogenerated changelog
Features
- logger: Automatically clear the logfile when it gets too large (c0698b4)
- Reduce map polling interval for lowmem hosts (fcf94ce)
- ntpClient: Improve log messages (8880bbf)
- ui: Add help button + modal to consumables view (d1388f1)
- ui: Add timers help (c864170)
- ui: Implement LogViewer component (1b96ae0)
- ui: Remove obsolete about > github release info (253d9f9)
- ui: Swap Manual control cw & ccw rotation button (44eab06)
Bug Fixes
- ui: Automatically refresh the updater state (596dc06)
- ui: Transparently decompress the v2 map data in the api client (0bcb974), closes #1262
- updater: Ignore github release drafts and prereleases (ad97a14)
- ui: Try avoiding bright flashes on initial loading (f84a51d)
- Fix log sse endpoint (fd6f0e2), closes #1256
- mqtt: Fix unit_of_measurement for current statistics and consumables (7f052dc)
- ntpClient: Delay initial ntp sync to wait for valetudo to start up properly (727af04)
- ui: AppBar and menu should not be user-selectable (69754b7)
- ui: Cleanup unused code (c050940)
- ui: Fix map zoom behavior for trackpoint and trackpad scroll zoom (ca94600)
- ui: Updater changelog should stay in its constraints (5d815bf)
- updater: Ensure that there is enough space besides process.argv0 to store the new binary (c298e98)
- vendor.dreame: Fix wrong segment iteration count (9fd9c17)
- vendor.dreame: There are actually no firmware limits for virtual restrictions (8a8b536)
- vendor.roborock: Fix resetting incomplete map on Roborock. Detect and reset current map slot. (#1252) (ba86057)
- Fix CurrentStatistics UI refresh (93249ad)
- ui: Fix LogViewer overflow-wrap (4799027)
Valetudo 2021.12.0
Map data format changes, quality of life improvements and bugfixes.
Map data format changes
This release features the first version increment of the ValetudoMap data format.
Initially, in version 1, pixel data such as walls or floor were stored as a huge array of coordinate pairs:
[x0, y0, x1, y1, ...]
. This was not a very efficient way of storing that data as most of it is redundant.
This resulted in map files that were over 1 MiB in size being pushed to your browser every 3 seconds.
To combat this, some thought was put into how the data is stored.
If you have a row of pixels, all of them will have the same y-coordinate, meaning that you only have to store that once.
People already figured that out in the 60s.
With Map V2, pixels are stored as [xStart0, y0, count0, xStart1, y1, count1, ...]
where [xStart, y]
is the starting point and count
represents additional pixels with the same y-coordinate to the right.
This resulted in V2 map files using between 5% and 15% of the size of the equivalent V1 map.
The huge testfile map for example was compressed from 847 kB to 75 kB.
While this is a breaking change, the breakage actually isn't that big of a change as V2 can easily be converted back to V1.
In fact, running JSON.parse()
on a V2 map and then converting it to a V1 one in memory is more than twice as fast as running JSON.parse()
on a V1 map.
Since this change drastically reduces the traffic caused by live maps, I expect to see general usability and reliability
improvements in situations where the Wi-Fi reception isn't that great.
LogViewer
The LogViewer has been greatly improved and now features a structured and color-coded view of your log.
You can use the text filter at the top to either filter for the loglevel or the message contents.
Just start typing.
UI Help
Both consumables and timers now feature a help button, which shall explain how to use these features.
Misc
- Map reset on newer roborock models should now be fixed thanks to @supersmile2009
- Zooming the map should now work much better if you zoom via a touchpad or trackpoint instead of a mousewheel
- MQTT current statistics now have a unit_of_measurement in HA
- Lowmem builds now have a reduced map poll rate to reduce memory pressure
- Valetudo now manages its logfile size to prevent it from growing indefinitely
Autogenerated changelog
Features
- logger: Automatically clear the logfile when it gets too large (c0698b4)
- Reduce map polling interval for lowmem hosts (fcf94ce)
- ntpClient: Improve log messages (8880bbf)
- ui: Add help button + modal to consumables view (d1388f1)
- ui: Add timers help (c864170)
- ui: Implement LogViewer component (1b96ae0)
- ui: Remove obsolete about > github release info (253d9f9)
- ui: Swap Manual control cw & ccw rotation button (44eab06)
Bug Fixes
- ui: Try avoiding bright flashes on initial loading (f84a51d)
- Fix log sse endpoint (fd6f0e2), closes #1256
- mqtt: Fix unit_of_measurement for current statistics and consumables (7f052dc)
- ntpClient: Delay initial ntp sync to wait for valetudo to start up properly (727af04)
- ui: AppBar and menu should not be user-selectable (69754b7)
- ui: Cleanup unused code (c050940)
- ui: Fix map zoom behavior for trackpoint and trackpad scroll zoom (ca94600)
- ui: Updater changelog should stay in its constraints (5d815bf)
- updater: Ensure that there is enough space besides process.argv0 to store the new binary (c298e98)
- vendor.dreame: Fix wrong segment iteration count (9fd9c17)
- vendor.dreame: There are actually no firmware limits for virtual restrictions (8a8b536)
- vendor.roborock: Fix resetting incomplete map on Roborock. Detect and reset current map slot. (#1252) (ba86057)
- Fix CurrentStatistics UI refresh (93249ad)
- ui: Fix LogViewer overflow-wrap (4799027)
Valetudo 2021.11.1
Bugfixes, polishing, two minor breaking changes and new features.
Don't forget: If you're running Valetudo 2021.11.0, you can now use the integrated updater :)
UI
Polishing
- Controls in the UI were slightly rearranged/reworked.
- The mobile controls drawer now works slightly different and more importantly more reliably with better performance (+ 50kb less bundle size).
- There's a neat loading splashscreen, which you should only see for longer than a second if your Wi-Fi sucks
Provisioning
The UI now checks if the robot is connected to a Wi-Fi network and if not opens a special provisioning page.
It's pretty neat and also fixes the issue of Dreames not being provisionable with the new UI.
Backend
CurrentStatisticsCapability
Statistics related to the current (or most recent) operation of the robot are now back.
Yes, they are also being published to MQTT. Stop asking.
Data is published to MQTT as machine-readable (seconds for runtime, cm² for the area) as it is meant to build automations with it.
Using cm² instead of m² saves us from having to deal with floats.
TotalStatisticsCapability
More importantly, you can now get total statistics from your robot.
Depending on your model those can be
- Total operation count
- Total runtime
- Total area
This isn't available via the UI yet as it is yet TBD how to do that.
Maybe have like badges, achievements or a rank system?
Maybe have random trivia related to the numbers? (e.g. having cleaned 0.0001% of the Saarland)
Feel free to leave your input in the comments. Like, subscribe and click the bell icon
If you're good with graphics design, something like e.g. a Corporal IV vacuum robot badge would be a great contribution.
Zeroconf hostname changes
By actually reading the relevant RFCs, we've discovered that valetudo_something.local
is not a valid bonjour hostname as the _
is illegal.
While it does seem to work in most setups, it might cause problems in some, which is why starting with this release, Valetudo will use an RFC-compliant hostname: valetudo-something.local
.
Please update your bookmarks if you were using any.
MQTT
Home Assistant 2021.11 MQTT Changes
Valetudo 2021.11.1 makes use of new features introduced in Home Assistant 2021.11 (namely configuration_url
and entity_category
).
This means that Home Assistant >= 2021.11 is now required if you want to use it with Valetudo.
You might also have to delete your Valetudo device in HA and let it get rediscovered so that the changes are applied properly.
It now looks like this:
Possible MQTT OOM fixes
We have received unconfirmed, unsubstantiated and possibly falsified reports of Valetudo going OOM related to Wi-Fi connectivity issues and the MQTT interface.
To combat this, Valetudo now drops any outgoing MQTT message if there are more than 1 MiB of outgoing messages buffered. This may or may not ever happen.
If you see a warning in your log related to this, please report back. I have not been able to reproduce this.
Homie Consumables
Home consumable durations are now reported as an int. This should fix issues with OpenHab.
Bugfixes
Dreame paths
Dreame paths now parse to multiple path map entities instead of a single one, which fixes the visual with lines going straight across the map connecting the previous path to the next one.
Consumers of the Valetudo map data might have to be updated to properly display multiple path entities.
1C-related fixes
I've bought a Dreame 1C to do some QA, which led to a few fixes.
I'm now quite happy with the current state of its implementation in Valetudo.
Autogenerated changelog
Features
- core: CurrentStatisticsCapability (8e4e183)
- core: CurrentStatisticsCapability & TotalStatisticsCapability properties (4fc9df2)
- core: Introduce ConsumableMonitoringCapability properties and remove mqtt consumables hack (a998ee1)
- core: TotalStatisticsCapability (55b6696)
- MockRobot: Add MockCurrentStatisticsCapability + fix MockConsumableMonitoringCapability (bda0b1a)
- mqtt: Homie consumables should always be int (c39ad93)
- mqtt: Limit outgoing message buffer size to prevent OOM situations (1a74f91)
- mqtt: Publish current statistics to mqtt (102a078)
- ui: Add Valetudo loading splash (a7ca33c)
- ui: Collapse preset selection controls (4f8aaec)
- ui: Display current statistics (0fbc182)
- ui: Slightly decrease required zoom level for segment label text (08209a3)
- vendor.dreame: Total and current statistics for the 1C (c1a51e9)
- Provision Wizard thingy (a6f6ded)
- ui: Reorder state display (828e54d)
- ui: Replace bottom sheet with simpler mobile controls (17ff7ec)
- vendor.dreame: DreameCurrentStatisticsCapability (656a19e)
- vendor.dreame: DreameTotalStatisticsCapability (4bb9342)
- vendor.roborock: RoborockCurrentStatisticsCapability (93aa77b)
- vendor.roborock: RoborockKeyLockCapability (#1222) (02e155c)
- vendor.roborock: RoborockTotalStatisticsCapability (e0cbbff)
- vendor.viomi: ViomiCurrentStatisticsCapability (9dd1091)
- webserver: Add 404 page (8f5095c)
Bug Fixes
- mqtt: Attempt to mitigate problems related to connectivity issues (cf0f2d6)
- mqtt: homie.durationsAsInteger should not be a breaking change (bbd918a)
- ui: Align preset selection labels with icons (c6803f6)
- ui: Attachment buttons should be disabled (922572a)
- ui: Fix CurrentStatistics trying to map something that isn't an array (4d6f3d8)
- ui: Fix mobile control scrolling (6264400)
- ui: Only check for provisioning once (6bd0480)
- ui: Only regular mouse clicks should interact with the map (d452d88)
- ui: Preset selection labels should not be user selectable (965a061)
- ui: Swap presetSelection open/close icons (380109b)
- ui: The whole controls body should not be user-selectable (861f15f)
- vendor.dreame: 1C shall ignore persistent map property updates (5744346)
- vendor.dreame: Assume that we're in the docked state if we're charging on the 1C ([c73e062](https://githu...
Valetudo 2021.11.0
Likely the most important release of the year.
Recap 0.6.1 to 2021.11.0
Apparently, Valetudo 0.6.1 was released only a bit more than a year ago, but tbh it feels like an eternity.
So much has changed since then. The iteration speed of the project has been insane in the last months.
As we've now finished most if not all of the huge tasks, I expect things to slow down a little.
Here's a quick recap of what happened since 0.6.1:
- Complete core rewrite to easily support multiple vendors and different robots
- A proper REST-API documented with Swagger UI
- Complete MQTT rewrite to support Home Assistant as well as Homie
- Easy map display in Home Assistant via MQTT and the custom lovelace valetudo map card
- Complete UI rewrite based on a proper UI framework
- Support for all relevant features of the robots
- Support for autodiscovery of Valetudo-enabled robots via mDNS and SSDP
- Support for Dreame-made robots
- An android companion app that makes use of said autodiscovery feature
- Valeronoi: A companion app that generates Wi-Fi signal strength maps using Valetudo
- An updater functionality
- Proper docs
- General polishing. A lot of it
Default new UI
Starting with this release, the new react-based UI introduced by @Jomik with large contributions by @ccoors is now the default.
The existing map renderer was ported to react with a few quality of life improvements:
- You can now specify an iteration count when cleaning segments or zones
- Layers are now sorted, meaning that walls will always be on top. This solves some visual issues of vSlam-based devices
- Adding a new zone/virtual wall/etc. will now spawn it in the middle of your viewport
- Map segment labels now attempt to actually be inside the segment they're for. This fixes issues with cornered hallways. No more stray triangles
- Editing the map will now refresh your current view instead of navigating back
- Rendering has been partly moved to a webworker for improved performance
Speaking of navigating back: Given that the new UI is based on a frontend framework including proper routing,
we now have a working back button. Amazing!
The only thing not yet available in the new UI is management of Zone and GoTo presets. This will be added later.
For now, please navigate to the old UI via the menu and use that.
Screenshots
Phone/Mobile
Tablet/Desktop
Updater
Starting with this release, Valetudo will be capable of updating itself with the press of a button.
This has been a long-requested feature and considering how mature this whole project has become, I decided that
it was finally time to actually implement that.
As it is implemented now, it uses the GitHub API by default, meaning that I am not able to track you.
There's also no automatic update check, because periodical pings to some cloud service are obviously problematic.
You will decide when to press the "Check for Updates" button and also when to update.
More stickers
I've decided to get a few more stickers printed because merch
Misc
I'm currently looking for a job that isn't a corporate hellhole with nice people doing interesting stuff.
If you're a likeminded hacker looking for a new colleague or know someone who does feel free to ping me
Thanks :)
Autogenerated changelog
Features
- ui: Add Valetudo logo to bottom sheet (76eeaff)
- ui: Bring back the old map renderer (7aa6822)
- ui: Change map colors according to theme in use (b17745e)
- ui: Fan speed icon and battery level bar improvements (d0a0671)
- ui: Improve controls (b678cda)
- ui: Map Editing (35feb65)
- ui: Move locate to the map view (32de2b8)
- ui: Place new client structures in the middle of the viewport (d9d2a64)
- ui: Remove map transparency (ace000b)
- ui: Remove obsolete segment controls (9912cf5)
- updater: Introduce ValetudoUpdaterNoUpdateRequiredState (354028e)
- Updater (5db2c55)
- ui: Remove Accordion from interface settings (c4c31bb)
- ui: Set the new UI as the default (c0f90fb)
- ui: Use a WebWorker for rendering the map layers when possible (3eafded)
- ui: Use real swagger icon in sidebar (#1160) (f4c0093)
- ValetudoEvents: Add Mop Attachment Reminder event (ac268d7)
- Add nonce to every instance of a Valetudo map (f0489f1)
Bug Fixes
- Fix MopAttachmentReminderValetudoEvent not being a DismissibleValetudoEvent (302f6ce)
- mqtt: Fix consumable state attribute data being published multiple times (894bba9)
- mqtt: Fix zone cleanup (#1130) (bb951b2)
- mqtt: Hopefully avoid a deadlock (c3313ea)
- ui: Allow more states for zone/segment cleanup and goto (c738938)
- ui: Better placement of segment labels (ba788a0)
- ui: Combinations of scrolling and touch events also should not cause any jank (e36c40f)
- ui: Fix controls jumping around when there is a status flag (c641fb1)
- ui: Fix draw order for ControlsBottomSheet (c46ef10)
- ui: Fix SSE not reconnecting after having closed the connection once (6feaaf8)
- ui: Further improve segment label placement using the median (6545cc7)
- ui: Ignore map updates if the tab is invisible (370753d)
- ui: MQTT port is an integer (#1159) (5b91c96)
- ui: Postpone map data updates during pan/zoom to prevent jank (92a9147)
- ui: Postpone map data updates during scroll to prevent jank (adcd117)
- ui: Prevent issues with zooming on mobile (a5057fd)
- ui: Use the correct canvas size for the map layer renderer ([b55ffa6](https://g...