From 38fd15becaee1c7300a639e557c6ce75bcac5fb3 Mon Sep 17 00:00:00 2001 From: DanielR92 Date: Wed, 29 May 2024 18:59:01 +0200 Subject: [PATCH 1/3] Update RestApi.h remove pm_pass, for security reason --- src/web/RestApi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/web/RestApi.h b/src/web/RestApi.h index 49a7caff..225ae105 100644 --- a/src/web/RestApi.h +++ b/src/web/RestApi.h @@ -843,7 +843,7 @@ class RestApi { objGroup[F("pm_src")] = String(mConfig->plugin.zeroExport.groups[group].pm_src); objGroup[F("pm_jsonPath")] = String(mConfig->plugin.zeroExport.groups[group].pm_jsonPath); objGroup[F("pm_user")] = String(mConfig->plugin.zeroExport.groups[group].pm_user); - objGroup[F("pm_pass")] = String(mConfig->plugin.zeroExport.groups[group].pm_pass); + //objGroup[F("pm_pass")] = String(mConfig->plugin.zeroExport.groups[group].pm_pass); // for security reason objGroup[F("pm_target")] = (uint8_t)mConfig->plugin.zeroExport.groups[group].pm_target; // Inverters objGroup[F("max_inverters")] = ZEROEXPORT_GROUP_MAX_INVERTERS; From b159a773f46a7e37e1ee15fabaa9787274dee157 Mon Sep 17 00:00:00 2001 From: DanielR92 Date: Wed, 29 May 2024 19:02:04 +0200 Subject: [PATCH 2/3] add power value to get from restapi --- src/plugins/zeroExport/powermeter.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/zeroExport/powermeter.h b/src/plugins/zeroExport/powermeter.h index eb0e6253..c06e1ab6 100644 --- a/src/plugins/zeroExport/powermeter.h +++ b/src/plugins/zeroExport/powermeter.h @@ -119,7 +119,8 @@ class powermeter { if (result) { bufferWrite(power, group); - + mCfg->groups[group].power = power; + // MQTT - Powermeter if (mMqtt->isConnected()) { mMqtt->publish(String("zero/state/groups/" + String(group) + "/powermeter/P").c_str(), String(ah::round1(power)).c_str(), false); @@ -236,7 +237,8 @@ class powermeter { // } bufferWrite(power, group); - + mCfg->groups[group].power = power; // TODO: join two sites together (PM & MQTT) + // MQTT - Powermeter if (mCfg->debug) { if (mMqtt->isConnected()) { From a1ad25040bbe5c41334577d98e9c0e48c8eb1e4f Mon Sep 17 00:00:00 2001 From: DanielR92 Date: Wed, 29 May 2024 19:04:50 +0200 Subject: [PATCH 3/3] Update platformio.ini for debugging change branch from MQTTClient to a special comit --- src/platformio.ini | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/platformio.ini b/src/platformio.ini index 763ac041..2c6ab3df 100644 --- a/src/platformio.ini +++ b/src/platformio.ini @@ -28,7 +28,11 @@ lib_deps = https://github.com/esphome/ESPAsyncWebServer @ ^3.2.0 https://github.com/nRF24/RF24.git#v1.4.8 paulstoffregen/Time @ ^1.6.1 - https://github.com/bertmelis/espMqttClient#v1.6.0 + ;https://github.com/bertmelis/espMqttClient#v1.6.0 + + ;TODO: tmp. bug fix, please change it to original later + https://github.com/bertmelis/espMqttClient.git#cb0c386 + bblanchon/ArduinoJson @ ^6.21.3 https://github.com/JChristensen/Timezone @ ^1.2.4 olikraus/U8g2 @ ^2.35.9