Allow HTTPS on non-PSRAM devices
This commit is contained in:
@@ -709,7 +709,7 @@ If you have enabled "Allow updating using MQTT" you can also use the Home Assist
|
||||
<br>
|
||||
Alternatively you can select a binary file from your file system to update Nuki Hub or the Nuki Hub updator manually<br>
|
||||
You can only update Nuki Hub from the Nuki Hub updater and update the updater only from Nuki Hub<br>
|
||||
You can reboot from Nuki Hub to the updater and vice versa by selecting the reboot option from the "Firware update" page<br>
|
||||
You can reboot from Nuki Hub to the updater and vice versa by selecting the reboot option from the "Firmware update" page<br>
|
||||
When you are on the right application you can upload the new binary by clicking on "Browse" and select the new "nuki_hub\[board\].bin" or "nuki_hub_updater\[board\].bin" file and select "Upload file".<br>
|
||||
After about a minute the new firmware should be installed afterwhich the ESP will reboot automatically to the updated binary.<br>
|
||||
Selecting the wrong binary will lead to an unsuccessfull update<br>
|
||||
|
||||
@@ -75,6 +75,7 @@ extra_scripts =
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE
|
||||
-DNUKI_HUB_HTTPS_SERVER
|
||||
|
||||
[env:esp32-gl-s10]
|
||||
extends = env:esp32
|
||||
@@ -90,6 +91,9 @@ extends = env:esp32
|
||||
board = esp32-c3-devkitc-02
|
||||
board_build.cmake_extra_args =
|
||||
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.release.defaults;sdkconfig.singlecore.defaults"
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE
|
||||
|
||||
[env:esp32-s3]
|
||||
extends = env:esp32
|
||||
@@ -115,6 +119,10 @@ extends = env:esp32
|
||||
board = esp32-c6-devkitm-1
|
||||
board_build.cmake_extra_args =
|
||||
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.release.defaults;sdkconfig.singlecore.defaults"
|
||||
build_flags =
|
||||
${env:esp32.build_flags}
|
||||
-DNUKI_HUB_HTTPS_SERVER
|
||||
-DFORCE_NUKI_HUB_HTTPS_SERVER
|
||||
|
||||
[env:esp32-h2]
|
||||
extends = env:esp32
|
||||
@@ -131,12 +139,18 @@ lib_ignore =
|
||||
ESPAsyncTCP-esphome
|
||||
AsyncTCP_RP2040W
|
||||
WiFiManager
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE
|
||||
|
||||
[env:esp32-solo1]
|
||||
extends = env:esp32
|
||||
board = nuki-esp32solo1
|
||||
board_build.cmake_extra_args =
|
||||
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.release.defaults;sdkconfig.singlecore.defaults;sdkconfig.defaults.esp32-solo1"
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE
|
||||
|
||||
[env:esp32-p4]
|
||||
extends = env:esp32
|
||||
@@ -144,9 +158,6 @@ board_build.embed_txtfiles =
|
||||
board = esp32-p4
|
||||
board_build.cmake_extra_args =
|
||||
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.release.defaults;sdkconfig.defaults.esp32-p4"
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE
|
||||
|
||||
[env:esp32_dbg]
|
||||
extends = env:esp32
|
||||
@@ -157,6 +168,7 @@ build_flags =
|
||||
${env.build_flags}
|
||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
|
||||
-DDEBUG_NUKIHUB
|
||||
-DNUKI_HUB_HTTPS_SERVER
|
||||
|
||||
[env:esp32-gl-s10_dbg]
|
||||
extends = env:esp32-gl-s10
|
||||
@@ -185,9 +197,7 @@ custom_build = debug
|
||||
board_build.cmake_extra_args =
|
||||
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.debug.defaults;sdkconfig.defaults.esp32-c5;sdkconfig.defaults.esp32-c5dbg;sdkconfig.singlecore.defaults"
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
|
||||
-DDEBUG_NUKIHUB
|
||||
${env:esp32_dbg.build_flags}
|
||||
|
||||
[env:esp32-c6_dbg]
|
||||
extends = env:esp32-c6
|
||||
@@ -195,9 +205,8 @@ custom_build = debug
|
||||
board_build.cmake_extra_args =
|
||||
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.debug.defaults;sdkconfig.singlecore.defaults"
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
|
||||
-DDEBUG_NUKIHUB
|
||||
${env:esp32_dbg.build_flags}
|
||||
-DFORCE_NUKI_HUB_HTTPS_SERVER
|
||||
|
||||
[env:esp32-h2_dbg]
|
||||
extends = env:esp32-h2
|
||||
@@ -216,9 +225,7 @@ custom_build = debug
|
||||
board_build.cmake_extra_args =
|
||||
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.debug.defaults;sdkconfig.defaults.esp32-s3"
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
|
||||
-DDEBUG_NUKIHUB
|
||||
${env:esp32_dbg.build_flags}
|
||||
|
||||
[env:esp32-s3-oct_dbg]
|
||||
extends = env:esp32-s3-oct
|
||||
@@ -226,9 +233,7 @@ custom_build = debug
|
||||
board_build.cmake_extra_args =
|
||||
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.debug.defaults;sdkconfig.defaults.esp32-s3-oct"
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
|
||||
-DDEBUG_NUKIHUB
|
||||
${env:esp32_dbg.build_flags}
|
||||
|
||||
[env:esp32-solo1_dbg]
|
||||
extends = env:esp32-solo1
|
||||
@@ -246,6 +251,4 @@ custom_build = debug
|
||||
board_build.cmake_extra_args =
|
||||
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.debug.defaults;sdkconfig.defaults.esp32-p4"
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
|
||||
-DDEBUG_NUKIHUB
|
||||
${env:esp32_dbg.build_flags}
|
||||
@@ -5,7 +5,7 @@
|
||||
#define NUKI_HUB_VERSION "9.11"
|
||||
#define NUKI_HUB_VERSION_INT (uint32_t)911
|
||||
#define NUKI_HUB_BUILD "unknownbuildnr"
|
||||
#define NUKI_HUB_DATE "2025-06-18"
|
||||
#define NUKI_HUB_DATE "2025-06-19"
|
||||
|
||||
#define GITHUB_LATEST_RELEASE_URL (char*)"https://github.com/technyon/nuki_hub/releases/latest"
|
||||
#define GITHUB_OTA_MANIFEST_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/manifest.json"
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
#include "esp_random.h"
|
||||
#ifdef CONFIG_SOC_SPIRAM_SUPPORTED
|
||||
#include "esp_psram.h"
|
||||
#endif
|
||||
#ifdef NUKI_HUB_HTTPS_SERVER
|
||||
#include "util/SSLCert.hpp"
|
||||
#endif
|
||||
#ifndef CONFIG_IDF_TARGET_ESP32H2
|
||||
@@ -2697,8 +2699,7 @@ bool WebCfgServer::processArgs(PsychicRequest *request, PsychicResponse* resp, S
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef CONFIG_SOC_SPIRAM_SUPPORTED
|
||||
else if(key == "HTTPCRT")
|
||||
else if(key == "HTTPCRT" && nuki_hub_https_server_enabled)
|
||||
{
|
||||
if (!SPIFFS.begin(true)) {
|
||||
Log->println("SPIFFS Mount Failed");
|
||||
@@ -2734,7 +2735,7 @@ bool WebCfgServer::processArgs(PsychicRequest *request, PsychicResponse* resp, S
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(key == "HTTPKEY")
|
||||
else if(key == "HTTPKEY" && nuki_hub_https_server_enabled)
|
||||
{
|
||||
if (!SPIFFS.begin(true)) {
|
||||
Log->println("SPIFFS Mount Failed");
|
||||
@@ -2770,14 +2771,15 @@ bool WebCfgServer::processArgs(PsychicRequest *request, PsychicResponse* resp, S
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(key == "HTTPGEN")
|
||||
else if(key == "HTTPGEN" && nuki_hub_https_server_enabled)
|
||||
{
|
||||
#ifdef NUKI_HUB_HTTPS_SERVER
|
||||
createSSLCertificate();
|
||||
#endif
|
||||
Log->print("Setting changed: ");
|
||||
Log->println(key);
|
||||
configChanged = true;
|
||||
}
|
||||
#endif
|
||||
else if(key == "UPTIME")
|
||||
{
|
||||
if(_preferences->getBool(preference_update_time, false) != (value == "1"))
|
||||
@@ -4809,12 +4811,10 @@ esp_err_t WebCfgServer::buildImportExportHtml(PsychicRequest *request, PsychicRe
|
||||
response.print("<button title=\"Basic export\" onclick=\" window.open('/get?page=export', '_self'); return false;\">Basic export</button>");
|
||||
response.print("<br><br><button title=\"Export with redacted settings\" onclick=\" window.open('/get?page=export&redacted=1'); return false;\">Export with redacted settings</button>");
|
||||
response.print("<br><br><button title=\"Export with redacted settings and pairing data\" onclick=\" window.open('/get?page=export&redacted=1&pairing=1'); return false;\">Export with redacted settings and pairing data</button>");
|
||||
#ifdef CONFIG_SOC_SPIRAM_SUPPORTED
|
||||
if(esp_psram_get_size() > 0)
|
||||
if(nuki_hub_https_server_enabled)
|
||||
{
|
||||
response.print("<br><br><button title=\"Export HTTP SSL certificate and key\" onclick=\" window.open('/get?page=export&type=https'); return false;\">Export HTTP SSL certificate and key</button>");
|
||||
}
|
||||
#endif
|
||||
response.print("<br><br><button title=\"Export MQTT SSL CA, client certificate and client key\" onclick=\" window.open('/get?page=export&type=mqtts'); return false;\">Export MQTT SSL CA, client certificate and client key</button>");
|
||||
response.print("<br><br><button title=\"Export Coredump\" onclick=\" window.open('/get?page=coredump'); return false;\">Export Coredump</button>");
|
||||
response.print("</div></body></html>");
|
||||
@@ -5121,15 +5121,13 @@ esp_err_t WebCfgServer::buildNetworkConfigHtml(PsychicRequest *request, PsychicR
|
||||
printCheckBox(&response, "RSTDISC", "Restart on disconnect", _preferences->getBool(preference_restart_on_disconnect), "");
|
||||
printCheckBox(&response, "CHECKUPDATE", "Check for Firmware Updates every 24h", _preferences->getBool(preference_check_updates), "");
|
||||
printCheckBox(&response, "FINDBESTRSSI", "Find WiFi AP with strongest signal", _preferences->getBool(preference_find_best_rssi, false), "");
|
||||
#ifdef CONFIG_SOC_SPIRAM_SUPPORTED
|
||||
if(esp_psram_get_size() > 0)
|
||||
if(nuki_hub_https_server_enabled)
|
||||
{
|
||||
response.print("<tr><td>Set HTTP SSL Certificate</td><td><button title=\"Set HTTP SSL Certificate\" onclick=\" window.open('/get?page=httpcrtconfig', '_self'); return false;\">Change</button></td></tr>");
|
||||
response.print("<tr><td>Set HTTP SSL Key</td><td><button title=\"Set HTTP SSL Key\" onclick=\" window.open('/get?page=httpkeyconfig', '_self'); return false;\">Change</button></td></tr>");
|
||||
response.print("<tr><td>Generate self-signed HTTP SSL Certificate and key</td><td><button title=\"Generate HTTP SSL Certificate and key\" onclick=\" window.open('/get?page=selfsignhttps', '_self'); return false;\">Generate</button></td></tr>");
|
||||
printInputField(&response, "HTTPSFQDN", "Nuki Hub FQDN for HTTP redirect", _preferences->getString(preference_https_fqdn, "").c_str(), 255, "");
|
||||
}
|
||||
#endif
|
||||
response.print("</table>");
|
||||
response.print("<h3>IP Address assignment</h3>");
|
||||
response.print("<table>");
|
||||
@@ -5326,7 +5324,6 @@ esp_err_t WebCfgServer::buildHttpSSLConfigHtml(PsychicRequest *request, PsychicR
|
||||
{
|
||||
bool found = false;
|
||||
|
||||
#ifdef CONFIG_SOC_SPIRAM_SUPPORTED
|
||||
if (!SPIFFS.begin(true)) {
|
||||
Log->println("SPIFFS Mount Failed");
|
||||
}
|
||||
@@ -5350,7 +5347,7 @@ esp_err_t WebCfgServer::buildHttpSSLConfigHtml(PsychicRequest *request, PsychicR
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!found)
|
||||
{
|
||||
printTextarea(&response, "HTTPCRT", "HTTP SSL Certificate (*, optional)", "", 4400, true, true);
|
||||
@@ -5360,7 +5357,6 @@ esp_err_t WebCfgServer::buildHttpSSLConfigHtml(PsychicRequest *request, PsychicR
|
||||
{
|
||||
bool found = false;
|
||||
|
||||
#ifdef CONFIG_SOC_SPIRAM_SUPPORTED
|
||||
if (!SPIFFS.begin(true)) {
|
||||
Log->println("SPIFFS Mount Failed");
|
||||
}
|
||||
@@ -5384,7 +5380,7 @@ esp_err_t WebCfgServer::buildHttpSSLConfigHtml(PsychicRequest *request, PsychicR
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!found)
|
||||
{
|
||||
printTextarea(&response, "HTTPKEY", "HTTP SSL Key (*, optional)", "", 2200, true, true);
|
||||
@@ -6028,10 +6024,7 @@ esp_err_t WebCfgServer::buildInfoHtml(PsychicRequest *request, PsychicResponse*
|
||||
response.print("\nWeb configurator enabled: ");
|
||||
response.print(_preferences->getBool(preference_webserver_enabled, true) ? "Yes" : "No");
|
||||
response.print("\nHTTP SSL: ");
|
||||
#ifdef CONFIG_SOC_SPIRAM_SUPPORTED
|
||||
if(esp_psram_get_size() > 0)
|
||||
{
|
||||
if (!SPIFFS.begin(true)) {
|
||||
if (!SPIFFS.begin(true) || !nuki_hub_https_server_enabled) {
|
||||
response.print("Disabled");
|
||||
}
|
||||
else
|
||||
@@ -6044,14 +6037,6 @@ esp_err_t WebCfgServer::buildInfoHtml(PsychicRequest *request, PsychicResponse*
|
||||
response.print("\nNuki Hub FQDN for HTTP redirect: ");
|
||||
response.print(_preferences->getString(preference_https_fqdn, "").length() > 0 ? "***" : "Not set");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
response.print("Disabled");
|
||||
}
|
||||
#else
|
||||
response.print("Disabled");
|
||||
#endif
|
||||
response.print("\nAdvanced menu enabled: ");
|
||||
response.print(_preferences->getBool(preference_enable_debug_mode, false) ? "Yes" : "No");
|
||||
response.print("\nPublish free heap over MQTT: ");
|
||||
@@ -7052,7 +7037,7 @@ const String WebCfgServer::getPreselectionForGpio(const uint8_t &pin) const
|
||||
return String((int8_t)PinRole::Disabled);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SOC_SPIRAM_SUPPORTED
|
||||
#ifdef NUKI_HUB_HTTPS_SERVER
|
||||
void WebCfgServer::createSSLCertificate()
|
||||
{
|
||||
SSLCert* cert;
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "ImportExport.h"
|
||||
|
||||
extern TaskHandle_t nukiTaskHandle;
|
||||
extern bool nuki_hub_https_server_enabled;
|
||||
|
||||
enum class TokenType
|
||||
{
|
||||
@@ -86,7 +87,7 @@ private:
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
const std::vector<std::pair<String, String>> getNetworkCustomCLKOptions() const;
|
||||
#endif
|
||||
#ifdef CONFIG_SOC_SPIRAM_SUPPORTED
|
||||
#ifdef NUKI_HUB_HTTPS_SERVER
|
||||
void createSSLCertificate();
|
||||
#endif
|
||||
const String getPreselectionForGpio(const uint8_t& pin) const;
|
||||
|
||||
@@ -9,7 +9,7 @@ dependencies:
|
||||
espressif/libsodium: "^1.0.20~2"
|
||||
|
||||
espressif/esp_hosted:
|
||||
version: "*"
|
||||
version: 2.0.10
|
||||
rules:
|
||||
- if: "target in [esp32p4]"
|
||||
|
||||
|
||||
43
src/main.cpp
43
src/main.cpp
@@ -15,6 +15,11 @@
|
||||
#include "FS.h"
|
||||
#include "SPIFFS.h"
|
||||
//#include <ESPmDNS.h>
|
||||
#ifdef NUKI_HUB_HTTPS_SERVER
|
||||
bool nuki_hub_https_server_enabled = true;
|
||||
#else
|
||||
bool nuki_hub_https_server_enabled = false;
|
||||
#endif
|
||||
#ifdef CONFIG_SOC_SPIRAM_SUPPORTED
|
||||
#include "esp_psram.h"
|
||||
#endif
|
||||
@@ -249,24 +254,20 @@ void cbSyncTime(struct timeval *tv) {
|
||||
#ifndef NUKI_HUB_UPDATER
|
||||
void startWebServer()
|
||||
{
|
||||
#ifdef CONFIG_SOC_SPIRAM_SUPPORTED
|
||||
bool failed = false;
|
||||
bool failed = true;
|
||||
|
||||
if (esp_psram_get_size() <= 0) {
|
||||
if (!nuki_hub_https_server_enabled) {
|
||||
Log->println("Not running on PSRAM enabled device");
|
||||
failed = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!SPIFFS.begin(true)) {
|
||||
Log->println("SPIFFS Mount Failed");
|
||||
failed = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
File file = SPIFFS.open("/http_ssl.crt");
|
||||
if (!file || file.isDirectory()) {
|
||||
failed = true;
|
||||
Log->println("http_ssl.crt not found");
|
||||
}
|
||||
else
|
||||
@@ -281,7 +282,6 @@ void startWebServer()
|
||||
|
||||
File file2 = SPIFFS.open("/http_ssl.key");
|
||||
if (!file2 || file2.isDirectory()) {
|
||||
failed = true;
|
||||
Log->println("http_ssl.key not found");
|
||||
}
|
||||
else
|
||||
@@ -319,6 +319,7 @@ void startWebServer()
|
||||
});
|
||||
psychicSSLServer->begin();
|
||||
webSSLStarted = true;
|
||||
failed = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -326,7 +327,6 @@ void startWebServer()
|
||||
|
||||
if (failed)
|
||||
{
|
||||
#endif
|
||||
psychicServer = new PsychicHttpServer;
|
||||
psychicServer->config.stack_size = HTTPD_TASK_SIZE;
|
||||
webCfgServer = new WebCfgServer(nuki, nukiOpener, network, gpio, preferences, network->networkDeviceType() == NetworkDeviceType::WiFi, partitionType, psychicServer, importExport);
|
||||
@@ -336,9 +336,7 @@ void startWebServer()
|
||||
});
|
||||
psychicServer->begin();
|
||||
webStarted = true;
|
||||
#ifdef CONFIG_SOC_SPIRAM_SUPPORTED
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void startNuki(bool lock)
|
||||
@@ -1042,6 +1040,15 @@ void logCoreDump()
|
||||
|
||||
void setup()
|
||||
{
|
||||
#ifdef CONFIG_SOC_SPIRAM_SUPPORTED
|
||||
#ifndef FORCE_NUKI_HUB_HTTPS_SERVER
|
||||
if(esp_psram_get_size() <= 0)
|
||||
{
|
||||
nuki_hub_https_server_enabled = false;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//Set Log level to error for all TAGS
|
||||
esp_log_level_set("*", ESP_LOG_ERROR);
|
||||
//Set Log level to none for mqtt TAG
|
||||
@@ -1051,7 +1058,6 @@ void setup()
|
||||
Log = &Serial;
|
||||
|
||||
#if !defined(NUKI_HUB_UPDATER) && !defined(CONFIG_IDF_TARGET_ESP32C5)
|
||||
//
|
||||
stdout = funopen(NULL, NULL, &write_fn, NULL, NULL);
|
||||
static char linebuf[1024];
|
||||
setvbuf(stdout, linebuf, _IOLBF, sizeof(linebuf));
|
||||
@@ -1121,24 +1127,20 @@ void setup()
|
||||
|
||||
if(!doOta)
|
||||
{
|
||||
#ifdef CONFIG_SOC_SPIRAM_SUPPORTED
|
||||
bool failed = false;
|
||||
bool failed = true;
|
||||
|
||||
if (esp_psram_get_size() <= 0) {
|
||||
Log->println("Not running on PSRAM enabled device");
|
||||
failed = true;
|
||||
if (!nuki_hub_https_server_enabled) {
|
||||
Log->println("Not running on HTTPS server enabled device");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!SPIFFS.begin(true)) {
|
||||
Log->println("SPIFFS Mount Failed");
|
||||
failed = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
File file = SPIFFS.open("/http_ssl.crt");
|
||||
if (!file || file.isDirectory()) {
|
||||
failed = true;
|
||||
Log->println("http_ssl.crt not found");
|
||||
}
|
||||
else
|
||||
@@ -1153,7 +1155,6 @@ void setup()
|
||||
|
||||
File file2 = SPIFFS.open("/http_ssl.key");
|
||||
if (!file2 || file2.isDirectory()) {
|
||||
failed = true;
|
||||
Log->println("http_ssl.key not found");
|
||||
}
|
||||
else
|
||||
@@ -1191,6 +1192,7 @@ void setup()
|
||||
});
|
||||
psychicSSLServer->begin();
|
||||
webSSLStarted = true;
|
||||
failed = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1198,7 +1200,6 @@ void setup()
|
||||
|
||||
if (failed)
|
||||
{
|
||||
#endif
|
||||
psychicServer = new PsychicHttpServer;
|
||||
psychicServer->config.stack_size = HTTPD_TASK_SIZE;
|
||||
webCfgServer = new WebCfgServer(network, preferences, network->networkDeviceType() == NetworkDeviceType::WiFi, partitionType, psychicServer, importExport);
|
||||
@@ -1208,9 +1209,7 @@ void setup()
|
||||
});
|
||||
psychicServer->begin();
|
||||
webStarted = true;
|
||||
#ifdef CONFIG_SOC_SPIRAM_SUPPORTED
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
if(preferences->getBool(preference_enable_bootloop_reset, false))
|
||||
|
||||
@@ -7,20 +7,9 @@
|
||||
#include "SPIFFS.h"
|
||||
#include "../MqttTopics.h"
|
||||
#include "PreferencesKeys.h"
|
||||
#ifdef CONFIG_SOC_SPIRAM_SUPPORTED
|
||||
#include "esp_psram.h"
|
||||
#endif
|
||||
|
||||
void NetworkDevice::init()
|
||||
{
|
||||
#ifdef CONFIG_SOC_SPIRAM_SUPPORTED
|
||||
if(esp_psram_get_size() > 0)
|
||||
{
|
||||
//_mqttInternal = true;
|
||||
_mqttInternal = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
if(_preferences->getBool(preference_mqtt_ssl_enabled, false)) {
|
||||
if (!SPIFFS.begin(true)) {
|
||||
Log->println("SPIFFS Mount Failed");
|
||||
|
||||
@@ -66,6 +66,9 @@ extra_scripts =
|
||||
post:pio_package_post.py
|
||||
board_build.cmake_extra_args =
|
||||
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.defaults.esp32"
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
-DNUKI_HUB_HTTPS_SERVER
|
||||
|
||||
[env:updater_esp32-gl-s10]
|
||||
extends = env:updater_esp32
|
||||
@@ -73,12 +76,14 @@ board = nuki-esp32gls10
|
||||
board_build.cmake_extra_args =
|
||||
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.defaults.esp32;sdkconfig.gls10.defaults"
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
${env:updater_esp32.build_flags}
|
||||
-DNUKI_TARGET_GL_S10=y
|
||||
|
||||
[env:updater_esp32-c3]
|
||||
extends = env:updater_esp32
|
||||
board = esp32-c3-devkitc-02
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
|
||||
[env:updater_esp32-s3]
|
||||
extends = env:updater_esp32
|
||||
@@ -95,10 +100,13 @@ board_build.cmake_extra_args =
|
||||
[env:updater_esp32-c6]
|
||||
extends = env:updater_esp32
|
||||
board = esp32-c6-devkitm-1
|
||||
build_flags =
|
||||
${env:updater_esp32.build_flags}
|
||||
-DFORCE_NUKI_HUB_HTTPS_SERVER
|
||||
|
||||
[env:updater_esp32-c5]
|
||||
board_build.partitions = partitions_c5.csv
|
||||
extends = env:updater_esp32
|
||||
board_build.partitions = partitions_c5.csv
|
||||
board = nuki-esp32-c5
|
||||
board_build.cmake_extra_args =
|
||||
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.defaults.esp32-c5"
|
||||
@@ -109,18 +117,19 @@ board_build.embed_txtfiles =
|
||||
board = esp32-p4
|
||||
board_build.cmake_extra_args =
|
||||
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.defaults.esp32-p4"
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE
|
||||
|
||||
[env:updater_esp32-h2]
|
||||
extends = env:updater_esp32
|
||||
board = esp32-h2-devkitm-1
|
||||
board_build.cmake_extra_args =
|
||||
-DNUKI_TARGET_H2=y
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
|
||||
[env:updater_esp32-solo1]
|
||||
extends = env:updater_esp32
|
||||
board = nuki-esp32solo1
|
||||
board_build.cmake_extra_args =
|
||||
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.defaults.esp32-solo1"
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
Reference in New Issue
Block a user