diff --git a/evcharger-app/CMakeLists.txt b/evcharger-app/CMakeLists.txt
index 355740e..9f17d0d 100644
--- a/evcharger-app/CMakeLists.txt
+++ b/evcharger-app/CMakeLists.txt
@@ -16,6 +16,8 @@ qt_add_executable(evcharger-app WIN32 MACOSX_BUNDLE
main.cpp
sendmessagehelper.cpp
sendmessagehelper.h
+ timeutils.cpp
+ timeutils.h
versionutils.cpp
versionutils.h
)
diff --git a/evcharger-app/i18n/qml_da.ts b/evcharger-app/i18n/qml_da.ts
index aac6399..a482631 100644
--- a/evcharger-app/i18n/qml_da.ts
+++ b/evcharger-app/i18n/qml_da.ts
@@ -29,9 +29,8 @@
Aktiver demotilstand
- Set charging color to new
- Indstil opladningsfarve til ny
+ Indstil opladningsfarve til ny
@@ -1531,10 +1530,210 @@
DateAndTimePage
-
+ Date and timeDato og tid
+
+
+
+ Custom
+ Brugerdefineret
+
+
+
+ The charger uses its clock for schedules, flexible energy prices and recorded data.
+ Laderen bruger sit ur til tidsplaner, fleksible energipriser og registrerede data.
+
+
+
+ Current device time
+ Aktuel enhedstid
+
+
+
+ UTC time
+ UTC-tid
+
+
+
+ Local time
+ Lokal tid
+
+
+
+
+ Sync from phone
+ Synkroniser fra telefonen
+
+
+
+ Set the charger clock to the phone's current time.
+ Indstil laderens ur til telefonens aktuelle tid.
+
+
+
+ Timezone
+ Tidszone
+
+
+
+ Choose a timezone to configure its standard offset and daylight-saving rule automatically.
+ Vælg en tidszone for automatisk at konfigurere dens standardforskydning og sommertidsregel.
+
+
+
+
+
+ Timezone preset
+ Forudindstillet tidszone
+
+
+
+ UTC offset
+ UTC-forskydning
+
+
+
+ minutes
+ minutter
+
+
+
+ Daylight-saving rule
+ Sommertidsregel
+
+
+
+ None
+ Ingen
+
+
+
+ European
+ Europæisk
+
+
+
+ United States
+ USA
+
+
+
+ Australian
+ Australsk
+
+
+
+ Network time (NTP)
+ Netværkstid (NTP)
+
+
+
+ NTP keeps the charger clock synchronized automatically while it has internet access.
+ NTP holder automatisk laderens ur synkroniseret, når den har internetadgang.
+
+
+
+ Automatic time synchronization
+ Automatisk tidssynkronisering
+
+
+
+ NTP server
+ NTP-server
+
+
+
+ Synchronization status
+ Synkroniseringsstatus
+
+
+
+ Not synchronized
+ Ikke synkroniseret
+
+
+
+ Synchronized
+ Synkroniseret
+
+
+
+ Synchronizing
+ Synkroniserer
+
+
+
+ Unknown (%1)
+ Ukendt (%1)
+
+
+
+
+ Synchronize now
+ Synkroniser nu
+
+
+
+ Ask the configured NTP server for the current time.
+ Hent den aktuelle tid fra den konfigurerede NTP-server.
+
+
+
+ Enable automatic time synchronization first.
+ Aktivér først automatisk tidssynkronisering.
+
+
+
+ Synchronization mode
+ Synkroniseringstilstand
+
+
+
+ Immediate
+ Øjeblikkelig
+
+
+
+ Smooth
+ Jævn
+
+
+
+ Synchronization interval
+ Synkroniseringsinterval
+
+
+
+ The preset is stored on the charger and configures the firmware's supported daylight-saving calculation.
+ Forudindstillingen gemmes på laderen og konfigurerer den sommertidsberegning, som firmwaren understøtter.
+
+
+
+ No daylight saving
+ Ingen sommertid
+
+
+
+ European daylight saving
+ Europæisk sommertid
+
+
+
+ US daylight saving
+ Amerikansk sommertid
+
+
+
+ Australian daylight saving
+ Australsk sommertid
+
+
+
+ Unknown
+ Ukendt
+ DeviceConnection
@@ -1873,7 +2072,7 @@
For fjernadgang skal der først konfigureres en adgangskode. Det kan gøres via adgangspunktet.
-
+ Connection disturbedForbindelsen forstyrret
@@ -1898,32 +2097,32 @@
DurationEditItem
-
+ %1 h%1 h
-
+ %1 min%1 min
-
+ %1 s%1 s
-
+ HoursTimer
-
+ MinutesMinutter
-
+ SecondsSekunder
@@ -3027,108 +3226,137 @@
Konfigureret forhåndsvisning
-
+ Adjust how the LED ring communicates charging states and preview the result before using it on the charger.Juster, hvordan LED-ringen viser opladningstilstande, og forhåndsvis resultatet, før du bruger det på laderen.
-
+ LED ring previewForhåndsvisning af LED-ring
-
+ PreviewForhåndsvisning
-
+ The live preview follows the animation reported by the charger. Select another state to preview its configured color; the charging preview includes the rotating tails.Forhåndsvisningen i realtid følger den animation, som laderen rapporterer. Vælg en anden tilstand for at forhåndsvise dens konfigurerede farve; opladningsforhåndsvisningen indeholder de roterende lyshaler.
-
+ BrightnessLysstyrke
-
+ LED brightnessLED-lysstyrke
-
-
+
+ %1%%1%
-
+ Lower brightness is less distracting at night. Set it to zero to turn the ring off completely.Lavere lysstyrke er mindre forstyrrende om natten. Indstil den til nul for at slukke ringen helt.
-
+ Status colorsStatusfarver
-
+ Tap a charging state to choose the color used by the LED ring.Tryk på en opladningstilstand for at vælge den farve, LED-ringen bruger.
-
+ Energy savingEnergibesparelse
-
+ Energy saving onEnergibesparelse til
-
+ Energy saving offEnergibesparelse fra
-
+ Energy saving turns off status lighting when it is not needed. Charging and important warnings remain visible.Energibesparelse slukker statusbelysningen, når den ikke er nødvendig. Opladning og vigtige advarsler forbliver synlige.
-
+ Keep mode indicators onBehold tilstandsindikatorerne tændt
-
+ Keep the small charging-mode indicators visible while the LED ring is saving energy.Behold de små opladningstilstandsindikatorer synlige, mens LED-ringen sparer energi.
-
+ Service diagnosticsServicediagnostik
-
+ These service options can replace normal status animations. Leave them off unless you are diagnosing the LED hardware.Disse serviceindstillinger kan erstatte normale statusanimationer. Lad dem være slået fra, medmindre du diagnosticerer LED-hardwaren.
-
+ Factory LED testFabrikkens LED-test
-
+ LED diagnosticsLED-diagnostik
-
+
+ Choose charging color
+ Vælg ladefarve
+
+
+
+ These special values enable animated charging effects. You can also choose a normal custom color.
+ Disse specialværdier aktiverer animerede ladeeffekter. Du kan også vælge en almindelig brugerdefineret farve.
+
+
+
+ Category colors
+ Kategorifarver
+
+
+ Magic charging
+ Magisk opladning
+
+
+
+ Rainbow charging
+ Regnbueopladning
+
+
+
+ Custom color…
+ Brugerdefineret farve…
+
+
+ Choose color for %1Vælg farve til %1
@@ -3863,7 +4091,7 @@
None
- Ingen
+ Ingen
diff --git a/evcharger-app/i18n/qml_de.ts b/evcharger-app/i18n/qml_de.ts
index 836f3f7..cd4c6a4 100644
--- a/evcharger-app/i18n/qml_de.ts
+++ b/evcharger-app/i18n/qml_de.ts
@@ -29,9 +29,8 @@
Demo Modus aktivieren
- Set charging color to new
- Lade-Farbe auf neu setzen
+ Lade-Farbe auf neu setzen
@@ -459,7 +458,7 @@
None
- Kein
+ Keine
@@ -1639,10 +1638,210 @@
DateAndTimePage
-
+ Date and timeDatum und Uhrzeit
+
+
+
+ Custom
+ Benutzerdefiniert
+
+
+
+ The charger uses its clock for schedules, flexible energy prices and recorded data.
+ Der Charger verwendet seine Uhr für Zeitpläne, flexible Energiepreise und aufgezeichnete Daten.
+
+
+
+ Current device time
+ Aktuelle Gerätezeit
+
+
+
+ UTC time
+ UTC-Zeit
+
+
+
+ Local time
+ Ortszeit
+
+
+
+
+ Sync from phone
+ Mit Telefon synchronisieren
+
+
+
+ Set the charger clock to the phone's current time.
+ Die Uhr des Chargers auf die aktuelle Zeit des Telefons stellen.
+
+
+
+ Timezone
+ Zeitzone
+
+
+
+ Choose a timezone to configure its standard offset and daylight-saving rule automatically.
+ Wähle eine Zeitzone, um deren Standardversatz und Sommerzeitregel automatisch zu konfigurieren.
+
+
+
+
+
+ Timezone preset
+ Zeitzonenvoreinstellung
+
+
+
+ UTC offset
+ UTC-Versatz
+
+
+
+ minutes
+ Minuten
+
+
+
+ Daylight-saving rule
+ Sommerzeitregel
+
+
+
+ None
+ Keine
+
+
+
+ European
+ Europäisch
+
+
+
+ United States
+ Vereinigte Staaten
+
+
+
+ Australian
+ Australisch
+
+
+
+ Network time (NTP)
+ Netzwerkzeit (NTP)
+
+
+
+ NTP keeps the charger clock synchronized automatically while it has internet access.
+ NTP hält die Uhr des Chargers automatisch synchron, solange er Internetzugang hat.
+
+
+
+ Automatic time synchronization
+ Automatische Zeitsynchronisierung
+
+
+
+ NTP server
+ NTP-Server
+
+
+
+ Synchronization status
+ Synchronisierungsstatus
+
+
+
+ Not synchronized
+ Nicht synchronisiert
+
+
+
+ Synchronized
+ Synchronisiert
+
+
+
+ Synchronizing
+ Synchronisierung läuft
+
+
+
+ Unknown (%1)
+ Unbekannt (%1)
+
+
+
+
+ Synchronize now
+ Jetzt synchronisieren
+
+
+
+ Ask the configured NTP server for the current time.
+ Aktuelle Zeit vom konfigurierten NTP-Server abrufen.
+
+
+
+ Enable automatic time synchronization first.
+ Aktiviere zuerst die automatische Zeitsynchronisierung.
+
+
+
+ Synchronization mode
+ Synchronisierungsmodus
+
+
+
+ Immediate
+ Sofort
+
+
+
+ Smooth
+ Schrittweise
+
+
+
+ Synchronization interval
+ Synchronisierungsintervall
+
+
+
+ The preset is stored on the charger and configures the firmware's supported daylight-saving calculation.
+ Die Voreinstellung wird auf dem Charger gespeichert und konfiguriert die von der Firmware unterstützte Sommerzeitberechnung.
+
+
+
+ No daylight saving
+ Keine Sommerzeit
+
+
+
+ European daylight saving
+ Europäische Sommerzeit
+
+
+
+ US daylight saving
+ US-Sommerzeit
+
+
+
+ Australian daylight saving
+ Australische Sommerzeit
+
+
+
+ Unknown
+ Unbekannt
+ DeviceConnection
@@ -2033,7 +2232,7 @@
Um dieses Gerät aus der Ferne nutzen zu können, müssen Sie erst ein Passwort einrichten. Dies kann über den AccessPoint gemacht werden.
-
+ Connection disturbedVerbindung schwer gestört
@@ -2058,32 +2257,32 @@
DurationEditItem
-
+ %1 h
-
+ %1 min
-
+ %1 s
-
+ Hours
-
+ Minutes
-
+ Seconds
@@ -2877,7 +3076,7 @@
Unknown
- Unbekannt
+ Unbekannt
@@ -3202,108 +3401,137 @@
Konfigurierte Vorschau
-
+ Adjust how the LED ring communicates charging states and preview the result before using it on the charger.Passe an, wie der LED-Ring Ladezustände anzeigt, und prüfe das Ergebnis in der Vorschau, bevor du es am Charger verwendest.
-
+ LED ring previewLED-Ring-Vorschau
-
+ PreviewVorschau
-
+ The live preview follows the animation reported by the charger. Select another state to preview its configured color; the charging preview includes the rotating tails.Die Live-Vorschau folgt der vom Charger gemeldeten Animation. Wähle einen anderen Zustand, um dessen konfigurierte Farbe zu prüfen; die Ladevorschau enthält die rotierenden Schweife.
-
+ BrightnessHelligkeit
-
+ LED brightnessLED-Helligkeit
-
-
+
+ %1%%1%
-
+ Lower brightness is less distracting at night. Set it to zero to turn the ring off completely.Geringere Helligkeit stört nachts weniger. Stelle sie auf null, um den Ring vollständig auszuschalten.
-
+ Status colorsStatusfarben
-
+ Tap a charging state to choose the color used by the LED ring.Tippe auf einen Ladezustand, um die vom LED-Ring verwendete Farbe auszuwählen.
-
+ Energy savingEnergiesparen
-
+ Energy saving onEnergiesparen ein
-
+ Energy saving offEnergiesparen aus
-
+ Energy saving turns off status lighting when it is not needed. Charging and important warnings remain visible.Beim Energiesparen wird die Statusbeleuchtung ausgeschaltet, wenn sie nicht benötigt wird. Laden und wichtige Warnungen bleiben sichtbar.
-
+ Keep mode indicators onModusanzeigen eingeschaltet lassen
-
+ Keep the small charging-mode indicators visible while the LED ring is saving energy.Lasse die kleinen Lademodus-Anzeigen sichtbar, während der LED-Ring Energie spart.
-
+ Service diagnosticsServicediagnose
-
+ These service options can replace normal status animations. Leave them off unless you are diagnosing the LED hardware.Diese Serviceoptionen können normale Statusanimationen ersetzen. Lasse sie ausgeschaltet, sofern du nicht die LED-Hardware diagnostizierst.
-
+ Factory LED testWerkseitiger LED-Test
-
+ LED diagnosticsLED-Diagnose
-
+
+ Choose charging color
+ Ladefarbe auswählen
+
+
+
+ These special values enable animated charging effects. You can also choose a normal custom color.
+ Diese besonderen Werte aktivieren animierte Ladeeffekte. Du kannst auch eine normale benutzerdefinierte Farbe wählen.
+
+
+
+ Category colors
+ Kategoriefarben
+
+
+ Magic charging
+ Magisches Laden
+
+
+
+ Rainbow charging
+ Regenbogenladen
+
+
+
+ Custom color…
+ Benutzerdefinierte Farbe…
+
+
+ Choose color for %1Farbe für %1 wählen
@@ -4139,7 +4367,7 @@
None
- Keines
+ Keine
@@ -4997,7 +5225,7 @@
Unknown
- Unbekannt
+ Unbekannt
diff --git a/evcharger-app/i18n/qml_fi.ts b/evcharger-app/i18n/qml_fi.ts
index b0eeb12..3f32874 100644
--- a/evcharger-app/i18n/qml_fi.ts
+++ b/evcharger-app/i18n/qml_fi.ts
@@ -29,9 +29,8 @@
Ota esittelytila käyttöön
- Set charging color to new
- Aseta latausväri uuteen
+ Aseta latausväri uuteen
@@ -1531,10 +1530,210 @@
DateAndTimePage
-
+ Date and timePäivämäärä ja aika
+
+
+
+ Custom
+ Mukautettu
+
+
+
+ The charger uses its clock for schedules, flexible energy prices and recorded data.
+ Laturi käyttää kelloaan ajastuksiin, joustaviin energiahintoihin ja tallennettuihin tietoihin.
+
+
+
+ Current device time
+ Laitteen nykyinen aika
+
+
+
+ UTC time
+ UTC-aika
+
+
+
+ Local time
+ Paikallinen aika
+
+
+
+
+ Sync from phone
+ Synkronoi puhelimesta
+
+
+
+ Set the charger clock to the phone's current time.
+ Aseta laturin kelloon puhelimen nykyinen aika.
+
+
+
+ Timezone
+ Aikavyöhyke
+
+
+
+ Choose a timezone to configure its standard offset and daylight-saving rule automatically.
+ Valitse aikavyöhyke, jolloin sen normaaliajan poikkeama ja kesäaikasääntö määritetään automaattisesti.
+
+
+
+
+
+ Timezone preset
+ Aikavyöhyke-esiasetus
+
+
+
+ UTC offset
+ UTC-poikkeama
+
+
+
+ minutes
+ minuuttia
+
+
+
+ Daylight-saving rule
+ Kesäaikasääntö
+
+
+
+ None
+ Ei mitään
+
+
+
+ European
+ Eurooppalainen
+
+
+
+ United States
+ Yhdysvallat
+
+
+
+ Australian
+ Australialainen
+
+
+
+ Network time (NTP)
+ Verkkoaika (NTP)
+
+
+
+ NTP keeps the charger clock synchronized automatically while it has internet access.
+ NTP pitää laturin kellon automaattisesti synkronoituna, kun internetyhteys on käytettävissä.
+
+
+
+ Automatic time synchronization
+ Automaattinen ajan synkronointi
+
+
+
+ NTP server
+ NTP-palvelin
+
+
+
+ Synchronization status
+ Synkronoinnin tila
+
+
+
+ Not synchronized
+ Ei synkronoitu
+
+
+
+ Synchronized
+ Synkronoitu
+
+
+
+ Synchronizing
+ Synkronoidaan
+
+
+
+ Unknown (%1)
+ Tuntematon (%1)
+
+
+
+
+ Synchronize now
+ Synkronoi nyt
+
+
+
+ Ask the configured NTP server for the current time.
+ Pyydä nykyinen aika määritetyltä NTP-palvelimelta.
+
+
+
+ Enable automatic time synchronization first.
+ Ota ensin automaattinen ajan synkronointi käyttöön.
+
+
+
+ Synchronization mode
+ Synkronointitila
+
+
+
+ Immediate
+ Välitön
+
+
+
+ Smooth
+ Asteittainen
+
+
+
+ Synchronization interval
+ Synkronointiväli
+
+
+
+ The preset is stored on the charger and configures the firmware's supported daylight-saving calculation.
+ Esiasetus tallennetaan laturiin, ja se määrittää laiteohjelmiston tukeman kesäaikalaskennan.
+
+
+
+ No daylight saving
+ Ei kesäaikaa
+
+
+
+ European daylight saving
+ Eurooppalainen kesäaika
+
+
+
+ US daylight saving
+ Yhdysvaltain kesäaika
+
+
+
+ Australian daylight saving
+ Australialainen kesäaika
+
+
+
+ Unknown
+ Tuntematon
+ DeviceConnection
@@ -1873,7 +2072,7 @@
Etäkäyttöä varten salasana on ensin määritettävä. Sen voi tehdä tukiaseman kautta.
-
+ Connection disturbedYhteys häiriintynyt
@@ -1898,32 +2097,32 @@
DurationEditItem
-
+ %1 h%1 h
-
+ %1 min%1 min
-
+ %1 s%1 s
-
+ HoursTuntia
-
+ MinutesMinuutit
-
+ SecondsSekuntia
@@ -3027,108 +3226,137 @@
Määritetty esikatselu
-
+ Adjust how the LED ring communicates charging states and preview the result before using it on the charger.Säädä, miten LED-rengas ilmaisee lataustilat, ja esikatsele tulos ennen sen käyttämistä laturissa.
-
+ LED ring previewLED-renkaan esikatselu
-
+ PreviewEsikatselu
-
+ The live preview follows the animation reported by the charger. Select another state to preview its configured color; the charging preview includes the rotating tails.Reaaliaikainen esikatselu seuraa laturin ilmoittamaa animaatiota. Valitse toinen tila nähdäksesi sen määritetyn värin; latauksen esikatselu sisältää pyörivät valovanat.
-
+ BrightnessKirkkaus
-
+ LED brightnessLED-kirkkaus
-
-
+
+ %1%%1%
-
+ Lower brightness is less distracting at night. Set it to zero to turn the ring off completely.Pienempi kirkkaus häiritsee vähemmän yöllä. Aseta arvoksi nolla sammuttaaksesi renkaan kokonaan.
-
+ Status colorsTilavärit
-
+ Tap a charging state to choose the color used by the LED ring.Valitse LED-renkaan käyttämä väri napauttamalla lataustilaa.
-
+ Energy savingEnergiansäästö
-
+ Energy saving onEnergiansäästö käytössä
-
+ Energy saving offEnergiansäästö pois käytöstä
-
+ Energy saving turns off status lighting when it is not needed. Charging and important warnings remain visible.Energiansäästö sammuttaa tilavalot, kun niitä ei tarvita. Lataus ja tärkeät varoitukset pysyvät näkyvissä.
-
+ Keep mode indicators onPidä tilan merkkivalot päällä
-
+ Keep the small charging-mode indicators visible while the LED ring is saving energy.Pidä pienet lataustilan merkkivalot näkyvissä, kun LED-rengas säästää energiaa.
-
+ Service diagnosticsHuoltodiagnostiikka
-
+ These service options can replace normal status animations. Leave them off unless you are diagnosing the LED hardware.Nämä huoltoasetukset voivat korvata normaalit tila-animaatiot. Jätä ne pois käytöstä, ellet diagnosoi LED-laitteistoa.
-
+ Factory LED testTehtaan LED-testi
-
+ LED diagnosticsLED-diagnostiikka
-
+
+ Choose charging color
+ Valitse latausväri
+
+
+
+ These special values enable animated charging effects. You can also choose a normal custom color.
+ Nämä erikoisarvot ottavat animoidut lataustehosteet käyttöön. Voit myös valita tavallisen mukautetun värin.
+
+
+
+ Category colors
+ Kategoriavärit
+
+
+ Magic charging
+ Maaginen lataus
+
+
+
+ Rainbow charging
+ Sateenkaarilataus
+
+
+
+ Custom color…
+ Mukautettu väri…
+
+
+ Choose color for %1Valitse kohteen %1 väri
@@ -3863,7 +4091,7 @@
None
- Ei mitään
+ Ei mitään
diff --git a/evcharger-app/i18n/qml_nb.ts b/evcharger-app/i18n/qml_nb.ts
index db85638..04de6e5 100644
--- a/evcharger-app/i18n/qml_nb.ts
+++ b/evcharger-app/i18n/qml_nb.ts
@@ -29,9 +29,8 @@
Aktiver demomodus
- Set charging color to new
- Sett ladefarge til ny
+ Sett ladefarge til ny
@@ -1531,10 +1530,210 @@
DateAndTimePage
-
+ Date and timeDato og tid
+
+
+
+ Custom
+ Tilpasset
+
+
+
+ The charger uses its clock for schedules, flexible energy prices and recorded data.
+ Laderen bruker klokken sin til tidsplaner, fleksible energipriser og registrerte data.
+
+
+
+ Current device time
+ Gjeldende enhetstid
+
+
+
+ UTC time
+ UTC-tid
+
+
+
+ Local time
+ Lokal tid
+
+
+
+
+ Sync from phone
+ Synkroniser fra telefonen
+
+
+
+ Set the charger clock to the phone's current time.
+ Still laderens klokke til telefonens gjeldende tid.
+
+
+
+ Timezone
+ Tidssone
+
+
+
+ Choose a timezone to configure its standard offset and daylight-saving rule automatically.
+ Velg en tidssone for å konfigurere standardavviket og sommertidsregelen automatisk.
+
+
+
+
+
+ Timezone preset
+ Forhåndsvalgt tidssone
+
+
+
+ UTC offset
+ UTC-avvik
+
+
+
+ minutes
+ minutter
+
+
+
+ Daylight-saving rule
+ Sommertidsregel
+
+
+
+ None
+ Ingen
+
+
+
+ European
+ Europeisk
+
+
+
+ United States
+ USA
+
+
+
+ Australian
+ Australsk
+
+
+
+ Network time (NTP)
+ Nettverkstid (NTP)
+
+
+
+ NTP keeps the charger clock synchronized automatically while it has internet access.
+ NTP holder laderens klokke automatisk synkronisert når den har internettilgang.
+
+
+
+ Automatic time synchronization
+ Automatisk tidssynkronisering
+
+
+
+ NTP server
+ NTP-server
+
+
+
+ Synchronization status
+ Synkroniseringsstatus
+
+
+
+ Not synchronized
+ Ikke synkronisert
+
+
+
+ Synchronized
+ Synkronisert
+
+
+
+ Synchronizing
+ Synkroniserer
+
+
+
+ Unknown (%1)
+ Ukjent (%1)
+
+
+
+
+ Synchronize now
+ Synkroniser nå
+
+
+
+ Ask the configured NTP server for the current time.
+ Be den konfigurerte NTP-serveren om gjeldende tid.
+
+
+
+ Enable automatic time synchronization first.
+ Aktiver automatisk tidssynkronisering først.
+
+
+
+ Synchronization mode
+ Synkroniseringsmodus
+
+
+
+ Immediate
+ Umiddelbar
+
+
+
+ Smooth
+ Jevn
+
+
+
+ Synchronization interval
+ Synkroniseringsintervall
+
+
+
+ The preset is stored on the charger and configures the firmware's supported daylight-saving calculation.
+ Forhåndsvalget lagres på laderen og konfigurerer sommertidsberegningen som støttes av fastvaren.
+
+
+
+ No daylight saving
+ Ingen sommertid
+
+
+
+ European daylight saving
+ Europeisk sommertid
+
+
+
+ US daylight saving
+ Amerikansk sommertid
+
+
+
+ Australian daylight saving
+ Australsk sommertid
+
+
+
+ Unknown
+ Ukjent
+ DeviceConnection
@@ -1873,7 +2072,7 @@
For fjerntilgang må et passord først konfigureres. Dette kan gjøres via tilgangspunktet.
-
+ Connection disturbedForbindelsen forstyrret
@@ -1898,32 +2097,32 @@
DurationEditItem
-
+ %1 h%1 h
-
+ %1 min%1 min
-
+ %1 s%1 s
-
+ HoursTimer
-
+ MinutesMinutter
-
+ SecondsSekunder
@@ -3027,108 +3226,137 @@
Konfigurert forhåndsvisning
-
+ Adjust how the LED ring communicates charging states and preview the result before using it on the charger.Juster hvordan LED-ringen viser ladestatus, og forhåndsvis resultatet før du bruker det på laderen.
-
+ LED ring previewForhåndsvisning av LED-ring
-
+ PreviewForhåndsvisning
-
+ The live preview follows the animation reported by the charger. Select another state to preview its configured color; the charging preview includes the rotating tails.Forhåndsvisningen i sanntid følger animasjonen som laderen rapporterer. Velg en annen tilstand for å forhåndsvise den konfigurerte fargen; ladeforhåndsvisningen inkluderer de roterende lyshalene.
-
+ BrightnessLysstyrke
-
+ LED brightnessLED-lysstyrke
-
-
+
+ %1%%1%
-
+ Lower brightness is less distracting at night. Set it to zero to turn the ring off completely.Lavere lysstyrke er mindre forstyrrende om natten. Sett den til null for å slå av ringen helt.
-
+ Status colorsStatusfarger
-
+ Tap a charging state to choose the color used by the LED ring.Trykk på en ladestatus for å velge fargen som LED-ringen bruker.
-
+ Energy savingEnergisparing
-
+ Energy saving onEnergisparing på
-
+ Energy saving offEnergisparing av
-
+ Energy saving turns off status lighting when it is not needed. Charging and important warnings remain visible.Energisparing slår av statusbelysningen når den ikke trengs. Lading og viktige advarsler forblir synlige.
-
+ Keep mode indicators onBehold modusindikatorene på
-
+ Keep the small charging-mode indicators visible while the LED ring is saving energy.Behold de små lademodusindikatorene synlige mens LED-ringen sparer energi.
-
+ Service diagnosticsServicediagnostikk
-
+ These service options can replace normal status animations. Leave them off unless you are diagnosing the LED hardware.Disse servicealternativene kan erstatte normale statusanimasjoner. La dem være av med mindre du feilsøker LED-maskinvaren.
-
+ Factory LED testLED-test fra fabrikk
-
+ LED diagnosticsLED-diagnostikk
-
+
+ Choose charging color
+ Velg ladefarge
+
+
+
+ These special values enable animated charging effects. You can also choose a normal custom color.
+ Disse spesialverdiene aktiverer animerte ladeeffekter. Du kan også velge en vanlig tilpasset farge.
+
+
+
+ Category colors
+ Kategorifarger
+
+
+ Magic charging
+ Magisk lading
+
+
+
+ Rainbow charging
+ Regnbuelading
+
+
+
+ Custom color…
+ Tilpasset farge…
+
+
+ Choose color for %1Velg farge for %1
@@ -3863,7 +4091,7 @@
None
- Ingen
+ Ingen
diff --git a/evcharger-app/i18n/qml_sv.ts b/evcharger-app/i18n/qml_sv.ts
index 5dfe174..0e32117 100644
--- a/evcharger-app/i18n/qml_sv.ts
+++ b/evcharger-app/i18n/qml_sv.ts
@@ -29,9 +29,8 @@
Aktivera demoläge
- Set charging color to new
- Ställ in laddningsfärgen till ny
+ Ställ in laddningsfärgen till ny
@@ -1531,10 +1530,210 @@
DateAndTimePage
-
+ Date and timeDatum och tid
+
+
+
+ Custom
+ Anpassad
+
+
+
+ The charger uses its clock for schedules, flexible energy prices and recorded data.
+ Laddaren använder sin klocka för scheman, flexibla energipriser och registrerade data.
+
+
+
+ Current device time
+ Aktuell enhetstid
+
+
+
+ UTC time
+ UTC-tid
+
+
+
+ Local time
+ Lokal tid
+
+
+
+
+ Sync from phone
+ Synkronisera från telefonen
+
+
+
+ Set the charger clock to the phone's current time.
+ Ställ in laddarens klocka på telefonens aktuella tid.
+
+
+
+ Timezone
+ Tidszon
+
+
+
+ Choose a timezone to configure its standard offset and daylight-saving rule automatically.
+ Välj en tidszon för att automatiskt konfigurera dess standardoffset och sommartidsregel.
+
+
+
+
+
+ Timezone preset
+ Förinställd tidszon
+
+
+
+ UTC offset
+ UTC-offset
+
+
+
+ minutes
+ minuter
+
+
+
+ Daylight-saving rule
+ Sommartidsregel
+
+
+
+ None
+ Ingen
+
+
+
+ European
+ Europeisk
+
+
+
+ United States
+ USA
+
+
+
+ Australian
+ Australisk
+
+
+
+ Network time (NTP)
+ Nätverkstid (NTP)
+
+
+
+ NTP keeps the charger clock synchronized automatically while it has internet access.
+ NTP håller laddarens klocka automatiskt synkroniserad när den har internetåtkomst.
+
+
+
+ Automatic time synchronization
+ Automatisk tidssynkronisering
+
+
+
+ NTP server
+ NTP-server
+
+
+
+ Synchronization status
+ Synkroniseringsstatus
+
+
+
+ Not synchronized
+ Inte synkroniserad
+
+
+
+ Synchronized
+ Synkroniserad
+
+
+
+ Synchronizing
+ Synkroniserar
+
+
+
+ Unknown (%1)
+ Okänd (%1)
+
+
+
+
+ Synchronize now
+ Synkronisera nu
+
+
+
+ Ask the configured NTP server for the current time.
+ Hämta aktuell tid från den konfigurerade NTP-servern.
+
+
+
+ Enable automatic time synchronization first.
+ Aktivera automatisk tidssynkronisering först.
+
+
+
+ Synchronization mode
+ Synkroniseringsläge
+
+
+
+ Immediate
+ Omedelbar
+
+
+
+ Smooth
+ Mjuk
+
+
+
+ Synchronization interval
+ Synkroniseringsintervall
+
+
+
+ The preset is stored on the charger and configures the firmware's supported daylight-saving calculation.
+ Förinställningen lagras på laddaren och konfigurerar den sommartidsberäkning som stöds av den fasta programvaran.
+
+
+
+ No daylight saving
+ Ingen sommartid
+
+
+
+ European daylight saving
+ Europeisk sommartid
+
+
+
+ US daylight saving
+ Amerikansk sommartid
+
+
+
+ Australian daylight saving
+ Australisk sommartid
+
+
+
+ Unknown
+ Okänd
+ DeviceConnection
@@ -1873,7 +2072,7 @@
För fjärråtkomst måste ett lösenord först konfigureras. Det kan göras via åtkomstpunkten.
-
+ Connection disturbedAnslutningen störd
@@ -1898,32 +2097,32 @@
DurationEditItem
-
+ %1 h%1 h
-
+ %1 min%1 min
-
+ %1 s%1 s
-
+ HoursTimmar
-
+ MinutesMinuter
-
+ SecondsSekunder
@@ -3027,108 +3226,137 @@
Konfigurerad förhandsvisning
-
+ Adjust how the LED ring communicates charging states and preview the result before using it on the charger.Anpassa hur LED-ringen visar laddningsstatus och förhandsgranska resultatet innan du använder det på laddaren.
-
+ LED ring previewFörhandsvisning av LED-ring
-
+ PreviewFörhandsvisning
-
+ The live preview follows the animation reported by the charger. Select another state to preview its configured color; the charging preview includes the rotating tails.Förhandsvisningen i realtid följer animationen som laddaren rapporterar. Välj ett annat tillstånd för att förhandsgranska dess konfigurerade färg; laddningsförhandsvisningen innehåller de roterande ljussvansarna.
-
+ BrightnessLjusstyrka
-
+ LED brightnessLED-ljusstyrka
-
-
+
+ %1%%1%
-
+ Lower brightness is less distracting at night. Set it to zero to turn the ring off completely.Lägre ljusstyrka stör mindre på natten. Ställ in den på noll för att stänga av ringen helt.
-
+ Status colorsStatusfärger
-
+ Tap a charging state to choose the color used by the LED ring.Tryck på ett laddningstillstånd för att välja färgen som LED-ringen använder.
-
+ Energy savingEnergisparläge
-
+ Energy saving onEnergisparläge på
-
+ Energy saving offEnergisparläge av
-
+ Energy saving turns off status lighting when it is not needed. Charging and important warnings remain visible.Energisparläget stänger av statusbelysningen när den inte behövs. Laddning och viktiga varningar förblir synliga.
-
+ Keep mode indicators onBehåll lägesindikatorerna tända
-
+ Keep the small charging-mode indicators visible while the LED ring is saving energy.Behåll de små laddningslägesindikatorerna synliga medan LED-ringen sparar energi.
-
+ Service diagnosticsServicediagnostik
-
+ These service options can replace normal status animations. Leave them off unless you are diagnosing the LED hardware.Dessa servicealternativ kan ersätta normala statusanimationer. Låt dem vara avstängda om du inte felsöker LED-maskinvaran.
-
+ Factory LED testLED-test från fabrik
-
+ LED diagnosticsLED-diagnostik
-
+
+ Choose charging color
+ Välj laddningsfärg
+
+
+
+ These special values enable animated charging effects. You can also choose a normal custom color.
+ Dessa specialvärden aktiverar animerade laddningseffekter. Du kan också välja en vanlig anpassad färg.
+
+
+
+ Category colors
+ Kategorifärger
+
+
+ Magic charging
+ Magisk laddning
+
+
+
+ Rainbow charging
+ Regnbågsladdning
+
+
+
+ Custom color…
+ Anpassad färg…
+
+
+ Choose color for %1Välj färg för %1
@@ -3863,7 +4091,7 @@
None
- Ingen
+ Ingen
diff --git a/evcharger-app/i18n/qml_tr.ts b/evcharger-app/i18n/qml_tr.ts
index 30a1477..215c214 100644
--- a/evcharger-app/i18n/qml_tr.ts
+++ b/evcharger-app/i18n/qml_tr.ts
@@ -29,9 +29,8 @@
Demo modunu etkinleştir
- Set charging color to new
- Şarj rengini yeniye ayarla
+ Şarj rengini yeniye ayarla
@@ -452,7 +451,7 @@
None
- Hiçbiri
+ Yok
@@ -1531,10 +1530,210 @@
DateAndTimePage
-
+ Date and timeTarih ve saat
+
+
+
+ Custom
+ Özel
+
+
+
+ The charger uses its clock for schedules, flexible energy prices and recorded data.
+ Şarj cihazı; programlar, esnek enerji fiyatları ve kaydedilen veriler için saatini kullanır.
+
+
+
+ Current device time
+ Geçerli cihaz saati
+
+
+
+ UTC time
+ UTC saati
+
+
+
+ Local time
+ Yerel saat
+
+
+
+
+ Sync from phone
+ Telefondan eşitle
+
+
+
+ Set the charger clock to the phone's current time.
+ Şarj cihazının saatini telefonun geçerli saatine ayarlayın.
+
+
+
+ Timezone
+ Saat dilimi
+
+
+
+ Choose a timezone to configure its standard offset and daylight-saving rule automatically.
+ Standart UTC farkını ve yaz saati kuralını otomatik olarak yapılandırmak için bir saat dilimi seçin.
+
+
+
+
+
+ Timezone preset
+ Saat dilimi ön ayarı
+
+
+
+ UTC offset
+ UTC farkı
+
+
+
+ minutes
+ dakika
+
+
+
+ Daylight-saving rule
+ Yaz saati kuralı
+
+
+
+ None
+ Yok
+
+
+
+ European
+ Avrupa
+
+
+
+ United States
+ Amerika Birleşik Devletleri
+
+
+
+ Australian
+ Avustralya
+
+
+
+ Network time (NTP)
+ Ağ zamanı (NTP)
+
+
+
+ NTP keeps the charger clock synchronized automatically while it has internet access.
+ NTP, internet erişimi varken şarj cihazının saatini otomatik olarak eşitler.
+
+
+
+ Automatic time synchronization
+ Otomatik zaman eşitleme
+
+
+
+ NTP server
+ NTP sunucusu
+
+
+
+ Synchronization status
+ Eşitleme durumu
+
+
+
+ Not synchronized
+ Eşitlenmedi
+
+
+
+ Synchronized
+ Eşitlendi
+
+
+
+ Synchronizing
+ Eşitleniyor
+
+
+
+ Unknown (%1)
+ Bilinmiyor (%1)
+
+
+
+
+ Synchronize now
+ Şimdi eşitle
+
+
+
+ Ask the configured NTP server for the current time.
+ Yapılandırılmış NTP sunucusundan geçerli zamanı isteyin.
+
+
+
+ Enable automatic time synchronization first.
+ Önce otomatik zaman eşitlemeyi etkinleştirin.
+
+
+
+ Synchronization mode
+ Eşitleme modu
+
+
+
+ Immediate
+ Anında
+
+
+
+ Smooth
+ Kademeli
+
+
+
+ Synchronization interval
+ Eşitleme aralığı
+
+
+
+ The preset is stored on the charger and configures the firmware's supported daylight-saving calculation.
+ Ön ayar şarj cihazında saklanır ve ürün yazılımının desteklediği yaz saati hesaplamasını yapılandırır.
+
+
+
+ No daylight saving
+ Yaz saati yok
+
+
+
+ European daylight saving
+ Avrupa yaz saati
+
+
+
+ US daylight saving
+ ABD yaz saati
+
+
+
+ Australian daylight saving
+ Avustralya yaz saati
+
+
+
+ Unknown
+ Bilinmiyor
+ DeviceConnection
@@ -1873,7 +2072,7 @@
Bu şifreyi uzaktan kullanmak için önce bir şifre ayarlanmalıdır. Bu işlem erişim noktası üzerinden yapılabilir.
-
+ Connection disturbedBağlantı bozuldu
@@ -1898,32 +2097,32 @@
DurationEditItem
-
+ %1 h%1 h
-
+ %1 min%1 dk.
-
+ %1 s%1 s
-
+ HoursSaat
-
+ Minutesdakika
-
+ SecondsSaniye
@@ -3027,108 +3226,137 @@
Yapılandırılmış önizleme
-
+ Adjust how the LED ring communicates charging states and preview the result before using it on the charger.LED halkasının şarj durumlarını nasıl gösterdiğini ayarlayın ve şarj cihazında kullanmadan önce sonucu önizleyin.
-
+ LED ring previewLED halkası önizlemesi
-
+ PreviewÖnizleme
-
+ The live preview follows the animation reported by the charger. Select another state to preview its configured color; the charging preview includes the rotating tails.Canlı önizleme, şarj cihazının bildirdiği animasyonu izler. Yapılandırılmış rengini önizlemek için başka bir durum seçin; şarj önizlemesi dönen ışık kuyruklarını içerir.
-
+ BrightnessParlaklık
-
+ LED brightnessLED parlaklığı
-
-
+
+ %1%%1%
-
+ Lower brightness is less distracting at night. Set it to zero to turn the ring off completely.Düşük parlaklık geceleri daha az rahatsız eder. Halkayı tamamen kapatmak için sıfıra ayarlayın.
-
+ Status colorsDurum renkleri
-
+ Tap a charging state to choose the color used by the LED ring.LED halkasının kullanacağı rengi seçmek için bir şarj durumuna dokunun.
-
+ Energy savingEnerji tasarrufu
-
+ Energy saving onEnerji tasarrufu açık
-
+ Energy saving offEnerji tasarrufu kapalı
-
+ Energy saving turns off status lighting when it is not needed. Charging and important warnings remain visible.Enerji tasarrufu, gerekmediğinde durum aydınlatmasını kapatır. Şarj ve önemli uyarılar görünür kalır.
-
+ Keep mode indicators onMod göstergelerini açık tut
-
+ Keep the small charging-mode indicators visible while the LED ring is saving energy.LED halkası enerji tasarrufu yaparken küçük şarj modu göstergelerini görünür tutun.
-
+ Service diagnosticsServis tanılama
-
+ These service options can replace normal status animations. Leave them off unless you are diagnosing the LED hardware.Bu servis seçenekleri normal durum animasyonlarının yerini alabilir. LED donanımını tanılamıyorsanız bunları kapalı bırakın.
-
+ Factory LED testFabrika LED testi
-
+ LED diagnosticsLED tanılama
-
+
+ Choose charging color
+ Şarj rengini seçin
+
+
+
+ These special values enable animated charging effects. You can also choose a normal custom color.
+ Bu özel değerler animasyonlu şarj efektlerini etkinleştirir. Normal bir özel renk de seçebilirsiniz.
+
+
+
+ Category colors
+ Kategori renkleri
+
+
+ Magic charging
+ Sihirli şarj
+
+
+
+ Rainbow charging
+ Gökkuşağı şarjı
+
+
+
+ Custom color…
+ Özel renk…
+
+
+ Choose color for %1%1 için renk seçin
@@ -3863,7 +4091,7 @@
None
- Hiçbiri
+ Yok
diff --git a/evcharger-app/qml/AboutPage.qml b/evcharger-app/qml/AboutPage.qml
index 261a083..f209e23 100644
--- a/evcharger-app/qml/AboutPage.qml
+++ b/evcharger-app/qml/AboutPage.qml
@@ -35,26 +35,4 @@ NavigationPage {
text: qsTr("Enable demo mode")
visible: true
}
- WhiteItemDelegate {
- SendMessageHelper {
- id: setChargingColor
- deviceConnection: theDeviceConnection
- }
-
- text: qsTr("Set charging color to new")
-
- onClicked: setChargingColor.sendMessage({
- type: "setValue",
- key: "cch",
- value: "#FEFEFE"
- })
-
- BusyIndicator {
- visible: setChargingColor.pending
- }
-
- RequestStatusText {
- request: setChargingColor
- }
- }
}
diff --git a/evcharger-app/qml/DateAndTimePage.qml b/evcharger-app/qml/DateAndTimePage.qml
index c631905..614ab30 100644
--- a/evcharger-app/qml/DateAndTimePage.qml
+++ b/evcharger-app/qml/DateAndTimePage.qml
@@ -1,13 +1,434 @@
+pragma ComponentBehavior: Bound
+
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
+import EVChargerApp
NavigationPage {
+ id: page
+
title: qsTr("Date and time")
- Text {
- text: "TODO"
+ readonly property var timezonePresets: [
+ { key: "UTC", name: "UTC", offset: 0, dst: 0 },
+ { key: "Europe/London", name: "Europe/London", offset: 0, dst: 1 },
+ { key: "Europe/Vienna", name: "Europe/Vienna", offset: 60, dst: 1 },
+ { key: "Europe/Berlin", name: "Europe/Berlin", offset: 60, dst: 1 },
+ { key: "Europe/Stockholm", name: "Europe/Stockholm", offset: 60, dst: 1 },
+ { key: "Europe/Oslo", name: "Europe/Oslo", offset: 60, dst: 1 },
+ { key: "Europe/Copenhagen", name: "Europe/Copenhagen", offset: 60, dst: 1 },
+ { key: "Europe/Helsinki", name: "Europe/Helsinki", offset: 120, dst: 1 },
+ { key: "Europe/Istanbul", name: "Europe/Istanbul", offset: 180, dst: 0 },
+ { key: "America/New_York", name: "America/New_York", offset: -300, dst: 2 },
+ { key: "America/Chicago", name: "America/Chicago", offset: -360, dst: 2 },
+ { key: "America/Denver", name: "America/Denver", offset: -420, dst: 2 },
+ { key: "America/Los_Angeles", name: "America/Los_Angeles", offset: -480, dst: 2 },
+ { key: "America/Phoenix", name: "America/Phoenix", offset: -420, dst: 0 },
+ { key: "Pacific/Honolulu", name: "Pacific/Honolulu", offset: -600, dst: 0 },
+ { key: "Australia/Perth", name: "Australia/Perth", offset: 480, dst: 0 },
+ { key: "Australia/Adelaide", name: "Australia/Adelaide", offset: 570, dst: 3 },
+ { key: "Australia/Sydney", name: "Australia/Sydney", offset: 600, dst: 3 },
+ { key: "Australia/Brisbane", name: "Australia/Brisbane", offset: 600, dst: 0 },
+ { key: "Asia/Kolkata", name: "Asia/Kolkata", offset: 330, dst: 0 },
+ { key: "Asia/Tokyo", name: "Asia/Tokyo", offset: 540, dst: 0 },
+ { key: "custom", name: qsTr("Custom"), offset: null, dst: null }
+ ]
- Layout.fillHeight: true
+ readonly property var legacyTimezoneAliases: ({
+ "gmt": "Europe/London",
+ "ect": "Europe/Vienna",
+ "eet": "Europe/Helsinki",
+ "jst": "Asia/Tokyo",
+ "awst": "Australia/Perth",
+ "acst": "Australia/Adelaide",
+ "aest": "Australia/Sydney",
+ "hst": "Pacific/Honolulu",
+ "pst": "America/Los_Angeles",
+ "pnt": "America/Denver",
+ "cst": "America/Chicago",
+ "est": "America/New_York"
+ })
+
+ function validNumber(value) {
+ return value !== null && value !== undefined && value !== "" && isFinite(Number(value))
+ }
+
+ function utcMilliseconds() {
+ if (!timeAtBoot.exists || !uptime.exists
+ || !validNumber(timeAtBoot.value) || !validNumber(uptime.value))
+ return NaN
+ return Number(timeAtBoot.value) + Number(uptime.value)
+ }
+
+ function utcText() {
+ const derived = utcMilliseconds()
+ if (isFinite(derived))
+ return TimeUtils.formatEpochMilliseconds(derived)
+ if (legacyUtc.exists && legacyUtc.value)
+ return TimeUtils.formatDeviceDateTime(String(legacyUtc.value)) || String(legacyUtc.value)
+ return "—"
+ }
+
+ function localText() {
+ const derived = utcMilliseconds()
+ if (isFinite(derived) && localOffset.exists && validNumber(localOffset.value))
+ return TimeUtils.formatEpochMilliseconds(derived + Number(localOffset.value))
+ if (legacyLocal.exists && legacyLocal.value)
+ return TimeUtils.formatDeviceDateTime(String(legacyLocal.value)) || String(legacyLocal.value)
+ return "—"
+ }
+
+ function offsetText(minutes) {
+ if (!validNumber(minutes))
+ return "—"
+ const rounded = Math.round(Number(minutes))
+ const absolute = Math.abs(rounded)
+ const hours = Math.floor(absolute / 60)
+ const remainder = absolute % 60
+ return "UTC" + (rounded < 0 ? "−" : "+")
+ + String(hours).padStart(2, "0") + ":"
+ + String(remainder).padStart(2, "0")
+ }
+
+ function presetIndexForCurrentValues() {
+ let key = timezoneKey.exists && timezoneKey.value !== null
+ ? String(timezoneKey.value) : ""
+ if (key in legacyTimezoneAliases)
+ key = legacyTimezoneAliases[key]
+ for (let i = 0; i < timezonePresets.length; ++i) {
+ if (timezonePresets[i].key === key)
+ return i
+ }
+ if (timezoneOffset.exists && daylightSaving.exists) {
+ for (let i = 0; i < timezonePresets.length - 1; ++i) {
+ const preset = timezonePresets[i]
+ if (preset.offset === Number(timezoneOffset.value)
+ && preset.dst === Number(daylightSaving.value))
+ return i
+ }
+ }
+ return timezonePresets.length - 1
+ }
+
+ function timezoneText() {
+ const index = presetIndexForCurrentValues()
+ const preset = timezonePresets[index]
+ if (preset.key !== "custom")
+ return preset.name
+ if (timezoneKey.exists && timezoneKey.value
+ && String(timezoneKey.value) !== "custom")
+ return String(timezoneKey.value)
+ return qsTr("Custom")
+ }
+
+ function applyTimezone(index) {
+ const preset = timezonePresets[index]
+ if (!preset)
+ return
+ if (timezoneKey.exists)
+ timezoneKeySetter.setValue(preset.key)
+ if (preset.key !== "custom") {
+ if (timezoneOffset.exists)
+ timezoneOffsetSetter.setValue(preset.offset)
+ if (daylightSaving.exists)
+ daylightSavingSetter.setValue(preset.dst)
+ }
+ }
+
+ function rememberCustomTimezone() {
+ if (timezoneKey.exists)
+ timezoneKeySetter.setValue("custom")
+ }
+
+ ApiKeyValueHelper { id: legacyUtc; deviceConnection: theDeviceConnection; apiKey: "utc" }
+ ApiKeyValueHelper { id: legacyLocal; deviceConnection: theDeviceConnection; apiKey: "loc" }
+ ApiKeyValueHelper { id: timeAtBoot; deviceConnection: theDeviceConnection; apiKey: "tab" }
+ ApiKeyValueHelper { id: uptime; deviceConnection: theDeviceConnection; apiKey: "rbt" }
+ ApiKeyValueHelper { id: localOffset; deviceConnection: theDeviceConnection; apiKey: "lto" }
+ ApiKeyValueHelper { id: timezoneOffset; deviceConnection: theDeviceConnection; apiKey: "tof" }
+ ApiKeyValueHelper { id: daylightSaving; deviceConnection: theDeviceConnection; apiKey: "tds" }
+ ApiKeyValueHelper { id: timezoneKey; deviceConnection: theDeviceConnection; apiKey: "tzt" }
+ ApiKeyValueHelper { id: ntpEnabled; deviceConnection: theDeviceConnection; apiKey: "tse" }
+ ApiKeyValueHelper { id: ntpServer; deviceConnection: theDeviceConnection; apiKey: "ts" }
+ ApiKeyValueHelper { id: ntpStatus; deviceConnection: theDeviceConnection; apiKey: "tsss" }
+
+ SetValueHelper { id: phoneTimeSetter; deviceConnection: theDeviceConnection; apiKey: "utc" }
+ SetValueHelper { id: timezoneKeySetter; deviceConnection: theDeviceConnection; apiKey: "tzt" }
+ SetValueHelper { id: timezoneOffsetSetter; deviceConnection: theDeviceConnection; apiKey: "tof" }
+ SetValueHelper { id: daylightSavingSetter; deviceConnection: theDeviceConnection; apiKey: "tds" }
+
+ SendMessageHelper {
+ id: ntpSynchronizer
+ deviceConnection: theDeviceConnection
+ }
+
+ Text {
+ Layout.fillWidth: true
+ text: qsTr("The charger uses its clock for schedules, flexible energy prices and recorded data.")
+ wrapMode: Text.Wrap
+ color: AppTheme.sectionLabelColor
+ }
+
+ SettingsSectionLabel { text: qsTr("Current device time") }
+
+ SettingsCard {
+ RowLayout {
+ Layout.fillWidth: true
+ SettingsLabel { text: qsTr("UTC time") }
+ Text {
+ Layout.fillWidth: true
+ text: page.utcText()
+ horizontalAlignment: Text.AlignRight
+ wrapMode: Text.Wrap
+ }
+ }
+
+ RowLayout {
+ Layout.fillWidth: true
+ SettingsLabel { text: qsTr("Local time") }
+ Text {
+ Layout.fillWidth: true
+ text: page.localText()
+ horizontalAlignment: Text.AlignRight
+ wrapMode: Text.Wrap
+ }
+ }
+ }
+
+ WhiteItemDelegate {
+ Layout.fillWidth: true
+ enabled: !phoneTimeSetter.pending
+ text: qsTr("Sync from phone")
+ onClicked: phoneTimeSetter.setValue(TimeUtils.currentUtcIsoString())
+
+ contentItem: RowLayout {
+ ColumnLayout {
+ Layout.fillWidth: true
+ SettingsLabel { Layout.fillWidth: true; text: qsTr("Sync from phone") }
+ Text {
+ Layout.fillWidth: true
+ text: qsTr("Set the charger clock to the phone's current time.")
+ wrapMode: Text.Wrap
+ color: AppTheme.sectionLabelColor
+ }
+ }
+ BusyIndicator { visible: phoneTimeSetter.pending }
+ RequestStatusText { request: phoneTimeSetter }
+ }
+ }
+
+ SettingsSectionLabel {
+ visible: timezoneOffset.exists || daylightSaving.exists || timezoneKey.exists
+ text: qsTr("Timezone")
+ }
+
+ Text {
+ Layout.fillWidth: true
+ visible: timezoneOffset.exists || daylightSaving.exists || timezoneKey.exists
+ text: qsTr("Choose a timezone to configure its standard offset and daylight-saving rule automatically.")
+ wrapMode: Text.Wrap
+ color: AppTheme.sectionLabelColor
+ }
+
+ WhiteItemDelegate {
+ Layout.fillWidth: true
+ visible: timezoneOffset.exists || daylightSaving.exists || timezoneKey.exists
+ text: qsTr("Timezone preset")
+ onClicked: {
+ timezoneCombo.currentIndex = page.presetIndexForCurrentValues()
+ timezoneDialog.open()
+ }
+
+ contentItem: RowLayout {
+ SettingsLabel { Layout.fillWidth: true; text: qsTr("Timezone preset") }
+ BusyIndicator {
+ visible: timezoneKeySetter.pending || timezoneOffsetSetter.pending
+ || daylightSavingSetter.pending
+ }
+ Text { text: page.timezoneText() }
+ Text { text: ">" }
+ }
+ }
+
+ RequestStatusText { Layout.fillWidth: true; request: timezoneKeySetter }
+ RequestStatusText { Layout.fillWidth: true; request: timezoneOffsetSetter }
+ RequestStatusText { Layout.fillWidth: true; request: daylightSavingSetter }
+
+ EditValueItem {
+ apiKey: "tof"
+ text: qsTr("UTC offset")
+ visible: exists
+ valueText: page.offsetText(value)
+ fullWidth: true
+ onValueSubmitted: page.rememberCustomTimezone()
+
+ editableItem: RowLayout {
+ property alias value: offsetInput.value
+
+ SpinBox {
+ id: offsetInput
+ from: -720
+ to: 840
+ editable: true
+ }
+ Label { text: qsTr("minutes") }
+ }
+ }
+
+ ApiEnumEditItem {
+ apiKey: "tds"
+ text: qsTr("Daylight-saving rule")
+ visible: exists
+ choices: [
+ { text: qsTr("None"), value: 0 },
+ { text: qsTr("European"), value: 1 },
+ { text: qsTr("United States"), value: 2 },
+ { text: qsTr("Australian"), value: 3 }
+ ]
+ onValueSubmitted: page.rememberCustomTimezone()
+ }
+
+ SettingsSectionLabel {
+ visible: ntpEnabled.exists || ntpServer.exists || ntpStatus.exists
+ text: qsTr("Network time (NTP)")
+ }
+
+ Text {
+ Layout.fillWidth: true
+ visible: ntpEnabled.exists || ntpServer.exists || ntpStatus.exists
+ text: qsTr("NTP keeps the charger clock synchronized automatically while it has internet access.")
+ wrapMode: Text.Wrap
+ color: AppTheme.sectionLabelColor
+ }
+
+ GeneralOnOffSwitch {
+ apiKey: "tse"
+ visible: exists
+ text: qsTr("Automatic time synchronization")
+ }
+
+ EditValueItem {
+ apiKey: "ts"
+ text: qsTr("NTP server")
+ visible: exists
+ valueText: value || "—"
+ fullWidth: true
+ editableItem: TextField {
+ id: ntpServerInput
+ property alias value: ntpServerInput.text
+ Layout.minimumWidth: 260
+ placeholderText: "europe.pool.ntp.org"
+ selectByMouse: true
+ }
+ }
+
+ ApiStatusRow {
+ apiKey: "tsss"
+ label: qsTr("Synchronization status")
+ valueFormatter: function(value) {
+ switch (Number(value)) {
+ case 0: return qsTr("Not synchronized")
+ case 1: return qsTr("Synchronized")
+ case 2: return qsTr("Synchronizing")
+ default: return qsTr("Unknown (%1)").arg(value)
+ }
+ }
+ }
+
+ WhiteItemDelegate {
+ Layout.fillWidth: true
+ visible: ntpEnabled.exists || ntpServer.exists || ntpStatus.exists
+ enabled: ntpEnabled.value === true && !ntpSynchronizer.pending
+ text: qsTr("Synchronize now")
+ onClicked: ntpSynchronizer.sendMessage({type: "syncTime"})
+
+ contentItem: RowLayout {
+ ColumnLayout {
+ Layout.fillWidth: true
+ SettingsLabel { Layout.fillWidth: true; text: qsTr("Synchronize now") }
+ Text {
+ Layout.fillWidth: true
+ text: ntpEnabled.value === true
+ ? qsTr("Ask the configured NTP server for the current time.")
+ : qsTr("Enable automatic time synchronization first.")
+ wrapMode: Text.Wrap
+ color: AppTheme.sectionLabelColor
+ }
+ }
+ BusyIndicator { visible: ntpSynchronizer.pending }
+ RequestStatusText { request: ntpSynchronizer }
+ }
+ }
+
+ ApiEnumEditItem {
+ apiKey: "tssm"
+ text: qsTr("Synchronization mode")
+ visible: exists
+ choices: [
+ { text: qsTr("Immediate"), value: 0 },
+ { text: qsTr("Smooth"), value: 1 }
+ ]
+ }
+
+ DurationEditItem {
+ apiKey: "tssi"
+ text: qsTr("Synchronization interval")
+ visible: exists
+ maximumHours: 168
+ minimumMilliseconds: 15000
+ }
+
+ CenteredDialog {
+ id: timezoneDialog
+ title: qsTr("Timezone preset")
+ standardButtons: Dialog.Ok | Dialog.Cancel
+ modal: true
+ focus: true
+ width: parent.width
+
+ onAccepted: page.applyTimezone(timezoneCombo.currentIndex)
+
+ contentItem: ColumnLayout {
+ spacing: 12
+
+ Text {
+ Layout.fillWidth: true
+ text: qsTr("The preset is stored on the charger and configures the firmware's supported daylight-saving calculation.")
+ wrapMode: Text.Wrap
+ }
+
+ ComboBox {
+ id: timezoneCombo
+ Layout.fillWidth: true
+ model: page.timezonePresets
+ textRole: "name"
+ }
+
+ Text {
+ Layout.fillWidth: true
+ visible: timezoneCombo.currentIndex >= 0
+ && page.timezonePresets[timezoneCombo.currentIndex].key !== "custom"
+ text: {
+ if (timezoneCombo.currentIndex < 0)
+ return ""
+ const preset = page.timezonePresets[timezoneCombo.currentIndex]
+ return page.offsetText(preset.offset) + " · "
+ + page.daylightSavingText(preset.dst)
+ }
+ wrapMode: Text.Wrap
+ color: AppTheme.sectionLabelColor
+ }
+ }
+ }
+
+ function daylightSavingText(value) {
+ switch (Number(value)) {
+ case 0: return qsTr("No daylight saving")
+ case 1: return qsTr("European daylight saving")
+ case 2: return qsTr("US daylight saving")
+ case 3: return qsTr("Australian daylight saving")
+ default: return qsTr("Unknown")
+ }
}
}
diff --git a/evcharger-app/qml/DeviceScreen.qml b/evcharger-app/qml/DeviceScreen.qml
index 1771594..d60d786 100644
--- a/evcharger-app/qml/DeviceScreen.qml
+++ b/evcharger-app/qml/DeviceScreen.qml
@@ -141,19 +141,52 @@ Loader {
}
}
- WhiteBox {
+ Item {
id: connectionDisturbed
- anchors.centerIn: parent
- width: Math.min(parent.width - 32, 320)
- padding: 16
+ anchors.fill: parent
visible: false
z: 100
- contentItem: Text {
- text: qsTr("Connection disturbed")
- wrapMode: Text.Wrap
- horizontalAlignment: Text.AlignHCenter
+ Rectangle {
+ anchors.fill: parent
+ color: "#73000000"
+ }
+
+ // Block normal interaction with this disconnected device. The
+ // application-level multi-finger handlers are above this item and can
+ // still switch language or app instance.
+ MouseArea {
+ anchors.fill: parent
+ acceptedButtons: Qt.AllButtons
+ preventStealing: false
+ onWheel: (wheel) => wheel.accepted = true
+ }
+
+ WhiteBox {
+ anchors.centerIn: parent
+ width: Math.min(parent.width - 32, 320)
+ padding: 16
+
+ contentItem: RowLayout {
+ spacing: 12
+
+ MaterialIcon {
+ iconName: "warning"
+ color: "#b3261e"
+ font.pixelSize: 32
+ Layout.alignment: Qt.AlignVCenter
+ }
+
+ Text {
+ Layout.fillWidth: true
+ text: qsTr("Connection disturbed")
+ wrapMode: Text.Wrap
+ font.bold: true
+ horizontalAlignment: Text.AlignHCenter
+ Layout.alignment: Qt.AlignVCenter
+ }
+ }
}
}
}
diff --git a/evcharger-app/qml/DurationEditItem.qml b/evcharger-app/qml/DurationEditItem.qml
index 525fea3..cd7cd15 100644
--- a/evcharger-app/qml/DurationEditItem.qml
+++ b/evcharger-app/qml/DurationEditItem.qml
@@ -6,6 +6,7 @@ EditValueItem {
id: root
property int maximumHours: 168
+ property int minimumMilliseconds: 0
function durationText(milliseconds) {
if (milliseconds === null || milliseconds === undefined)
@@ -52,8 +53,9 @@ EditValueItem {
function updateValue() {
if (!updating)
- value = ((hoursInput.value * 60 + minutesInput.value) * 60
- + secondsInput.value) * 1000
+ value = Math.max(root.minimumMilliseconds,
+ ((hoursInput.value * 60 + minutesInput.value) * 60
+ + secondsInput.value) * 1000)
}
onValueChanged: loadValue()
diff --git a/evcharger-app/qml/EditValueItem.qml b/evcharger-app/qml/EditValueItem.qml
index 857df61..286b714 100644
--- a/evcharger-app/qml/EditValueItem.qml
+++ b/evcharger-app/qml/EditValueItem.qml
@@ -13,6 +13,7 @@ WhiteItemDelegate {
property alias exists: apiKeyValueHelper.exists
property bool fullWidth: false
property var editValueTransform: null
+ signal valueSubmitted(var value)
Layout.fillWidth: true
@@ -74,6 +75,7 @@ WhiteItemDelegate {
onAccepted: {
setValueHelper.setValue(editableItem.value)
+ itemDelegate.valueSubmitted(editableItem.value)
}
}
}
diff --git a/evcharger-app/qml/LedPage.qml b/evcharger-app/qml/LedPage.qml
index 4594835..5f83090 100644
--- a/evcharger-app/qml/LedPage.qml
+++ b/evcharger-app/qml/LedPage.qml
@@ -112,7 +112,20 @@ NavigationPage {
selectedColorKey = option.key
selectedColorName = option.title
colorDialog.selectedColor = option.value || "#000000"
- colorDialog.open()
+ if (option.key === "cch")
+ chargingColorDialog.open()
+ else
+ colorDialog.open()
+ }
+
+ function setChargingPreset(color) {
+ chargingColorDialog.close()
+ colorSetter.setValue(color)
+ }
+
+ function openCustomChargingColor() {
+ chargingColorDialog.close()
+ Qt.callLater(colorDialog.open)
}
ApiKeyValueHelper {
@@ -430,6 +443,44 @@ NavigationPage {
text: qsTr("LED diagnostics")
}
+ CenteredDialog {
+ id: chargingColorDialog
+ title: qsTr("Choose charging color")
+ standardButtons: Dialog.Cancel
+ modal: true
+ focus: true
+ width: parent.width
+
+ contentItem: ColumnLayout {
+ spacing: 8
+
+ Text {
+ Layout.fillWidth: true
+ text: qsTr("These special values enable animated charging effects. You can also choose a normal custom color.")
+ wrapMode: Text.Wrap
+ color: AppTheme.sectionLabelColor
+ }
+
+ Button {
+ Layout.fillWidth: true
+ text: qsTr("Category colors")
+ onClicked: page.setChargingPreset("#FEFEFE")
+ }
+
+ Button {
+ Layout.fillWidth: true
+ text: qsTr("Rainbow charging")
+ onClicked: page.setChargingPreset("#2A2A2A")
+ }
+
+ Button {
+ Layout.fillWidth: true
+ text: qsTr("Custom color…")
+ onClicked: page.openCustomChargingColor()
+ }
+ }
+ }
+
ColorDialog {
id: colorDialog
title: qsTr("Choose color for %1").arg(page.selectedColorName)
diff --git a/evcharger-app/timeutils.cpp b/evcharger-app/timeutils.cpp
new file mode 100644
index 0000000..087c292
--- /dev/null
+++ b/evcharger-app/timeutils.cpp
@@ -0,0 +1,45 @@
+#include "timeutils.h"
+
+#include
+#include
+#include
+
+namespace
+{
+QString formatWallClock(const QDateTime &dateTime)
+{
+ return dateTime.isValid()
+ ? QLocale::system().toString(dateTime, QLocale::ShortFormat)
+ : QString{};
+}
+}
+
+QString TimeUtils::formatEpochMilliseconds(qint64 milliseconds) const
+{
+ // Device-local time is represented as UTC milliseconds plus the device's
+ // offset. Keep the resulting wall-clock fields unchanged by formatting it
+ // in UTC instead of converting it to the phone's timezone.
+ return formatWallClock(QDateTime::fromMSecsSinceEpoch(milliseconds, QTimeZone::UTC));
+}
+
+QString TimeUtils::formatDeviceDateTime(const QString &value) const
+{
+ QString timestamp = value.trimmed();
+ if (timestamp.size() >= 23)
+ timestamp = timestamp.left(23);
+
+ QDateTime parsed = QDateTime::fromString(timestamp, Qt::ISODateWithMs);
+ if (!parsed.isValid())
+ parsed = QDateTime::fromString(timestamp, Qt::ISODate);
+ if (!parsed.isValid())
+ return {};
+
+ // utc/loc are wall-clock strings. Reconstruct the parsed fields in UTC so
+ // QLocale does not silently apply the phone's timezone while formatting.
+ return formatWallClock(QDateTime(parsed.date(), parsed.time(), QTimeZone::UTC));
+}
+
+QString TimeUtils::currentUtcIsoString() const
+{
+ return QDateTime::currentDateTimeUtc().toString(Qt::ISODateWithMs);
+}
diff --git a/evcharger-app/timeutils.h b/evcharger-app/timeutils.h
new file mode 100644
index 0000000..61d1bd6
--- /dev/null
+++ b/evcharger-app/timeutils.h
@@ -0,0 +1,19 @@
+#pragma once
+
+#include
+#include
+#include
+
+class TimeUtils final : public QObject
+{
+ Q_OBJECT
+ QML_ELEMENT
+ QML_SINGLETON
+
+public:
+ using QObject::QObject;
+
+ Q_INVOKABLE QString formatEpochMilliseconds(qint64 milliseconds) const;
+ Q_INVOKABLE QString formatDeviceDateTime(const QString &value) const;
+ Q_INVOKABLE QString currentUtcIsoString() const;
+};