(pin.display_type),
+ pin.display_data,
+ pin.display_clk,
+ pin.display_cs,
+ pin.display_reset);
+ Display.showLogo = config.Display_ShowLogo;
+ Display.enablePowerSafe = config.Display_PowerSafe;
+ Display.enableScreensaver = config.Display_ScreenSaver;
+ Display.contrast = config.Display_Contrast;
+ MessageOutput.println(F("done"));
+
// Check for default DTU serial
MessageOutput.print(F("Check for default DTU serial... "));
- CONFIG_T& config = Configuration.get();
if (config.Dtu_Serial == DTU_SERIAL) {
MessageOutput.print(F("generate serial based on ESP chip id: "));
uint64_t dtuId = Utils::generateDtuSerial();
@@ -111,7 +127,6 @@ void setup()
MessageOutput.print(F("Initialize Hoymiles interface... "));
if (PinMapping.isValidNrf24Config()) {
SPIClass* spiClass = new SPIClass(HSPI);
- PinMapping_t& pin = PinMapping.get();
spiClass->begin(pin.nrf24_clk, pin.nrf24_miso, pin.nrf24_mosi, pin.nrf24_cs);
Hoymiles.setMessageOutput(&MessageOutput);
Hoymiles.init(spiClass, pin.nrf24_en, pin.nrf24_irq);
@@ -177,6 +192,8 @@ void loop()
yield();
WebApi.loop();
yield();
+ Display.loop();
+ yield();
MessageOutput.loop();
yield();
}
\ No newline at end of file
diff --git a/webapp/src/components/PinInfo.vue b/webapp/src/components/PinInfo.vue
index e3946b57..de7524b7 100644
--- a/webapp/src/components/PinInfo.vue
+++ b/webapp/src/components/PinInfo.vue
@@ -80,6 +80,33 @@
| {{ currentPinAssignment?.eth?.clk_mode }} |
+
+ | Display |
+ type |
+ {{ selectedPinAssignment?.display?.type }} |
+ {{ currentPinAssignment?.display?.type }} |
+
+
+ | data |
+ {{ selectedPinAssignment?.display?.data }} |
+ {{ currentPinAssignment?.display?.data }} |
+
+
+ | clk |
+ {{ selectedPinAssignment?.display?.clk }} |
+ {{ currentPinAssignment?.display?.clk }} |
+
+
+ | cs |
+ {{ selectedPinAssignment?.display?.cs }} |
+ {{ currentPinAssignment?.display?.cs }} |
+
+
+ | reset |
+ {{ selectedPinAssignment?.display?.reset }} |
+ {{ currentPinAssignment?.display?.reset }} |
+
+
diff --git a/webapp/src/locales/de.json b/webapp/src/locales/de.json
index ecf47651..4cfe1e91 100644
--- a/webapp/src/locales/de.json
+++ b/webapp/src/locales/de.json
@@ -493,7 +493,7 @@
"Back": "Zurück",
"Retry": "Wiederholen",
"OtaStatus": "OTA Status",
- "OtaSuccess": "OTA Erfolgreich. Das Gerät wurde automatisch neu gestartet und wird in wenigen Augenblicken wieder zur Verfügung stehen.",
+ "OtaSuccess": "OTA Erfolgreich. Das Gerät wurde automatisch neu gestartet und wird in wenigen Augenblicken wieder zur Verfügung stehen. Bitte nicht vergessen die Weboberfläche neu zu laden!",
"FirmwareUpload": "Firmware hochladen",
"UploadProgress": "Hochlade Fortschritt"
},
@@ -524,6 +524,13 @@
"SelectedProfile": "Ausgewähltes Profil:",
"DefaultProfile": "(Standard Einstellungen)",
"ProfileHint": "Ihr Gerät reagiert möglicherweise nicht mehr, wenn Sie ein inkompatibles Profil wählen. In diesem Fall müssen Sie eine Löschung über das serielle Interface durchführen.",
+ "Display": "Display",
+ "PowerSafe": "Power Safe aktivieren:",
+ "PowerSafeHint": "Schaltet das Display aus wenn kein Wechselrichter produziert",
+ "Screensaver": "Screensaver aktivieren:",
+ "ScreensaverHint": "Bewegt die Ausgabe bei jeder Aktualisierung um ein Einbrennen zu verhindern. (Nützlich v.a. für OLED Displays)",
+ "ShowLogo": "Logo anzeigen:",
+ "Contrast": "Kontrast ({contrast}):",
"Save": "@:dtuadmin.Save"
},
"pininfo": {
diff --git a/webapp/src/locales/en.json b/webapp/src/locales/en.json
index 1586be7b..9d34c093 100644
--- a/webapp/src/locales/en.json
+++ b/webapp/src/locales/en.json
@@ -493,7 +493,7 @@
"Back": "Back",
"Retry": "Retry",
"OtaStatus": "OTA Status",
- "OtaSuccess": "OTA Success. The unit has been automatically restarted and will be available again in a few moments.",
+ "OtaSuccess": "OTA Success. The unit has been automatically restarted and will be available again in a few moments. Please do not forget to reload the web interface!",
"FirmwareUpload": "Firmware Upload",
"UploadProgress": "Upload Progress"
},
@@ -524,6 +524,13 @@
"SelectedProfile": "Selected profile:",
"DefaultProfile": "(Default settings)",
"ProfileHint": "Your device may stop responding if you select an incompatible profile. In this case, you must perform a deletion via the serial interface.",
+ "Display": "Display",
+ "PowerSafe": "Enable Power Safe:",
+ "PowerSafeHint": "Turn off the display if no inverter is producing.",
+ "Screensaver": "Enable Screensaver:",
+ "ScreensaverHint": "Move the display a little bit on each update to prevent burn-in. (Useful especially for OLED displays)",
+ "ShowLogo": "Show Logo:",
+ "Contrast": "Contrast ({contrast}):",
"Save": "@:dtuadmin.Save"
},
"pininfo": {
diff --git a/webapp/src/locales/fr.json b/webapp/src/locales/fr.json
index a7fac46d..e2a37f27 100644
--- a/webapp/src/locales/fr.json
+++ b/webapp/src/locales/fr.json
@@ -8,7 +8,7 @@
"InverterSettings": "Paramètres des onduleurs",
"SecuritySettings": "Paramètres de sécurité",
"DTUSettings": "Paramètres DTU",
- "DeviceManager": "Device-Manager",
+ "DeviceManager": "Gestionnaire de périphériques",
"VedirectSettings": "Paramètres Ve.direct",
"ConfigManagement": "Gestion de la configuration",
"FirmwareUpgrade": "Mise à jour du firmware",
@@ -86,7 +86,7 @@
"10002": "Authentification réussie !",
"11001": "@:apiresponse.2001",
"11002": "@:apiresponse:5004",
- "12001": "Profil must between 1 and {max} characters long!"
+ "12001": "Le profil doit comporter entre 1 et {max} caractères !"
},
"home": {
"LiveData": "Données en direct",
@@ -493,7 +493,7 @@
"Back": "Retour",
"Retry": "Réessayer",
"OtaStatus": "Statut OTA",
- "OtaSuccess": "Succès de l'OTA. L'unité a été automatiquement redémarrée et sera à nouveau disponible dans quelques instants.",
+ "OtaSuccess": "Succès de l'OTA. L'unité a été automatiquement redémarrée et sera à nouveau disponible dans quelques instants. N'oubliez pas de recharger l'interface web !",
"FirmwareUpload": "Téléversement du firmware",
"UploadProgress": "Progression du téléversement"
},
@@ -519,18 +519,25 @@
"DefaultPasswordLink": "Merci de changer le mot de passe."
},
"deviceadmin": {
- "DeviceManager": "Device-Manager",
- "PinAssignment": "Connection settings",
- "SelectedProfile": "Selected profile:",
- "DefaultProfile": "(Default settings)",
- "ProfileHint": "Your device may stop responding if you select an incompatible profile. In this case, you must perform a deletion via the serial interface.",
+ "DeviceManager": "Gestionnaire de périphériques",
+ "PinAssignment": "Paramètres de connexion",
+ "SelectedProfile": "Profil sélectionné",
+ "DefaultProfile": "(Réglages par défaut)",
+ "ProfileHint": "Votre appareil peut cesser de répondre si vous sélectionnez un profil incompatible. Dans ce cas, vous devez effectuer une suppression via l'interface série.",
+ "Display": "Affichage",
+ "PowerSafe": "Activer l'économiseur d'énergie",
+ "PowerSafeHint": "Eteindre l'écran si aucun onduleur n'est en production.",
+ "Screensaver": "Activer l'écran de veille",
+ "ScreensaverHint": "Déplacez un peu l'écran à chaque mise à jour pour éviter le phénomène de brûlure. (Utile surtout pour les écrans OLED)",
+ "ShowLogo": "Afficher le logo",
+ "Contrast": "Contraste ({contrast}):",
"Save": "@:dtuadmin.Save"
},
"pininfo": {
- "PinOverview": "Connection overview",
- "Category": "Category",
- "Name": "Name",
- "ValueSelected": "Selected",
- "ValueActive": "Active"
+ "PinOverview": "Vue d'ensemble des connexions",
+ "Category": "Catégorie",
+ "Name": "Nom",
+ "ValueSelected": "Sélectionné",
+ "ValueActive": "Activé"
}
}
\ No newline at end of file
diff --git a/webapp/src/types/DeviceConfig.ts b/webapp/src/types/DeviceConfig.ts
index 51b967b7..99ce70c2 100644
--- a/webapp/src/types/DeviceConfig.ts
+++ b/webapp/src/types/DeviceConfig.ts
@@ -1,5 +1,13 @@
import type { Device } from "./PinMapping";
+export interface Display {
+ show_logo: boolean;
+ power_safe: boolean;
+ screensaver: boolean;
+ contrast: number;
+}
+
export interface DeviceConfig {
curPin: Device;
+ display: Display;
}
\ No newline at end of file
diff --git a/webapp/src/types/PinMapping.ts b/webapp/src/types/PinMapping.ts
index fa7bf493..0445c1f8 100644
--- a/webapp/src/types/PinMapping.ts
+++ b/webapp/src/types/PinMapping.ts
@@ -17,10 +17,19 @@ export interface Ethernet {
clk_mode: number;
}
+export interface Display {
+ type: number;
+ data: number;
+ clk: number;
+ cs: number;
+ reset: number;
+}
+
export interface Device {
name: string;
nrf24: Nrf24;
eth: Ethernet;
+ display: Display;
}
export interface PinMapping extends Array{}
\ No newline at end of file
diff --git a/webapp/src/views/DeviceAdminView.vue b/webapp/src/views/DeviceAdminView.vue
index cc6606a8..0eccf5b3 100644
--- a/webapp/src/views/DeviceAdminView.vue
+++ b/webapp/src/views/DeviceAdminView.vue
@@ -4,21 +4,22 @@
{{ alertMessage }}
-
-