diff --git a/environments.ini b/environments.ini index a330d88..5e363e5 100644 --- a/environments.ini +++ b/environments.ini @@ -117,6 +117,7 @@ build_flags = '-DDEEP_SLEEP_IN_US=120000000' ; Deep sleep for a period of time to conserve battery '-DESP32_EXT0_WAKE_PIN=GPIO_NUM_14' ;Should a water leak be detected immediatly wake the ESP32 and report the problem '-DESP32_EXT0_WAKE_PIN_STATE=0' ;Should a water leak be detected immediatly wake the ESP32 and report the problem, sensor state to look for wakeup + '-UMQTT_HTTPS_FW_UPDATE' ;disable HTTPS firmware updating [env:esp32dev-rf] platform = ${com.esp32_platform} board = esp32dev diff --git a/main/ZwebUI.ino b/main/ZwebUI.ino index 0d88558..8268cbf 100644 --- a/main/ZwebUI.ino +++ b/main/ZwebUI.ino @@ -1056,6 +1056,7 @@ void handleIN() { } } +# if defined(ESP32) && defined(MQTT_HTTPS_FW_UPDATE) /** * @brief /UP - Firmware Upgrade Page * @@ -1121,6 +1122,7 @@ void handleUP() { response += String(buffer); server.send(200, "text/html", response); } +# endif void sendRestartPage() { char jsonChar[100]; @@ -1257,8 +1259,9 @@ void WebUISetup() { server.on("/in", handleIN); // Information server.on("/cs", handleCS); // Console +# if defined(ESP32) && defined(MQTT_HTTPS_FW_UPDATE) server.on("/up", handleUP); // Firmware Upgrade - +# endif server.on("/cn", handleCN); // Configuration server.on("/wi", handleWI); // Configure Wifi server.on("/mq", handleMQ); // Configure MQTT diff --git a/main/config_WebContent.h b/main/config_WebContent.h index 64796d0..ef0f010 100644 --- a/main/config_WebContent.h +++ b/main/config_WebContent.h @@ -34,8 +34,11 @@ #define body_footer_config_menu "

" #define body_header "

%s

%s

" -#define button_upgrade "

" - +#if defined(ESP32) && defined(MQTT_HTTPS_FW_UPDATE) +# define button_upgrade "

" +#else +# define button_upgrade "" +#endif // Configuration Menu #define configure_1 "

"