diff --git a/src/CHANGES.md b/src/CHANGES.md
index a11a4e2b..fd02a030 100644
--- a/src/CHANGES.md
+++ b/src/CHANGES.md
@@ -1,5 +1,8 @@
# Development Changes
+## 0.8.50 - 2024-01-09
+* merge PR: added history charts to web #1336
+
## 0.8.49 - 2024-01-08
* fix send total values if inverter state is different from `OFF` #1331
* fix german language issues #1335
diff --git a/src/defines.h b/src/defines.h
index b205297f..9d0e97c9 100644
--- a/src/defines.h
+++ b/src/defines.h
@@ -13,7 +13,7 @@
//-------------------------------------
#define VERSION_MAJOR 0
#define VERSION_MINOR 8
-#define VERSION_PATCH 49
+#define VERSION_PATCH 50
//-------------------------------------
typedef struct {
diff --git a/src/web/RestApi.h b/src/web/RestApi.h
index 26ca571f..96a4c5e4 100644
--- a/src/web/RestApi.h
+++ b/src/web/RestApi.h
@@ -794,7 +794,6 @@ class RestApi {
void getPowerHistory(AsyncWebServerRequest *request, JsonObject obj) {
getGeneric(request, obj.createNestedObject(F("generic")));
obj[F("refresh")] = mConfig->inst.sendInterval;
- obj[F("datapoints")] = HISTORY_DATA_ARR_LENGTH;
uint16_t max = 0;
for (uint16_t fld = 0; fld < HISTORY_DATA_ARR_LENGTH; fld++) {
uint16_t value = mApp->getHistoryValue((uint8_t)HistoryStorageType::POWER, fld);
@@ -809,7 +808,6 @@ class RestApi {
void getYieldDayHistory(AsyncWebServerRequest *request, JsonObject obj) {
getGeneric(request, obj.createNestedObject(F("generic")));
obj[F("refresh")] = 86400; // 1 day
- obj[F("datapoints")] = HISTORY_DATA_ARR_LENGTH;
uint16_t max = 0;
for (uint16_t fld = 0; fld < HISTORY_DATA_ARR_LENGTH; fld++) {
uint16_t value = mApp->getHistoryValue((uint8_t)HistoryStorageType::YIELD, fld);
diff --git a/src/web/html/history.html b/src/web/html/history.html
index 5b6c1fb5..d0f33755 100644
--- a/src/web/html/history.html
+++ b/src/web/html/history.html
@@ -1,135 +1,113 @@
+
+ {#NAV_HISTORY}
+ {#HTML_HEADER}
+
+
-
- History
- {#HTML_HEADER}
-
-
+
-
-
-
- {#HTML_NAV}
-
-
-
Total Power history
-
-
-
- Maximum day: W. Last value: W.
- Maximum graphics: W. Updated every seconds
-
-
Yield per day history
-
-
-
- Maximum value: Wh
- Updated every seconds
+
+ {#HTML_NAV}
+
+
+
{#TOTAL_POWER}
+
+
+
+ {#MAX_DAY}: W. {#LAST_VALUE}: W.
+ {#MAXIMUM}: W. {#UPDATED} {#SECONDS}
+
+
+
{#TOTAL_YIELD_PER_DAY}
+
+
+
+ {#MAXIMUM}: Wh
+ {#UPDATED} {#SECONDS}
+
+
+
+ {#HTML_FOOTER}
-
Insert data into Yield per day history
-
-
-
-
- {#HTML_FOOTER}
+
+ function parsePowerHistory(obj){
+ if (null != obj) {
+ parseHistory(obj,"pwr", pwrExeOnce)
+ document.getElementById("pwrLast").innerHTML = mLastValue
+ document.getElementById("pwrMaxDay").innerHTML = obj.maxDay
+ }
+ if (pwrExeOnce) {
+ pwrExeOnce = false;
+ window.setInterval("getAjax('/api/powerHistory', parsePowerHistory)", mRefresh * 1000);
-
+ setTimeout(() => {
+ getAjax("/api/yieldDayHistory", parseYieldDayHistory);
+ } , 20);
+ }
+ }
+ function parseYieldDayHistory(obj) {
+ if (null != obj) {
+ parseNav(obj.generic);
+ parseHistory(obj, "yd", ydExeOnce)
+ }
+ if (ydExeOnce) {
+ ydExeOnce = false;
+ window.setInterval("getAjax('/api/yieldDayHistory', parseYieldDayHistory)", mRefresh * 500);
+ }
+ }
-
\ No newline at end of file
+ getAjax("/api/powerHistory", parsePowerHistory);
+
+
+