Valetudo Versions Save

Cloud replacement for vacuum robots enabling local-only operation

2021.07.0

2 years ago
valetudo

2021.07.0

This release includes, SSDP and Zeroconf advertisement, an Event/Notification feature some bugfixes and lowmem optimizations.

Network advertisement

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:

image

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.

ValetudoEvents

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.

Runtime Reuse

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.

S5 Max Map issues

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.

Misc

  • To help with debugging, you can now enable an option in the config file to store all uploaded maps in the filesystem.
  • Resetting the Map will now also invalidate the map cached by Valetudo to reduce confusion.

Autogenerated changelog

Features

  • Network Announcement via SSDP/UPnP and mDNS/Zeroconf/Bonjour (c158d77)
  • core: MappingPassCapability (1b09cde)
  • core: PendingMapChangeHandlingCapability (ed0455d)
  • miio: Add easy way to store uploaded maps for debugging purposes (547f8c1)
  • vendor.dreame: Add Support for the L10 Pro (2f618c0)
  • vendor.dreame: DreamePendingMapChangeHandlingCapability (d972121)
  • vendor.dreame: Handle more properties (421e7de)
  • vendor.dreame: MappingPassCapability (7f9322b)
  • Set OOM Score Adj when embedded (6de2f06)
  • ValetudoEvents (aa15238)
  • vendor.dreame: Map fast mapping status (021213e)
  • vendor.dreame: Sensor consumable (4c1e319)

Bug Fixes

  • core: Reverse event order (a829ba5)
  • vendor.dreame: Fix segment cleanup via mqtt (5dbb9d0)
  • vendor.dreame: Fix status mapping and ignore irrelevant property change (68c1c0c), closes #969
  • vendor.dreame: Handle more properties (6a834c8)
  • vendor.dreame: Handle sensor consumable push (cc8b7a5)
  • vendor.dreame: Handle sensor consumable push (4276c36)
  • vendor.dreame: Handle uploaded multi-map jsons (01486b8)
  • vendor.dreame: Revert Fix status mapping (8db8b6f)
  • vendor.dreame: Segments from rism might not apply in some situations (e1161cf)
  • vendor.dreame: There actually is a difference between pause and stop (6da5dc4)
  • vendor.roborock: Add filename to map upload url (90b7346)
  • vendor.roborock: Enable S7 Water Pump Control + No-Mop-Zones (f699a55)
  • vendor.roborock: MapSnapshots are only available on Gen2 robots (0752de2)
  • vendor.roborock: MapSnapshots IDs are strings in valetudo but numbers for roborock (361dffa)
  • webserver: Remove unused parameter (d27e3b1)
  • Fix missing git commit id (40ca9cb)
  • Fix OOM-issues caused by SSE connections (a0371f4)
  • Further tweak forced garbage collection (c70393a)
  • Further tweak SSE settings (40d16f5)
  • Further tweak SSE settings (cb8e01e)
  • Resetting the map should also clear the Map cached by Valetudo (e70041f)
  • vendor.roborock: Multi-Map capable roborock robots use a different command for map resets (2bbd86f)
  • Further tweak SSE settings (8eae178)
  • vendor.viomi: Set correct env variables (#979) (5fd4a6a)
  • vendor.viomi: Set correct ssh key location (b15c707)
  • Try logging everything we can get about process memory before committing sudoku (6578a99)
  • Tweak forced garbage collection (d905864)

2021.06.0

2 years ago
valetudo

2021.06.0

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.

Swagger UI

image

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.

image

UI support of course coming soon.

Config file Schema Validation

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.

Other noteworthy changes

NodeJS v16.4.0

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.

MQTT ignores retained messages

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.

System REST Endpoints

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
  ]
}

Code Compression

Due to the switch to vercel/pkg 5.3.0, Valetudo now uses the code compression feature, which results in smaller binaries.

Memory Usage

MQTT Map compression is now streamed, which may or may not improve memory usage on 256mb ram robots.

Autogenerated changelog

Features

  • mqtt: Ignore received retained message to work around common user errors (26d8a4c)
  • mqtt: Stream map serialization to improve memory usage with large maps (98b2757)
  • timers: Add endpoint which returns timer actions supported by this robot (fe1fa88)
  • timers: add ValetudoGoToTimerAction (#953) (d8a523e)
  • vendor.roborock: Add support for the Roborock S7 (c9ccb4a)
  • webserver: Add SystemRouter (efc46e6)
  • webserver: Normalize reported system load (b384ac3)
  • webserver: Streamed compression of some heavy requests (0d7d836)
  • webserver: Validate actual endpoint existence against openApi schema (f7cee31)
  • Swagger Docs (7842d9e), closes #892
  • Validate configuration file and create a new one on error (39e4613)

Bug Fixes

  • configuration: Add migration for invalid mqtt port type (1220aa5)
  • miio: Allow setting new wifi credentials when provisioned (32a12cf), closes #657
  • mqtt: Calling GoTo Presets should use regular strings and not json strings (ec975aa), closes #960
  • mqtt: Use semaphore to avoid reconfigure race condition (5b4b377)
  • ntpclient: Reduce loglevel of more error codes to avoid confusion (ec4ee08)
  • ui: Allow resetting map when PersistentMapControl is unavailable (#954) (bc8feb9)
  • ui: Hide defunct zones button (ae7c059)
  • vendor.dreame: Handle some previously unhandled messages (810a212)
  • webserver: Fix SystemRouter units (fd908f6)
  • webserver: os.freemem() isn't what it appears to be (80743f4)
  • webserver: Properly report memory info for kernels older than 3.14 but newer than 2.6 (9000f51)

2021.05.0

2 years ago
valetudo

2021.05.0

This release features mostly bugfixes, unfinished features and a hostile takeover.

MQTT Rewrite

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-yet finished things

Not everything in this section is already part of this release.

UI Rewrite

@jomik is still working on the rewrite of the Valetudo UI. It's already looking fantastic:

image image

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.

Timers

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.

Dreame Support

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.

Freenode hostile takeover

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:

image

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

Autogenerated changelog

Features

  • vendor.dreame: Add iteration count to MapSegmentationCapability (05b338f)
  • Timers (7b8c37a)
  • ntpClient: Keep track of the current state and enable configuration via REST (e350eba)
  • vendor.dreame: 1C: Add/fix various Map & Volume capabilities (#915) (c88df12)
  • vendor.roborock: Add support for ordered segment cleanup with multiple iterations (2541113)
  • vendor.viomi: Implement DND capability (#877) (dd05c51)

Bug Fixes

  • miio: Better map upload logline (0e7ce7c)
  • mqtt: Allow strings as segment IDs (#891) (3e30414), closes #889
  • mqtt: Always publish state (6a041c6)
  • mqtt: Only migrate HAss topics if enabled (#912) (eb2edaf)
  • mqtt: Publish state for both hass and homie, as the hass device availability_topic is set to the same topic (#860) (219bc34)
  • mqtt: Remove unnecessary availability_topic (#859) (aa85205), closes #858
  • ntpClient: Support disabling the ntpClient (949d8e3), closes #925
  • timers: Copy-paste antipattern (e331eda)
  • timers: Fix zoned scheduled cleanup (34443b3)
  • ui: DND should be rendered as localtime but stored as UTC (fd79163)
  • vendor.dreame: Ignore uploaded multi-map data (6f3dcc5)
  • vendor.roborock: Handle DND as UTC (8fc9ea8)
  • vendor.roborock: Roborock only accepts int coordinates (c7efd6a)
  • Print error message when failing to load config file (#914) (9ebda7e)
  • vendor.roborock: Remove invalid RoborockCombinedVirtualRestrictionsCapability from V1 robot (5a2bae4)
  • vendor.viomi: Fix system timezone in init script (#876) (908d5dd)
  • vendor.viomi: Syntax error in init script (2d53b7c)
  • vendor.viomi: Viomi minor bugfixes (#820) (4742214)

2021.04.0

3 years ago
valetudo

2021.04.0

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

Newcomer Guide

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.

MQTT Rewrite

@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.

Home Assistant MQTT Rewrite FAQ

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:

  1. Go to the MQTT settings
  2. Disable MQTT, enable "Delete autodiscovery on shutdown" under "Home Assistant Autodscovery".
  3. Save MQTT configuration
  4. Check Hass to ensure everything has disappeared, refresh the page as needed.
  5. Enable MQTT, disable "Delete autodiscovery on shutdown" under "Home Assistant Autodscovery".
  6. Save MQTT configuration

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

Segment Renaming

Valetudo now supports (re-)naming segments and cleaning them from the UI Homepage in the same way you'd trigger a ZonePreset cleanup.

image

Water Usage Control and No-Mop Zones

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.

image image

Lowmem enhancements

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.

UI

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.

Musl

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

Dreame Support

The Dreame 1c support has been greatly improved thanks to the help of @frankZZ

Public root coming soon™

Autogenerated changelog

Features

  • core: Collect our own garbage (3c3df9a)
  • core: MapSegmentRenameCapability (6371291)
  • MockRobot: add GoToLocationCapability and MockMap (2957e25)
  • MockRobot: add MapResetCapability (531498b)
  • MockRobot: Add MockCarpetModeControlCapability (#759) (5bd5fb7)
  • MockRobot: Add MockConsumableMonitoringCapability (6d8b8e0)
  • MockRobot: Add MockDoNotDisturbCapability (f85194c)
  • MockRobot: Add MockWifiConfigurationCapability (accba05)
  • MockRobot: add PersistentMapControlCapability (f91e8e7)
  • MockRobot: Add speaker capabilities (12d1a27)
  • mqtt: Add MapSegmentationCapabilityMqttHandle (#842) (0534888)
  • mqtt: Add vacuum error state description property (#850) (14793c7), closes #816
  • mqtt: Await MQTT disconnect before proceeding with shutdown (1c0410c)
  • mqtt: Provide segment information (f104189)
  • mqtt: Remove increase/decrease from intensity capability (#843) (e6fd6e4)
  • ui: Add dialog for renaming segments (#772) (306b8ba)
  • ui: add Segments on home (2129e22), closes #773
  • ui: capitalize robot states in UI (#765) (c988e69)
  • ui: Generate consumables list dynamically (#764) (05d658b)
  • ui: Snap zones and walls to grid and reasonable angles to implement #796 (25836e8)
  • ui: Toggle button states depending on Robot Capabilities (#769) (cc66d52)
  • ui: Water Usage Control (cf375ce)
  • vendor.dreame: 1C voicepack install support (#795) (b72ca53)
  • vendor.dreame: Add Dreame F9 (4fe0ff7)
  • vendor.dreame: Add more 1C variants (9e2e194)
  • vendor.dreame: Add MOVA Z500 (0107932)
  • vendor.dreame: DreameCarpetModeControlCapability (2d674d4)
  • vendor.dreame: DreameMapResetCapability (f60fe24)
  • vendor.dreame: DreameWaterUsageControlCapability (8be7cd4)
  • vendor.viomi: Add viomi.vacuum.v6 to supported devices (#849) (a18633c), closes #848
  • webserver: Add X-Valetudo-Version header (d494510)
  • Debug capability (#813) (4866475)
  • Remove DNSHack since we're using musl now (79194b6)
  • SSE Endpoints for State and StateAttributes (c90d426)
  • vendor.dreame: 1C active zone & segments (2281701)
  • vendor.dreame: DreameMapSegmentRenameCapability (1470c53)
  • vendor.dreame: Implement/setup most capabilities of the 1C (256b907)
  • vendor.dreame: Update 1C properties_changed handling (83dddfe)
  • vendor.dreame: Use currently configured water grade and fanspeed when starting a zone or segment cleanup (200b13b)
  • vendor.roborock: RoborockManualControlCapability (59b9bd5)
  • vendor.roborock: RoborockMapSegmentRenameCapability (4d6a1a4)
  • vendor.roborock: RoborockWaterUsageControlCapability (fdebd3c)
  • vendor.viomi: Add MapResetCapability (#785) (696d76b)
  • vendor.viomi: Add ViomiMapSegmentationCapability (#762) (1a9eef4)
  • vendor.viomi: Add ViomiMapSegmentRenamenCapability (0123f24)
  • vendor.viomi: Manual control capability (#740) (a5324e8)
  • vendor.viomi: ViomiMapSegmentEditCapability (#766) (a210b0e)
  • no-mop zones (f011023)

Bug Fixes

  • core: Add name to ValetudoMapSegment (e9da2cf)
  • core: Lowmem enhancements (5787afa)
  • core: Segment IDs should be strings (97c832e)
  • miio: Improve error message on missing keys in device.conf (7ed177a)
  • mqtt: Await close event before considering MQTT closed (1afa717)
  • mqtt: Do not disconnect on cfg reload if not connected (5c74342)
  • mqtt: Handle nested reconfiguration (#841) (c0ff5ce)
  • mqtt: Make BasicCtl actually home when HOME is sent (8272dd5)
  • mqtt: Map zone presets to zones (#839) (8ac882f)
  • mqtt: Remove test leftovers from consumable monitoring (#831) (ec289a0)
  • ui: instead of hiding settings based on capabilities at page load, unhide at page load (#774) (e5f0f4f)
  • vendor.roborock: do not send empty layers (#809) (a2e1c21)
  • vendor.roborock: Don't store null to this.state.map on map parse failure (ae4bf24)
  • vendor.roborock: Fix segment rename (0bed81a)
  • vendor.roborock: Fix V1 capabilities (6cdcc1e)
  • vendor.roborock: Renaming map segments always requires the full list of names (559d1ad)
  • vendor.roborock: Roborock expects a number as the segmentId (1e6db81)
  • vendor.viomi: Don't store paths with zero points (77e7128)
  • vendor.viomi: Fix "Unknown water grade" (#784) (04f2df4)
  • vendor.viomi: Fix basic control functionality (#782) (a0fa7f4)
  • vendor.viomi: Fix last clean time (#822) (21b5876)
  • vendor.viomi: Fix map issues (hopefully) (#819) (07a1c7a)
  • vendor.viomi: Fix operation mode selection (710758d)
  • vendor.viomi: Fix water grade controlling fan speed instead (#791) (3f4d844)
  • vendor.viomi: Increase timeout for set_timezone (#806) (a128a91), closes #799
  • vendor.viomi: Raise default miIO timeout (#817) (5f6068d)
  • vendor.viomi: replace fanSpeeds with waterGrades (#825) (2b5d3e6)
  • vendor.viomi: Viomi segment edit fixes (#821) (5c8495c)
  • Improve state handling in MockConsumableMonitoringCapability (1138c84)
  • MapParsers should not return empty path map entities (371ceea)
  • Typo in ConsumableStateAttribute (7d64a1a)

2021.03.0

3 years ago
valetudo

2021.03.0

This release features segment editing, SVG path and icon rendering, and a cool new companion service.

Segment editing

Yep. It's finally here.
Starting with this release, you can split and merge your Segments, which you might also refer to as Rooms.

image

If this was the only thing holding you back from switching back to Valetudo: Welcome back.

SVG Path + Icons

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:

image

Furthermore, this might also improve performance. In any case, I'm quite happy with how good zooming in looks now.

Valeronoi

@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!

image

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.

More Valetudo Builds

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.

Misc

VoicePacks

@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.

MockRobot

@alexkn added a MockRobot to make development easier and enable you to contribute to Valetudo even if you don't have a robot around.

ID Button

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 ¯_(ツ)_/¯

Git Commit UI Info

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.

Docs

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.

Autogenerated changelog

Features

  • core: Log and display git commit id (2d94408)
  • MockRobot: add BatteryStateAttribute (584bfcb)
  • MockRobot: add ModelName (db643c6)
  • MockRobot: add returning state to BasicControlCapability (721cd78)
  • MockRobot: introduce MockRobot (96c4bae)
  • MockRobot: MockLocateCapability (#752) (5c41d49)
  • ui: Add info button which shows the id of a zone or location preset (ea7cce4)
  • ui: Draw path as SVG (48e5d54)
  • ui: Nice rounded paths (59aaee3)
  • ui: Render icons as SVGs (12f2907)
  • ui: Segment editing (e306569)
  • vendor.dreame: DreameVoicePackManagementCapability (f9d6ab1)
  • vendor.dreame: Fully implemented segment joining + splitting (82e4fe3)
  • vendor.roborock: Add support for the S4 Max (#699) (f7eb451)
  • vendor.roborock: RoborockVoicePackManagementCapability (d81befc)
  • vendor.viomi: Ensure timezone is UTC (#732) (bafa158), closes #728
  • vendor.viomi: initial implementation of ViomiZoneCleaningCapability class (#675) (f760137)
  • vendor.viomi: Speaker control capabilities (#738) (630d2ab)
  • vendor.viomi: ViomiCarpetModeControlCapability (#739) (fe31438)
  • webserver: Fully implemented MapSegmentationCapabilityRouter (eda7dcd)
  • Add os.freemem() to debug memoryStats (5c7dfc3)
  • Add voice pack managemenet capability (#725) (c953e2b)

Bug Fixes

  • ui: Fix map canvas size (3c05e2d)
  • Fix default map (25eac7c)
  • dnshack: Don't try resolving ip addresses (b8c456d)
  • logger: Use the windows equivalent of /dev/null on windows machines (fa8f909)
  • miio: Bind dummycloud after setting event listeners (#741) (2aba77e)
  • miio: Discard handshake packets with older stamps to avoid endless loops with 100% cpu (e274cf1)
  • miio: Fix broken development token refresh (9217f70)
  • miio: Fix Valetudo crashing due to missing onMessage function (4512fe0)
  • miio: Various fixes related to Valetudo crashing in some situations (a62d7e3)
  • mqtt: Log on command-less custom command json (3fa8232)
  • ui: Decouple svg path generation from rendering to eliminate flicker (9ebee25)
  • ui: do not cache API responses (#698) (6e3b462)
  • ui: Fix copy-paste error (4479777)
  • ui: Fix initial map offset (#711) (a408edc)
  • ui: Fix log UI only working once (#718) (2d02570)
  • ui: Fix new zone placement (036752a)
  • ui: Only show presets if the robot is capable of having those (d996beb)
  • ui: Reduce path render resolution (aa64016)
  • ui: Reduce path render solution and render charger + robot as locations (1c4e4f3)
  • ui: Remove old paths if they vanish from the map data (eef055e)
  • ui: Various scaling-related issues (fb92c16)
  • vendor.dreame: Maps are always persistent (3630fa3)
  • vendor.roborock: Fix map not being available on a fresh boot for another 60s (f4c4c1a)
  • vendor.roborock: Fix S4 detection logic (#729) (75974a5)
  • vendor.roborock: RoborockS4 actually needs the MultiMapPersistentMapControlCapability (6279831)
  • vendor.viomi: Use marketing model name for viomi.v8 (#742) (7987168)
  • vendor.viomi: Wait a few seconds after cloud connected before fixing TZ (#736) (f9bfb00)

2021.02.0

3 years ago
valetudo

2021.02.0

This release features Home Assistant MQTT Autoconfig for the Map Data, an NTP Client and more.

Map Autodiscovery

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.

image

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

  • better zooming
  • custom colors
  • custom icons
  • mouseover things
  • click-to-select things

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 :)

NTP Client

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.

UI-Accessible Logs

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.

image

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.

Misc

@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.

Autogenerated changelog

Features

  • logger: Log config and logfile location to logfile (0171a8d)
  • Add Valetudo log to UI (#690) (89320f4)
  • Log the firmware version if embedded (4bd09c8)
  • core: Change the interface of the SpeakerVolumeControlCapability and add the SpeakerTestCapability (56b0637)
  • mqtt: Home Assistant Autodiscovery for Maps by embedding the map data in a png (83d1d13)
  • vendor.dreame: Consumable monitoring (e986687)
  • vendor.dreame: D9 error codes (669f192)
  • vendor.dreame: Improve handling of RISM maps (186abd3)
  • vendor.dreame: Minor improvements for D9 Firmware 1072 (ef949be)
  • vendor.dreame: Virtual Restrictions (3f1f494)
  • vendor.dreame: Volume Control + Volume Test (1509be3)
  • vendor.roborock: Roborock/Capability Carpet Mode (#661) (54ca606), closes #656
  • vendor.roborock: Volume Control + Volume Test (4a47939)
  • NTPClient (8b54c7d)

Bug Fixes

  • logger: Default loglevel should be info (3e23678)
  • logger: Do not log twice if logfile is the same as stdout redirection (#691) (2bd4c82)
  • logger: Logger should log 🪵 ([58515d9](https://github.com/Hypfer/Valetudo/commit/58515d97559b 8bd2ab2ac12ddfbadd4fad576d9f))
  • miio: Don't get confused by the system clock doing weird things (5e6d8df)
  • miio: http_dns: Block ott.io.mi.com requests (#671) (852683b)
  • miio: One failing message should not kill the process 20 minutes later (e5fd0a5)
  • miio: Set ServerSocket to disconnected on timeouts to prevent valetudo breaking on wifi issues (e14935d)
  • mqtt: Fix home assistant vacuum.send_command functionality (97ac35e)
  • ntpClient: Intercept dns lookup calls for our ntp server as well (c7095a7)
  • ui: Fix for pinch zoom bug in IOS / Safari (#683) (3c0a644)
  • ui: SSE Map updates should use a relative path (54bc2b7)
  • vendor.dreame: Don't store empty MapLayers (1230c08)
  • vendor.dreame: Proper angles (43aa8c6)
  • vendor.dreame: Properly parse map with correct rotation, offsets etc (5e037c2)
  • vendor.roborock: calculation of max elements for virtual restrictions (#681) (2e4421b)
  • vendor.viomi: consumables command fix for viaomi.v8 (#677) (bef609e)
  • vendor.viomi: Resolve #672: Fix viomi fan speed control (#673) (be0efca)
  • vendor.viomi: Various fixes for 2020.01.1 (a38987a), closes #641
  • webserver: Fix handleHttpDnsRequest scope (8226e4a)
  • webserver: Rate-limit logfile access (8fd53a5)

2021.01.1

3 years ago
valetudo

2021.01.1

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.

Core rewrite (Capabilities)

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.

New HTTP REST Interface

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.

image

New MQTT Interface

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:

image

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.

image

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.

New Config Schema + Location

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

Roborock

Viomi

Dreame Support

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

Misc

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.

Autogenerated changelog

Features

  • mqtt: Publish ValetudoGoToLocations & ValetudoZonePresets (76a9c52)
  • ui: Bring back consumable monitoring & resetting for now (fde2ffd)
  • vacuum.roborock: Add support for no-mopping zones on S5 Max and S6 (#630) (61902ed )
  • vacuum.roborock: Re-added support for S6 Pure (0226cd5)
  • vacuum.viomi: Virtual Walls & No-Go Areas (96462ac)
  • vendor.dreame: Basic Dreame D9 support (7c5e231)
  • vendor.dreame: Re-add support for 1c as well as more dreame capabilities (cd76abe)
  • vendor.roborock: Do not disturb capability (#659) (4b3ed97)
  • vendor.roborock: Use the lo alias approach for more robots (58a2618)
  • Add properties to capability (7114fcc)
  • Configure authorized_keys location via ENV variable (d06520d)
  • Viomi capabilities port (8486f04)

Bug Fixes

  • miio: Only report a new token from handshake if it is actually new (b373703)
  • Fix map layer dimensions calculation for empty layers (216c347)
  • ui: fix #565 ui not working with safari and basic auth (252c22d)
  • vendor.dreame: Fix map parser tests (a81b8e9)
  • vendor.roborock: Use lo alias cloud redirection approach for S6 & S5Max with miio_client 3.5.8 (71bc1f8)
  • Set VALETUDO_CONFIG_PATH variable for Upstart (#648) (f75b70d)
  • mqtt: missing / in set_fan_speed topic (26ceb95)
  • vacuum.roborock: Fix broken cloud connectivity on newer roborock vacuums caused by missing region (28483ab)
  • vacuum.viomi: Added model names for viomi.v8 (20d86c3)
  • vacuum.viomi: Fix fan speed state parsing (3ca7450)
  • vacuum.viomi: Fix invalid property access (6da2822)
  • vacuum.viomi: Segments + Docs (#600) (89a5485)
  • Improved dnshack to catch all problematic dns.lookup requests (8609612)

2021.01.0b0

3 years ago
valetudo

2021.01.0b0

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.

Core rewrite (Capabilities)

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.

New HTTP REST Interface

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.

image

New MQTT Interface

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:

image

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.

image

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.

New Config Schema + Location

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

Roborock

Viomi

Misc

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.

Autogenerated changelog

Features

  • vacuum.viomi: Virtual Walls & No-Go Areas (96462ac)
  • Configure authorized_keys location via ENV variable (d06520d)
  • Viomi capabilities port (8486f04)
  • mqtt: Publish ValetudoGoToLocations & ValetudoZonePresets (76a9c52)
  • vacuum.roborock: Add support for no-mopping zones on S5 Max and S6 (#630) (61902ed)

Bug Fixes

  • ui: fix #565 ui not working with safari and basic auth (252c22d)
  • vacuum.viomi: Added model names for viomi.v8 (20d86c3)
  • vacuum.viomi: Fix fan speed state parsing (3ca7450)
  • vacuum.viomi: Fix invalid property access (6da2822)
  • vacuum.viomi: Segments + Docs (#600) (89a5485)
  • Improved dnshack to catch all problematic dns.lookup requests (8609612)

0.6.1

3 years ago
valetudo

0.6.1

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:

Features

  • mqtt: Added sw_version to mqtt autodiscovery to fix #568 (a23d5af)

Bug Fixes

  • mqtt: Fix segfault on mqtt hostname resolution (b2410ff)
  • mqtt: Fixed #571 mqtt pause status (8b06203)
  • ui: Fix mqtt settings checkboxes (039b741)
  • ui: Restore context after drawing active zone (4f7ec2c)
  • vacuum.roborock: Don't multiply iterations by 10 to fix #573 (f3cc935)
  • override dns.lookup to mitigate static nodejs segfaults (41f3e98)

0.6.0

3 years ago
valetudo

0.6.0

New Data Format

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.

(Initial) Support for many more Vacuums + a new Vendor

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.

Segment Cleaning via the Web and MQTT

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.

image

If you zoom in on a segment marker, it will display both it's segment id as well as the segments' area in . The latter also being a benefit of the new Map Data format.

image

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.

UI enhancements

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.

image

Furthermore, it is now impossible for you to break the map by zooming out too far.

Misc

  • The map renderer has been updated by @aa-ko to always color adjacent segments in a different color thanks to math™
  • MQTT supports client certificate authentication thanks to @mqtt-fan

and of course there's the autogenerated changelog:

Features

  • Segment cleanup via WebUI + MQTT (f14f6cc)
  • entities.state: Added Charging/Charged/Discharging status to BatteryStateAttribute (97b5cdf)
  • mqtt: add support for client certificate (#549) (33f94ec)
  • roborock: Experimental support for even more roborock vacuums (2450ceb)
  • ui: Added zone size display, proper icon/text scaling and limited scaling (6b61ca8)
  • ui: Use math (four color theorem) to properly color segments (d462f65)
  • vacuum.dreame: Initial basic support for the dreame.vacuum.mc1808 (f73c7c6)
  • vacuum.viomi: add support for viomi.vacuum.v8 + mop enhancements (#543) (17bb01e), closes #541 #538 #548
  • Experimental support(?) for S6 MaxV (88de212)

Bug Fixes

  • entities.map: Fixed MapLayer area calculation (ac86c84)
  • mqtt: Check DNS resolution before connecting to mqtt broker to fix #563 (38a0af8)
  • ui: Default to colorIndex 0 if solver can't find the segment in its graph (e1565d0)
  • ui: Fix map coloring (#567) (890120c)
  • ui: Fixed zone dimensions (0ca13e3)
  • vacuum.roborock: Changed set_lab_status payload for S6 to fix #540 (19e141e)
  • vacuum.roborock: Fix map parsing failing for maps with no image data (f187906)
  • vacuum.viomi: Hackishly fixed map parsing for viomi v6 + fan speed settings for all viomi (ffbb8e7)
  • vacuum.viomi: Hackishly fixed path + angle (fdd80d2)