diff --git a/.github/workflows/compile_zero-export.yml b/.github/workflows/compile_zero-export.yml index 54742e5d..c5318980 100644 --- a/.github/workflows/compile_zero-export.yml +++ b/.github/workflows/compile_zero-export.yml @@ -25,6 +25,8 @@ jobs: variant: #- opendtufusion #- opendtufusion-ethernet + #- opendtufusion-16MB + #- opendtufusion-ethernet-16MB #- esp8266 #- esp8266-all #- esp8266-minimal @@ -38,6 +40,9 @@ jobs: #- esp32-c3-mini - opendtufusion-zero_export - opendtufusion-ethernet-zero_export + - opendtufusion-16MB-zero_export + - opendtufusion-ethernet-16MB-zero_export + steps: - uses: actions/checkout@v4 - uses: benjlevesque/short-sha@v3.0 @@ -96,6 +101,8 @@ jobs: variant: #- opendtufusion-de #- opendtufusion-ethernet-de + #- opendtufusion-16MB-de + #- opendtufusion-ethernet-16MB-de #- esp8266-de #- esp8266-all-de #- esp8266-prometheus-de @@ -107,6 +114,9 @@ jobs: #- esp32-c3-mini-de - opendtufusion-zero_export-de - opendtufusion-ethernet-zero_export-de + - opendtufusion-16MB-zero_export-de + - opendtufusion-ethernet-16MB-zero_export-de + steps: - uses: actions/checkout@v4 - uses: benjlevesque/short-sha@v3.0 diff --git a/src/CHANGES.md b/src/CHANGES.md index 91949ced..dfd4ca2a 100644 --- a/src/CHANGES.md +++ b/src/CHANGES.md @@ -1,5 +1,16 @@ # Development Changes +## 0.8.128 - 2024-07-10 +* add environments for 16MB flash size ESP32-S3 aka opendtufusion +* prevent duplicate alarms, update end time once it is received + +## 0.8.127 - 2024-06-21 +* add grid file #1677 +* merge PR: Bugfix Inv delete not working with password protection #1678 + +## 0.8.126 - 2024-06-12 +* merge PR: Update pubMqtt.h - Bugfix #1673 #1674 + ## 0.8.125 - 2024-06-09 * fix ESP8266 compilation * merge PR: active_PowerLimit #1663 diff --git a/src/defines.h b/src/defines.h index 1e488e90..b534edda 100644 --- a/src/defines.h +++ b/src/defines.h @@ -13,7 +13,7 @@ //------------------------------------- #define VERSION_MAJOR 0 #define VERSION_MINOR 8 -#define VERSION_PATCH 1250004 +#define VERSION_PATCH 1280001 //------------------------------------- typedef struct { uint8_t ch; diff --git a/src/hm/hmInverter.h b/src/hm/hmInverter.h index b72ec5ab..e1b99bc8 100644 --- a/src/hm/hmInverter.h +++ b/src/hm/hmInverter.h @@ -670,7 +670,6 @@ class Inverter { DPRINTLN(DBG_DEBUG, "Alarm #" + String(pyld[startOff+1]) + " '" + String(getAlarmStr(pyld[startOff+1])) + "' start: " + ah::getTimeStr(start) + ", end: " + ah::getTimeStr(endTime)); addAlarm(pyld[startOff+1], start, endTime); - alarmCnt++; alarmLastId = alarmMesIndex; return pyld[startOff+1]; @@ -818,6 +817,26 @@ class Inverter { private: inline void addAlarm(uint16_t code, uint32_t start, uint32_t end) { + bool found = false; + uint8_t i = 0; + + if(start > end) + end = 0; + + for(; i < 10; i++) { + mAlarmNxtWrPos = (++mAlarmNxtWrPos) % 10; + + if(lastAlarm[mAlarmNxtWrPos].code == code && lastAlarm[mAlarmNxtWrPos].start == start) { + // replace with same or update end time + if(lastAlarm[mAlarmNxtWrPos].end == 0 || lastAlarm[mAlarmNxtWrPos].end == end) { + break; + } + } + } + + if(alarmCnt < 10 && alarmCnt < mAlarmNxtWrPos) + alarmCnt = mAlarmNxtWrPos + 1; + lastAlarm[mAlarmNxtWrPos] = alarm_t(code, start, end); if(++mAlarmNxtWrPos >= 10) // rolling buffer mAlarmNxtWrPos = 0; diff --git a/src/platformio.ini b/src/platformio.ini index a1ff4b82..a956d1d2 100644 --- a/src/platformio.ini +++ b/src/platformio.ini @@ -379,6 +379,42 @@ build_flags = ${env:opendtufusion-ethernet.build_flags} monitor_filters = esp32_exception_decoder, colorize +[env:opendtufusion-16MB] +platform = espressif32@6.6.0 +board = esp32-s3-devkitc-1 +board_upload.flash_size = 16MB +upload_protocol = esp-builtin +build_flags = ${env:opendtufusion.build_flags} +monitor_filters = + esp32_exception_decoder, colorize + +[env:opendtufusion-16MB-de] +platform = espressif32@6.6.0 +board = esp32-s3-devkitc-1 +upload_protocol = esp-builtin +build_flags = ${env:opendtufusion-16MB.build_flags} + -DLANG_DE +monitor_filters = + esp32_exception_decoder, colorize + +[env:opendtufusion-ethernet-16MB] +platform = espressif32@6.6.0 +board = esp32-s3-devkitc-1 +board_upload.flash_size = 16MB +upload_protocol = esp-builtin +build_flags = ${env:opendtufusion-ethernet.build_flags} +monitor_filters = + esp32_exception_decoder, colorize + +[env:opendtufusion-ethernet-16MB-de] +platform = espressif32@6.6.0 +board = esp32-s3-devkitc-1 +upload_protocol = esp-builtin +build_flags = ${env:opendtufusion-ethernet-16MB.build_flags} + -DLANG_DE +monitor_filters = + esp32_exception_decoder, colorize + [env:opendtufusion-ethernet-zero_export] platform = espressif32@6.6.0 board = esp32-s3-devkitc-1 diff --git a/src/publisher/pubMqtt.h b/src/publisher/pubMqtt.h index ebe03a52..0ba32b9a 100644 --- a/src/publisher/pubMqtt.h +++ b/src/publisher/pubMqtt.h @@ -622,6 +622,7 @@ class PubMqtt { private: enum {MQTT_STATUS_OFFLINE = 0, MQTT_STATUS_PARTIAL, MQTT_STATUS_ONLINE}; + struct message_s { char *topic; @@ -630,7 +631,13 @@ class PubMqtt { size_t index; size_t total; - message_s() : topic { nullptr }, payload { nullptr }, len { 0 }, index { 0}, total { 0 } {} + message_s() + : topic { nullptr } + , payload { nullptr } + , len { 0 } + , index { 0 } + , total { 0 } + {} message_s(const char* topic, const uint8_t* payload, size_t len, size_t index, size_t total) { diff --git a/src/web/html/grid_info.json b/src/web/html/grid_info.json index efb5651d..5b5d4186 100644 --- a/src/web/html/grid_info.json +++ b/src/web/html/grid_info.json @@ -10,6 +10,7 @@ {"0x0908": "France_VFR2014"}, {"0x0a00": "DE NF_EN_50549-1:2019"}, {"0x0c00": "AT_TOR_Erzeuger_default"}, + {"0x0c03": "AT_TOR_Erzeuger_cosphi=1"}, {"0x0c04": "AT_TOR_Erzeuger_default"}, {"0x0d00": "FR_VFR2019"}, {"0x0d04": "NF_EN_50549-1:2019"}, diff --git a/src/web/html/setup.html b/src/web/html/setup.html index 3e434464..864bd6a1 100644 --- a/src/web/html/setup.html +++ b/src/web/html/setup.html @@ -977,6 +977,7 @@ function del() { var o = new Object(); o.cmd = "save_iv"; + o.token = "*" o.id = obj.id; o.ser = 0; o.name = ""; diff --git a/src/web/html/visualization.html b/src/web/html/visualization.html index 241c27c4..e5244ba7 100644 --- a/src/web/html/visualization.html +++ b/src/web/html/visualization.html @@ -278,7 +278,7 @@ ml("div", {class: "col mt-3"}, String(a.str)), ml("div", {class: "col mt-3"}, String(a.code)), ml("div", {class: "col mt-3"}, String(toIsoTimeStr(new Date((a.start + offs) * 1000)))), - ml("div", {class: "col mt-3"}, String(toIsoTimeStr(new Date((a.end + offs) * 1000)))) + ml("div", {class: "col mt-3"}, (a.end == 0) ? "-" : String(toIsoTimeStr(new Date((a.end + offs) * 1000)))) ]) ); }