Skip to content

Mate 4.15.5 — The Battery page keeps the views you picked

Choose a tag to compare

@ProtossBlaster ProtossBlaster released this 17 Oct 22:16
· 3 commits to main since this release
Immutable release. Only release title and notes can be modified.

Mate 4.15.5 — The Battery page keeps the views you picked

Three fixes by @arekm: views that survive a page's own reload, a live chart that no longer blinks, and an
outside temperature that survives a restart.


What changes

The Battery health page keeps the views you picked (#426)

Left open, the Battery health page reloads itself every 30 seconds, so a charge that ends or a park that
goes on shows up unasked. The reload also put its two charts back on their defaults: Time on
Estimated capacity per charge, %/day and per stop on Vampire drain.

Now the views picked go into the page's address, as a calendar keeps its month:
battery?capacity_by=distance&drain=lost&drain_per=date, with only the views not at their default. The
page's own reload, a link or the browser's Back draws them again. The page still reloads itself, and
opening it from the menu shows the defaults.

The calendars write their month into the address through the same helper now, lmKeepInAddress in
base.html, with no change in what they do.

The chart of a charge in progress is redrawn without a blink (#422)

While the car charges, the Charges page redraws the chart of the charge in progress every 30 seconds. At
every redraw the card showed for 0.07 to 0.17 s without its chart, and everything under it jumped up by
the chart's height and back. The panel now settles at once (settle:0ms), so the new chart is drawn in
the same step that swaps it in.

A restart keeps the outside temperature the car had (#425)

With the outside temperature switched on, Mate asks Open-Meteo at most once every 20 minutes or 10 km,
and a refused lookup keeps the last reading. That reading lived only in memory: when the first lookup
after a restart was refused (Open-Meteo answers 503 when it sheds load), there was no outside temperature
for up to 20 minutes. On one B10 from 13 to 17 October that happened on 4 of 10 starts.

Now the sampler starts from the reading on the car's newest position, if that position is younger than
20 minutes. The first poll still asks, and a lookup that answers replaces the stored reading at once; how
often Mate asks is unchanged.

Upgrade impact

  • Nothing is migrated, and no setting is added.
  • The Battery health page's address carries the views picked on it; an address without them shows the
    defaults, as before.
  • When the poller starts it reads, for each car, the outside temperature of its newest position: one
    query, 0.02 ms on the test instance's database.
  • The manuals gain one sentence on the Battery page's views kept in the address.

Verification

  • CI green on the tag and on main: 5,673 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: 5,673 passed, 1 skipped (a local-only reference file the clone does not carry).
  • The new tests fail on 4.15.4's code and pass with the change: the browser test of #426 (back on Time,
    %/day and per stop), the browser test of #422 ("the card was swapped in without its chart") and the 3
    tests of #425 (None == 13.5, and the sampler not taking a stored reading). Those of #426 and #425 were
    checked before their merge, the one of #422 after the release.
  • The Docker image, built from this release, ran on the test instance (one car, a real database, the
    outside temperature switched off there) before the tag: healthy, no errors in the log, and every page
    answers 200 as on 4.15.4. The Battery page with the views in its address answers too.
  • Screenshots on the demo, before the merges: the Battery page keeps Distance, % lost and per date
    through a reload, where 4.15.4 goes back to the defaults; the card of the charge in progress keeps its
    height (534 px) during an update, where 4.15.4 drops to 123 px.
  • Not tried: a refused Open-Meteo lookup after a real restart (covered by the tests and by @arekm on a
    copy of a live database), the add-on behind Home Assistant.

Italiano

Mate 4.15.5 — La pagina Batteria tiene le viste scelte

Tre correzioni di @arekm: viste che resistono all'aggiornamento automatico di una pagina, un grafico dal
vivo che non sfarfalla più e una temperatura esterna che resiste a un riavvio.

Cosa cambia

La pagina Salute batteria tiene le viste scelte (#426)

Lasciata aperta, la pagina Salute batteria si ricarica da sola ogni 30 secondi, così una ricarica che
finisce o una sosta che continua compaiono senza chiedere. Il ricaricamento però riportava i suoi due
grafici alle viste predefinite: Tempo su Capacità stimata per ricarica, %/giorno e per sosta su
Consumo da fermo.

Ora le viste scelte vanno nell'indirizzo della pagina, come un calendario tiene il suo mese:
battery?capacity_by=distance&drain=lost&drain_per=date, solo con le viste diverse da quelle
predefinite. Il ricaricamento della pagina, un link o il tasto Indietro del browser le ridisegnano. La
pagina si ricarica ancora da sola, e aprendola dal menu si vedono le viste predefinite.

I calendari scrivono il loro mese nell'indirizzo con la stessa funzione, lmKeepInAddress in
base.html, senza cambiare quello che fanno.

Il grafico di una ricarica in corso si ridisegna senza sfarfallare (#422)

Mentre l'auto carica, la pagina Ricariche ridisegna il grafico della ricarica in corso ogni 30 secondi. A
ogni ridisegno la scheda restava per 0,07–0,17 s senza grafico, e tutto quello che stava sotto saliva
dell'altezza del grafico e tornava giù. Ora il pannello si assesta subito (settle:0ms), quindi il
grafico nuovo viene disegnato nello stesso passo in cui viene sostituito.

Un riavvio mantiene la temperatura esterna che l'auto aveva (#425)

Con la temperatura esterna attiva, Mate chiede a Open-Meteo al massimo una volta ogni 20 minuti o 10 km,
e una richiesta rifiutata tiene l'ultimo valore. Quel valore stava solo in memoria: quando la prima
richiesta dopo un riavvio veniva rifiutata (Open-Meteo risponde 503 quando scarta il carico), la
temperatura esterna mancava fino a 20 minuti. Su una B10, dal 13 al 17 ottobre, è successo in 4 avvii
su 10.

Ora il campionatore parte dalla lettura dell'ultima posizione dell'auto, se quella posizione ha meno di
20 minuti. La prima lettura chiede comunque, e una richiesta che risponde sostituisce subito il valore
salvato; quante volte Mate chiede non cambia.

Impatto dell'aggiornamento

  • Nessuna migrazione e nessuna impostazione nuova.
  • L'indirizzo della pagina Salute batteria porta le viste scelte; un indirizzo senza mostra le viste
    predefinite, come prima.
  • All'avvio il poller legge, per ogni auto, la temperatura esterna della sua ultima posizione: una query,
    0,02 ms sul database dell'istanza di prova.
  • I manuali hanno una frase in più sulle viste della pagina Batteria tenute nell'indirizzo.

Verifica

  • CI verde sul tag e su main: 5.673 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: 5.673 passati, 1 saltato (un file di riferimento solo locale che la copia non porta).
  • I test nuovi falliscono sul codice della 4.15.4 e passano con la modifica: il test nel browser della #426
    (torna su Tempo, %/giorno e per sosta), il test nel browser della #422 («la scheda è stata
    sostituita senza il suo grafico») e i 3 test della #425 (None == 13.5, e il campionatore che non prende un
    valore salvato). Quelli della #426 e della #425 sono stati controllati prima del merge, quello della #422
    dopo la release.
  • L'immagine Docker, costruita da questa versione, ha girato sull'istanza di prova (una sola auto, un
    database vero, la temperatura esterna spenta lì) prima del tag: sana, nessun errore nel log, e ogni
    pagina risponde 200 come sulla 4.15.4. Risponde anche la pagina Batteria con le viste nell'indirizzo.
  • Screenshot sulla demo, prima dei merge: la pagina Batteria tiene Distanza, % perso e per data
    dopo il ricaricamento, mentre la 4.15.4 torna alle viste predefinite; la scheda della ricarica in corso
    mantiene la sua altezza (534 px) durante un aggiornamento, mentre la 4.15.4 scende a 123 px.
  • Non provati: una richiesta a Open-Meteo rifiutata dopo un vero riavvio (coperta dai test e da @arekm su
    una copia di un database vero), l'add-on dentro Home Assistant.