diff --git a/src/CHANGES.md b/src/CHANGES.md index 8aeec68fa..a6746af53 100644 --- a/src/CHANGES.md +++ b/src/CHANGES.md @@ -1,5 +1,11 @@ # Development Changes +## 0.7.20 - 2023-07-28 +* merge PR #1048 version and hash in API, fixes #1045 +* fix: no yield day update if yield day reads `0` after inverter reboot (mostly on evening) #848 +* try to fix Wifi override #1047 +* added information after NTP sync to WebUI #1040 + ## 0.7.19 - 2023-07-27 * next attempt to fix yield day for multiple inverters #1016 * reduced threshold for inverter state machine from 60min to 15min to go from state `WAS_ON` to `OFF` diff --git a/src/defines.h b/src/defines.h index ccafdea76..062bb0a94 100644 --- a/src/defines.h +++ b/src/defines.h @@ -13,7 +13,7 @@ //------------------------------------- #define VERSION_MAJOR 0 #define VERSION_MINOR 7 -#define VERSION_PATCH 19 +#define VERSION_PATCH 20 //------------------------------------- typedef struct { diff --git a/src/publisher/pubMqttIvData.h b/src/publisher/pubMqttIvData.h index 372ac9b58..40abd6bf3 100644 --- a/src/publisher/pubMqttIvData.h +++ b/src/publisher/pubMqttIvData.h @@ -68,6 +68,7 @@ class PubMqttIvData { void stateStart() { mLastIvId = 0; mTotalFound = false; + mSendTotalYd = true; mAllTotalFound = true; if(!mSendList->empty()) { mCmd = mSendList->front().cmd; @@ -136,9 +137,14 @@ class PubMqttIvData { case FLD_YT: mTotal[1] += mIv->getValue(mPos, rec); break; - case FLD_YD: - mTotal[2] += mIv->getValue(mPos, rec); + case FLD_YD: { + uint8_t val = mIv->getValue(mPos, rec); + if(0 == val) // inverter restarted during day + mSendTotalYd = false; + else + mTotal[2] += val; break; + } case FLD_PDC: mTotal[3] += mIv->getValue(mPos, rec); break; @@ -180,7 +186,7 @@ class PubMqttIvData { fieldId = FLD_YT; break; case 2: - if(!mAllTotalFound) { + if((!mAllTotalFound) || (!mSendTotalYd)) { mPos++; return; } @@ -210,7 +216,7 @@ class PubMqttIvData { uint8_t mCmd; uint8_t mLastIvId; - bool mSendTotals, mTotalFound, mAllTotalFound; + bool mSendTotals, mTotalFound, mAllTotalFound, mSendTotalYd; float mTotal[4]; Inverter<> *mIv, *mIvSend; diff --git a/src/web/RestApi.h b/src/web/RestApi.h index dcc675132..fba6486e3 100644 --- a/src/web/RestApi.h +++ b/src/web/RestApi.h @@ -197,6 +197,7 @@ class RestApi { void getGeneric(AsyncWebServerRequest *request, JsonObject obj) { obj[F("wifi_rssi")] = (WiFi.status() != WL_CONNECTED) ? 0 : WiFi.RSSI(); obj[F("ts_uptime")] = mApp->getUptime(); + obj[F("ts_now")] = mApp->getTimestamp(); obj[F("version")] = String(mApp->getVersion()); obj[F("build")] = String(AUTO_GIT_HASH); obj[F("menu_prot")] = mApp->getProtection(request); diff --git a/src/web/html/setup.html b/src/web/html/setup.html index 7c9108386..52c4634d5 100644 --- a/src/web/html/setup.html +++ b/src/web/html/setup.html @@ -200,13 +200,17 @@