diff --git a/.vscode/settings.json b/.vscode/settings.json
index 6e77734..7a73a41 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,3 +1,2 @@
{
- "python.pythonPath": "/Users/torsten/.platformio/penv/bin/python"
}
\ No newline at end of file
diff --git a/html/websiteBasic_EN.html b/html/websiteBasic_EN.html
new file mode 100644
index 0000000..c04c20a
--- /dev/null
+++ b/html/websiteBasic_EN.html
@@ -0,0 +1,23 @@
+
+
+
+ Wifi-configuration
+
+
+
+
+
+
diff --git a/html/website_EN.html b/html/website_EN.html
new file mode 100644
index 0000000..1e14e81
--- /dev/null
+++ b/html/website_EN.html
@@ -0,0 +1,358 @@
+
+
+
+ ESPuino-configuration
+
+
+
+
+
+
+
+
+
+
+
+
Wifi-configuration
+
+
+
+
+
+
+
MQTT-configuration
+
+
+
+
+
FTP-configuration
+
+
+
+
+
General configuration
+
+
+
+
+
+
+
diff --git a/processHtml.py b/processHtml.py
index 9267213..1e9dd5f 100644
--- a/processHtml.py
+++ b/processHtml.py
@@ -2,6 +2,8 @@
content = ''
content2 = ''
+contentEN = ''
+content2EN = ''
with open('html/website.html', 'r') as r:
data = r.read().replace('\n', '\\\n')
@@ -16,6 +18,18 @@ with open('src/websiteMgmt.h', 'w') as w:
w.write(content)
w.write("\";")
+with open('html/website_EN.html', 'r') as ren:
+ data = ren.read().replace('\n', '\\\n')
+ data = data.replace('\"', '\\"')
+ data = data.replace('\\d', '\\\d')
+ data = data.replace('\\.', '\\\.')
+ data = data.replace('\\^', '\\\\^')
+ contentEN += data
+
+with open('src/websiteMgmt_EN.h', 'w') as wen:
+ wen.write("static const char mgtWebsite[] PROGMEM = \"")
+ wen.write(contentEN)
+ wen.write("\";")
with open('html/websiteBasic.html', 'r') as r2:
data = r2.read().replace('\n', '\\\n')
@@ -27,6 +41,15 @@ with open('src/websiteBasic.h', 'w') as w2:
w2.write(content2)
w2.write("\";")
+with open('html/websiteBasic_EN.html', 'r') as r2en:
+ data = r2en.read().replace('\n', '\\\n')
+ data = data.replace('\"', '\\"')
+ content2EN += data
+
+with open('src/websiteBasic_EN.h', 'w') as w2en:
+ w2en.write("static const char basicWebsite[] PROGMEM = \"")
+ w2en.write(content2EN)
+ w2en.write("\";")
r.close()
w.close()
diff --git a/src/logmessages.h b/src/logmessages.h
index 8e1e1b8..8745f50 100644
--- a/src/logmessages.h
+++ b/src/logmessages.h
@@ -108,27 +108,27 @@ static const char unableToCreateMgmtQ[] PROGMEM = "Konnte Play-Management-Queue
static const char unableToCreatePlayQ[] PROGMEM = "Konnte Track-Queue nicht anlegen..";
static const char initialBrightnessfromNvs[] PROGMEM = "Initiale LED-Helligkeit wurde aus NVS geladen";
static const char wroteInitialBrightnessToNvs[] PROGMEM = "Initiale LED-Helligkeit wurde ins NVS geschrieben.";
-static const char loadedInitialBrightnessForNmFromNvs[] PROGMEM = "LED-Helligkeit für Nachtmodus wurde aus NVS geladen";
+static const char restoredInitialBrightnessForNmFromNvs[] PROGMEM = "LED-Helligkeit für Nachtmodus wurde aus NVS geladen";
static const char wroteNmBrightnessToNvs[] PROGMEM = "LED-Helligkeit für Nachtmodus wurde ins NVS geschrieben.";
static const char wroteFtpUserToNvs[] PROGMEM = "FTP-User wurde ins NVS geschrieben.";
-static const char loadedFtpUserFromNvs[] PROGMEM = "FTP-User wurde aus NVS geladen";
+static const char restoredFtpUserFromNvs[] PROGMEM = "FTP-User wurde aus NVS geladen";
static const char wroteFtpPwdToNvs[] PROGMEM = "FTP-Passwort wurde ins NVS geschrieben.";
-static const char loadedFtpPwdFromNvs[] PROGMEM = "FTP-Passwort wurde aus NVS geladen";
-static const char loadedMaxInactivityFromNvs[] PROGMEM = "Maximale Inaktivitätszeit wurde aus NVS geladen";
+static const char restoredFtpPwdFromNvs[] PROGMEM = "FTP-Passwort wurde aus NVS geladen";
+static const char restoredMaxInactivityFromNvs[] PROGMEM = "Maximale Inaktivitätszeit wurde aus NVS geladen";
static const char wroteMaxInactivityToNvs[] PROGMEM = "Maximale Inaktivitätszeit wurde ins NVS geschrieben.";
-static const char loadedInitialLoudnessFromNvs[] PROGMEM = "Initiale Lautstärke wurde aus NVS geladen";
+static const char restoredInitialLoudnessFromNvs[] PROGMEM = "Initiale Lautstärke wurde aus NVS geladen";
static const char wroteInitialLoudnessToNvs[] PROGMEM = "Initiale Lautstärke wurde ins NVS geschrieben.";
-static const char loadedMaxLoudnessFromNvs[] PROGMEM = "Maximale Lautstärke wurde aus NVS geladen";
+static const char restoredMaxLoudnessFromNvs[] PROGMEM = "Maximale Lautstärke wurde aus NVS geladen";
static const char wroteMaxLoudnessToNvs[] PROGMEM = "Maximale Lautstärke wurde ins NVS geschrieben.";
static const char wroteMqttFlagToNvs[] PROGMEM = "MQTT-Flag wurde ins NVS geschrieben.";
-static const char loadedMqttActiveFromNvs[] PROGMEM = "MQTT-Flag (aktiviert) wurde aus NVS geladen";
-static const char loadedMqttDeactiveFromNvs[] PROGMEM = "MQTT-Flag (deaktiviert) wurde aus NVS geladen";
+static const char restoredMqttActiveFromNvs[] PROGMEM = "MQTT-Flag (aktiviert) wurde aus NVS geladen";
+static const char restoredMqttDeactiveFromNvs[] PROGMEM = "MQTT-Flag (deaktiviert) wurde aus NVS geladen";
static const char wroteMqttServerToNvs[] PROGMEM = "MQTT-Server wurde ins NVS geschrieben.";
-static const char loadedMqttServerFromNvs[] PROGMEM = "MQTT-Server wurde aus NVS geladen";
+static const char restoredMqttServerFromNvs[] PROGMEM = "MQTT-Server wurde aus NVS geladen";
static const char wroteMqttUserToNvs[] PROGMEM = "MQTT-User wurde ins NVS geschrieben.";
-static const char loadedMqttUserFromNvs[] PROGMEM = "MQTT-User wurde aus NVS geladen";
+static const char restoredMqttUserFromNvs[] PROGMEM = "MQTT-User wurde aus NVS geladen";
static const char wroteMqttPwdToNvs[] PROGMEM = "MQTT-Passwort wurde ins NVS geschrieben.";
-static const char loadedMqttPwdFromNvs[] PROGMEM = "MQTT-Passwort wurde aus NVS geladen";
+static const char restoredMqttPwdFromNvs[] PROGMEM = "MQTT-Passwort wurde aus NVS geladen";
static const char mqttWithPwd[] PROGMEM = "Verbinde zu MQTT-Server mit User und Passwort";
static const char mqttWithoutPwd[] PROGMEM = "Verbinde zu MQTT-Server ohne User und Passwort";
static const char ssidNotFoundInNvs[] PROGMEM = "SSID wurde im NVS nicht gefunden.";
@@ -136,3 +136,4 @@ static const char wifiPwdNotFoundInNvs[] PROGMEM = "WLAN-Passwort wurde im NVS n
static const char wifiStaticIpConfigNotFoundInNvs[] PROGMEM = "Statische WLAN-IP-Konfiguration wurde im NVS nicht gefunden.";
static const char wifiHostnameNotSet[] PROGMEM = "Keine Hostname-Konfiguration im NVS gefunden.";
static const char mqttConnFailed[] PROGMEM = "Verbindung fehlgeschlagen, versuche erneut in Kürze erneut";
+static const char restoredHostnameFromNvs[] PROGMEM = "Hostname aus NVS geladen";
\ No newline at end of file
diff --git a/src/logmessages_EN.h b/src/logmessages_EN.h
new file mode 100644
index 0000000..5365380
--- /dev/null
+++ b/src/logmessages_EN.h
@@ -0,0 +1,139 @@
+static const char stillOnlineMqtt[] PROGMEM = "MQTT: still online.";
+static const char tryConnectMqttS[] PROGMEM = "Trying to connect to MQTT-broker";
+static const char mqttOk[] PROGMEM = "MQTT-connection established.";
+static const char sleepTimerEOP[] PROGMEM = "Sleep-timer: after last track of playlist.";
+static const char sleepTimerEOT[] PROGMEM = "Sleep-timer: after end of current track.";
+static const char sleepTimerStop[] PROGMEM = "Sleep-timer has been disabled.";
+static const char sleepTimerEO5[] PROGMEM = "Sleep-timer: after five track or end of playlist - whatever is reached first";
+static const char sleepTimerAlreadyStopped[] PROGMEM = "sleep-timer is already disabled.";
+static const char sleepTimerSetTo[] PROGMEM = "sleep-timer adjusted to";
+static const char allowButtons[] PROGMEM = "Unlocking all keys.";
+static const char lockButtons[] PROGMEM = "Locking all keys.";
+static const char noPlaylistNotAllowedMqtt[] PROGMEM = "Playmode cannot be adjusted to 'no playlist' via MQTT.";
+static const char playmodeChangedMQtt[] PROGMEM = "Playlist adjusted via MQTT.";
+static const char noPlaymodeChangeIfIdle[] PROGMEM = "Playlist cannot be adjusted while no playlist is active.";
+static const char noValidTopic[] PROGMEM = "No valid MQTT-topic";
+static const char freePtr[] PROGMEM = "Releasing Pointer";
+static const char freeMemory[] PROGMEM = "Free memory";
+static const char writeEntryToNvs[] PROGMEM = "Storing data to NVS";
+static const char freeMemoryAfterFree[] PROGMEM = "Free memory after cleaning";
+static const char releaseMemoryOfOldPlaylist[] PROGMEM = "Releasing memory of old playlist.";
+static const char dirOrFileDoesNotExist[] PROGMEM = "File of directory does not exist!";
+static const char unableToAllocateMemForPlaylist[] PROGMEM = "Unable to allocate memory for playlist!";
+static const char unableToAllocateMem[] PROGMEM = "Unable to allocate memory!";
+static const char fileModeDetected[] PROGMEM = "File-mode detected.";
+static const char nameOfFileFound[] PROGMEM = "File found";
+static const char reallocCalled[] PROGMEM = "Reallocated memory.";
+static const char unableToAllocateMemForLinearPlaylist[] PROGMEM = "Unable to allocate memory for linear playlist!";
+static const char numberOfValidFiles[] PROGMEM = "Number of valid files";
+static const char newLoudnessReceivedQueue[] PROGMEM = "New volume received via queue";
+static const char newCntrlReceivedQueue[] PROGMEM = "Control-command received via queue";
+static const char newPlaylistReceived[] PROGMEM = "New playlist received";
+static const char repeatTrackDueToPlaymode[] PROGMEM = "Repeating track due to playmode configured.";
+static const char repeatPlaylistDueToPlaymode[] PROGMEM = "Repeating playlist due to playmode configured.";
+static const char cmndStop[] PROGMEM = "Command: stop";
+static const char cmndPause[] PROGMEM = "Command: pause";
+static const char cmndNextTrack[] PROGMEM = "Command: next track";
+static const char cmndPrevTrack[] PROGMEM = "Command: previous track";
+static const char cmndFirstTrack[] PROGMEM = "Command: first track of playlist";
+static const char cmndLastTrack[] PROGMEM = "Command: last track of playlist";
+static const char cmndDoesNotExist[] PROGMEM = "Command requested does not exist.";
+static const char lastTrackAlreadyActive[] PROGMEM = "Already playing last track.";
+static const char firstTrackAlreadyActive[] PROGMEM = "Already playing first track.";
+static const char trackStartAudiobook[] PROGMEM = "Starting track in playmode from the very beginning.";
+static const char trackStart[] PROGMEM = "Starting track from the very beginning.";
+static const char trackChangeWebstream[] PROGMEM = "Playing from the very beginning is not possible while webradio-mode is active.";
+static const char endOfPlaylistReached[] PROGMEM = "Reached end of playlist.";
+static const char trackStartatPos[] PROGMEM = "Starting track at position";
+static const char rfidScannerReady[] PROGMEM = "RFID-tags can now be applied...";
+static const char rfidTagDetected[] PROGMEM = "RFID-tag detected: ";
+static const char rfidTagReceived[] PROGMEM = "RFID-tag received";
+static const char rfidTagUnknownInNvs[] PROGMEM = "RFID-tag is unkown to NVS.";
+static const char goToSleepDueToIdle[] PROGMEM = "Going to deepsleep due to inactivity-timer...";
+static const char goToSleepDueToTimer[] PROGMEM = "Going to deepsleep due to sleep timer...";
+static const char goToSleepNow[] PROGMEM = "Going to deepsleep now!";
+static const char maxLoudnessReached[] PROGMEM = "Already reached max volume!";
+static const char minLoudnessReached[] PROGMEM = "Already reached min volume!";
+static const char errorOccured[] PROGMEM = "Error occured!";
+static const char noMp3FilesInDir[] PROGMEM = "Directory does not contain mp3-files.";
+static const char modeSingleTrack[] PROGMEM = "Mode: Single track";
+static const char modeSingleTrackLoop[] PROGMEM = "Mode: single track as infinite loop";
+static const char modeSingleAudiobook[] PROGMEM = "Mode: audiobook";
+static const char modeSingleAudiobookLoop[] PROGMEM = "Mode: audiobook as infinite loop";
+static const char modeAllTrackAlphSorted[] PROGMEM = "Mode: all tracks (in alph. order) of directory";
+static const char modeAllTrackRandom[] PROGMEM = "Mode: all tracks (in random. order) of directory";
+static const char modeAllTrackAlphSortedLoop[] PROGMEM = "Mode: all tracks (in alph. order) of directory as infinite loop";
+static const char modeAllTrackRandomLoop[] PROGMEM = "Mode: all tracks (in random order) of directory as infinite loop";
+static const char modeWebstream[] PROGMEM = "Mode: webstream";
+static const char webstreamNotAvailable[] PROGMEM = "Unable to access webstream as no wifi-connection is available!";
+static const char modeDoesNotExist[] PROGMEM = "Playmode does not exist!";
+static const char modeRepeatNone[] PROGMEM = "Repeatmode: no repeat";
+static const char modeRepeatTrack[] PROGMEM = "Repeatmode: current track";
+static const char modeRepeatPlaylist[] PROGMEM = "Repeatmode: whole playlist";
+static const char modeRepeatTracknPlaylist[] PROGMEM = "Repeatmode: track and playlist";
+static const char modificatorAllButtonsLocked[] PROGMEM = "Modificator: locking all keys via RFID-tag.";
+static const char modificatorAllButtonsUnlocked[] PROGMEM = "Modificator: unlocking all keys via RFID-tag.";
+static const char modificatorSleepd[] PROGMEM = "Modificator: sleep-Timer deactivated.";
+static const char modificatorSleepTimer15[] PROGMEM = "Modificator: sleep-Timer enabled via RFID (15 minutes).";
+static const char modificatorSleepTimer30[] PROGMEM = "Modificator: sleep-Timer enabled via RFID (30 minutes).";
+static const char modificatorSleepTimer60[] PROGMEM = "Modificator: sleep-Timer enabled via RFID (60 minutes).";
+static const char modificatorSleepTimer120[] PROGMEM = "Modificator: sleep-Timer enabled via RFID (2 hours).";
+static const char ledsDimmedToNightmode[] PROGMEM = "Dimmed LEDs to nightmode.";
+static const char modificatorNotallowedWhenIdle[] PROGMEM = "Modificator cannot be applied while playlist is inactive.";
+static const char modificatorSleepAtEOT[] PROGMEM = "Modificator: adjusted sleep-timer to after end of current track.";
+static const char modificatorSleepAtEOTd[] PROGMEM = "Modificator: disabled sleep-timer after end of current track.";
+static const char modificatorSleepAtEOP[] PROGMEM = "Modificator: adjusted sleep-timer to after end of playlist.";
+static const char modificatorSleepAtEOPd[] PROGMEM = "Modificator: disabled sleep-timer after end of playlist.";
+static const char modificatorAllTrackAlphSortedLoop[] PROGMEM = "Modificator: adjusted to all tracks (in alph. order) as infinite loop.";
+static const char modificatorAllTrackRandomLoop[] PROGMEM = "Modificator: adjusted to all tracks (in random order) as infinite loop.";
+static const char modificatorCurTrackLoop[] PROGMEM = "Modificator: adjusted to current track as infinite loop.";
+static const char modificatorCurAudiobookLoop[] PROGMEM = "Modificator: adjusted to current audiobook as infinite loop.";
+static const char modificatorPlaylistLoopActive[] PROGMEM = "Modificator: adjusted to all tracks as infinite loop.";
+static const char modificatorPlaylistLoopDeactive[] PROGMEM = "Modificator: disabled all tracks as infinite loop.";
+static const char modificatorTrackActive[] PROGMEM = "Modificator: adjusted to current track as infinite loop.";
+static const char modificatorTrackDeactive[] PROGMEM = "Modificator: disabled current track as infinite loop.";
+static const char modificatorNotAllowed[] PROGMEM = "Unable to apply modificator.";
+static const char modificatorLoopRev[] PROGMEM = "Modificator: infinite loop ended.";
+static const char modificatorDoesNotExist[] PROGMEM = "This type of card-modificator does not exist";
+static const char errorOccuredNvs[] PROGMEM = "Error occured while reading from NVS!";
+static const char statementsReceivedByServer[] PROGMEM = "Data received from server";
+static const char savedSsidInNvs[] PROGMEM = "Storing SSID to NVS";
+static const char savedWifiPwdInNvs[] PROGMEM = "Storing wifi-password to NVS";
+static const char apReady[] PROGMEM = "Started wifi-access-point";
+static const char httpReady[] PROGMEM = "Started HTTP-server.";
+static const char unableToMountSd[] PROGMEM = "Unable to mount sd-card.";
+static const char unableToCreateVolQ[] PROGMEM = "Unable to create volume-queue.";
+static const char unableToCreateRfidQ[] PROGMEM = "Unable to create RFID-queue.";
+static const char unableToCreateMgmtQ[] PROGMEM = "Unable to play-management-queue.";
+static const char unableToCreatePlayQ[] PROGMEM = "Unable to create track-queue..";
+static const char initialBrightnessfromNvs[] PROGMEM = "Restoring initial LED-brightness from NVS";
+static const char wroteInitialBrightnessToNvs[] PROGMEM = "Storing initial LED-brightness to NVS.";
+static const char restoredInitialBrightnessForNmFromNvs[] PROGMEM = "Restored LED-brightness for nightmode from NVS";
+static const char wroteNmBrightnessToNvs[] PROGMEM = "Stored LED-brightness for nightmode to NVS.";
+static const char wroteFtpUserToNvs[] PROGMEM = "Stored FTP-user to NVS.";
+static const char restoredFtpUserFromNvs[] PROGMEM = "Restored FTP-user from NVS";
+static const char wroteFtpPwdToNvs[] PROGMEM = "Stored FTP-password to NVS.";
+static const char restoredFtpPwdFromNvs[] PROGMEM = "Restored FTP-password from NVS";
+static const char restoredMaxInactivityFromNvs[] PROGMEM = "Restored maximum inactivity-time from NVS.";
+static const char wroteMaxInactivityToNvs[] PROGMEM = "Stored maximum inactivity-time to NVS.";
+static const char restoredInitialLoudnessFromNvs[] PROGMEM = "Restored initial volume from NVS";
+static const char wroteInitialLoudnessToNvs[] PROGMEM = "Stored initial volume to NVS.";
+static const char restoredMaxLoudnessFromNvs[] PROGMEM = "Restored maximum volume from NVS";
+static const char wroteMaxLoudnessToNvs[] PROGMEM = "Stored maximum volume to NVS.";
+static const char wroteMqttFlagToNvs[] PROGMEM = "Stored MQTT-flag to NVS.";
+static const char restoredMqttActiveFromNvs[] PROGMEM = "Restored MQTT-flag (enabled) from NVS";
+static const char restoredMqttDeactiveFromNvs[] PROGMEM = "Restored MQTT-flag (disabled) from NVS";
+static const char wroteMqttServerToNvs[] PROGMEM = "Stored MQTT-server to NVS.";
+static const char restoredMqttServerFromNvs[] PROGMEM = "Restored MQTT-Server from NVS";
+static const char wroteMqttUserToNvs[] PROGMEM = "Stored MQTT-user to NVS.";
+static const char restoredMqttUserFromNvs[] PROGMEM = "Restored MQTT-user from NVS";
+static const char wroteMqttPwdToNvs[] PROGMEM = "Stored MQTT-password to NVS.";
+static const char restoredMqttPwdFromNvs[] PROGMEM = "Restored MQTT-password from NVS";
+static const char mqttWithPwd[] PROGMEM = "Try to connect to MQTT-server with user und password";
+static const char mqttWithoutPwd[] PROGMEM = "Try to connect to MQTT-server without user und password";
+static const char ssidNotFoundInNvs[] PROGMEM = "Unable to find SSID to NVS.";
+static const char wifiPwdNotFoundInNvs[] PROGMEM = "Unable to find wifi-password to NVS.";
+static const char wifiStaticIpConfigNotFoundInNvs[] PROGMEM = "Unable to find static wifi-ip-configuration to NVS.";
+static const char wifiHostnameNotSet[] PROGMEM = "Unable to find hostname-configuration to NVS.";
+static const char mqttConnFailed[] PROGMEM = "Unable to establish mqtt-connection, trying again...";
+static const char restoredHostnameFromNvs[] PROGMEM = "Restored hostname from NVS";
\ No newline at end of file
diff --git a/src/main.cpp b/src/main.cpp
index 8c0d277..55872ae 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3,6 +3,7 @@
#define FTP_ENABLE
#define NEOPIXEL_ENABLE // Don't forget configuration of NUM_LEDS
#define NEOPIXEL_REVERSE_ROTATION // Some Neopixels are adressed/soldered counter-clockwise. This can be configured here.
+#define LANGUAGE 1 // 1 = deutsch; 2 = english
#include
#include "Arduino.h"
@@ -24,9 +25,18 @@
#ifdef NEOPIXEL_ENABLE
#include
#endif
-#include "logmessages.h"
-#include "websiteMgmt.h"
-#include "websiteBasic.h"
+
+#if LANGUAGE == 1
+ #include "logmessages.h"
+ #include "websiteMgmt.h"
+ #include "websiteBasic.h"
+#endif
+#if LANGUAGE == 2
+ #include "logmessages_EN.h"
+ #include "websiteMgmt_EN.h"
+ #include "websiteBasic_EN.h"
+#endif
+
#include
#include
#include
@@ -2581,15 +2591,15 @@ wl_status_t wifiManager(void) {
// Get (optional) hostname-configration from NVS
String hostname = prefsSettings.getString("Hostname", "-1");
- Serial.println(hostname.c_str());
if (hostname.compareTo("-1")) {
WiFi.config(INADDR_NONE, INADDR_NONE, INADDR_NONE);
WiFi.setHostname(hostname.c_str());
- Serial.println(hostname.c_str());
+ snprintf(logBuf, sizeof(logBuf) / sizeof(logBuf[0]), "%s: %s", (char *) FPSTR(restoredHostnameFromNvs), hostname.c_str());
+ loggerNl(logBuf, LOGLEVEL_INFO);
} else {
loggerNl((char *) FPSTR(wifiHostnameNotSet), LOGLEVEL_INFO);
}
- // ...and create a connection with it. If not successful, an access-point will is opened
+ // ...and create a connection with it. If not successful, an access-point is opened
WiFi.begin(_ssid, _pwd);
uint8_t tryCount=0;
@@ -3083,7 +3093,7 @@ void setup() {
uint8_t nvsNLedBrightness = prefsSettings.getUChar("nLedBrightness", 0);
if (nvsNLedBrightness) {
nightLedBrightness = nvsNLedBrightness;
- snprintf(logBuf, sizeof(logBuf) / sizeof(logBuf[0]), "%s: %d", (char *) FPSTR(loadedInitialBrightnessForNmFromNvs), nvsNLedBrightness);
+ snprintf(logBuf, sizeof(logBuf) / sizeof(logBuf[0]), "%s: %d", (char *) FPSTR(restoredInitialBrightnessForNmFromNvs), nvsNLedBrightness);
loggerNl(logBuf, LOGLEVEL_INFO);
} else {
prefsSettings.putUChar("nLedBrightness", nightLedBrightness);
@@ -3097,7 +3107,7 @@ void setup() {
loggerNl((char *) FPSTR(wroteFtpUserToNvs), LOGLEVEL_ERROR);
} else {
strncpy(ftpUser, nvsFtpUser.c_str(), sizeof(ftpUser)/sizeof(ftpUser[0]));
- snprintf(logBuf, sizeof(logBuf) / sizeof(logBuf[0]), "%s: %s", (char *) FPSTR(loadedFtpUserFromNvs), nvsFtpUser.c_str());
+ snprintf(logBuf, sizeof(logBuf) / sizeof(logBuf[0]), "%s: %s", (char *) FPSTR(restoredFtpUserFromNvs), nvsFtpUser.c_str());
loggerNl(logBuf, LOGLEVEL_INFO);
}
@@ -3108,7 +3118,7 @@ void setup() {
loggerNl((char *) FPSTR(wroteFtpPwdToNvs), LOGLEVEL_ERROR);
} else {
strncpy(ftpPassword, nvsFtpPassword.c_str(), sizeof(ftpPassword)/sizeof(ftpPassword[0]));
- snprintf(logBuf, sizeof(logBuf) / sizeof(logBuf[0]), "%s: %s", (char *) FPSTR(loadedFtpPwdFromNvs), nvsFtpPassword.c_str());
+ snprintf(logBuf, sizeof(logBuf) / sizeof(logBuf[0]), "%s: %s", (char *) FPSTR(restoredFtpPwdFromNvs), nvsFtpPassword.c_str());
loggerNl(logBuf, LOGLEVEL_INFO);
}
@@ -3116,7 +3126,7 @@ void setup() {
uint32_t nvsMInactivityTime = prefsSettings.getUInt("mInactiviyT", 0);
if (nvsMInactivityTime) {
maxInactivityTime = nvsMInactivityTime;
- snprintf(logBuf, sizeof(logBuf) / sizeof(logBuf[0]), "%s: %u", (char *) FPSTR(loadedMaxInactivityFromNvs), nvsMInactivityTime);
+ snprintf(logBuf, sizeof(logBuf) / sizeof(logBuf[0]), "%s: %u", (char *) FPSTR(restoredMaxInactivityFromNvs), nvsMInactivityTime);
loggerNl(logBuf, LOGLEVEL_INFO);
} else {
prefsSettings.putUInt("mInactiviyT", maxInactivityTime);
@@ -3127,7 +3137,7 @@ void setup() {
uint32_t nvsInitialVolume = prefsSettings.getUInt("initVolume", 0);
if (nvsInitialVolume) {
initVolume = nvsInitialVolume;
- snprintf(logBuf, sizeof(logBuf) / sizeof(logBuf[0]), "%s: %u", (char *) FPSTR(loadedInitialLoudnessFromNvs), nvsInitialVolume);
+ snprintf(logBuf, sizeof(logBuf) / sizeof(logBuf[0]), "%s: %u", (char *) FPSTR(restoredInitialLoudnessFromNvs), nvsInitialVolume);
loggerNl(logBuf, LOGLEVEL_INFO);
} else {
prefsSettings.putUInt("initVolume", initVolume);
@@ -3138,7 +3148,7 @@ void setup() {
uint32_t nvsMaxVolume = prefsSettings.getUInt("maxVolume", 0);
if (nvsMaxVolume) {
maxVolume = nvsMaxVolume;
- snprintf(logBuf, sizeof(logBuf) / sizeof(logBuf[0]), "%s: %u", (char *) FPSTR(loadedMaxLoudnessFromNvs), nvsMaxVolume);
+ snprintf(logBuf, sizeof(logBuf) / sizeof(logBuf[0]), "%s: %u", (char *) FPSTR(restoredMaxLoudnessFromNvs), nvsMaxVolume);
loggerNl(logBuf, LOGLEVEL_INFO);
} else {
prefsSettings.putUInt("maxVolume", maxVolume);
@@ -3155,12 +3165,12 @@ void setup() {
case 1:
//prefsSettings.putUChar("enableMQTT", enableMqtt);
enableMqtt = nvsEnableMqtt;
- snprintf(logBuf, sizeof(logBuf) / sizeof(logBuf[0]), "%s: %u", (char *) FPSTR(loadedMqttActiveFromNvs), nvsEnableMqtt);
+ snprintf(logBuf, sizeof(logBuf) / sizeof(logBuf[0]), "%s: %u", (char *) FPSTR(restoredMqttActiveFromNvs), nvsEnableMqtt);
loggerNl(logBuf, LOGLEVEL_INFO);
break;
case 0:
enableMqtt = nvsEnableMqtt;
- snprintf(logBuf, sizeof(logBuf) / sizeof(logBuf[0]), "%s: %u", (char *) FPSTR(loadedMqttDeactiveFromNvs), nvsEnableMqtt);
+ snprintf(logBuf, sizeof(logBuf) / sizeof(logBuf[0]), "%s: %u", (char *) FPSTR(restoredMqttDeactiveFromNvs), nvsEnableMqtt);
loggerNl(logBuf, LOGLEVEL_INFO);
break;
}
@@ -3172,7 +3182,7 @@ void setup() {
loggerNl((char*) FPSTR(wroteMqttServerToNvs), LOGLEVEL_ERROR);
} else {
strncpy(mqtt_server, nvsMqttServer.c_str(), sizeof(mqtt_server)/sizeof(mqtt_server[0]));
- snprintf(logBuf, sizeof(logBuf) / sizeof(logBuf[0]), "%s: %s", (char *) FPSTR(loadedMqttServerFromNvs), nvsMqttServer.c_str());
+ snprintf(logBuf, sizeof(logBuf) / sizeof(logBuf[0]), "%s: %s", (char *) FPSTR(restoredMqttServerFromNvs), nvsMqttServer.c_str());
loggerNl(logBuf, LOGLEVEL_INFO);
}
@@ -3183,7 +3193,7 @@ void setup() {
loggerNl((char *) FPSTR(wroteMqttUserToNvs), LOGLEVEL_ERROR);
} else {
strncpy(mqttUser, nvsMqttUser.c_str(), sizeof(mqttUser)/sizeof(mqttUser[0]));
- snprintf(logBuf, sizeof(logBuf) / sizeof(logBuf[0]), "%s: %s", (char *) FPSTR(loadedMqttUserFromNvs), nvsMqttUser.c_str());
+ snprintf(logBuf, sizeof(logBuf) / sizeof(logBuf[0]), "%s: %s", (char *) FPSTR(restoredMqttUserFromNvs), nvsMqttUser.c_str());
loggerNl(logBuf, LOGLEVEL_INFO);
}
@@ -3194,7 +3204,7 @@ void setup() {
loggerNl((char *) FPSTR(wroteMqttPwdToNvs), LOGLEVEL_ERROR);
} else {
strncpy(mqttPassword, nvsMqttPassword.c_str(), sizeof(mqttPassword)/sizeof(mqttPassword[0]));
- snprintf(logBuf, sizeof(logBuf) / sizeof(logBuf[0]), "%s: %s", (char *) FPSTR(loadedMqttPwdFromNvs), nvsMqttPassword.c_str());
+ snprintf(logBuf, sizeof(logBuf) / sizeof(logBuf[0]), "%s: %s", (char *) FPSTR(restoredMqttPwdFromNvs), nvsMqttPassword.c_str());
loggerNl(logBuf, LOGLEVEL_INFO);
}
diff --git a/src/websiteBasic_EN.h b/src/websiteBasic_EN.h
new file mode 100644
index 0000000..4d4921e
--- /dev/null
+++ b/src/websiteBasic_EN.h
@@ -0,0 +1,24 @@
+static const char basicWebsite[] PROGMEM = "\
+\
+ \
+ Wifi-configuration\
+ \
+ \
+ \
+ \
+ \
+\
+";
\ No newline at end of file
diff --git a/src/websiteMgmt_EN.h b/src/websiteMgmt_EN.h
new file mode 100644
index 0000000..938575c
--- /dev/null
+++ b/src/websiteMgmt_EN.h
@@ -0,0 +1,359 @@
+static const char mgtWebsite[] PROGMEM = "\
+\
+ \
+ ESPuino-configuration\
+ \
+ \
+ \
+ \
+ \
+ \
+ \
+ \
+ \
+
\
+ \
+
Wifi-configuration
\
+
\
+
\
+
\
+ \
+ \
+ \
+
MQTT-configuration
\
+
\
+
\
+
\
+ \
+
FTP-configuration
\
+
\
+
\
+
\
+ \
+
General configuration
\
+
\
+
\
+
\
+ \
+
NVS-importer
\
+
\
+
\
+
\
+ \
+ \
+\
+";
\ No newline at end of file