Repository navigation
Mate 4.15.1 — A charge ends when the energy stops
Mate 4.15.1 — A charge ends when the energy stops
Two changes by @arekm: #414 and
#415.
What changes
A charge ends when the energy stops, and a full battery says "Charge complete" (#414, @arekm)
After a charge, with the cable still in, a car keeps its charge session open for a while: in the
diagnostic bundles #414 replayed, for minutes on the B10s and up to hours on the T03s. Mate ended the
charge only with the session, so until then:
- the Overview showed the charging animation and "Charging", and the Charges page "LIVE" at 0.00 kW;
- the charge was filed as lasting until the session closed: its end time and its duration counted
the minutes, or hours, after the energy stopped.
Now:
- a charge ends where it stopped adding energy: the later of the first reading after its last
charging sample and its last SoC rise. Its end SoC is that reading's; - with the cable in, nothing going in and the SoC within one point of the car's charge limit (100 %
if the car reports none), the Overview reads "Cable connected · 100% (Charge complete)" and the
Charges page "Fully charged"; - the session's close is kept in a new column,
charges.closed_at. The wallbox counter and the Home
Assistant kWh helper (custom-kWh pricing) are still read up to it, and the wallbox profile switch
still waits for it; - the Charges page reloads its history when the car ends its session;
- signal 3736 is no longer read: no car in #414's data sends it as a completion. It stays in the
diagnostics ascharge_completed_raw.
Unchanged: a charge that pauses below the limit still reads as charging while its session is open
(#307); a finished charge appears in the list when the car ends its session; MQTT and the Home
Assistant entities publish the car's own charging flag, as before.
A row that ends on another day says which (#415, @arekm)
A charge or a trip printed its end as a bare time, so a charge from 23:05 to 06:40 the next day read
"23:05 → 06:40". Now it reads "23:05 → 09 Oct 06:40", with the day and month in the reader's
language: in the Charges and Trips drawers, the merge preview, the similar-trips page and the times
of a merged trip's later pieces. A row that starts and ends on one day reads as before, and is still
listed under the day it started.
Upgrade impact
- The charges table gets one new column,
closed_at. It stays empty on the charges recorded before
and on manual and reconstructed ones. Nothing is migrated or deleted, and the charges recorded
before keep their end. - The charges CSV export has the new
closed_atcolumn; the import ignores it. - After a charge to the limit with the cable still in, the Overview says "Charge complete" instead of
"Charging", and a new charge no longer counts the time the car kept its session open afterwards.
Verification
- CI green on the tag: 5,628 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,628 passed, 1 skipped
(a local-only reference file the clone does not carry). - #414 adds five test files and adapts six; #415 adds one and registers its filter in seven that
render templates. On 4.15.0, 25 of #414's new or adapted tests and the 3 new tests of #415 fail;
here they pass. - Nine parts of #414 were put back one at a time, and each time a test failed: the end on the first
reading after the last sample, the end on the last SoC rise, a reading without an SoC, the wallbox
ceiling over the session, the kWh helper read up to the close, a full battery still read as
charging, "complete" with current going in, the wallbox profile guard, the session read before the
chart. - Screenshots on demo data in Chromium: a charge to 100 % with its session still open, on the
Overview and the Charges page, before and after; the Charges and Trips drawers in Italian at 1280
and 390 px, before and after. On the demo data, a charge to 100 % whose session closed 15 minutes
after the energy stopped now lasts 155 minutes instead of 170, with the same energy. - 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.15.0; theclosed_atcolumn is added and stays empty on
the charges already there; the six charges that ran past midnight now show their end day, as
"→ 11 giu 08:19" in Italian, and the rows within one day show none; the charges CSV has 42
columns instead of 41; the log has no errors. No trip of that car crosses midnight, and the car
has not charged since 7 October, so the new end of a charge and "Charge complete" were not seen at
work on it. - Not tried: a real charge on 4.15.1 (the new end has not yet dated a real charge), the replay of the
74 public bundles described in #414, the add-on behind Home Assistant, a real phone.
Italiano
Mate 4.15.1 — Una ricarica finisce quando smette di entrare energia
Due modifiche di @arekm: la #414 e la
#415.
Cosa cambia
Una ricarica finisce quando smette di entrare energia, e una batteria piena dice «Carica completa» (#414, @arekm)
Dopo una ricarica, con il cavo ancora inserito, l'auto tiene aperta la sessione di carica ancora per
un po': nei pacchetti di diagnostica riletti nella #414, per minuti sulle B10 e fino a ore sulle T03.
Mate chiudeva la ricarica solo con la sessione, quindi fino ad allora:
- la Panoramica mostrava l'animazione di carica e «In ricarica», e la pagina Ricariche «LIVE» a
0,00 kW; - la ricarica veniva registrata come durata fino alla chiusura della sessione: l'ora di fine e la
durata contavano i minuti, o le ore, dopo che l'energia aveva smesso di entrare.
Ora:
- una ricarica finisce dove ha smesso di aggiungere energia: la più tarda tra la prima lettura dopo
il suo ultimo campione di carica e la sua ultima salita del SoC. Il SoC finale è quello di quella
lettura; - con il cavo inserito, niente che entra e il SoC entro un punto dal limite di carica dell'auto
(100 % se l'auto non ne indica uno), la Panoramica dice «Cavo connesso · 100% (Carica completa)» e
la pagina Ricariche «Carica completa»; - la chiusura della sessione resta in una colonna nuova,
charges.closed_at. Il contatore della
wallbox e l'helper dei kWh di Home Assistant (prezzo kWh personalizzato) si leggono ancora fino a
lì, e il cambio di profilo della wallbox aspetta ancora quella chiusura; - la pagina Ricariche ricarica la sua cronologia quando l'auto chiude la sessione;
- il segnale 3736 non si legge più: nessuna auto nei dati della #414 lo manda come fine della carica.
Resta nella diagnostica comecharge_completed_raw.
Non cambia: una ricarica che fa una pausa sotto il limite si legge ancora come in carica finché la
sessione è aperta (#307); una ricarica finita compare nell'elenco quando l'auto chiude la sessione;
MQTT e le entità di Home Assistant pubblicano il segnale di carica dell'auto, come prima.
Una riga che finisce un altro giorno lo dice (#415, @arekm)
Una ricarica o un viaggio scriveva la fine come un'ora sola, quindi una ricarica dalle 23:05 alle
06:40 del giorno dopo si leggeva «23:05 → 06:40». Ora si legge «23:05 → 09 ott 06:40», con giorno e
mese nella lingua di chi legge: nei pannelli del giorno di Ricariche e Viaggi, nell'anteprima
dell'unione, nella pagina dei viaggi simili e negli orari dei pezzi successivi di un viaggio unito.
Una riga che inizia e finisce lo stesso giorno si legge come prima, ed è ancora elencata sotto il
giorno in cui è iniziata.
Impatto dell'aggiornamento
- La tabella delle ricariche riceve una colonna nuova,
closed_at. Resta vuota sulle ricariche
registrate prima e su quelle manuali e ricostruite. Niente viene migrato o cancellato, e le
ricariche registrate prima tengono la loro fine. - L'esportazione CSV delle ricariche ha la nuova colonna
closed_at; l'importazione la ignora. - Dopo una ricarica fino al limite con il cavo ancora inserito, la Panoramica dice «Carica completa»
invece di «In ricarica», e una ricarica nuova non conta più il tempo in cui l'auto ha tenuto aperta
la sessione dopo.
Verifica
- CI verde sul tag: 5.628 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.628 passati,
1 saltato (un file di riferimento solo locale che la copia non porta). - La #414 aggiunge cinque file di test e ne adatta sei; la #415 ne aggiunge uno e registra il suo
filtro in sette che disegnano i template. Sulla 4.15.0 falliscono 25 test nuovi o adattati della
#414 e i 3 test nuovi della #415; qui passano. - Nove parti della #414 sono state tolte una alla volta, e ogni volta un test è fallito: la fine sulla
prima lettura dopo l'ultimo campione, la fine sull'ultima salita del SoC, una lettura senza SoC, il
tetto della wallbox sulla sessione, l'helper dei kWh letto fino alla chiusura, una batteria piena
letta ancora come in carica, «completa» con corrente che entra, la protezione del profilo della
wallbox, la sessione letta prima del grafico. - Schermate con dati dimostrativi in Chromium: una ricarica al 100 % con la sessione ancora aperta,
nella Panoramica e nella pagina Ricariche, prima e dopo; i pannelli del giorno di Ricariche e Viaggi
in italiano a 1280 e 390 px, prima e dopo. Sui dati dimostrativi, una ricarica al 100 % la cui
sessione si è chiusa 15 minuti dopo la fine dell'energia ora dura 155 minuti invece di 170, con la
stessa energia. - 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.15.0; la colonnaclosed_atviene
aggiunta e resta vuota sulle ricariche già presenti; le sei ricariche andate oltre la mezzanotte ora
mostrano il giorno di fine, come «→ 11 giu 08:19», e le righe dentro un giorno non lo mostrano; il
CSV delle ricariche ha 42 colonne invece di 41; nel log non ci sono errori. Nessun viaggio di
quell'auto passa la mezzanotte, e l'auto non ricarica dal 7 ottobre, quindi la nuova fine di una
ricarica e «Carica completa» non si sono viste all'opera. - Non provati: una ricarica vera sulla 4.15.1 (la nuova fine non ha ancora datato una ricarica vera),
la rilettura dei 74 pacchetti pubblici descritta nella #414, l'add-on dentro Home Assistant, un
telefono vero.