Browse Source

0.8.1280001

Merge branch 'development03' into zero-export
pull/1701/head
Patrick Amrhein 8 months ago
parent
commit
c4e6cfa9cf
  1. 10
      .github/workflows/compile_zero-export.yml
  2. 11
      src/CHANGES.md
  3. 2
      src/defines.h
  4. 21
      src/hm/hmInverter.h
  5. 36
      src/platformio.ini
  6. 9
      src/publisher/pubMqtt.h
  7. 1
      src/web/html/grid_info.json
  8. 1
      src/web/html/setup.html
  9. 2
      src/web/html/visualization.html

10
.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

11
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

2
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;

21
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;

36
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

9
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)
{

1
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"},

1
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 = "";

2
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))))
])
);
}

Loading…
Cancel
Save