From 33ea7a412561632ce6f19e207ef3eeacb8ff52d7 Mon Sep 17 00:00:00 2001 From: DanielR92 Date: Thu, 11 Aug 2022 15:29:26 +0200 Subject: [PATCH 1/9] updated changelog from the commit&merge possible to automate this section in the future? --- tools/esp8266/README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tools/esp8266/README.md b/tools/esp8266/README.md index e8c8be5f..b538a818 100644 --- a/tools/esp8266/README.md +++ b/tools/esp8266/README.md @@ -73,7 +73,23 @@ For now the following inverters should work out of the box: ## Changelog (*) EEPROM changes require settings to be changed, your settings will be overwritten and need to be set again! - +- v0.5.6 *fix only MQTT sub after the first loop in a conenction +- v0.5.5 *fixed MQTT sub only after connection is established (HorstG-57) + + added in app.cpp some compiler if statements + *fix: compile possible for non repository versions (if project was download as zip - lumapu) + *fix README.md - Update line 69 (`RF24` 1.4.2 -> 1.4.5) (DanielR92) + *Update hmRadio.h (lumapu) +- v0.5.4 + added Github report text with a URL (aschiffler) + + added auto_firmware_version.py for GIT_HASH + + added switch case AlarmData/AlarmUpdate +- v0.5.3 #Bugfix #125 PowerLimit + + prototype webapi to get info, improved pwr limit (aschiffler) + + Merge remote-tracking branch 'upstream/main' into pwrlimit +- v0.5.2 add #114 ntp_server_name and port to eeprom + + stefan123t added some functions (devcontrol/cbMqtt/...) +- v0.5.1 *Merge branch 'upstream/HEAD' into control + *update revision (0.4.26 -> 0.5.1) +- v0.4.26 first poc for power set via mqtt - v0.4.25 added default SERIAL/MQTT/SEND_INTERVAL #100, fixed env:node_mcu_v2 build #101 - v0.4.24 added fixes for #63, #88, #93. revert #36 (*) EEPROM changes - v0.4.23 added workflow, fix index.html to load inverter info immediately, changed timestamp to 1 for stand alone ESP #90, Implement MQTT discovery for Home Assistant From 0f9f6795bc18493b142aa9941a1ebf7646b55973 Mon Sep 17 00:00:00 2001 From: DanielR92 Date: Thu, 11 Aug 2022 20:31:21 +0200 Subject: [PATCH 2/9] Style setup page with collapse feature sort order too. --- tools/esp8266/html/setup.html | 141 ++++++++++++++++++++++------------ 1 file changed, 91 insertions(+), 50 deletions(-) diff --git a/tools/esp8266/html/setup.html b/tools/esp8266/html/setup.html index a1e0d51c..7596fbe7 100644 --- a/tools/esp8266/html/setup.html +++ b/tools/esp8266/html/setup.html @@ -52,64 +52,88 @@

Setup

-

- Enter the credentials to your prefered WiFi station. After rebooting the device tries to connect with this information. -

-
-

WiFi

- - - - -

Device Host Name

+ ERASE SETTINGS (not WiFi) + +

Device Host Name

+ + + +
+
+ WiFi +

Enter the credentials to your prefered WiFi station. After rebooting the device tries to connect with this information.

+ + + + +
+
+ +
+
+ Inverter + {INVERTERS}
+

General

+ + + + +
+
- ERASE SETTINGS (not WiFi) - -

Inverter

- {INVERTERS}
-

General

- - - - - -

Pinout (Wemos)

- {PINOUT} + +
+
+ NTP Server + + + + +
+
-

Radio (NRF24L01+)

- - + +
+
+ MQTT + + + + + + + + + + + + +
+
-

NTP Server

- - - - + +
+
+ System Config +

Pinout (Wemos)

+ {PINOUT} -

MQTT

- - - - - - - - - - - - +

Radio (NRF24L01+)

+ + -

Serial Console

- -
- -
- - +

Serial Console

+ +
+ +
+ + +
+

 

@@ -126,5 +150,22 @@

Factory Reset

Reboot

+ + From ac967371c12590fe8aeeca4b04997a91ce4762f5 Mon Sep 17 00:00:00 2001 From: DanielR92 Date: Thu, 11 Aug 2022 20:32:21 +0200 Subject: [PATCH 3/9] update style css needed somme add style for collapse feature --- tools/esp8266/html/style.css | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/tools/esp8266/html/style.css b/tools/esp8266/html/style.css index af88f60d..69d60b15 100644 --- a/tools/esp8266/html/style.css +++ b/tools/esp8266/html/style.css @@ -25,11 +25,34 @@ p.lic, p.lic a { } .des { - margin-top: 35px; + margin-top: 20px; font-size: 13pt; color: #006ec0; } +.s_active, .s_collapsible:hover { + background-color: #006ec0; +} + +.s_content { + padding: 0 18px; + display: none; + overflow: hidden; + background-color: #fff; +} + +.s_collapsible { + background-color: #044e86; + color: white; + cursor: pointer; + padding: 18px; + width: 100%; + border: none; + text-align: left; + outline: none; + font-size: 15px; +} + .subdes { font-size: 12pt; color: #006ec0; @@ -218,7 +241,7 @@ div.ts { div.ch { width: 170px; - min-height: 100px; + min-height: 100px } .subgrp { From 9974748be8f45d2e88733f717d05292bfa75a584 Mon Sep 17 00:00:00 2001 From: lumapu Date: Thu, 11 Aug 2022 21:54:14 +0200 Subject: [PATCH 4/9] version update 0.5.7 --- tools/esp8266/defines.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/esp8266/defines.h b/tools/esp8266/defines.h index b5813f93..f44e5c0b 100644 --- a/tools/esp8266/defines.h +++ b/tools/esp8266/defines.h @@ -21,7 +21,7 @@ //------------------------------------- #define VERSION_MAJOR 0 #define VERSION_MINOR 5 -#define VERSION_PATCH 6 +#define VERSION_PATCH 7 //------------------------------------- From 75e7eb8bb2b1b3ecbd98e4f6534139363a2404f0 Mon Sep 17 00:00:00 2001 From: lumapu Date: Thu, 11 Aug 2022 21:55:55 +0200 Subject: [PATCH 5/9] * html Update (was not converted) --- tools/esp8266/html/h/setup_html.h | 2 +- tools/esp8266/html/h/style_css.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/esp8266/html/h/setup_html.h b/tools/esp8266/html/h/setup_html.h index ae14aab2..685565a7 100644 --- a/tools/esp8266/html/h/setup_html.h +++ b/tools/esp8266/html/h/setup_html.h @@ -1,4 +1,4 @@ #ifndef __SETUP_HTML_H__ #define __SETUP_HTML_H__ -const char setup_html[] PROGMEM = "Setup - {DEVICE}

Setup

Enter the credentials to your prefered WiFi station. After rebooting the device tries to connect with this information.

WiFi

Device Host Name

ERASE SETTINGS (not WiFi)

Inverter

{INVERTERS}

General

Pinout (Wemos)

{PINOUT}

Radio (NRF24L01+)

NTP Server

MQTT

Serial Console



 

"; +const char setup_html[] PROGMEM = "Setup - {DEVICE}

Setup

ERASE SETTINGS (not WiFi)

Device Host Name

WiFi

Enter the credentials to your prefered WiFi station. After rebooting the device tries to connect with this information.

Inverter{INVERTERS}

General

NTP Server
MQTT
System Config

Pinout (Wemos)

{PINOUT}

Radio (NRF24L01+)

Serial Console



 

"; #endif /*__SETUP_HTML_H__*/ diff --git a/tools/esp8266/html/h/style_css.h b/tools/esp8266/html/h/style_css.h index 5f972cf8..ce458e7c 100644 --- a/tools/esp8266/html/h/style_css.h +++ b/tools/esp8266/html/h/style_css.h @@ -1,4 +1,4 @@ #ifndef __STYLE_CSS_H__ #define __STYLE_CSS_H__ -const char style_css[] PROGMEM = "h1 {margin:0;padding:20pt;font-size:22pt;color:#fff;background-color:#006ec0;display:block;text-transform:uppercase;}html, body {font-family:Arial;margin:0;padding:0;}p {text-align:justify;font-size:13pt;}p.lic, p.lic a {font-size:8pt;color:#999;}.des {margin-top:35px;font-size:13pt;color:#006ec0;}.subdes {font-size:12pt;color:#006ec0;margin-left:7px;}.subsubdes {font-size:12pt;color:#006ec0;margin:0 0 7px 12px;}.hide {display:none;}a:link, a:visited {text-decoration:none;font-size:13pt;color:#006ec0;}a:hover, a:focus {color:#f00;}a.erase {background-color:#006ec0;color:#fff;padding:7px;display:inline-block;margin-top:30px;float:right;}#content {padding:15px 15px 60px 15px;}#footer {position:fixed;bottom:0px;height:45px;background-color:#006ec0;width:100%;border-top:5px solid #fff;}#footer p, #footer a {color:#fff;padding:0 7px 0 7px;font-size:10pt !important;}div.content {background-color:#fff;padding-bottom:65px;overflow:auto;}input, select {padding:7px;font-size:13pt;}input.text, select {width:70%;box-sizing:border-box;margin-bottom:10px;border:1px solid #ccc;}input.sh {max-width:150px !important;margin-right:10px;}input.btn {background-color:#006ec0;color:#fff;border:0px;float:right;margin:10px 0 30px;text-transform:uppercase;}input.cb {margin-bottom:20px;}label {width:20%;display:inline-block;font-size:12pt;padding-right:10px;margin-left:15px;}.left {float:left;}.right {float:right;}div.ch-iv {width:100%;background-color:#32b004;display:inline-block;margin-bottom:15px;padding-bottom:20px;overflow:auto;}div.ch {width:220px;min-height:350px;background-color:#006ec0;display:inline-block;margin:0 10px 15px 10px;overflow:auto;padding-bottom:20px;}div.ch .value, div.ch .info, div.ch .head, div.ch-iv .value, div.ch-iv .info, div.ch-iv .head {color:#fff;display:block;width:100%;text-align:center;}.subgrp {float:left;width:220px;}div.ch .unit, div.ch-iv .unit {font-size:19px;margin-left:10px;}div.ch .value, div.ch-iv .value {margin-top:20px;font-size:24px;}div.ch .info, div.ch-iv .info {margin-top:3px;font-size:10px;}div.ch .head {background-color:#003c80;padding:10px 0 10px 0;}div.ch-iv .head {background-color:#1c6800;padding:10px 0 10px 0;}div.iv {max-width:960px;margin-bottom:40px;}div.ts {font-size:13px;background-color:#ddd;border-top:7px solid #999;padding:7px;}#note {margin:50px 10px 10px 10px;padding-top:10px;width:100%;border-top:1px solid #bbb;}@media(max-width:500px) {div.ch .unit, div.ch-iv .unit {font-size:18px;}div.ch {width:170px;min-height:100px;}.subgrp {width:180px;}}"; +const char style_css[] PROGMEM = "h1 {margin:0;padding:20pt;font-size:22pt;color:#fff;background-color:#006ec0;display:block;text-transform:uppercase;}html, body {font-family:Arial;margin:0;padding:0;}p {text-align:justify;font-size:13pt;}p.lic, p.lic a {font-size:8pt;color:#999;}.des {margin-top:20px;font-size:13pt;color:#006ec0;}.s_active, .s_collapsible:hover {background-color:#006ec0;}.s_content {padding:0 18px;display:none;overflow:hidden;background-color:#fff;}.s_collapsible {background-color:#044e86;color:white;cursor:pointer;padding:18px;width:100%;border:none;text-align:left;outline:none;font-size:15px;}.subdes {font-size:12pt;color:#006ec0;margin-left:7px;}.subsubdes {font-size:12pt;color:#006ec0;margin:0 0 7px 12px;}.hide {display:none;}a:link, a:visited {text-decoration:none;font-size:13pt;color:#006ec0;}a:hover, a:focus {color:#f00;}a.erase {background-color:#006ec0;color:#fff;padding:7px;display:inline-block;margin-top:30px;float:right;}#content {padding:15px 15px 60px 15px;}#footer {position:fixed;bottom:0px;height:45px;background-color:#006ec0;width:100%;border-top:5px solid #fff;}#footer p, #footer a {color:#fff;padding:0 7px 0 7px;font-size:10pt !important;}div.content {background-color:#fff;padding-bottom:65px;overflow:auto;}input, select {padding:7px;font-size:13pt;}input.text, select {width:70%;box-sizing:border-box;margin-bottom:10px;border:1px solid #ccc;}input.sh {max-width:150px !important;margin-right:10px;}input.btn {background-color:#006ec0;color:#fff;border:0px;float:right;margin:10px 0 30px;text-transform:uppercase;}input.cb {margin-bottom:20px;}label {width:20%;display:inline-block;font-size:12pt;padding-right:10px;margin-left:15px;}.left {float:left;}.right {float:right;}div.ch-iv {width:100%;background-color:#32b004;display:inline-block;margin-bottom:15px;padding-bottom:20px;overflow:auto;}div.ch {width:220px;min-height:350px;background-color:#006ec0;display:inline-block;margin:0 10px 15px 10px;overflow:auto;padding-bottom:20px;}div.ch .value, div.ch .info, div.ch .head, div.ch-iv .value, div.ch-iv .info, div.ch-iv .head {color:#fff;display:block;width:100%;text-align:center;}.subgrp {float:left;width:220px;}div.ch .unit, div.ch-iv .unit {font-size:19px;margin-left:10px;}div.ch .value, div.ch-iv .value {margin-top:20px;font-size:24px;}div.ch .info, div.ch-iv .info {margin-top:3px;font-size:10px;}div.ch .head {background-color:#003c80;padding:10px 0 10px 0;}div.ch-iv .head {background-color:#1c6800;padding:10px 0 10px 0;}div.iv {max-width:960px;margin-bottom:40px;}div.ts {font-size:13px;background-color:#ddd;border-top:7px solid #999;padding:7px;}#note {margin:50px 10px 10px 10px;padding-top:10px;width:100%;border-top:1px solid #bbb;}@media(max-width:500px) {div.ch .unit, div.ch-iv .unit {font-size:18px;}div.ch {width:170px;min-height:100px }.subgrp {width:180px;}}"; #endif /*__STYLE_CSS_H__*/ From ec08f58a468fecfdecc16490949f9255f6339443 Mon Sep 17 00:00:00 2001 From: lumapu Date: Thu, 11 Aug 2022 22:10:40 +0200 Subject: [PATCH 6/9] * fix setup html (recent version crashed) maybe the issue was regarding the flower brackets --- tools/esp8266/html/h/setup_html.h | 2 +- tools/esp8266/html/setup.html | 23 +++++++++-------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/tools/esp8266/html/h/setup_html.h b/tools/esp8266/html/h/setup_html.h index 685565a7..8ca71321 100644 --- a/tools/esp8266/html/h/setup_html.h +++ b/tools/esp8266/html/h/setup_html.h @@ -1,4 +1,4 @@ #ifndef __SETUP_HTML_H__ #define __SETUP_HTML_H__ -const char setup_html[] PROGMEM = "Setup - {DEVICE}

Setup

ERASE SETTINGS (not WiFi)

Device Host Name

WiFi

Enter the credentials to your prefered WiFi station. After rebooting the device tries to connect with this information.

Inverter{INVERTERS}

General

NTP Server
MQTT
System Config

Pinout (Wemos)

{PINOUT}

Radio (NRF24L01+)

Serial Console



 

"; +const char setup_html[] PROGMEM = "Setup - {DEVICE}

Setup

ERASE SETTINGS (not WiFi)

Device Host Name

WiFi

Enter the credentials to your prefered WiFi station. After rebooting the device tries to connect with this information.

Inverter{INVERTERS}

General

NTP Server
MQTT
System Config

Pinout (Wemos)

{PINOUT}

Radio (NRF24L01+)

Serial Console



 

"; #endif /*__SETUP_HTML_H__*/ diff --git a/tools/esp8266/html/setup.html b/tools/esp8266/html/setup.html index 7596fbe7..a81c5a6a 100644 --- a/tools/esp8266/html/setup.html +++ b/tools/esp8266/html/setup.html @@ -151,21 +151,16 @@

Reboot

- From aca98b6911c22d667ef6a5bb7184dba7dd51ff5c Mon Sep 17 00:00:00 2001 From: lumapu Date: Thu, 11 Aug 2022 23:01:44 +0200 Subject: [PATCH 7/9] * style update (margins) * automatically convert html files to header file during build --- tools/esp8266/html/convert.py | 19 ++++++++++++++----- tools/esp8266/html/h/style_css.h | 2 +- tools/esp8266/html/style.css | 5 +++-- tools/esp8266/platformio.ini | 4 +++- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/tools/esp8266/html/convert.py b/tools/esp8266/html/convert.py index 8171b69e..4cbecb20 100755 --- a/tools/esp8266/html/convert.py +++ b/tools/esp8266/html/convert.py @@ -1,8 +1,19 @@ import re +import sys +import os def convert2Header(inFile): - outName = "h/" + inFile.replace(".", "_") + ".h" - fileType = inFile.split(".")[1] + fileType = inFile.split(".")[1] + define = inFile.split(".")[0].upper() + define2 = inFile.split(".")[1].upper() + inFileVarName = inFile.replace(".", "_") + + if os.getcwd()[-4:] != "html": + print("ok") + outName = "html/" + "h/" + inFileVarName + ".h" + inFile = "html/" + inFile + else: + outName = "h/" + inFileVarName + ".h" f = open(inFile, "r") data = f.read().replace('\n', '') @@ -14,12 +25,10 @@ def convert2Header(inFile): else: data = re.sub(r"(\;|\}|\:|\{)\s+", r'\1', data) # whitespaces inner css - define = inFile.split(".")[0].upper() - define2 = inFile.split(".")[1].upper() f = open(outName, "w") f.write("#ifndef __{}_{}_H__\n".format(define, define2)) f.write("#define __{}_{}_H__\n".format(define, define2)) - f.write("const char {}[] PROGMEM = \"{}\";\n".format(inFile.replace(".", "_"), data)) + f.write("const char {}[] PROGMEM = \"{}\";\n".format(inFileVarName, data)) f.write("#endif /*__{}_{}_H__*/\n".format(define, define2)) f.close() diff --git a/tools/esp8266/html/h/style_css.h b/tools/esp8266/html/h/style_css.h index ce458e7c..b7fec0cf 100644 --- a/tools/esp8266/html/h/style_css.h +++ b/tools/esp8266/html/h/style_css.h @@ -1,4 +1,4 @@ #ifndef __STYLE_CSS_H__ #define __STYLE_CSS_H__ -const char style_css[] PROGMEM = "h1 {margin:0;padding:20pt;font-size:22pt;color:#fff;background-color:#006ec0;display:block;text-transform:uppercase;}html, body {font-family:Arial;margin:0;padding:0;}p {text-align:justify;font-size:13pt;}p.lic, p.lic a {font-size:8pt;color:#999;}.des {margin-top:20px;font-size:13pt;color:#006ec0;}.s_active, .s_collapsible:hover {background-color:#006ec0;}.s_content {padding:0 18px;display:none;overflow:hidden;background-color:#fff;}.s_collapsible {background-color:#044e86;color:white;cursor:pointer;padding:18px;width:100%;border:none;text-align:left;outline:none;font-size:15px;}.subdes {font-size:12pt;color:#006ec0;margin-left:7px;}.subsubdes {font-size:12pt;color:#006ec0;margin:0 0 7px 12px;}.hide {display:none;}a:link, a:visited {text-decoration:none;font-size:13pt;color:#006ec0;}a:hover, a:focus {color:#f00;}a.erase {background-color:#006ec0;color:#fff;padding:7px;display:inline-block;margin-top:30px;float:right;}#content {padding:15px 15px 60px 15px;}#footer {position:fixed;bottom:0px;height:45px;background-color:#006ec0;width:100%;border-top:5px solid #fff;}#footer p, #footer a {color:#fff;padding:0 7px 0 7px;font-size:10pt !important;}div.content {background-color:#fff;padding-bottom:65px;overflow:auto;}input, select {padding:7px;font-size:13pt;}input.text, select {width:70%;box-sizing:border-box;margin-bottom:10px;border:1px solid #ccc;}input.sh {max-width:150px !important;margin-right:10px;}input.btn {background-color:#006ec0;color:#fff;border:0px;float:right;margin:10px 0 30px;text-transform:uppercase;}input.cb {margin-bottom:20px;}label {width:20%;display:inline-block;font-size:12pt;padding-right:10px;margin-left:15px;}.left {float:left;}.right {float:right;}div.ch-iv {width:100%;background-color:#32b004;display:inline-block;margin-bottom:15px;padding-bottom:20px;overflow:auto;}div.ch {width:220px;min-height:350px;background-color:#006ec0;display:inline-block;margin:0 10px 15px 10px;overflow:auto;padding-bottom:20px;}div.ch .value, div.ch .info, div.ch .head, div.ch-iv .value, div.ch-iv .info, div.ch-iv .head {color:#fff;display:block;width:100%;text-align:center;}.subgrp {float:left;width:220px;}div.ch .unit, div.ch-iv .unit {font-size:19px;margin-left:10px;}div.ch .value, div.ch-iv .value {margin-top:20px;font-size:24px;}div.ch .info, div.ch-iv .info {margin-top:3px;font-size:10px;}div.ch .head {background-color:#003c80;padding:10px 0 10px 0;}div.ch-iv .head {background-color:#1c6800;padding:10px 0 10px 0;}div.iv {max-width:960px;margin-bottom:40px;}div.ts {font-size:13px;background-color:#ddd;border-top:7px solid #999;padding:7px;}#note {margin:50px 10px 10px 10px;padding-top:10px;width:100%;border-top:1px solid #bbb;}@media(max-width:500px) {div.ch .unit, div.ch-iv .unit {font-size:18px;}div.ch {width:170px;min-height:100px }.subgrp {width:180px;}}"; +const char style_css[] PROGMEM = "h1 {margin:0;padding:20pt;font-size:22pt;color:#fff;background-color:#006ec0;display:block;text-transform:uppercase;}html, body {font-family:Arial;margin:0;padding:0;}p {text-align:justify;font-size:13pt;}p.lic, p.lic a {font-size:8pt;color:#999;}.des {margin-top:20px;font-size:13pt;color:#006ec0;}.s_active, .s_collapsible:hover {background-color:#006ec0;}.s_content {display:none;overflow:hidden;margin-bottom:20px;}.s_collapsible {background-color:#044e86;color:white;cursor:pointer;padding:18px;width:100%;border:none;text-align:left;outline:none;font-size:15px;margin-bottom:4px;}.subdes {font-size:12pt;color:#006ec0;margin-left:7px;}.subsubdes {font-size:12pt;color:#006ec0;margin:0 0 7px 12px;}.hide {display:none;}a:link, a:visited {text-decoration:none;font-size:13pt;color:#006ec0;}a:hover, a:focus {color:#f00;}a.erase {background-color:#006ec0;color:#fff;padding:7px;display:inline-block;margin-top:30px;float:right;}#content {padding:15px 15px 60px 15px;}#footer {position:fixed;bottom:0px;height:45px;background-color:#006ec0;width:100%;border-top:5px solid #fff;}#footer p, #footer a {color:#fff;padding:0 7px 0 7px;font-size:10pt !important;}div.content {background-color:#fff;padding-bottom:65px;overflow:auto;}input, select {padding:7px;font-size:13pt;}input.text, select {width:70%;box-sizing:border-box;margin-bottom:10px;border:1px solid #ccc;}input.sh {max-width:150px !important;margin-right:10px;}input.btn {background-color:#006ec0;color:#fff;border:0px;float:right;margin:10px 0 30px;text-transform:uppercase;}input.cb {margin-bottom:20px;}label {width:20%;display:inline-block;font-size:12pt;padding-right:10px;margin-left:15px;}.left {float:left;}.right {float:right;}div.ch-iv {width:100%;background-color:#32b004;display:inline-block;margin-bottom:15px;padding-bottom:20px;overflow:auto;}div.ch {width:220px;min-height:350px;background-color:#006ec0;display:inline-block;margin:0 10px 15px 10px;overflow:auto;padding-bottom:20px;}div.ch .value, div.ch .info, div.ch .head, div.ch-iv .value, div.ch-iv .info, div.ch-iv .head {color:#fff;display:block;width:100%;text-align:center;}.subgrp {float:left;width:220px;}div.ch .unit, div.ch-iv .unit {font-size:19px;margin-left:10px;}div.ch .value, div.ch-iv .value {margin-top:20px;font-size:24px;}div.ch .info, div.ch-iv .info {margin-top:3px;font-size:10px;}div.ch .head {background-color:#003c80;padding:10px 0 10px 0;}div.ch-iv .head {background-color:#1c6800;padding:10px 0 10px 0;}div.iv {max-width:960px;margin-bottom:40px;}div.ts {font-size:13px;background-color:#ddd;border-top:7px solid #999;padding:7px;}#note {margin:50px 10px 10px 10px;padding-top:10px;width:100%;border-top:1px solid #bbb;}@media(max-width:500px) {div.ch .unit, div.ch-iv .unit {font-size:18px;}div.ch {width:170px;min-height:100px }.subgrp {width:180px;}}"; #endif /*__STYLE_CSS_H__*/ diff --git a/tools/esp8266/html/style.css b/tools/esp8266/html/style.css index 69d60b15..6de836e8 100644 --- a/tools/esp8266/html/style.css +++ b/tools/esp8266/html/style.css @@ -35,10 +35,10 @@ p.lic, p.lic a { } .s_content { - padding: 0 18px; display: none; overflow: hidden; - background-color: #fff; + margin-bottom: 20px; + } .s_collapsible { @@ -51,6 +51,7 @@ p.lic, p.lic a { text-align: left; outline: none; font-size: 15px; + margin-bottom: 4px; } .subdes { diff --git a/tools/esp8266/platformio.ini b/tools/esp8266/platformio.ini index ecfe4748..973ed7de 100644 --- a/tools/esp8266/platformio.ini +++ b/tools/esp8266/platformio.ini @@ -34,6 +34,7 @@ monitor_filters = extra_scripts = pre:scripts/auto_firmware_version.py + pre:html/convert.py lib_deps = nrf24/RF24@1.4.5 @@ -72,6 +73,7 @@ upload_port = /dev/ttyUSB0 extra_scripts = pre:scripts/auto_firmware_version.py + pre:html/convert.py html/ lib_deps = nrf24/RF24@1.4.5 @@ -84,4 +86,4 @@ lib_deps = ;esp8266/ESP8266WebServer@^1.0 ;esp8266/ESP8266WiFi@^1.0 ;esp8266/SPI@1.0 - ;esp8266/Ticker@^1.0 \ No newline at end of file + ;esp8266/Ticker@^1.0 From 2f88fea22978ce2fd94cd3cd07be78ccd863719c Mon Sep 17 00:00:00 2001 From: lumapu Date: Fri, 12 Aug 2022 11:17:04 +0200 Subject: [PATCH 8/9] fix #146 v0.5.8 --- tools/esp8266/defines.h | 2 +- tools/esp8266/html/h/setup_html.h | 2 +- tools/esp8266/html/setup.html | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/esp8266/defines.h b/tools/esp8266/defines.h index f44e5c0b..ba02cf58 100644 --- a/tools/esp8266/defines.h +++ b/tools/esp8266/defines.h @@ -21,7 +21,7 @@ //------------------------------------- #define VERSION_MAJOR 0 #define VERSION_MINOR 5 -#define VERSION_PATCH 7 +#define VERSION_PATCH 8 //------------------------------------- diff --git a/tools/esp8266/html/h/setup_html.h b/tools/esp8266/html/h/setup_html.h index 8ca71321..ebd3ce15 100644 --- a/tools/esp8266/html/h/setup_html.h +++ b/tools/esp8266/html/h/setup_html.h @@ -1,4 +1,4 @@ #ifndef __SETUP_HTML_H__ #define __SETUP_HTML_H__ -const char setup_html[] PROGMEM = "Setup - {DEVICE}

Setup

ERASE SETTINGS (not WiFi)

Device Host Name

WiFi

Enter the credentials to your prefered WiFi station. After rebooting the device tries to connect with this information.

Inverter{INVERTERS}

General

NTP Server
MQTT
System Config

Pinout (Wemos)

{PINOUT}

Radio (NRF24L01+)

Serial Console



 

"; +const char setup_html[] PROGMEM = "Setup - {DEVICE}

Setup

ERASE SETTINGS (not WiFi)

Device Host Name

WiFi

Enter the credentials to your prefered WiFi station. After rebooting the device tries to connect with this information.

Inverter{INVERTERS}

General

NTP Server
MQTT
System Config

Pinout (Wemos)

{PINOUT}

Radio (NRF24L01+)

Serial Console



 

"; #endif /*__SETUP_HTML_H__*/ diff --git a/tools/esp8266/html/setup.html b/tools/esp8266/html/setup.html index a81c5a6a..3b2078d2 100644 --- a/tools/esp8266/html/setup.html +++ b/tools/esp8266/html/setup.html @@ -54,11 +54,11 @@
ERASE SETTINGS (not WiFi) -

Device Host Name

+
+

Device Host Name

-
From b663951206ecc00e60818212ce5e047fa4517217 Mon Sep 17 00:00:00 2001 From: stefan123t Date: Fri, 12 Aug 2022 12:12:24 +0200 Subject: [PATCH 9/9] 0.5.9 fix PowerPFDev.Desc=0x0001 for PowerLimit --- tools/esp8266/README.md | 3 +++ tools/esp8266/app.cpp | 2 +- tools/esp8266/defines.h | 2 +- tools/esp8266/hmInverter.h | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/esp8266/README.md b/tools/esp8266/README.md index b538a818..d2c4114f 100644 --- a/tools/esp8266/README.md +++ b/tools/esp8266/README.md @@ -73,6 +73,9 @@ For now the following inverters should work out of the box: ## Changelog (*) EEPROM changes require settings to be changed, your settings will be overwritten and need to be set again! +- v0.5.9 *fix PowerLimit PowerPFDev.Desc=0x0001 for permanent +- v0.5.8 *fix #146 device name in setup +- v0.5.7 *add collapsible setup - v0.5.6 *fix only MQTT sub after the first loop in a conenction - v0.5.5 *fixed MQTT sub only after connection is established (HorstG-57) + added in app.cpp some compiler if statements diff --git a/tools/esp8266/app.cpp b/tools/esp8266/app.cpp index b0517c3d..23c8b575 100644 --- a/tools/esp8266/app.cpp +++ b/tools/esp8266/app.cpp @@ -86,7 +86,7 @@ void app::setup(uint32_t timeout) { if(NULL != iv) { mEep->read(ADDR_INV_PWR_LIM + (i * 2),(uint16_t *)&(iv->powerLimit[0])); if (iv->powerLimit[0] != 0xffff) { // only set it, if it is changed by user. Default value in the html setup page is -1 = 0xffff - iv->powerLimit[1] = 0x0100; // set the limit as persistent + iv->powerLimit[1] = 0x0001; // set the limit as persistent iv->devControlCmd = ActivePowerContr; // set active power limit iv->devControlRequest = true; // set to true to update the active power limit from setup html page DPRINTLN(DBG_INFO, F("add inverter: ") + String(name) + ", SN: " + String(invSerial, HEX) + ", Power Limit: " + String(iv->powerLimit[0])); diff --git a/tools/esp8266/defines.h b/tools/esp8266/defines.h index ba02cf58..f229e1da 100644 --- a/tools/esp8266/defines.h +++ b/tools/esp8266/defines.h @@ -21,7 +21,7 @@ //------------------------------------- #define VERSION_MAJOR 0 #define VERSION_MINOR 5 -#define VERSION_PATCH 8 +#define VERSION_PATCH 9 //------------------------------------- diff --git a/tools/esp8266/hmInverter.h b/tools/esp8266/hmInverter.h index 531e1e60..f7a50cf7 100644 --- a/tools/esp8266/hmInverter.h +++ b/tools/esp8266/hmInverter.h @@ -84,7 +84,7 @@ class Inverter { Inverter() { ts = 0; powerLimit[0] = -1; // 65535 W Limit -> unlimited - powerLimit[1] = 0x0100; // 0x0000 --> set temporary , 0x0100 --> set persistent + powerLimit[1] = 0x0001; // 0x0000 --> set temporary , 0x0001 --> set persistent devControlRequest = false; devControlCmd = 0xff; }