Skip to content

Mate 4.14.1 — A reading stays with the car it was read from

Choose a tag to compare

@ProtossBlaster ProtossBlaster released this 10 Oct 15:12
· 12 commits to main since this release
Immutable release. Only release title and notes can be modified.

Mate 4.14.1 — A reading stays with the car it was read from

A fix for accounts with two cars, found in the diagnostics @dommi1966 sent on
#338.


What changes

Besides the poller, the web writes a car's reading in two places: the check after a command (lock,
climate, windows…) and the 🔄 Refresh button. Both asked twice which car was meant — once to read it
from the cloud, once to write the reading — and the car chosen in the sidebar can change in between,
while the cloud answers. Then one car's reading was filed under the other.

On @dommi1966's install (an A10 and a shared T03), right after a command to the T03 on 30/09, the
T03's reading — 53 % and 9,275 km — was filed under the A10. The A10's diagnostics then showed that
day as "driven 8,527 km" (the T03's odometer minus the A10's), and a standby bar of 39 % a day
(the T03's 53 % down to the A10's 20.9 %) on a car that lost none.

  • The car is now chosen once, when the command is sent or Refresh is pressed, and both the read
    and the write are that car's, wherever the sidebar goes meanwhile.
  • A car the account no longer lists is neither read nor written, instead of the other car being read.

Upgrade impact

  • Nothing is migrated, recomputed or deleted. A reading already filed under the wrong car stays where
    it is, with what it shows.
  • With one car nothing changes: there is only one car to choose.

Verification

  • CI green on the tag: 5,505 passed, 1 skipped, plus 48 passed and 2 skipped on the Windows job;
    the check that the released desktop shell still runs this Mate is green.
  • Locally, in the CI's image with Node.js and a MateDesktop checkout added — so that nothing is
    skipped: 5,506 passed, none skipped.
  • Four new tests. The two that reproduce #338 — an account with an A10 listed first and a T03, a
    command (and a Refresh) on the T03, the sidebar moved to the A10 while the cloud answers — fail on
    4.14.0 exactly as the diagnostics did: the T03's 53 % and 9,275 km under car 1. The two about a car
    no longer on the account each fail when the check they cover is taken out. Now all pass.
  • The Docker image, built from this release, ran on the test instance (one car) with a real database
    before the tag: every page answers as on 4.14.0 (the fuel page sends a car without a tank
    elsewhere, as before), and the log has no errors.
  • Not proven: in @dommi1966's diagnostics the command to the T03 is there (right after it the T03
    alone was polled every 10 s, which only a command from the web does with MQTT off); the switch of
    car in the sidebar is not, because the pack keeps no record of the pages opened. The code allowed
    it, and the new tests reproduce it.
  • Not tried: a real account with two cars, the add-on behind Home Assistant, a phone.

Italiano

Mate 4.14.1 — Una lettura resta all'auto da cui è stata letta

Una correzione per gli account con due auto, trovata nella diagnostica che @dommi1966 ha mandato
sulla #338.

Cosa cambia

Oltre al poller, la parte web scrive la lettura di un'auto in due punti: il controllo dopo un comando
(chiusura, clima, finestrini…) e il pulsante 🔄 Aggiorna. Tutti e due chiedevano due volte di quale
auto si trattasse — una volta per leggerla dal cloud, una volta per scrivere la lettura — e l'auto
scelta nella barra laterale può cambiare in mezzo, mentre il cloud risponde. Allora la lettura di
un'auto finiva sotto l'altra.

Sull'installazione di @dommi1966 (una A10 e una T03 condivisa), subito dopo un comando alla T03 il
30/09, la lettura della T03 — 53 % e 9.275 km — è stata scritta sotto la A10. La diagnostica della
A10 mostrava allora quel giorno come «drove 8527 km» (il contachilometri della T03 meno quello della
A10), e una barra di standby del 39 % al giorno (il 53 % della T03 sceso al 20,9 % della A10) su
un'auto che non aveva perso niente.

  • L'auto ora si sceglie una volta sola, quando parte il comando o premi Aggiorna, e sia la
    lettura sia la scrittura sono di quell'auto, dovunque vada nel frattempo la barra laterale.
  • Un'auto che l'account non elenca più non viene né letta né scritta, invece di leggere l'altra.

Impatto dell'aggiornamento

  • Niente viene migrato, ricalcolato o cancellato. Una lettura già finita sotto l'auto sbagliata resta
    dov'è, con quello che mostra.
  • Con una sola auto non cambia niente: c'è una sola auto da scegliere.

Verifica

  • CI verde sul tag: 5.505 passati, 1 saltato, più 48 passati e 2 saltati sul job Windows; il
    controllo che il guscio desktop pubblicato faccia ancora girare questa Mate è verde.
  • In locale, nell'immagine della CI con Node.js e una copia di MateDesktop aggiunti — così che non si
    salti niente: 5.506 passati, nessuno saltato.
  • Quattro test nuovi. I due che riproducono la #338 — un account con una A10 elencata per prima e una
    T03, un comando (e un Aggiorna) sulla T03, la barra laterale spostata sulla A10 mentre il cloud
    risponde — falliscono sulla 4.14.0 esattamente come la diagnostica: il 53 % e i 9.275 km della T03
    sotto l'auto 1. I due su un'auto non più sull'account falliscono ciascuno se si toglie il controllo
    che coprono. Adesso passano tutti.
  • L'immagine Docker, costruita da questa versione, ha girato sull'istanza di prova (una sola auto) con
    un database vero prima del tag: ogni pagina risponde come sulla 4.14.0 (la pagina del carburante manda altrove
    un'auto senza serbatoio, come prima), e nel log non ci sono errori.
  • Non dimostrato: nella diagnostica di @dommi1966 il comando alla T03 c'è (subito dopo, solo la T03 è
    stata letta ogni 10 s, cosa che con MQTT spento fa solo un comando dalla web); il cambio d'auto nella
    barra laterale no, perché il pacchetto non tiene traccia delle pagine aperte. Il codice lo permetteva,
    e i test nuovi lo riproducono.
  • Non provati: un vero account con due auto, l'add-on dentro Home Assistant, un telefono.