diff --git a/tools/esp8266/app.cpp b/tools/esp8266/app.cpp
index 17798bfc..21c1ef60 100644
--- a/tools/esp8266/app.cpp
+++ b/tools/esp8266/app.cpp
@@ -745,6 +745,11 @@ void app::loadDefaultConfig(void) {
snprintf(mConfig.ntpAddr, NTP_ADDR_LEN, "%s", DEF_NTP_SERVER_NAME);
mConfig.ntpPort = DEF_NTP_PORT;
+ // Latitude + Longitude
+ mConfig.lat = 0;
+ mConfig.lon = 0;
+ mConfig.disnightcom = false; // disable night communication
+
// mqtt
snprintf(mConfig.mqtt.broker, MQTT_ADDR_LEN, "%s", DEF_MQTT_BROKER);
mConfig.mqtt.port = DEF_MQTT_PORT;
diff --git a/tools/esp8266/defines.h b/tools/esp8266/defines.h
index ece45946..aa61d193 100644
--- a/tools/esp8266/defines.h
+++ b/tools/esp8266/defines.h
@@ -82,7 +82,6 @@ typedef enum {
#define INV_CH_CH_NAME_LEN MAX_NUM_INVERTERS * MAX_NAME_LENGTH * 4 // (4 channels)
#define INV_INTERVAL_LEN 2 // uint16_t
#define INV_MAX_RTRY_LEN 1 // uint8_t
-#define INV_PWR_LIM_LEN MAX_NUM_INVERTERS * 2 // uint16_t
#define NTP_ADDR_LEN 32 // DNS Name
@@ -132,6 +131,11 @@ typedef struct {
// mqtt
mqttConfig_t mqtt;
+ // Latitude + Longitude
+ float lat;
+ float lon;
+ bool disnightcom;
+
// serial
uint16_t serialInterval;
bool serialShowIv;
@@ -148,8 +152,8 @@ typedef struct {
#define CFG_MQTT_LEN MQTT_ADDR_LEN + 2 + MQTT_USER_LEN + MQTT_PWD_LEN +MQTT_TOPIC_LEN
-#define CFG_SYS_LEN DEVNAME_LEN + SSID_LEN + PWD_LEN + 1
-#define CFG_LEN 7 + NTP_ADDR_LEN + 2 + CFG_MQTT_LEN + 4
+#define CFG_SYS_LEN DEVNAME_LEN + SSID_LEN + PWD_LEN + 1
+#define CFG_LEN 7 + NTP_ADDR_LEN + 2 + CFG_MQTT_LEN + (4 + 4 + 1) + 4 // in the brackets its needed for lon+lat+bool
#define ADDR_START 0
#define ADDR_CFG_SYS ADDR_START
diff --git a/tools/esp8266/html/convert.py b/tools/esp8266/html/convert.py
index 36877dec..4d48a112 100755
--- a/tools/esp8266/html/convert.py
+++ b/tools/esp8266/html/convert.py
@@ -1,6 +1,7 @@
import re
import os
import gzip
+import glob
from pathlib import Path
@@ -62,10 +63,19 @@ def convert2Header(inFile, compress):
f.write("#endif /*__{}_{}_H__*/\n".format(define, define2))
f.close()
-convert2Header("index.html", True)
-convert2Header("setup.html", True)
-convert2Header("visualization.html", True)
-convert2Header("update.html", True)
-convert2Header("serial.html", True)
-convert2Header("style.css", True)
-convert2Header("api.js", True)
+# Todo: delete all, but ignore 'favicon_ico_gz.h'
+# delete all files in the 'h' dir
+#dir = './html/h'
+#for f in os.listdir(dir):
+# os.remove(os.path.join(dir, f))
+
+# grab all files with following extensions
+os.chdir('./html')
+types = ('*.html', '*.css', '*.js') # the tuple of file types
+files_grabbed = []
+for files in types:
+ files_grabbed.extend(glob.glob(files))
+
+# go throw the array
+for val in files_grabbed:
+ convert2Header(val, True)
\ No newline at end of file
diff --git a/tools/esp8266/html/setup.html b/tools/esp8266/html/setup.html
index f2763238..651c93ac 100644
--- a/tools/esp8266/html/setup.html
+++ b/tools/esp8266/html/setup.html
@@ -71,6 +71,23 @@
+
+
+