Repository navigation
Mate 4.15.4 — A parked car without GPS keeps its outside temperature
Mate 4.15.4 — A parked car without GPS keeps its outside temperature
A fix to the live outside temperature, for a car whose GPS position the Leapmotor cloud sends as zero.
What changes
A parked car without GPS keeps its outside temperature
With the outside temperature switched on (Settings → trip defaults), Mate looks the car's position up
against Open-Meteo, at most once every 20 minutes or 10 km. A reading with no GPS fix, latitude and
longitude 0, is not looked up, so that the weather of a wrong place is never stored. Until now that
left the last value as it was, kept only in memory: after a restart of Mate there was none, every new
position was stored without an outside temperature, and the Overview, after some hours of readings
without one, hid the row.
On 13 October the cloud sent all six GPS signals of a parked B10 as zero for more than 14 hours, with
every other reading normal and the odometer unchanged.
Now:
- with no GPS fix, Mate asks Open-Meteo about the car's last real position, but only while the odometer
reads what it read there, both known; - the last real position comes from each reading that has one and, when Mate starts, from the database,
so a restart no longer leaves the value empty; - a car driven since its last fix, or a reading without an odometer, is not guessed at: the last value
stays, as before; - with a GPS fix nothing changes, and with the switch off Mate asks Open-Meteo nothing, as before.
Upgrade impact
- Nothing is migrated. When the poller starts it reads, for each car, the last stored position with a
GPS fix: one query, 0.5 ms on the test instance's database. - With the switch on and the GPS missing, a parked car is looked up as often as one with a fix, at most
once every 20 minutes, where before nothing was asked. - Positions already stored are not changed.
Verification
- CI green on the tag: 5,668 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. On main, the same commit's first
run stopped once on a browser test of the Charges page (a 30 s wait after the 🆓 button, code this
release does not touch); its second run was green, and the test passed 20 times out of 20 locally. - Locally, in the CI's image with Node.js and a MateDesktop checkout added: 5,668 passed, 1 skipped (a local-only reference file the clone does not carry).
- The 8 new tests fail on 4.15.3. Putting back, one at a time, the odometer check and the reading of the
last position at start, each made a test fail. - The Docker image, built from this release, ran on the test instance (one car, a real database, the
GPS at zero since the night, the outside temperature switched off there) before the tag: every page
answers as on 4.15.3 and the log has no errors. On that database, with Open-Meteo's call replaced so
that nothing was sent, the last reading has no GPS fix, the last position with one has the same
odometer, and the sampler asks once, about that position. - Not tried: a real Open-Meteo lookup with the GPS missing, the add-on behind Home Assistant.
Italiano
Mate 4.15.4 — Un'auto ferma senza GPS mantiene la temperatura esterna
Una correzione della temperatura esterna dal vivo, per un'auto di cui il cloud Leapmotor manda la
posizione GPS a zero.
Cosa cambia
Un'auto ferma senza GPS mantiene la temperatura esterna
Con la temperatura esterna attiva (Impostazioni → valori predefiniti dei viaggi), Mate chiede a
Open-Meteo il meteo nella posizione dell'auto, al massimo una volta ogni 20 minuti o 10 km. Una lettura
senza posizione GPS, latitudine e longitudine 0, non viene chiesta, così non viene mai salvato il meteo
di un posto sbagliato. Finora questo lasciava l'ultimo valore com'era, tenuto solo in memoria: dopo un
riavvio di Mate non c'era più, ogni nuova posizione veniva salvata senza temperatura esterna, e la
Panoramica, dopo alcune ore di letture senza, nascondeva la riga.
Il 13 ottobre il cloud ha mandato a zero tutti e sei i segnali GPS di una B10 ferma per più di 14 ore,
con tutte le altre letture normali e il contachilometri fermo.
Ora:
- senza posizione GPS, Mate chiede a Open-Meteo il meteo nell'ultima posizione vera dell'auto, ma solo
finché il contachilometri segna quello che segnava lì, ed entrambi sono noti; - l'ultima posizione vera viene da ogni lettura che ce l'ha e, all'avvio di Mate, dal database, quindi
un riavvio non lascia più il valore vuoto; - un'auto guidata dopo l'ultima posizione, o una lettura senza contachilometri, non viene indovinata:
resta l'ultimo valore, come prima; - con la posizione GPS non cambia niente, e con l'interruttore spento Mate non chiede niente a
Open-Meteo, come prima.
Impatto dell'aggiornamento
- Nessuna migrazione. All'avvio il poller legge, per ogni auto, l'ultima posizione salvata con il GPS:
una query, 0,5 ms sul database dell'istanza di prova. - Con l'interruttore acceso e il GPS assente, un'auto ferma viene chiesta tanto spesso quanto una con
il GPS, al massimo una volta ogni 20 minuti, dove prima non si chiedeva niente. - Le posizioni già salvate non cambiano.
Verifica
- CI verde sul tag: 5.668 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. Su main, il primo giro dello
stesso commit si è fermato una volta su un test del browser della pagina Ricariche (un'attesa di 30 s
dopo il pulsante 🆓, codice che questa versione non tocca); il secondo giro è stato verde, e in locale
il test è passato 20 volte su 20. - In locale, nell'immagine della CI con Node.js e una copia di MateDesktop aggiunti: 5.668 passati, 1 saltato (un file di riferimento solo locale che la copia non porta).
- Gli 8 test nuovi falliscono sulla 4.15.3. Rimettendo com'erano, uno alla volta, il controllo del
contachilometri e la lettura dell'ultima posizione all'avvio, ognuno ha fatto fallire un test. - L'immagine Docker, costruita da questa versione, ha girato sull'istanza di prova (una sola auto, un
database vero, il GPS a zero dalla notte, la temperatura esterna spenta lì) prima del tag: ogni pagina
risponde come sulla 4.15.3 e nel log non ci sono errori. Su quel database, con la chiamata a
Open-Meteo sostituita così che non partisse niente, l'ultima lettura non ha il GPS, l'ultima posizione
con il GPS ha lo stesso contachilometri, e il campionatore chiede una volta, per quella posizione. - Non provati: una vera richiesta a Open-Meteo con il GPS assente, l'add-on dentro Home Assistant.