Repository navigation
Mate 4.15.6 — The MQTT plug sensor follows the cable
Mate 4.15.6 — The MQTT plug sensor follows the cable
Two fixes: the MQTT plug sensor says what the Overview says, and the Overview's car picture shows at once.
What changes
The MQTT plug sensor shows the cable the pages show (#429)
Since 4.10.0 the pages show the cable when the charge session says so (signal 1149), or when the AC port
reports one on a parked car (signal 47 at 1). A car that has finished its charge, or waits for its
schedule, ends the charge session with the cable still in, and the AC port is what still shows it.
MQTT kept publishing the session alone. On a C10 with the cable in after its charge, the Overview and the
Leapmotor app said Plugged and Home Assistant's Plug Connected said OFF; it was right only while the
car charged.
Now plug_connected and evcc/plugged publish the cable as the pages do. The rule lives in one place,
events.cable_in_port, which the events read too. The charge session the poller opens and closes charges
on is unchanged.
The Overview shows the car picture at once, also while charging (#427)
While the car charges, the car picture is an animation of the charging cable, which took about 2.5 s to
compose on Home Assistant's 4 cores; the card stayed empty meanwhile. After each restart, the first
picture also waited for the picture package to be downloaded again, about 2 s.
Now, while the car charges, the page shows the car with its cable in first (/api/car-picture?still=1)
and puts the animation in its place once it has come. After a restart, with the package on disk, the
first picture comes from the copy on disk and the once-per-start download runs alongside, so a new colour
shows on a later load. With no package on disk, or on a manual refresh, the request waits for the
download, as before.
Upgrade impact
- Nothing is migrated, and no setting is added.
- With MQTT on, Plug Connected and
evcc/pluggedturn on in more readings: those where the Overview
already showed the cable without a charge session. On the test instance's database, 12,410 of 431,332
readings since June. An EVCC setup readingevcc/pluggedsees the car plugged in those readings too. - After a restart, a new colour of the car shows one load later, and the browser keeps a picture for
5 minutes.
Verification
- CI green on the tag and on main: 5,685 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,685 passed, 1 skipped (a local-only reference file the clone does not carry).
- #429: the new test (6 cases, one reading 24 combinations through both MQTT and the pages) failed on
4.15.5 and passes here; making the rule count a moving car, or the V2L adapter, as a cable each made it
fail. A patch the reporter attached, applied by hand, gives the same answers. - #427: of its tests, the 5 new or adjusted ones fail on 4.15.5 and all 10 pass here. On Mate's demo in
Chromium, with the animation held back by 2.5 s: 4.15.5 shows an empty card at 1.2 s, this release the
car with its cable in, and the animation afterwards. - The Docker image, built from this release, ran on the test instance (one car, a real database, MQTT on)
before the tag: healthy, no errors in the log, every page answers as on 4.15.5. - Not tried: the sensor in a real Home Assistant, a real EVCC setup, the car picture on Home Assistant's
hardware.
Italiano
Mate 4.15.6 — Il sensore MQTT della presa segue il cavo
Due correzioni: il sensore MQTT della presa dice quello che dice la Panoramica, e la foto dell'auto in
Panoramica compare subito.
Cosa cambia
Il sensore MQTT della presa mostra il cavo che mostrano le pagine (#429)
Dalla 4.10.0 le pagine mostrano il cavo quando lo dice la sessione di ricarica (segnale 1149), oppure
quando la presa AC lo segnala con l'auto ferma (segnale 47 a 1). Un'auto che ha finito di caricare, o che
aspetta la sua programmazione, chiude la sessione con il cavo ancora dentro, e la presa AC è ciò che lo
mostra ancora.
MQTT continuava a pubblicare solo la sessione. Su una C10 con il cavo dentro dopo la ricarica, la
Panoramica e l'app Leapmotor dicevano Plugged e il Plug Connected di Home Assistant diceva OFF; era
giusto solo mentre l'auto caricava.
Ora plug_connected ed evcc/plugged pubblicano il cavo come le pagine. La regola sta in un punto solo,
events.cable_in_port, che usano anche gli eventi. La sessione con cui il poller apre e chiude le
ricariche non cambia.
La Panoramica mostra subito la foto dell'auto, anche in ricarica (#427)
Mentre l'auto carica, la foto dell'auto è un'animazione del cavo di ricarica, che richiedeva circa 2,5 s
per essere composta su Home Assistant con 4 core; nel frattempo la scheda restava vuota. Dopo ogni
riavvio, anche la prima foto aspettava di riscaricare il pacchetto delle immagini, circa 2 s.
Ora, mentre l'auto carica, la pagina mostra prima l'auto con il cavo (/api/car-picture?still=1) e mette
l'animazione al suo posto quando è arrivata. Dopo un riavvio, con il pacchetto sul disco, la prima foto
viene dalla copia sul disco e il download di ogni avvio parte in parallelo, così un colore nuovo compare
a un caricamento successivo. Senza pacchetto sul disco, o con un aggiornamento manuale, la richiesta
aspetta il download, come prima.
Impatto dell'aggiornamento
- Nessuna migrazione e nessuna impostazione nuova.
- Con MQTT attivo, Plug Connected ed
evcc/pluggedsi accendono in più letture: quelle in cui la
Panoramica mostrava già il cavo senza una sessione di ricarica. Sul database dell'istanza di prova,
12.410 letture su 431.332 da giugno. Un impianto EVCC che leggeevcc/pluggedvede l'auto collegata
anche in quelle letture. - Dopo un riavvio, un colore nuovo dell'auto compare un caricamento dopo, e il browser tiene una foto per
5 minuti.
Verifica
- CI verde sul tag e su main: 5.685 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.685 passati, 1 saltato (un file di riferimento solo locale che la copia non porta).
- #429: il test nuovo (6 casi, uno legge 24 combinazioni sia da MQTT sia dalle pagine) falliva sulla
4.15.5 e passa qui; far contare alla regola un'auto in movimento, o l'adattatore V2L, come cavo l'ha
fatto fallire ogni volta. Una patch allegata da chi ha segnalato il problema, applicata a mano, dà le
stesse risposte. - #427: dei suoi test, i 5 nuovi o adattati falliscono sulla 4.15.5 e tutti e 10 passano qui. Sulla demo
di Mate in Chromium, con l'animazione trattenuta di 2,5 s: la 4.15.5 mostra una scheda vuota a 1,2 s,
questa versione l'auto con il cavo, e poi l'animazione. - L'immagine Docker, costruita da questa versione, ha girato sull'istanza di prova (una sola auto, un
database vero, MQTT attivo) prima del tag: sana, nessun errore nel log, ogni pagina risponde come sulla
4.15.5. - Non provati: il sensore in un vero Home Assistant, un vero impianto EVCC, la foto dell'auto
sull'hardware di Home Assistant.