Gladys Assistant v4.12.1: socket-io update, VOC with colors & HomeKit typography!

Hello everyone!

Small release today in terms of functionality, but not insignificant in terms of work :smiley:

socket.io update

Two weeks ago, an important security fix was released for the library I use for WebSocket connections to Gladys Plus (socket.io).

The problem was that the security fix was only available on the latest version of the library, version 4.xx.

However, we were on version 2.xx.

I had been following the evolution of this library for a while, but jumping two major versions for a library that is the backbone of Gladys Plus isn’t simple, because you have to update both the server and the client, and synchronize the two so that everything works correctly!

The goal was to absolutely avoid any service interruption for Gladys Plus users.

Following this security alert, there was no choice but to do the migration.

My work up to that point was to update the server as quickly as possible (to fix the security issue), while ensuring that the old clients remained backward-compatible. After some changes made in Gladys v4.12, that was the case: a v2 client could talk to a v4 server.

After publishing the v4 server, I then prepared the migration of all clients to this v4 protocol so that everyone speaks the same protocol. It’s this release, Gladys Assistant v4.12.1, that includes these changes.

Now, step 3 of this deployment is to wait for all clients (both browsers and Gladys instances) to move to this new version, so we can publish a server version that blocks v2 clients.

This may sound like gibberish to some, but it was a fair bit of work on my side to test all these behaviors (browser v2 talking to server v4 talking to Gladys instance v2), and I wanted to show that sometimes some releases require a lot of work for just… 0 changes on the user side :sweat_smile:

Stability and security sometimes require as much work as a new development :smiley:

That said, this v4 of socket.io still brings its share of new things for developers: a simpler API to use as a developer, and the lib has been completely rewritten in TypeScript, which is rather positive for a library — a sign of quality and stability. Performance improvements may even have been included :slight_smile:

VOC with colors

Credit to @VonOx for the work: VOC sensors now display a color depending on the VOC level in the air, according to the danger level of the values:



HomeKit Typo

Tiny fix: a spelling mistake was corrected in the HomeKit integration by @bertrandda!

The full CHANGELOG is available here .

How to update?

If you installed Gladys with the official Raspberry Pi OS image, your instances will update automatically in the coming hours. This can take up to 24h, don’t panic.

If you installed Gladys with Docker, check that you are using Watchtower (See the documentation )

9 Likes