From 39fc8e5b7ceda7d06a2d2d74ec6a4a6373491c03 Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 Date: Sun, 7 Jul 2024 22:19:11 +0200 Subject: [PATCH] Implement a few more pages with dummies --- CMakeLists.txt | 1 + ChargerTabPage.qml | 33 +- EcoTabPage.qml | 113 ++++++- SelectLogicModeItem.qml | 6 - SetPriceLimitPage.qml | 42 +++ i18n/qml_de.ts | 711 ++++++++++++++++++++++++++-------------- qmldir | 1 + 7 files changed, 641 insertions(+), 266 deletions(-) create mode 100644 SetPriceLimitPage.qml diff --git a/CMakeLists.txt b/CMakeLists.txt index e8465e8..29f7640 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -106,6 +106,7 @@ qt_add_qml_module(evcharger-app SecurityPage.qml SelectLogicModeItem.qml SensorsConfigurationPage.qml + SetPriceLimitPage.qml SettingsTabPage.qml SwitchLanguagePage.qml VerticalTabButton.qml diff --git a/ChargerTabPage.qml b/ChargerTabPage.qml index d0d2e6d..9e82e6d 100644 --- a/ChargerTabPage.qml +++ b/ChargerTabPage.qml @@ -16,10 +16,6 @@ StackView { } initialItem: ColumnLayout { - function backPressed() { - return false - } - ToolBar { id: toolBar @@ -159,9 +155,38 @@ StackView { text: qsTr("Start") } + ApiKeyValueHelper { + id: logicMode + deviceConnection: mainScreen.deviceConnection + apiKey: "lmo" + } + SelectLogicModeItem { Layout.fillWidth: true } + + NavigationItem { + visible: logicMode.value == 4 + iconSource: "material-icons/grid_guides.svg" + title: qsTr("Price limit") + description: qsTr("%0 ct/kWh").arg(0) + component: "SetPriceLimitPage.qml" + } + + NavigationItem { + visible: logicMode.value == 5 + iconSource: "material-icons/grid_guides.svg" + title: qsTr("Daily trip") + description: qsTr("By %0 with %1").arg("08:00").arg(qsTr("%0 km").arg(100)) + component: "DailyTripPage.qml" + } + + NavigationItem { + iconSource: "material-icons/grid_guides.svg" + title: qsTr("Charging speed") + description: qsTr("%0 Ampere & %1-phase").arg(0).arg(0) + component: "ChargingSpeedPage.qml" + } } } } diff --git a/EcoTabPage.qml b/EcoTabPage.qml index d6da9fb..8c37cfe 100644 --- a/EcoTabPage.qml +++ b/EcoTabPage.qml @@ -1,7 +1,118 @@ import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import EVChargerApp + +StackView { + id: stackView -Item { function backPressed() { + if (depth > 1) { + pop() + return true + } + return false } + + initialItem: NavigationPage { + title: qsTr("Eco") + + NavigationItem { + iconSource: "material-icons/grid_guides.svg" + title: qsTr("Flexible energy tariff") // TODO show On Off + component: "FlexibleEnergyTariffPage.qml" + } + + NavigationItem { + iconSource: "material-icons/grid_guides.svg" + title: qsTr("PV Surplus") // TODO show On Off + component: "PvSurplusPage.qml" + } + + WhiteBox { + Layout.fillWidth: true + + ColumnLayout { + anchors.fill: parent + + Image { + Layout.fillWidth: true + Layout.preferredHeight: 50 + source: "material-icons/grid_guides.svg" + fillMode: Image.PreserveAspectFit + } + + Label { + Layout.fillWidth: true + font.pointSize: 20 + font.bold: true + text: qsTr("About eco") + verticalAlignment: Text.AlignVCenter + } + + RowLayout { + Layout.fillWidth: true + + Image { + Layout.preferredWidth: 50 + Layout.fillHeight: true + source: "material-icons/grid_guides.svg" + fillMode: Image.PreserveAspectFit + } + + ColumnLayout { + Layout.fillWidth: true + + Text { + Layout.fillWidth: true + + font.bold: true + text: qsTr("Flexible energy tariff") + wrapMode: Text.Wrap + } + + Text { + Layout.fillWidth: true + Layout.fillHeight: true + + text: qsTr("We offer to charge your car during periods of low electricity price, If you have an electricity contract based on flexible energy tariffs.") + wrapMode: Text.Wrap + } + } + } + + RowLayout { + Layout.fillWidth: true + + Image { + Layout.preferredWidth: 50 + Layout.fillHeight: true + source: "material-icons/grid_guides.svg" + fillMode: Image.PreserveAspectFit + } + + ColumnLayout { + Layout.fillWidth: true + + Text { + Layout.fillWidth: true + + font.bold: true + text: qsTr("PV surplus energy") + wrapMode: Text.Wrap + } + + Text { + Layout.fillWidth: true + Layout.fillHeight: true + + text: qsTr("By connecting a PV system and a controller to your charger, you can charge your EV particularly cheaply and use clean energy at the same time.") + wrapMode: Text.Wrap + } + } + } + } + } + } } diff --git a/SelectLogicModeItem.qml b/SelectLogicModeItem.qml index 321b762..9be90d3 100644 --- a/SelectLogicModeItem.qml +++ b/SelectLogicModeItem.qml @@ -9,12 +9,6 @@ WhiteBox { RowLayout { anchors.fill: parent - ApiKeyValueHelper { - id: logicMode - deviceConnection: mainScreen.deviceConnection - apiKey: "lmo" - } - SendMessageHelper { id: valueChanger deviceConnection: mainScreen.deviceConnection diff --git a/SetPriceLimitPage.qml b/SetPriceLimitPage.qml new file mode 100644 index 0000000..f6d0a45 --- /dev/null +++ b/SetPriceLimitPage.qml @@ -0,0 +1,42 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts + +NavigationPage { + title: qsTr("Set price limit") + + Text { + Layout.fillWidth: true + text: qsTr("Set a proper price limit for charging, so charging starts when the electricity price is below this limit. Also, you can see the charging forecast chart below based on the limit that you define.") + wrapMode: Text.Wrap + } + + ItemDelegate { + Layout.fillWidth: true + Component.onCompleted: { + background.color = "white" + background.radius = 5 + } + + contentItem: RowLayout { + Text { + text: qsTr("Price limit") + wrapMode: Text.Wrap + Layout.fillWidth: true + font.bold: true + } + + Text { + text: qsTr("%0 ct/kWh").arg(0) + } + + Text { + text: '>' + } + } + } + + Item { + Layout.fillHeight: true + } +} diff --git a/i18n/qml_de.ts b/i18n/qml_de.ts index db0ad06..974ae92 100644 --- a/i18n/qml_de.ts +++ b/i18n/qml_de.ts @@ -13,7 +13,7 @@ Firmware - + Firmware @@ -46,34 +46,34 @@ Gerät hinzufügen oder einrichten - - + + Add via local connection or AP: Über lokale Verbindung oder AP einrichten: - - + + Local url Lokale url - - - - + + + + Connect Verbinden - - + + Add via cloud: Über Cloud einrichten: - - + + Cloud Serial Cloud Seriennr. @@ -99,64 +99,64 @@ Wenn "Cloud Verbindung aktivieren" deaktiviert ist, sind Funktionen wie flexible Energietarife, Zeitsynchronisierung und App-Verbindung über das Internet nicht möglich. - - + + Allow access to local HTTP-Api v2 Zugriff auf die lokale HTTP-API v2 zulassen - - - - - - - - + + + + + + + + API documentation API-Dokumentation - - + + Generate token - + Token erzeugen - - + + OK! token: %0 - + OK! token: %0 - - + + Clear API token - + API-Token entfernen - - + + Enable cloud API Cloud HTTP API aktivieren - - - - + + + + API key: %0 - + API key: %0 - - + + Enable grid API Netzbetreiber-API aktiviert - - + + Allow access to legacy HTTP-Api v1 Zugriff auf lokale HTTP-API v1 zulassen @@ -164,36 +164,44 @@ AppSettingsPage - - + + App Settings - + App Einstellungen - - + + Number of app instances: - + Anzahl an App Instanzen: - - + + solalaweb key: - + solalaweb key: - - - - + + + + Select... - + Auswählen... - - + + + + + Replace... + Ersetzen... + + + + solalaweb cert: - + solalaweb cert: @@ -202,7 +210,7 @@ Back - Zurück + Zurück @@ -226,46 +234,116 @@ ChargerTabPage - - + + Devices Geräte - - + + + Internal error + Interner Fehler + + + + No car connected Kein Auto angeschlossen - - - Connect the cable to charge your car + + + Car is charging + Auto wird geladen + + + + + Connecting to your car... + Verbinde mit Auto... + + + + + Charging completed + Ladevorgang abgeschlossen + + + + + Unknown error %0 + Unbekannter Fehler %0 + + + + + Plug in the cable to start charging your car Stecke das Kabel ein, um dein Auto aufzuladen - - + + + Charger is connecting to your car, it usually takes a few seconds + Der Charger stellt die Verbindung zu deinem Auto her, das dauert in der Regel ein paar Sekunden + + + + + Let's go-e :) + Let's go-e :) + + + + + Price limit + Preisgrenze + + + + + %0 ct/kWh + %0 ct/kWh + + + + + By %0 with %1 + Bis %0 mit %1 + + + + + %0 km + %0 km + + + + + Charging speed + Ladegeschwindigkeit + + + + + %0 Ampere & %1-phase + %0 Ampere & %1-phasic + + + Connect the cable to charge your car + Stecke das Kabel ein, um dein Auto aufzuladen + + + + Start - + Start - - - Eco - - - - - - Basic - - - - - + + Daily trip - + Daily trip @@ -286,13 +364,13 @@ kWh Limit - + kWh Limit Daily Trip - + Daily Trip @@ -346,49 +424,49 @@ Cloud - + Cloud Enable cloud connection - Cloud Verbindung aktivieren + Cloud Verbindung aktivieren Features like flexible energy tariffs, time sync and app connection are unavilable when "Enable cloud connection" is disabled - Wenn "Cloud Verbindung aktivieren" deaktiviert ist, sind Funktionen wie flexible Energietarife, Zeitsynchronisierung und App-Verbindung über das Internet nicht möglich. + Wenn "Cloud Verbindung aktivieren" deaktiviert ist, sind Funktionen wie flexible Energietarife, Zeitsynchronisierung und App-Verbindung über das Internet nicht möglich - - + + Trying to connect: - + Versuche zu verbinden: - - + + Is connected: - + Ist verbunden: - - + + Hello received: - + Hallo empfangen: - - + + Queue size cloud: - + Cloud Warteschlagengröße: - - + + Last error: - + Letzer Fehler: @@ -397,44 +475,44 @@ V2 - + V2 Wattpilot - + Wattpilot go-eCharger - + go-eCharger go-eController - + go-eController Solalaweb - + Solalaweb ConnectingScreen - - + + Trying to reach device... Versuche Gerät zu erreichen... - - + + Cancel Abbrechen @@ -457,25 +535,25 @@ Hotspot - + Hotspot Ethernet - + Ethernet OCPP - + OCPP Cloud - + Cloud @@ -490,20 +568,20 @@ Controller - + Controller ControllerTabPage - - + + Devices Geräte - - + + Connected Verbunden @@ -523,7 +601,7 @@ Daily Trip - + Daily Trip @@ -538,202 +616,212 @@ DeviceConnection - + Connecting to %0 Verbinde zu %0 - + Received something that is not a json object! - + Received something that does not contain a type! - + Received something with a non-string type! - + Received hello without serial! - + Received hello with a non-string serial! - + Received hello with a non-bool secured! - + Received hello without manufacturer! - + Received hello with a non-string manufacturer! - + Received hello without friendly_name! - + Received hello with a non-string friendly_name! - + Received hello without devicetype! - + + Could not parse solalaweb certificate! + + + + + Could not parse solalaweb key! + + + + Received hello with a non-string devicetype! - + Received authRequired without token1! - + Received authRequired with a non-string token1! - + Received authRequired without token2! - + Received authRequired with a non-string token2! - + Received fullStatus with a non-bool partial! - + Received fullStatus without a status! - + Received fullStatus with a non-object status! - + Received partial fullStatus - + Received last fullStatus - + Received deltaStatus without a status! - + Received deltaStatus with a non-object status! - + Received message type %0 %1 - + Received message with a non-string requestId! - + Sending %0 - + Connected! Verbunden! - + Disconnected! Verbindung verloren! - + Reconnecting to %0 Verbinde wieder zu %0 - + state changed: %0 - + could not parse received json: %0 at offset %1 - + unknown binary message type %0 received - + error occured: %0 - + ssl peer verify error - + ssl errors - + ssl alert sent level=%0 type=%1 description=%2 - + ssl alert received level=%0 type=%1 description=%2 - + ssl handshake interrupted on error - + unknown response type %0 @@ -766,7 +854,7 @@ App Settings - + App Einstellungen @@ -834,13 +922,13 @@ Host Name: - + Host Name: Ip: - + Ip: @@ -910,13 +998,69 @@ Display + + EVChargerApp + + + + EVcharger App + EVcharger App + + + + EcoTabPage + + + + Eco + Eco + + + + + + + Flexible energy tariff + Flexibler Energietarif + + + + + PV Surplus + PV-Überschuss + + + + + About eco + Über Eco + + + + + We offer to charge your car during periods of low electricity price, If you have an electricity contract based on flexible energy tariffs. + Du kannst dein Auto in Zeiten niedriger Strompreise aufladen, sofern du einen Stromvertrag mit flexiblen Tarifen hast. + + + + + PV surplus energy + PV-Überschuss + + + + + By connecting a PV system and a controller to your charger, you can charge your EV particularly cheaply and use clean energy at the same time. + Wenn du eine PV-Anlage und einen Controller an deinen Charger anschließt, kannst du dein Elektroauto besonders günstig aufladen und gleichzeitig grüne Energie nutzen. + + EthernetPage Ethernet - + Ethernet @@ -925,67 +1069,67 @@ Firmware - + Firmware - - + + Update: - + Update: - - + + Start - + Start - - + + Abort Abbrechen - - + + Switch partition Partition tauschen - - + + Update status: - + Update status: - - + + Update progress: Update Fortschritt: - - + + Update message: Update Meldung: - - + + Recommended version: Empfohlene Version: - - + + Running version: Ausgeführte Version: - - + + Details: - + Details: @@ -1007,14 +1151,14 @@ GeneralOnOffSwitch - - + + On An - - + + Off Aus @@ -1031,7 +1175,7 @@ Name - + Name @@ -1055,13 +1199,13 @@ LED - + LED Controller - + Controller @@ -1076,15 +1220,6 @@ Neustart - - EVChargerApp - - - - go-e App - - - GridPage @@ -1112,22 +1247,22 @@ Hardwareinformationen - - + + Serial Number: Seriennummer: - - + + Variant: Variante: - - + + RSSI: - + RSSI: @@ -1136,7 +1271,7 @@ Hotspot - + Hotspot @@ -1151,7 +1286,7 @@ kWh Limit - + kWh Limit @@ -1160,7 +1295,7 @@ LED - + LED @@ -1193,7 +1328,7 @@ in %0 - + in %0 @@ -1201,7 +1336,7 @@ Charger - + Charger @@ -1209,7 +1344,7 @@ Eco - + Eco @@ -1217,7 +1352,7 @@ Controller - + Controller @@ -1250,7 +1385,7 @@ Name - + Name @@ -1275,7 +1410,7 @@ OCPP - + OCPP @@ -1360,6 +1495,45 @@ Erdungsprüfung + + SelectLogicModeItem + + + + Eco + Eco + + + + + Eco-friendly & cost effective + Nachhaltig & Wirtschaftlich + + + + + Basic + Basic + + + + + Basic charging + Einfaches Laden + + + + + Daily trip + Daily trip + + + + + Specific energy and time + Energie zur bestimmten Zeit + + SendMessageHelper @@ -1377,6 +1551,33 @@ Sensorkonfiguration + + SetPriceLimitPage + + + + Set price limit + Preisgrenze festlegen + + + + + Set a proper price limit for charging, so charging starts when the electricity price is below this limit. Also, you can see the charging forecast chart below based on the limit that you define. + Lege eine angemessene Preisgrenze für das Laden fest, sodass das Laden beginnt, wenn der Strompreis unter dieser Grenze liegt. Außerdem siehst du unten ein Diagramm mit der Ladeprognose, die auf dem von dir festgelegten Grenzwert basiert. + + + + + Price limit + Preisgrenze + + + + + %0 ct/kWh + %0 ct/kWh + + SettingsTabPage @@ -1401,13 +1602,13 @@ kWh Limit - + kWh Limit Daily Trip - + Daily Trip @@ -1473,25 +1674,25 @@ Hotspot - + Hotspot Ethernet - + Ethernet OCPP - + OCPP Cloud - + Cloud @@ -1503,7 +1704,7 @@ Name - + Name @@ -1527,13 +1728,13 @@ LED - + LED Controller - + Controller @@ -1545,7 +1746,7 @@ Firmware - + Firmware @@ -1632,26 +1833,26 @@ WLAN Probleme - - + + Timestamp: Zeitpunkt: - - + + SSID: - + SSID: - - + + BSSID: - + BSSID: - - + + Reason: Grund: @@ -1659,26 +1860,26 @@ WiFiOnOffSwitch - - + + On An - - + + Off Aus - - + + Do you really want to disable Wi-Fi? Möchten Sie wirklich WLAN ausschalten? - - + + This action could make your device unreachable from your local homenetwork or the cloud! Diese Aktion könnte das Gerät im Heimnetzwerk und aus der Cloud unerreichbar machen! @@ -1695,7 +1896,7 @@ Status: - + Status: diff --git a/qmldir b/qmldir index d53d2aa..5678c36 100644 --- a/qmldir +++ b/qmldir @@ -56,6 +56,7 @@ EVChargerApp 1.0 SchedulerPage.qml EVChargerApp 1.0 SecurityPage.qml EVChargerApp 1.0 SelectLogicModeItem.qml EVChargerApp 1.0 SensorsConfigurationPage.qml +EVChargerApp 1.0 SetPriceLimitPage.qml EVChargerApp 1.0 SettingsTabPage.qml EVChargerApp 1.0 SwitchLanguagePage.qml EVChargerApp 1.0 VerticalTabButton.qml