diff --git a/platformio.ini b/platformio.ini index fb54d9c..086fe6f 100644 --- a/platformio.ini +++ b/platformio.ini @@ -14,7 +14,7 @@ framework = arduino monitor_speed = 115200 monitor_filters = esp8266_exception_decoder, default, time, printable, colorize -custom_prog_version = 2.0.0 +custom_prog_version = 2.0.1 build_flags = -DVERSION=${this.custom_prog_version} diff --git a/src/htmlProzessor.h b/src/htmlProzessor.h index 622715b..27883d6 100644 --- a/src/htmlProzessor.h +++ b/src/htmlProzessor.h @@ -3,9 +3,9 @@ String htmlProcessor(const String &var) { extern Settings _settings; if (var == F("pre_head_template")) - return (HTML_HEAD); + return (FPSTR(HTML_HEAD)); if (var == F("pre_foot_template")) - return (HTML_FOOT); + return (FPSTR(HTML_FOOT)); if (var == F("pre_software_version")) return (SOFTWARE_VERSION); if (var == F("pre_swversion")) @@ -16,7 +16,7 @@ String htmlProcessor(const String &var) return (String(ESP01).c_str()); if (var == F("pre_device_name")) return (_settings.data.deviceName); - if (var == ("pre_device_quantity")) + if (var == F("pre_device_quantity")) return (String(_settings.data.deviceQuantity).c_str()); if (var == F("pre_mqtt_server")) return (_settings.data.mqttServer); diff --git a/src/main.cpp b/src/main.cpp index 108ebf1..147ee80 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -29,6 +29,7 @@ bool restartNow = false; bool workerCanRun = true; unsigned long mqtttimer = 0; unsigned long RestartTimer = 0; +unsigned long notifyTimer = 0; byte ReqDevAddr = 1; char mqtt_server[80]; char mqttClientId[80]; @@ -439,7 +440,13 @@ bool epWorker() } else { - notifyClients(); // anyway, call the client something + if(errorcode != 0 && millis() > (notifyTimer +1000)){ + notifyClients(); // anyway, call the client something + notifyTimer = millis(); + } else if(errorcode == 0) { + notifyClients(); // anyway, call the client something + } + } // mqtt part, when time is come, fire up the mqtt function to send all data to the broker diff --git a/src/webpages/HTML_CONFIRM_RESET.html b/src/webpages/HTML_CONFIRM_RESET.html index d0ef6e3..aefb04e 100644 --- a/src/webpages/HTML_CONFIRM_RESET.html +++ b/src/webpages/HTML_CONFIRM_RESET.html @@ -1,6 +1,6 @@ %pre_head_template%
-

Erease all Data?

+

Erase all Data?

Yes diff --git a/src/webpages/HTML_MAIN.html b/src/webpages/HTML_MAIN.html index ae6407b..369a38f 100644 --- a/src/webpages/HTML_MAIN.html +++ b/src/webpages/HTML_MAIN.html @@ -50,18 +50,18 @@

-
Gemperature:
+
Temperature:
-
Consumed Kwh:
+
Consumed kWh:
-
Generated Kwh:
+
Generated kWh:
diff --git a/src/webpages/HTML_SETTINGS_EDIT.html b/src/webpages/HTML_SETTINGS_EDIT.html index 378db1c..9b89713 100644 --- a/src/webpages/HTML_SETTINGS_EDIT.html +++ b/src/webpages/HTML_SETTINGS_EDIT.html @@ -3,7 +3,7 @@

Edit Configuration

-
+
Device Name @@ -48,14 +48,14 @@

Edit Configuration

-
+
MQTT Json Style
-
+
WebUI Dark Mode