Browse Source

0.8.123

* show device name in html title #1639
* update AsyncWebserver library to `3.2.2`
pull/1663/head
lumapu 8 months ago
parent
commit
64ee494a06
  1. 2
      src/CHANGES.md
  2. 2
      src/platformio.ini
  3. 2
      src/web/RestApi.h
  4. 8
      src/web/html/api.js
  5. 1
      src/web/html/history.html
  6. 4
      src/web/html/index.html
  7. 7
      src/web/html/serial.html
  8. 7
      src/web/html/setup.html
  9. 7
      src/web/html/system.html
  10. 1
      src/web/html/update.html
  11. 7
      src/web/html/visualization.html

2
src/CHANGES.md

@ -7,6 +7,8 @@
* add option to publish mqtt as json
* publish rssi not on ch0 any more, published on `topic/rssi`
* add total power to index page (if multiple inverters are configured)
* show device name in html title #1639
* update AsyncWebserver library to `3.2.2`
## 0.8.122 - 2024-05-23
* add button for donwloading coredump (ESP32 variants only)

2
src/platformio.ini

@ -26,7 +26,7 @@ extra_scripts =
post:../scripts/add_littlefs_binary.py
lib_deps =
https://github.com/esphome/ESPAsyncWebServer @ ^3.2.0
https://github.com/esphome/ESPAsyncWebServer @ ^3.2.2
https://github.com/nRF24/RF24.git#v1.4.8
paulstoffregen/Time @ ^1.6.1
https://github.com/bertmelis/espMqttClient#v1.7.0

2
src/web/RestApi.h

@ -391,6 +391,7 @@ class RestApi {
obj[F("modules")] = String(mApp->getVersionModules());
obj[F("build")] = String(AUTO_GIT_HASH);
obj[F("env")] = String(ENV_NAME);
obj[F("host")] = mConfig->sys.deviceName;
obj[F("menu_prot")] = mApp->isProtected(request->client()->remoteIP().toString().c_str(), "", true);
obj[F("menu_mask")] = (uint16_t)(mConfig->sys.protectionMask );
obj[F("menu_protEn")] = (bool) (mConfig->sys.adminPwd[0] != '\0');
@ -418,7 +419,6 @@ class RestApi {
obj[F("dark_mode")] = (bool)mConfig->sys.darkMode;
obj[F("sched_reboot")] = (bool)mConfig->sys.schedReboot;
obj[F("hostname")] = mConfig->sys.deviceName;
obj[F("pwd_set")] = (strlen(mConfig->sys.adminPwd) > 0);
obj[F("prot_mask")] = mConfig->sys.protectionMask;

8
src/web/html/api.js

@ -143,7 +143,7 @@ function parseVersion(obj) {
function parseESP(obj) {
document.getElementById("esp_type").replaceChildren(
document.createTextNode("Board: " + obj["esp_type"])
document.createTextNode("Board: " + obj.esp_type)
);
}
@ -153,7 +153,11 @@ function parseRssi(obj) {
icon = iconWifi1;
else if(obj["wifi_rssi"] <= -70)
icon = iconWifi2;
document.getElementById("wifiicon").replaceChildren(svg(icon, 32, 32, "icon-fg2", obj["wifi_rssi"]));
document.getElementById("wifiicon").replaceChildren(svg(icon, 32, 32, "icon-fg2", obj.wifi_rssi));
}
function parseTitle(obj) {
document.title = obj.host + " - " + document.title
}
function toIsoDateStr(d) {

1
src/web/html/history.html

@ -149,6 +149,7 @@
parseNav(obj.generic)
parseESP(obj.generic)
parseRssi(obj.generic)
parseTitle(obj.generic)
window.setInterval("getAjax('/api/powerHistory', parsePowerHistory)", obj.refresh * 1000)
setTimeout(() => {
window.setInterval("getAjax('/api/powerHistoryDay', parsePowerHistoryDay)", obj.refresh * 1000)

4
src/web/html/index.html

@ -57,8 +57,10 @@
}
function parseGeneric(obj) {
if(exeOnce)
if(exeOnce) {
parseESP(obj)
parseTitle(obj)
}
parseRssi(obj)
}

7
src/web/html/serial.html

@ -40,10 +40,11 @@
+ ("0"+min).substr(-2) + ":"
+ ("0"+sec).substr(-2);
parseRssi(obj);
parseRssi(obj)
if(true == exeOnce) {
parseNav(obj);
parseESP(obj);
parseNav(obj)
parseESP(obj)
parseTitle(obj)
window.setInterval("getAjax('/api/generic', parseGeneric)", 5000);
exeOnce = false;
setTimeOffset();

7
src/web/html/setup.html

@ -717,9 +717,10 @@
}
function parseGeneric(obj) {
parseNav(obj);
parseESP(obj);
parseRssi(obj);
parseNav(obj)
parseESP(obj)
parseRssi(obj)
parseTitle(obj)
if(0 != obj.cst_lnk.length) {
document.getElementsByName("cstLnk")[0].value = obj.cst_lnk

7
src/web/html/system.html

@ -15,9 +15,10 @@
{#HTML_FOOTER}
<script type="text/javascript">
function parseGeneric(obj) {
parseNav(obj);
parseESP(obj);
parseRssi(obj);
parseNav(obj)
parseESP(obj)
parseRssi(obj)
parseTitle(obj)
}
function parseSysInfo(obj) {

1
src/web/html/update.html

@ -44,6 +44,7 @@
parseNav(obj)
parseESP(obj)
parseRssi(obj)
parseTitle(obj)
env = obj.env
document.getElementById("version").innerHTML = "{#VERSION_FULL}_" + obj.env + ".bin"
}

7
src/web/html/visualization.html

@ -34,10 +34,11 @@
function parseGeneric(obj) {
if(true == exeOnce){
parseNav(obj);
parseESP(obj);
parseNav(obj)
parseESP(obj)
parseTitle(obj)
}
parseRssi(obj);
parseRssi(obj)
}
function numBig(val, unit, des) {

Loading…
Cancel
Save