mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-24 14:26:11 +02:00
0.8.104
* fix reboot on inverter save (ESP32) #1559 * fix NRF and Ethernet #1506
This commit is contained in:
parent
7ee1f992cb
commit
f105e25d3c
6 changed files with 42 additions and 37 deletions
|
@ -31,5 +31,5 @@ applyPatch("ESPAsyncWebServer-esphome", "../patches/AsyncWeb_Prometheus.patch")
|
||||||
if env['PIOENV'][:13] == "opendtufusion":
|
if env['PIOENV'][:13] == "opendtufusion":
|
||||||
applyPatch("GxEPD2", "../patches/GxEPD2_SW_SPI.patch")
|
applyPatch("GxEPD2", "../patches/GxEPD2_SW_SPI.patch")
|
||||||
|
|
||||||
if (env['PIOENV'][:13] == "opendtufusion"): # or (env['PIOENV'][:13] == "esp32-wroom32"):
|
if (env['PIOENV'][:13] == "opendtufusion") or (env['PIOENV'][:5] == "esp32"):
|
||||||
applyPatch("RF24", "../patches/RF24_Hal.patch")
|
applyPatch("RF24", "../patches/RF24_Hal.patch")
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
# Development Changes
|
# Development Changes
|
||||||
|
|
||||||
|
## 0.8.104 - 2024-04-04
|
||||||
|
* fix reboot on inverter save (ESP32) #1559
|
||||||
|
* fix NRF and Ethernet #1506
|
||||||
|
|
||||||
## 0.8.103 - 2024-04-02
|
## 0.8.103 - 2024-04-02
|
||||||
* merge PR: fix: get refresh property from object #1552
|
* merge PR: fix: get refresh property from object #1552
|
||||||
* merge PR: fix typos and spelling in Github Issue template #1550
|
* merge PR: fix typos and spelling in Github Issue template #1550
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include "SPI.h"
|
#include "SPI.h"
|
||||||
#include "radio.h"
|
#include "radio.h"
|
||||||
#include "../config/config.h"
|
#include "../config/config.h"
|
||||||
#if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(SPI_HAL)
|
#if defined(SPI_HAL)
|
||||||
#include "nrfHal.h"
|
#include "nrfHal.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ class HmRadio : public Radio {
|
||||||
HmRadio() {
|
HmRadio() {
|
||||||
mDtuSn = DTU_SN;
|
mDtuSn = DTU_SN;
|
||||||
mIrqRcvd = false;
|
mIrqRcvd = false;
|
||||||
#if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(SPI_HAL)
|
#if defined(SPI_HAL)
|
||||||
//mNrf24.reset(new RF24());
|
//mNrf24.reset(new RF24());
|
||||||
#else
|
#else
|
||||||
mNrf24.reset(new RF24(CE_PIN, CS_PIN, SPI_SPEED));
|
mNrf24.reset(new RF24(CE_PIN, CS_PIN, SPI_SPEED));
|
||||||
|
@ -55,7 +55,7 @@ class HmRadio : public Radio {
|
||||||
mDtuRadioId = ((uint64_t)(((mDtuSn >> 24) & 0xFF) | ((mDtuSn >> 8) & 0xFF00) | ((mDtuSn << 8) & 0xFF0000) | ((mDtuSn << 24) & 0xFF000000)) << 8) | 0x01;
|
mDtuRadioId = ((uint64_t)(((mDtuSn >> 24) & 0xFF) | ((mDtuSn >> 8) & 0xFF00) | ((mDtuSn << 8) & 0xFF0000) | ((mDtuSn << 24) & 0xFF000000)) << 8) | 0x01;
|
||||||
|
|
||||||
#ifdef ESP32
|
#ifdef ESP32
|
||||||
#if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(SPI_HAL)
|
#if defined(SPI_HAL)
|
||||||
mNrfHal.init(mosi, miso, sclk, cs, ce, SPI_SPEED);
|
mNrfHal.init(mosi, miso, sclk, cs, ce, SPI_SPEED);
|
||||||
mNrf24.reset(new RF24(&mNrfHal));
|
mNrf24.reset(new RF24(&mNrfHal));
|
||||||
#else
|
#else
|
||||||
|
@ -72,7 +72,7 @@ class HmRadio : public Radio {
|
||||||
mSpi->begin();
|
mSpi->begin();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(SPI_HAL)
|
#if defined(SPI_HAL)
|
||||||
mNrf24->begin();
|
mNrf24->begin();
|
||||||
#else
|
#else
|
||||||
mNrf24->begin(mSpi.get(), ce, cs);
|
mNrf24->begin(mSpi.get(), ce, cs);
|
||||||
|
@ -432,7 +432,7 @@ class HmRadio : public Radio {
|
||||||
|
|
||||||
std::unique_ptr<SPIClass> mSpi;
|
std::unique_ptr<SPIClass> mSpi;
|
||||||
std::unique_ptr<RF24> mNrf24;
|
std::unique_ptr<RF24> mNrf24;
|
||||||
#if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(SPI_HAL)
|
#if defined(SPI_HAL)
|
||||||
nrfHal mNrfHal;
|
nrfHal mNrfHal;
|
||||||
#endif
|
#endif
|
||||||
Inverter<> *mLastIv = NULL;
|
Inverter<> *mLastIv = NULL;
|
||||||
|
|
|
@ -58,7 +58,7 @@ class AhoyWifi : public AhoyNetwork {
|
||||||
mConnected = true;
|
mConnected = true;
|
||||||
ah::welcome(WiFi.localIP().toString(), F("Station"));
|
ah::welcome(WiFi.localIP().toString(), F("Station"));
|
||||||
MDNS.begin(mConfig->sys.deviceName);
|
MDNS.begin(mConfig->sys.deviceName);
|
||||||
MDNS.addServiceTxt("http", "tcp", "path", "/");
|
//MDNS.addServiceTxt("http", "tcp", "path", "/");
|
||||||
mOnNetworkCB(true);
|
mOnNetworkCB(true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -148,17 +148,18 @@ monitor_filters =
|
||||||
esp8266_exception_decoder
|
esp8266_exception_decoder
|
||||||
|
|
||||||
[env:esp32-wroom32-minimal]
|
[env:esp32-wroom32-minimal]
|
||||||
platform = espressif32@6.5.0
|
platform = espressif32@6.6.0
|
||||||
board = lolin_d32
|
board = lolin_d32
|
||||||
build_flags = ${env.build_flags}
|
build_flags = ${env.build_flags}
|
||||||
-DUSE_HSPI_FOR_EPD
|
-DSPI_HAL
|
||||||
monitor_filters =
|
monitor_filters =
|
||||||
esp32_exception_decoder
|
esp32_exception_decoder
|
||||||
|
|
||||||
[env:esp32-wroom32]
|
[env:esp32-wroom32]
|
||||||
platform = espressif32@6.5.0
|
platform = espressif32@6.6.0
|
||||||
board = lolin_d32
|
board = lolin_d32
|
||||||
build_flags = ${env:esp32-wroom32-minimal.build_flags}
|
build_flags = ${env:esp32-wroom32-minimal.build_flags}
|
||||||
|
-DUSE_HSPI_FOR_EPD
|
||||||
-DENABLE_MQTT
|
-DENABLE_MQTT
|
||||||
-DPLUGIN_DISPLAY
|
-DPLUGIN_DISPLAY
|
||||||
-DENABLE_HISTORY
|
-DENABLE_HISTORY
|
||||||
|
@ -166,7 +167,7 @@ monitor_filters =
|
||||||
esp32_exception_decoder
|
esp32_exception_decoder
|
||||||
|
|
||||||
[env:esp32-wroom32-de]
|
[env:esp32-wroom32-de]
|
||||||
platform = espressif32@6.5.0
|
platform = espressif32@6.6.0
|
||||||
board = lolin_d32
|
board = lolin_d32
|
||||||
build_flags = ${env:esp32-wroom32.build_flags}
|
build_flags = ${env:esp32-wroom32.build_flags}
|
||||||
-DLANG_DE
|
-DLANG_DE
|
||||||
|
@ -174,7 +175,7 @@ monitor_filters =
|
||||||
esp32_exception_decoder
|
esp32_exception_decoder
|
||||||
|
|
||||||
[env:esp32-wroom32-prometheus]
|
[env:esp32-wroom32-prometheus]
|
||||||
platform = espressif32@6.5.0
|
platform = espressif32@6.6.0
|
||||||
board = lolin_d32
|
board = lolin_d32
|
||||||
build_flags = ${env:esp32-wroom32.build_flags}
|
build_flags = ${env:esp32-wroom32.build_flags}
|
||||||
-DENABLE_PROMETHEUS_EP
|
-DENABLE_PROMETHEUS_EP
|
||||||
|
@ -182,7 +183,7 @@ monitor_filters =
|
||||||
esp32_exception_decoder
|
esp32_exception_decoder
|
||||||
|
|
||||||
[env:esp32-wroom32-prometheus-de]
|
[env:esp32-wroom32-prometheus-de]
|
||||||
platform = espressif32@6.5.0
|
platform = espressif32@6.6.0
|
||||||
board = lolin_d32
|
board = lolin_d32
|
||||||
build_flags = ${env:esp32-wroom32-prometheus.build_flags}
|
build_flags = ${env:esp32-wroom32-prometheus.build_flags}
|
||||||
-DLANG_DE
|
-DLANG_DE
|
||||||
|
@ -199,7 +200,7 @@ build_flags = ${env:esp32-wroom32.build_flags}
|
||||||
-DDEF_ETH_MISO_PIN=12
|
-DDEF_ETH_MISO_PIN=12
|
||||||
-DDEF_ETH_MOSI_PIN=13
|
-DDEF_ETH_MOSI_PIN=13
|
||||||
-DDEF_ETH_IRQ_PIN=4
|
-DDEF_ETH_IRQ_PIN=4
|
||||||
-DDEF_ETH_RST_PIN=2
|
-DDEF_ETH_RST_PIN=255
|
||||||
-DDEF_NRF_CS_PIN=5
|
-DDEF_NRF_CS_PIN=5
|
||||||
-DDEF_NRF_CE_PIN=17
|
-DDEF_NRF_CE_PIN=17
|
||||||
-DDEF_NRF_IRQ_PIN=16
|
-DDEF_NRF_IRQ_PIN=16
|
||||||
|
@ -218,10 +219,11 @@ monitor_filters =
|
||||||
esp32_exception_decoder
|
esp32_exception_decoder
|
||||||
|
|
||||||
[env:esp32-s2-mini]
|
[env:esp32-s2-mini]
|
||||||
platform = espressif32@6.5.0
|
platform = espressif32@6.6.0
|
||||||
board = lolin_s2_mini
|
board = lolin_s2_mini
|
||||||
build_flags = ${env.build_flags}
|
build_flags = ${env.build_flags}
|
||||||
-DUSE_HSPI_FOR_EPD
|
-DUSE_HSPI_FOR_EPD
|
||||||
|
-DSPI_HAL
|
||||||
-DENABLE_MQTT
|
-DENABLE_MQTT
|
||||||
-DPLUGIN_DISPLAY
|
-DPLUGIN_DISPLAY
|
||||||
-DENABLE_HISTORY
|
-DENABLE_HISTORY
|
||||||
|
@ -240,7 +242,7 @@ monitor_filters =
|
||||||
esp32_exception_decoder
|
esp32_exception_decoder
|
||||||
|
|
||||||
[env:esp32-s2-mini-de]
|
[env:esp32-s2-mini-de]
|
||||||
platform = espressif32@6.5.0
|
platform = espressif32@6.6.0
|
||||||
board = lolin_s2_mini
|
board = lolin_s2_mini
|
||||||
build_flags = ${env:esp32-s2-mini.build_flags}
|
build_flags = ${env:esp32-s2-mini.build_flags}
|
||||||
-DLANG_DE
|
-DLANG_DE
|
||||||
|
@ -248,10 +250,11 @@ monitor_filters =
|
||||||
esp32_exception_decoder
|
esp32_exception_decoder
|
||||||
|
|
||||||
[env:esp32-c3-mini]
|
[env:esp32-c3-mini]
|
||||||
platform = espressif32@6.5.0
|
platform = espressif32@6.6.0
|
||||||
board = lolin_c3_mini
|
board = lolin_c3_mini
|
||||||
build_flags = ${env.build_flags}
|
build_flags = ${env.build_flags}
|
||||||
-DUSE_HSPI_FOR_EPD
|
-DUSE_HSPI_FOR_EPD
|
||||||
|
-DSPI_HAL
|
||||||
-DENABLE_MQTT
|
-DENABLE_MQTT
|
||||||
-DPLUGIN_DISPLAY
|
-DPLUGIN_DISPLAY
|
||||||
-DENABLE_HISTORY
|
-DENABLE_HISTORY
|
||||||
|
@ -270,7 +273,7 @@ monitor_filters =
|
||||||
esp32_exception_decoder
|
esp32_exception_decoder
|
||||||
|
|
||||||
[env:esp32-c3-mini-de]
|
[env:esp32-c3-mini-de]
|
||||||
platform = espressif32@6.5.0
|
platform = espressif32@6.6.0
|
||||||
board = lolin_c3_mini
|
board = lolin_c3_mini
|
||||||
build_flags = ${env:esp32-c3-mini.build_flags}
|
build_flags = ${env:esp32-c3-mini.build_flags}
|
||||||
-DLANG_DE
|
-DLANG_DE
|
||||||
|
@ -278,7 +281,7 @@ monitor_filters =
|
||||||
esp32_exception_decoder
|
esp32_exception_decoder
|
||||||
|
|
||||||
[env:opendtufusion-minimal]
|
[env:opendtufusion-minimal]
|
||||||
platform = espressif32@6.5.0
|
platform = espressif32@6.6.0
|
||||||
board = esp32-s3-devkitc-1
|
board = esp32-s3-devkitc-1
|
||||||
upload_protocol = esp-builtin
|
upload_protocol = esp-builtin
|
||||||
build_flags = ${env.build_flags}
|
build_flags = ${env.build_flags}
|
||||||
|
@ -303,7 +306,7 @@ monitor_filters =
|
||||||
esp32_exception_decoder, colorize
|
esp32_exception_decoder, colorize
|
||||||
|
|
||||||
[env:opendtufusion]
|
[env:opendtufusion]
|
||||||
platform = espressif32@6.5.0
|
platform = espressif32@6.6.0
|
||||||
board = esp32-s3-devkitc-1
|
board = esp32-s3-devkitc-1
|
||||||
upload_protocol = esp-builtin
|
upload_protocol = esp-builtin
|
||||||
build_flags = ${env:opendtufusion-minimal.build_flags}
|
build_flags = ${env:opendtufusion-minimal.build_flags}
|
||||||
|
@ -314,7 +317,7 @@ monitor_filters =
|
||||||
esp32_exception_decoder, colorize
|
esp32_exception_decoder, colorize
|
||||||
|
|
||||||
[env:opendtufusion-de]
|
[env:opendtufusion-de]
|
||||||
platform = espressif32@6.5.0
|
platform = espressif32@6.6.0
|
||||||
board = esp32-s3-devkitc-1
|
board = esp32-s3-devkitc-1
|
||||||
upload_protocol = esp-builtin
|
upload_protocol = esp-builtin
|
||||||
build_flags = ${env:opendtufusion.build_flags}
|
build_flags = ${env:opendtufusion.build_flags}
|
||||||
|
@ -323,7 +326,7 @@ monitor_filters =
|
||||||
esp32_exception_decoder, colorize
|
esp32_exception_decoder, colorize
|
||||||
|
|
||||||
[env:opendtufusion-ethernet]
|
[env:opendtufusion-ethernet]
|
||||||
platform = espressif32@6.5.0
|
platform = espressif32@6.6.0
|
||||||
board = esp32-s3-devkitc-1
|
board = esp32-s3-devkitc-1
|
||||||
upload_protocol = esp-builtin
|
upload_protocol = esp-builtin
|
||||||
build_flags = ${env:opendtufusion-minimal.build_flags}
|
build_flags = ${env:opendtufusion-minimal.build_flags}
|
||||||
|
@ -342,7 +345,7 @@ monitor_filters =
|
||||||
esp32_exception_decoder, colorize
|
esp32_exception_decoder, colorize
|
||||||
|
|
||||||
[env:opendtufusion-ethernet-de]
|
[env:opendtufusion-ethernet-de]
|
||||||
platform = espressif32@6.5.0
|
platform = espressif32@6.6.0
|
||||||
board = esp32-s3-devkitc-1
|
board = esp32-s3-devkitc-1
|
||||||
upload_protocol = esp-builtin
|
upload_protocol = esp-builtin
|
||||||
build_flags = ${env:opendtufusion-ethernet.build_flags}
|
build_flags = ${env:opendtufusion-ethernet.build_flags}
|
||||||
|
|
|
@ -52,14 +52,18 @@
|
||||||
<div class="s_content">
|
<div class="s_content">
|
||||||
<fieldset class="mb-2">
|
<fieldset class="mb-2">
|
||||||
<legend class="des">WiFi</legend>
|
<legend class="des">WiFi</legend>
|
||||||
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-12 col-sm-3 my-2">{#AP_PWD}</div>
|
<div class="col-12 col-sm-3 my-2">{#AP_PWD}</div>
|
||||||
<div class="col-12 col-sm-9"><input type="text" name="ap_pwd" minlength="8" /></div>
|
<div class="col-12 col-sm-9"><input type="text" name="ap_pwd" minlength="8" /></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!--IF_ETHERNET-->
|
||||||
|
<!--ELSE-->
|
||||||
<div class="row mb-2 mb-sm-3">
|
<div class="row mb-2 mb-sm-3">
|
||||||
<div class="col-12 col-sm-3 my-2">SSID</div>
|
<div class="col-12 col-sm-3 my-2">SSID</div>
|
||||||
<div class="col-12 col-sm-9"><input type="text" name="ssid"/><br/><a href="/wizard">{#SCAN_WIFI}</a></div>
|
<div class="col-12 col-sm-9">
|
||||||
|
<input type="text" name="ssid"/><br/>
|
||||||
|
<a href="/wizard">{#SCAN_WIFI}</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-2 mb-sm-3">
|
<div class="row mb-2 mb-sm-3">
|
||||||
<div class="col-12 col-sm-3">{#SSID_HIDDEN}</div>
|
<div class="col-12 col-sm-3">{#SSID_HIDDEN}</div>
|
||||||
|
@ -69,6 +73,7 @@
|
||||||
<div class="col-12 col-sm-3 my-2">{#PASSWORD}</div>
|
<div class="col-12 col-sm-3 my-2">{#PASSWORD}</div>
|
||||||
<div class="col-12 col-sm-9"><input type="password" name="pwd" value="{PWD}"/></div>
|
<div class="col-12 col-sm-9"><input type="password" name="pwd" value="{PWD}"/></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!--ENDIF_ETHERNET-->
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset class="mb-4">
|
<fieldset class="mb-4">
|
||||||
<legend class="des">{#STATIC_IP}</legend>
|
<legend class="des">{#STATIC_IP}</legend>
|
||||||
|
@ -652,9 +657,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseSys(obj) {
|
function parseSys(obj) {
|
||||||
|
/*IF_ETHERNET*/
|
||||||
|
for(var i of [["device", "device_name"], ["ap_pwd", "ap_pwd"]])
|
||||||
|
document.getElementsByName(i[0])[0].value = obj[i[1]];
|
||||||
|
/*ELSE*/
|
||||||
for(var i of [["device", "device_name"], ["ssid", "ssid"], ["ap_pwd", "ap_pwd"]])
|
for(var i of [["device", "device_name"], ["ssid", "ssid"], ["ap_pwd", "ap_pwd"]])
|
||||||
document.getElementsByName(i[0])[0].value = obj[i[1]];
|
document.getElementsByName(i[0])[0].value = obj[i[1]];
|
||||||
document.getElementsByName("hidd")[0].checked = obj["hidd"];
|
document.getElementsByName("hidd")[0].checked = obj["hidd"];
|
||||||
|
/*ENDIF_ETHERNET*/
|
||||||
document.getElementsByName("darkMode")[0].checked = obj["dark_mode"];
|
document.getElementsByName("darkMode")[0].checked = obj["dark_mode"];
|
||||||
document.getElementsByName("schedReboot")[0].checked = obj["sched_reboot"];
|
document.getElementsByName("schedReboot")[0].checked = obj["sched_reboot"];
|
||||||
e = document.getElementsByName("adminpwd")[0];
|
e = document.getElementsByName("adminpwd")[0];
|
||||||
|
@ -1288,18 +1298,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function listNetworks(root) {
|
|
||||||
var s = document.getElementById("networks");
|
|
||||||
selDelAllOpt(s);
|
|
||||||
if(root["networks"].length > 0) {
|
|
||||||
s.appendChild(opt("-1", "{#NETWORK_PLEASE_SELECT}"));
|
|
||||||
for(i = 0; i < root["networks"].length; i++) {
|
|
||||||
s.appendChild(opt(root["networks"][i]["ssid"], root["networks"][i]["ssid"] + " (" + root["networks"][i]["rssi"] + " dBm)"));
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
s.appendChild(opt("-1", "{#NO_NETWORK_FOUND}"));
|
|
||||||
}
|
|
||||||
|
|
||||||
getAjax("/api/setup", parse);
|
getAjax("/api/setup", parse);
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue