github Hypfer/Valetudo 2021.06.0
Valetudo 2021.06.0

latest releases: 2024.06.2, 2024.06.1, 2024.06.0...
3 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)

Don't miss a new Valetudo release

NewReleases is sending notifications on new releases.