From 33a9b7454cba593f4d7baa56d02b900aa73fff9c Mon Sep 17 00:00:00 2001 From: Thomas Basler Date: Sun, 10 Nov 2024 02:45:42 +0100 Subject: [PATCH 01/64] Make function getClientId const --- include/MqttSettings.h | 2 +- src/MqttSettings.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/MqttSettings.h b/include/MqttSettings.h index 41b0e6ec7..f31855355 100644 --- a/include/MqttSettings.h +++ b/include/MqttSettings.h @@ -20,7 +20,7 @@ class MqttSettingsClass { void unsubscribe(const String& topic); String getPrefix() const; - String getClientId(); + String getClientId() const; private: void NetworkEvent(network_event event); diff --git a/src/MqttSettings.cpp b/src/MqttSettings.cpp index c547e0db0..39e76e229 100644 --- a/src/MqttSettings.cpp +++ b/src/MqttSettings.cpp @@ -179,7 +179,7 @@ String MqttSettingsClass::getPrefix() const return Configuration.get().Mqtt.Topic; } -String MqttSettingsClass::getClientId() +String MqttSettingsClass::getClientId() const { String clientId = Configuration.get().Mqtt.ClientId; if (clientId == "") { From d843ac64222eb852cae41bd45b3d4a3df132d94e Mon Sep 17 00:00:00 2001 From: Thomas Basler Date: Mon, 11 Nov 2024 22:11:57 +0100 Subject: [PATCH 02/64] Fix comment --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 0851b19bc..e2e58e52e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -96,7 +96,7 @@ void setup() const auto& pin = PinMapping.get(); MessageOutput.println("done"); - // Initialize WiFi + // Initialize Network MessageOutput.print("Initialize Network... "); NetworkSettings.init(scheduler); MessageOutput.println("done"); From eac2e2fb39c6fcac238cc5cd26b106fde27b515f Mon Sep 17 00:00:00 2001 From: Thomas Basler Date: Mon, 11 Nov 2024 23:52:59 +0100 Subject: [PATCH 03/64] Fix: Really always execute the generate of the factory.bin file --- pio-scripts/create_factory_bin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pio-scripts/create_factory_bin.py b/pio-scripts/create_factory_bin.py index ec8274e21..e9647d986 100644 --- a/pio-scripts/create_factory_bin.py +++ b/pio-scripts/create_factory_bin.py @@ -130,4 +130,5 @@ def esp32_create_combined_bin(source, target, env): esptool.main(cmd) -env.AddPostAction("buildprog", esp32_create_combined_bin) +from SCons.Script import AlwaysBuild +AlwaysBuild(env.AddPostAction("buildprog", esp32_create_combined_bin)) From 2b07e3c2c8e15daf04b4ab3078fe074ddd3bd6e1 Mon Sep 17 00:00:00 2001 From: Thomas Basler Date: Tue, 12 Nov 2024 20:23:28 +0100 Subject: [PATCH 04/64] Organize includes --- src/WebApi_firmware.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/WebApi_firmware.cpp b/src/WebApi_firmware.cpp index b179eb106..2796991d6 100644 --- a/src/WebApi_firmware.cpp +++ b/src/WebApi_firmware.cpp @@ -5,11 +5,10 @@ #include "WebApi_firmware.h" #include "Configuration.h" #include "RestartHelper.h" -#include "Update.h" -#include "Utils.h" #include "WebApi.h" #include "helper.h" #include +#include void WebApiFirmwareClass::init(AsyncWebServer& server, Scheduler& scheduler) { From 9bfded055a23383442748baaddbab4da766695b5 Mon Sep 17 00:00:00 2001 From: Thomas Basler Date: Wed, 13 Nov 2024 19:20:56 +0100 Subject: [PATCH 05/64] Remove not required string generation --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index e2e58e52e..b2a4a391e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -88,7 +88,7 @@ void setup() // Load PinMapping MessageOutput.print("Reading PinMapping... "); - if (PinMapping.init(String(Configuration.get().Dev_PinMapping))) { + if (PinMapping.init(Configuration.get().Dev_PinMapping)) { MessageOutput.print("found valid mapping "); } else { MessageOutput.print("using default config "); From cc3290be8e726dd373130d8ccd094dc4b4f9f4b0 Mon Sep 17 00:00:00 2001 From: Thomas Basler Date: Wed, 13 Nov 2024 19:21:41 +0100 Subject: [PATCH 06/64] Use correct variable --- pio-scripts/auto_firmware_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pio-scripts/auto_firmware_version.py b/pio-scripts/auto_firmware_version.py index c1fa9771d..2d2f3be71 100644 --- a/pio-scripts/auto_firmware_version.py +++ b/pio-scripts/auto_firmware_version.py @@ -49,7 +49,7 @@ def get_firmware_specifier_build_flag(): build_version = get_build_version() build_flag = "-D AUTO_GIT_HASH=\\\"" + build_version + "\\\"" build_branch = get_build_branch() - build_flag += " -D AUTO_GIT_BRANCH=\\\"" + branch_name + "\\\"" + build_flag += " -D AUTO_GIT_BRANCH=\\\"" + build_branch + "\\\"" return (build_flag) From 82975918539a0e2063b989ab4fe20a8dc354aaf8 Mon Sep 17 00:00:00 2001 From: stefan123t Date: Wed, 20 Nov 2024 08:00:26 +0100 Subject: [PATCH 07/64] change markdown table to github style --- lib/Hoymiles/src/inverters/README.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/Hoymiles/src/inverters/README.md b/lib/Hoymiles/src/inverters/README.md index b55445328..fcc684200 100644 --- a/lib/Hoymiles/src/inverters/README.md +++ b/lib/Hoymiles/src/inverters/README.md @@ -1,16 +1,16 @@ # Class overview -| Class | Models | Serial range | -| --------------| --------------------------- | ------------- -- | -| HM_1CH | HM-300/350/400-1T | 1121 | -| HM_2CH | HM-600/700/800-2T | 1141 | -| HM_4CH | HM-1000/1200/1500-4T | 1161 | -| HMS_1CH | HMS-300/350/400/450/500-1T | 1124 | -| HMS_1CHv2 | HMS-500-1T v2 | 1125 | -| HMS_2CH | HMS-600/700/800/900/1000-2T | 1143, 1144, 1410 | -| HMS_4CH | HMS-1600/1800/2000-4T | 1164 | -| HMT_4CH | HMT-1600/1800/2000-4T | 1361 | -| HMT_6CH | HMT-1800/2250-6T | 1382 | -| HERF_1CH | HERF 300 | 2841 | -| HERF_2CH | HERF 800 | 2821 | -| HERF_4CH | HERF 1800 | 2801 | +Class | Models | Serial range | +------------- | --------------------------- | ---------------- | +HM_1CH | HM-300/350/400-1T | 1121 | +HM_2CH | HM-600/700/800-2T | 1141 | +HM_4CH | HM-1000/1200/1500-4T | 1161 | +HMS_1CH | HMS-300/350/400/450/500-1T | 1124 | +HMS_1CHv2 | HMS-500-1T v2 | 1125 | +HMS_2CH | HMS-600/700/800/900/1000-2T | 1143, 1144, 1410 | +HMS_4CH | HMS-1600/1800/2000-4T | 1164 | +HMT_4CH | HMT-1600/1800/2000-4T | 1361 | +HMT_6CH | HMT-1800/2250-6T | 1382 | +HERF_1CH | HERF 300 | 2841 | +HERF_2CH | HERF 800 | 2821 | +HERF_4CH | HERF 1800 | 2801 | From 680863fb00852daadd4cf23baca778d509df144e Mon Sep 17 00:00:00 2001 From: stefan123t Date: Wed, 20 Nov 2024 08:02:07 +0100 Subject: [PATCH 08/64] Update README.md --- lib/Hoymiles/src/inverters/README.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/Hoymiles/src/inverters/README.md b/lib/Hoymiles/src/inverters/README.md index fcc684200..63d84baa2 100644 --- a/lib/Hoymiles/src/inverters/README.md +++ b/lib/Hoymiles/src/inverters/README.md @@ -1,16 +1,16 @@ # Class overview -Class | Models | Serial range | -------------- | --------------------------- | ---------------- | -HM_1CH | HM-300/350/400-1T | 1121 | -HM_2CH | HM-600/700/800-2T | 1141 | -HM_4CH | HM-1000/1200/1500-4T | 1161 | -HMS_1CH | HMS-300/350/400/450/500-1T | 1124 | -HMS_1CHv2 | HMS-500-1T v2 | 1125 | -HMS_2CH | HMS-600/700/800/900/1000-2T | 1143, 1144, 1410 | -HMS_4CH | HMS-1600/1800/2000-4T | 1164 | -HMT_4CH | HMT-1600/1800/2000-4T | 1361 | -HMT_6CH | HMT-1800/2250-6T | 1382 | -HERF_1CH | HERF 300 | 2841 | -HERF_2CH | HERF 800 | 2821 | -HERF_4CH | HERF 1800 | 2801 | +| Class | Models | Serial range | +| ------------- | --------------------------- | ---------------- | +| HM_1CH | HM-300/350/400-1T | 1121 | +| HM_2CH | HM-600/700/800-2T | 1141 | +| HM_4CH | HM-1000/1200/1500-4T | 1161 | +| HMS_1CH | HMS-300/350/400/450/500-1T | 1124 | +| HMS_1CHv2 | HMS-500-1T v2 | 1125 | +| HMS_2CH | HMS-600/700/800/900/1000-2T | 1143, 1144, 1410 | +| HMS_4CH | HMS-1600/1800/2000-4T | 1164 | +| HMT_4CH | HMT-1600/1800/2000-4T | 1361 | +| HMT_6CH | HMT-1800/2250-6T | 1382 | +| HERF_1CH | HERF 300 | 2841 | +| HERF_2CH | HERF 800 | 2821 | +| HERF_4CH | HERF 1800 | 2801 | From 041ae7bae795cf39dab2321e673de123dddbd7be Mon Sep 17 00:00:00 2001 From: Florian <70096465+turrican944@users.noreply.github.com> Date: Fri, 22 Nov 2024 08:21:13 +0100 Subject: [PATCH 09/64] add Sum of DC Powrr add Sum of DC power of all enabled inverters to Homeassistant MQTT autodiscovery --- src/MqttHandleHass.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MqttHandleHass.cpp b/src/MqttHandleHass.cpp index 6491c9baf..c39485dd8 100644 --- a/src/MqttHandleHass.cpp +++ b/src/MqttHandleHass.cpp @@ -70,6 +70,7 @@ void MqttHandleHassClass::publishConfig() publishDtuSensor("Yield Total", "ac/yieldtotal", "kWh", "", DEVICE_CLS_ENERGY, STATE_CLS_TOTAL_INCREASING, CATEGORY_NONE); publishDtuSensor("Yield Day", "ac/yieldday", "Wh", "", DEVICE_CLS_ENERGY, STATE_CLS_TOTAL_INCREASING, CATEGORY_NONE); publishDtuSensor("AC Power", "ac/power", "W", "", DEVICE_CLS_PWR, STATE_CLS_MEASUREMENT, CATEGORY_NONE); + publishDtuSensor("DC Power", "dc/power", "W", "", DEVICE_CLS_PWR, STATE_CLS_MEASUREMENT, CATEGORY_NONE); publishDtuBinarySensor("Status", config.Mqtt.Lwt.Topic, config.Mqtt.Lwt.Value_Online, config.Mqtt.Lwt.Value_Offline, DEVICE_CLS_CONNECTIVITY, STATE_CLS_NONE, CATEGORY_DIAGNOSTIC); From 37b173071e26809acc10eb62f900518d75743b2f Mon Sep 17 00:00:00 2001 From: Bernhard Kirchen Date: Mon, 11 Nov 2024 20:55:13 +0100 Subject: [PATCH 10/64] webapp: fix line break for reload button if a page uses the reload button, it had only 1 column of space, and only if the viewport was at least "sm". this is not the case for typical smartphones, in which case the reload button would appear on its own row instead of to the right. we now limit the heading to 10 columns if and only if the reload button is to be used, otherwise the heading uses all 12 columns, regardless of the viewport size. the reload buton uses two columns -- if it is displayed at all. the font size of the icon is increased slightly. as the font size of h1 headings changes with the viewport size, we need to center both the heading and the button vertically. --- webapp/src/components/BasePage.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/webapp/src/components/BasePage.vue b/webapp/src/components/BasePage.vue index 4ac0f80ee..d94e3219e 100644 --- a/webapp/src/components/BasePage.vue +++ b/webapp/src/components/BasePage.vue @@ -1,9 +1,9 @@