From 6326578cd6756b8a94244bcf622611cac4c20960 Mon Sep 17 00:00:00 2001 From: Mario Mariete <11509521+melkati@users.noreply.github.com> Date: Thu, 16 May 2024 21:14:59 +0200 Subject: [PATCH 01/15] feat: Add support for captive portal --- CO2_Gadget.ino | 8 +++++++ CO2_Gadget_WIFI.h | 56 +++++++++++++++++++++++++++++++++++++++++++++++ platformio.ini | 3 ++- 3 files changed, 66 insertions(+), 1 deletion(-) diff --git a/CO2_Gadget.ino b/CO2_Gadget.ino index cbf19e11..5762c815 100644 --- a/CO2_Gadget.ino +++ b/CO2_Gadget.ino @@ -145,6 +145,9 @@ uint16_t timeToWaitForImprov = 0; // Time in seconds to wait for improv serial #endif // #include #include +#ifdef SUPPORT_CAPTIVE_PORTAL +#include +#endif #include #include "AsyncJson.h" @@ -590,6 +593,10 @@ void setup() { Serial.println(""); printLargeASCII(WiFi.localIP().toString().c_str()); Serial.println(""); + } else { +#ifdef SUPPORT_CAPTIVE_PORTAL + initCaptivePortal(); +#endif } initImprov(); if (timeToWaitForImprov > 0) { @@ -608,6 +615,7 @@ void loop() { utilityLoop(); improvLoop(); wifiClientLoop(); + wifiCaptivePortalLoop(); mqttClientLoop(); sensorsLoop(); outputsLoop(); diff --git a/CO2_Gadget_WIFI.h b/CO2_Gadget_WIFI.h index 7ecff2b2..4319ba5d 100644 --- a/CO2_Gadget_WIFI.h +++ b/CO2_Gadget_WIFI.h @@ -14,6 +14,10 @@ #include "credentials.h" #endif +#ifdef SUPPORT_CAPTIVE_PORTAL +DNSServer dnsServer; +#endif + WiFiClient espClient; AsyncWebServer server(80); @@ -1107,6 +1111,58 @@ void initWifi() { } } +#ifdef SUPPORT_CAPTIVE_PORTAL +class CaptiveRequestHandler : public AsyncWebHandler { + public: + CaptiveRequestHandler() { + initWebServer(); + } + + virtual ~CaptiveRequestHandler() {} + + bool canHandle(AsyncWebServerRequest *request) { + // request->addInterestingHeader("ANY"); + return true; + } + + void handleRequest(AsyncWebServerRequest *request) { + AsyncResponseStream *response = request->beginResponseStream("text/html"); + response->print("Captive Portal"); + response->print("

This is out captive portal front page.

"); + response->printf("

You were trying to reach: http://%s%s

", request->host().c_str(), request->url().c_str()); + response->printf("

Try opening this link instead

", WiFi.softAPIP().toString().c_str()); + response->print(""); + request->send(response); + } +}; + +static const void initCaptivePortal() { + if (WiFi.status() == WL_CONNECTED) { + Serial.println("-->[WiFi] Already connected to Wi-Fi"); + return; + } else { + Serial.println("-->[WiFi] Not connected to Wi-Fi. Starting captive portal"); + } + WiFi.softAP("CO2-Gadget", NULL); // SSID, password + dnsServer.start(53, "*", WiFi.softAPIP()); + server.end(); + delay(100); + // initWebServer(); + server.addHandler(new CaptiveRequestHandler()).setFilter(ON_AP_FILTER); // only when requested from AP + + server.begin(); + // Print IP Adrress + Serial.print("-->[WiFi] AP IP address: "); + Serial.println(WiFi.softAPIP()); +} +#endif // SUPPORT_CAPTIVE_PORTAL + +void wifiCaptivePortalLoop() { +#ifdef SUPPORT_CAPTIVE_PORTAL + dnsServer.processNextRequest(); +#endif +} + void wifiClientLoop() { if (isDownloadingBLE) return; if (activeWIFI && troubledWIFI && (millis() - timeTroubledWIFI >= timeToRetryTroubledWIFI * 1000)) { diff --git a/platformio.ini b/platformio.ini index fda7e5bf..7eee75c3 100644 --- a/platformio.ini +++ b/platformio.ini @@ -10,7 +10,7 @@ extra_configs = platformio_extra_configs.ini [version] build_flags = -D CO2_GADGET_VERSION="\"0.12."\" - -D CO2_GADGET_REV="\"072-development"\" + -D CO2_GADGET_REV="\"072-development-feature-captive-portal"\" ;**************************************************************************************** ;*** This is deprecated. It's here only for backward compatibility. @@ -85,6 +85,7 @@ build_flags = -DSUPPORT_MQTT -DSUPPORT_MQTT_DISCOVERY -DSUPPORT_OTA + -DSUPPORT_CAPTIVE_PORTAL ;**************************************************************************************** ;*** You can dissable debug by commenting the line with a semicolon at the beginning From 52099a3fd652b824c440cfa4e9c6fe483995af9c Mon Sep 17 00:00:00 2001 From: Mario Mariete <11509521+melkati@users.noreply.github.com> Date: Fri, 17 May 2024 19:52:25 +0200 Subject: [PATCH 02/15] Fix captive portal support --- CO2_Gadget.ino | 10 ++++++++-- CO2_Gadget_EINK.h | 5 +++++ CO2_Gadget_TFT.h | 6 ++++++ CO2_Gadget_WIFI.h | 37 +++++++++++++++++++++++++++++++------ platformio.ini | 4 ++-- 5 files changed, 52 insertions(+), 10 deletions(-) diff --git a/CO2_Gadget.ino b/CO2_Gadget.ino index 5762c815..e99c431b 100644 --- a/CO2_Gadget.ino +++ b/CO2_Gadget.ino @@ -124,6 +124,13 @@ uint16_t co2RedRange = 1000; bool waitingForImprov = true; uint16_t timeToWaitForImprov = 0; // Time in seconds to wait for improv serial +// Variables for Captive Portal +#ifdef SUPPORT_CAPTIVE_PORTAL +bool captivePortalActive = false; +uint16_t timeToWaitForCaptivePortal = 60; // Time in seconds to wait for captive portal +#endif + + #ifdef CUSTOM_I2C_SDA #undef I2C_SDA #define I2C_SDA CUSTOM_I2C_SDA @@ -612,10 +619,9 @@ void setup() { void loop() { batteryLoop(); - utilityLoop(); + // utilityLoop(); improvLoop(); wifiClientLoop(); - wifiCaptivePortalLoop(); mqttClientLoop(); sensorsLoop(); outputsLoop(); diff --git a/CO2_Gadget_EINK.h b/CO2_Gadget_EINK.h index ded83446..651f9f5b 100644 --- a/CO2_Gadget_EINK.h +++ b/CO2_Gadget_EINK.h @@ -557,6 +557,11 @@ void showBLEIcon(int32_t posX, int32_t posY, bool forceRedraw) { void showWiFiIcon(int32_t posX, int32_t posY, bool forceRedraw) { display.fillRect(posX, posY, 16, 16, GxEPD_WHITE); + // If captivePortalActive = true; draw a circle instead of the WiFi icon + if (captivePortalActive) { + display.drawCircle(posX + 8, posY + 8, 6, GxEPD_BLACK); + return; + } int8_t rssi = WiFi.RSSI(); if (troubledWIFI) { display.drawBitmap(posX, posY, iconWiFi, 16, 16, GxEPD_BLACK); diff --git a/CO2_Gadget_TFT.h b/CO2_Gadget_TFT.h index 8575d7fd..fc344790 100644 --- a/CO2_Gadget_TFT.h +++ b/CO2_Gadget_TFT.h @@ -437,6 +437,12 @@ void showBatteryIcon(int32_t posX, int32_t posY, bool forceRedraw) { // For TTG } void showWiFiIcon(int32_t posX, int32_t posY, bool forceRedraw) { + // If captivePortalActive = true; draw a white circle instead of the WiFi icon + if (captivePortalActive) { + tft.drawRoundRect(posX - 2, posY - 2, 16 + 4, 16 + 4, 2, TFT_DARKGREY); + tft.fillCircle(posX + 8, posY + 8, 6, TFT_WHITE); + return; + } int8_t rssi = WiFi.RSSI(); if (troubledWIFI) { tft.drawRoundRect(posX - 2, posY - 2, 16 + 4, 16 + 4, 2, TFT_RED); diff --git a/CO2_Gadget_WIFI.h b/CO2_Gadget_WIFI.h index 4319ba5d..0e087430 100644 --- a/CO2_Gadget_WIFI.h +++ b/CO2_Gadget_WIFI.h @@ -687,6 +687,7 @@ void WiFiStationGotIP(WiFiEvent_t event, WiFiEventInfo_t info) { } void WiFiStationDisconnected(WiFiEvent_t event, WiFiEventInfo_t info) { + if (captivePortalActive) return; ++WiFiConnectionRetries; Serial.println("-->[WiFi] Disconnected from WiFi access point. Reason: " + getWiFiDisconnectReason(info.wifi_sta_disconnected.reason) + " (" + String(info.wifi_sta_disconnected.reason) + ") Retries: " + String(WiFiConnectionRetries) + " of " + String(maxWiFiConnectionRetries)); #ifdef DEBUG_WIFI_EVENTS @@ -1090,6 +1091,8 @@ void initOTA() { } void initWifi() { + if (captivePortalActive) return; + if (wifiSSID == "") { activeWIFI = false; } @@ -1115,7 +1118,8 @@ void initWifi() { class CaptiveRequestHandler : public AsyncWebHandler { public: CaptiveRequestHandler() { - initWebServer(); + // initWebServer(); + Serial.println("-->[WiFi] Captive portal started"); } virtual ~CaptiveRequestHandler() {} @@ -1133,6 +1137,7 @@ class CaptiveRequestHandler : public AsyncWebHandler { response->printf("

Try opening this link instead

", WiFi.softAPIP().toString().c_str()); response->print(""); request->send(response); + Serial.println("-->[WiFi] Captive portal request"); } }; @@ -1141,29 +1146,46 @@ static const void initCaptivePortal() { Serial.println("-->[WiFi] Already connected to Wi-Fi"); return; } else { - Serial.println("-->[WiFi] Not connected to Wi-Fi. Starting captive portal"); + Serial.println("-->[WiFi] Not connected to Wi-Fi. Starting captive portal for " + String(timeToWaitForCaptivePortal) + " seconds"); } + WiFi.disconnect(true); + delay(20); WiFi.softAP("CO2-Gadget", NULL); // SSID, password dnsServer.start(53, "*", WiFi.softAPIP()); server.end(); - delay(100); - // initWebServer(); + delay(20); + initWebServer(); server.addHandler(new CaptiveRequestHandler()).setFilter(ON_AP_FILTER); // only when requested from AP server.begin(); - // Print IP Adrress + delay(100); Serial.print("-->[WiFi] AP IP address: "); Serial.println(WiFi.softAPIP()); + captivePortalActive = true; } #endif // SUPPORT_CAPTIVE_PORTAL void wifiCaptivePortalLoop() { #ifdef SUPPORT_CAPTIVE_PORTAL - dnsServer.processNextRequest(); + if (captivePortalActive) { + dnsServer.processNextRequest(); + // int connectedStations = WiFi.softAPgetStationNum(); + // Serial.println("-->[WiFi] Captive portal active. Connected stations: " + String(connectedStations)); + if (millis() > timeInitializationCompleted + timeToWaitForCaptivePortal * 1000) { + captivePortalActive = false; + Serial.println("-->[WiFi] Captive portal timeout. Disabling captive portal"); + } + } #endif } void wifiClientLoop() { +#ifdef SUPPORT_CAPTIVE_PORTAL + if (captivePortalActive) { + wifiCaptivePortalLoop(); + return; + } +#endif if (isDownloadingBLE) return; if (activeWIFI && troubledWIFI && (millis() - timeTroubledWIFI >= timeToRetryTroubledWIFI * 1000)) { initWifi(); @@ -1191,6 +1213,9 @@ void wifiClientLoop() { void OTALoop() { #ifdef SUPPORT_OTA +#ifdef SUPPORT_CAPTIVE_PORTAL + if (captivePortalActive) return; +#endif if (isDownloadingBLE) return; if ((activeWIFI) && (activeOTA) && (!troubledWIFI) && (WiFi.status() == WL_CONNECTED)) { AsyncElegantOTA.loop(); diff --git a/platformio.ini b/platformio.ini index 7eee75c3..ef99ff41 100644 --- a/platformio.ini +++ b/platformio.ini @@ -53,8 +53,8 @@ build_flags = ;**************************************************************************************** [HISTORY] build_flags = - -DHISTORY_INTERVAL_MILISECONDS=60000 ; Interval in miliseconds to save history data for MyAmbiance (60000 = 1 minute) - -DHISTORY_RING_BUFFER_SIZE_BYTES=11520 ; Number of samples to keep in history for MyAmbiance. Try to save memory by using just what you need (recommended < 20000 for boards without PSRAM). 11520 bytes = 24 hours of data with 1 minute interval (each sample is 8 bytes) + -DHISTORY_INTERVAL_MILISECONDS=60000 ; Interval in miliseconds to save history data for MyAmbiance (60000 = 1 minute) + -DHISTORY_RING_BUFFER_SIZE_BYTES=11520 ; Number of samples to keep in history for MyAmbiance. Try to save memory by using just what you need (recommended < 20000 for boards without PSRAM). 11520 bytes = 24 hours of data with 1 minute interval (each sample is 8 bytes) ;**************************************************************************************** ;*** GPIO configuration. You override this in the environment specific data below From 581a3e1bf5ef0054824403cd8e85080703430067 Mon Sep 17 00:00:00 2001 From: Mario Mariete <11509521+melkati@users.noreply.github.com> Date: Sun, 19 May 2024 11:39:25 +0200 Subject: [PATCH 03/15] feat: Redirect captive portal requests to /index.html --- CO2_Gadget_WIFI.h | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/CO2_Gadget_WIFI.h b/CO2_Gadget_WIFI.h index 0e087430..66166894 100644 --- a/CO2_Gadget_WIFI.h +++ b/CO2_Gadget_WIFI.h @@ -1130,15 +1130,20 @@ class CaptiveRequestHandler : public AsyncWebHandler { } void handleRequest(AsyncWebServerRequest *request) { - AsyncResponseStream *response = request->beginResponseStream("text/html"); - response->print("Captive Portal"); - response->print("

This is out captive portal front page.

"); - response->printf("

You were trying to reach: http://%s%s

", request->host().c_str(), request->url().c_str()); - response->printf("

Try opening this link instead

", WiFi.softAPIP().toString().c_str()); - response->print(""); - request->send(response); - Serial.println("-->[WiFi] Captive portal request"); + request->redirect("/index.html"); + Serial.println("-->[WiFi] Captive portal request redirected to /index.html"); } + + // void handleRequest(AsyncWebServerRequest *request) { + // AsyncResponseStream *response = request->beginResponseStream("text/html"); + // response->print("Captive Portal"); + // response->print("

This is out captive portal front page.

"); + // response->printf("

You were trying to reach: http://%s%s

", request->host().c_str(), request->url().c_str()); + // response->printf("

Try opening this link instead

", WiFi.softAPIP().toString().c_str()); + // response->print(""); + // request->send(response); + // Serial.println("-->[WiFi] Captive portal request"); + // } }; static const void initCaptivePortal() { From 8743a45f76484e6b1d1aff83747a3990d3825c05 Mon Sep 17 00:00:00 2001 From: Mario Mariete <11509521+melkati@users.noreply.github.com> Date: Sun, 19 May 2024 12:25:55 +0200 Subject: [PATCH 04/15] feat: Update captive portal redirection to /index.html --- CO2_Gadget_WIFI.h | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/CO2_Gadget_WIFI.h b/CO2_Gadget_WIFI.h index 66166894..c976622a 100644 --- a/CO2_Gadget_WIFI.h +++ b/CO2_Gadget_WIFI.h @@ -818,10 +818,15 @@ void initWebServer() { }); server.on("/preferences.html", HTTP_GET, [](AsyncWebServerRequest *request) { - /** GZIPPED CONTENT ***/ - AsyncWebServerResponse *response = request->beginResponse(SPIFFS, "/preferences.html.gz", "text/html"); - response->addHeader("Content-Encoding", "gzip"); - request->send(response); + if (captivePortalActive && !request->hasParam("relaxedSecurity")) { + // Redirigir a preferences.html con el parámetro ?relaxedSecurity + request->redirect("/preferences.html?relaxedSecurity"); + } else { + // Servir la página preferences.html sin el parámetro + AsyncWebServerResponse *response = request->beginResponse(SPIFFS, "/preferences.html.gz", "text/html"); + response->addHeader("Content-Encoding", "gzip"); + request->send(response); + } }); server.on("/status.html", HTTP_GET, [](AsyncWebServerRequest *request) { @@ -1119,7 +1124,7 @@ class CaptiveRequestHandler : public AsyncWebHandler { public: CaptiveRequestHandler() { // initWebServer(); - Serial.println("-->[WiFi] Captive portal started"); + Serial.println("-->[WiFi] CAPTIVE PORTAL STARTED"); } virtual ~CaptiveRequestHandler() {} @@ -1134,6 +1139,11 @@ class CaptiveRequestHandler : public AsyncWebHandler { Serial.println("-->[WiFi] Captive portal request redirected to /index.html"); } + // void handleRequest(AsyncWebServerRequest *request) { + // request->redirect("/index.html"); + // Serial.println("-->[WiFi] Captive portal request redirected to /index.html"); + // } + // void handleRequest(AsyncWebServerRequest *request) { // AsyncResponseStream *response = request->beginResponseStream("text/html"); // response->print("Captive Portal"); @@ -1151,7 +1161,7 @@ static const void initCaptivePortal() { Serial.println("-->[WiFi] Already connected to Wi-Fi"); return; } else { - Serial.println("-->[WiFi] Not connected to Wi-Fi. Starting captive portal for " + String(timeToWaitForCaptivePortal) + " seconds"); + Serial.println("-->[WiFi] NOT CONNECTED TO WI-FI. STARTING CAPTIVE PORTAL FOR " + String(timeToWaitForCaptivePortal) + " SECONDS"); } WiFi.disconnect(true); delay(20); From 249604790c1d463d8a23e5452b467b887dea2dee Mon Sep 17 00:00:00 2001 From: Mario Mariete <11509521+melkati@users.noreply.github.com> Date: Sun, 19 May 2024 20:21:30 +0200 Subject: [PATCH 05/15] CO2 Gadget Beta v0.12.075-development --- platformio.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index e897ce54..efb066f7 100644 --- a/platformio.ini +++ b/platformio.ini @@ -10,7 +10,7 @@ extra_configs = platformio_extra_configs.ini [version] build_flags = -D CO2_GADGET_VERSION="\"0.12."\" - -D CO2_GADGET_REV="\"073-development-feature-captive-portal"\" + -D CO2_GADGET_REV="\"075-development"\" ;**************************************************************************************** ;*** This is deprecated. It's here only for backward compatibility. @@ -300,7 +300,6 @@ lib_deps = build_flags = ${common_env_data.build_flags} ${TTGO_TDISPLAY.build_flags} - -DHISTORY_INTERVAL_MILISECONDS=10000 ; Interval in miliseconds to save history data for MyAmbiance (10000 = 10 seconds) -DCUSTOM_I2C_SDA=22 ; Override default pin for I2C SDA (for sandwich build) -DCUSTOM_I2C_SCL=21 ; Override default pin for I2C SCL (for sandwich build) -DUNITHOSTNAME="\"CO2-Gadget-S"\" From 5819d5aa93436cdeea4ad1231acf27fb800c4602 Mon Sep 17 00:00:00 2001 From: Mario Mariete <11509521+melkati@users.noreply.github.com> Date: Sun, 19 May 2024 20:55:35 +0200 Subject: [PATCH 06/15] CO2 Gadget Beta v0.12.075-development Fixes font includes for some enviroments --- CO2_Gadget_EINK.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CO2_Gadget_EINK.h b/CO2_Gadget_EINK.h index 51d41b6f..7c9b0fa2 100644 --- a/CO2_Gadget_EINK.h +++ b/CO2_Gadget_EINK.h @@ -109,7 +109,7 @@ GxEPD2_BW display(GxEPD2_213_BN(EPD_CS, EP #endif #ifdef EINKBOARD_WEACT_GDEH0154D67 -#include +#include #include const GFXfont SmallFont = NotoSans_SemiCondensed_Bold10pt7b; const GFXfont BigFont = Digits_NotoSans_Bold38pt7b; From 4330f82bfd896468c773911a08101e99fb751fd6 Mon Sep 17 00:00:00 2001 From: Mario Mariete <11509521+melkati@users.noreply.github.com> Date: Mon, 20 May 2024 14:59:29 +0200 Subject: [PATCH 07/15] feat: Add support for setting fixed IP in WEB config --- CO2_Gadget.ino | 11 ++++-- CO2_Gadget_Menu.h | 2 + CO2_Gadget_Preferences.h | 55 +++++++++++++++++++++++++++ CO2_Gadget_WIFI.h | 25 +++++++++--- data/index.html.gz | Bin 1094 -> 1094 bytes data/ota.html.gz | Bin 480 -> 480 bytes data/preferences.html | 56 +++++++++++++++++++++++++++ data/preferences.html.gz | Bin 4249 -> 4521 bytes data/preferences.js | 26 +++++++++++++ data/preferences.js.gz | Bin 4483 -> 4657 bytes data/status.html | 80 ++++++++++++++++++++++++++++++++------- data/status.html.gz | Bin 2663 -> 2824 bytes 12 files changed, 233 insertions(+), 22 deletions(-) diff --git a/CO2_Gadget.ino b/CO2_Gadget.ino index e99c431b..ff065463 100644 --- a/CO2_Gadget.ino +++ b/CO2_Gadget.ino @@ -28,8 +28,8 @@ String mqttClientId = UNITHOSTNAME; String mqttBroker = MQTT_BROKER_SERVER; String mqttUser = ""; String mqttPass = ""; -String wifiSSID = WIFI_SSID_CREDENTIALS; -String wifiPass = WIFI_PW_CREDENTIALS; +String wifiSSID = ""; +String wifiPass = ""; String MACAddress = "Unset"; uint8_t peerESPNowAddress[] = ESPNOW_PEER_MAC_ADDRESS; @@ -45,6 +45,12 @@ uint64_t timeToRetryTroubledWIFI = 300; // Time in seconds to retry WIFI connec uint16_t WiFiConnectionRetries = 0; uint16_t maxWiFiConnectionRetries = 10; bool wifiChanged = false; +bool useStaticIP = false; // Set to true if you want to use a static IP +IPAddress staticIP(192, 168, 1, 199); // Change this to the desired IP +IPAddress gateway(192, 168, 1, 1); // Change this to your network's gateway +IPAddress subnet(255, 255, 255, 0); // Change this to your network's subnet mask +IPAddress dns1(8, 8, 8, 8); // Change this to your preferred DNS server +IPAddress dns2(8, 8, 4, 4); // Change this to your secondary DNS server // MQTT options bool activeMQTT = true; @@ -130,7 +136,6 @@ bool captivePortalActive = false; uint16_t timeToWaitForCaptivePortal = 60; // Time in seconds to wait for captive portal #endif - #ifdef CUSTOM_I2C_SDA #undef I2C_SDA #define I2C_SDA CUSTOM_I2C_SDA diff --git a/CO2_Gadget_Menu.h b/CO2_Gadget_Menu.h index 278bdafc..ba6f38af 100644 --- a/CO2_Gadget_Menu.h +++ b/CO2_Gadget_Menu.h @@ -381,6 +381,8 @@ MENU(wifiConfigMenu, "WIFI Config", doNothing, noEvent, wrapStyle #ifdef SUPPORT_OTA ,SUBMENU(activeOTAMenu) #endif + ,OP("Set fixed IP", doNothing, noEvent) + ,OP("in WEB config.", doNothing, noEvent) ,EXIT("[PREF] wifiPass:\t#" + wifiPass + "#"); #endif Serial.println("-->[PREF] hostName:\t#" + hostName + "#"); + + // Fixed IP + Serial.println("-->[PREF] useStaticIP:\t #" + String(useStaticIP) + "#"); + Serial.println("-->[PREF] staticIP:\t #" + staticIP.toString() + "#"); + Serial.println("-->[PREF] gateway:\t #" + gateway.toString() + "#"); + Serial.println("-->[PREF] subnet:\t #" + subnet.toString() + "#"); + Serial.println("-->[PREF] dns1:\t #" + dns1.toString() + "#"); + Serial.println("-->[PREF] dns2:\t #" + dns2.toString() + "#"); + Serial.println("-->[PREF] selCO2Sensor:\t #" + String(selectedCO2Sensor) + "#"); Serial.println("-->[PREF] debugSensors is:\t#" + String(debugSensors ? "Enabled" : "Disabled") + "# (" + String(debugSensors) + ")"); Serial.println("-->[PREF] displayReverse is:\t#" + String(displayReverse ? "Reversed" : "Normal") + "# (" + String(displayReverse) + ")"); @@ -218,6 +227,7 @@ void printPreferences() { Serial.println("-->[PREF] durationBuzzerBeep is:\t#" + String(durationBuzzerBeep) + "#"); Serial.println("-->[PREF] timeBetweenBuzzerBeeps is:\t#" + String(timeBetweenBuzzerBeeps) + "#"); + Serial.println(); delay(50); } @@ -287,6 +297,15 @@ void initPreferences() { wifiSSID = preferences.getString("wifiSSID", wifiSSID).c_str(); wifiPass = preferences.getString("wifiPass", wifiPass).c_str(); hostName = preferences.getString("hostName", hostName).c_str(); + + // Fixed IP + useStaticIP = preferences.getBool("useStaticIP", false); + staticIP.fromString(preferences.getString("staticIP", staticIP.toString()).c_str()); + gateway.fromString(preferences.getString("gateway", gateway.toString()).c_str()); + subnet.fromString(preferences.getString("subnet", subnet.toString()).c_str()); + dns1.fromString(preferences.getString("dns1", dns1.toString()).c_str()); + dns2.fromString(preferences.getString("dns2", dns2.toString()).c_str()); + selectedCO2Sensor = preferences.getUInt("selCO2Sensor", 0); debugSensors = preferences.getBool("debugSensors", false); displayReverse = preferences.getBool("displayReverse", false); @@ -392,6 +411,15 @@ void putPreferences() { preferences.putString("wifiSSID", wifiSSID); preferences.putString("wifiPass", wifiPass); preferences.putString("hostName", hostName); + + // Fixed IP + preferences.putBool("useStaticIP", useStaticIP); + preferences.putString("staticIP", staticIP.toString()); + preferences.putString("gateway", gateway.toString()); + preferences.putString("subnet", subnet.toString()); + preferences.putString("dns1", dns1.toString()); + preferences.putString("dns2", dns2.toString()); + preferences.putUInt("selCO2Sensor", selectedCO2Sensor); preferences.putBool("debugSensors", debugSensors); preferences.putBool("displayReverse", displayReverse); @@ -479,6 +507,15 @@ String getPreferencesAsJson() { doc["wifiSSID"] = preferences.getString("wifiSSID", wifiSSID); // doc["wifiPass"] = preferences.getString("wifiPass", wifiPass); doc["hostName"] = preferences.getString("hostName", hostName); + + // Fixed IP + doc["useStaticIP"] = preferences.getBool("useStaticIP", false); + doc["staticIP"] = preferences.getString("staticIP", staticIP.toString()); + doc["gateway"] = preferences.getString("gateway", gateway.toString()); + doc["subnet"] = preferences.getString("subnet", subnet.toString()); + doc["dns1"] = preferences.getString("dns1", dns1.toString()); + doc["dns2"] = preferences.getString("dns2", dns2.toString()); + doc["selCO2Sensor"] = preferences.getInt("selCO2Sensor", 0); doc["debugSensors"] = preferences.getBool("debugSensors", false); doc["displayReverse"] = preferences.getBool("displayReverse", false); @@ -556,6 +593,15 @@ String getActualSettingsAsJson(bool includePasswords = false) { doc["wifiPass"] = wifiPass; } doc["hostName"] = hostName; + + // Fixed IP + doc["useStaticIP"] = useStaticIP; + doc["staticIP"] = staticIP.toString(); + doc["gateway"] = gateway.toString(); + doc["subnet"] = subnet.toString(); + doc["dns1"] = dns1.toString(); + doc["dns2"] = dns2.toString(); + doc["selCO2Sensor"] = selectedCO2Sensor; doc["debugSensors"] = debugSensors; doc["displayReverse"] = displayReverse; @@ -653,6 +699,15 @@ bool handleSavePreferencesFromJSON(String jsonPreferences) { displayOffOnExternalPower = JsonDocument["dispOffOnExP"]; wifiSSID = JsonDocument["wifiSSID"].as().c_str(); hostName = JsonDocument["hostName"].as().c_str(); + + // Fixed IP + useStaticIP = JsonDocument["useStaticIP"]; + staticIP.fromString(JsonDocument["staticIP"].as()); + gateway.fromString(JsonDocument["gateway"].as()); + subnet.fromString(JsonDocument["subnet"].as()); + dns1.fromString(JsonDocument["dns1"].as()); + dns2.fromString(JsonDocument["dns2"].as()); + selectedCO2Sensor = JsonDocument["selCO2Sensor"]; debugSensors = JsonDocument["debugSensors"]; displayReverse = JsonDocument["displayReverse"]; diff --git a/CO2_Gadget_WIFI.h b/CO2_Gadget_WIFI.h index c976622a..401afd2e 100644 --- a/CO2_Gadget_WIFI.h +++ b/CO2_Gadget_WIFI.h @@ -9,11 +9,6 @@ /*****************************************************************************************************/ // clang-format on -#if !defined WIFI_SSID_CREDENTIALS || !defined WIFI_PW_CREDENTIALS -// If not using enviroment variables, you must have a credentials.h file -#include "credentials.h" -#endif - #ifdef SUPPORT_CAPTIVE_PORTAL DNSServer dnsServer; #endif @@ -729,6 +724,13 @@ String getCO2GadgetStatusAsJson() { doc["RSSI"] = WiFi.RSSI(); doc["MACAddress"] = MACAddress; doc["hostName"] = hostName; + doc["useStaticIP"] = useStaticIP; + doc["staticIP"] = staticIP.toString(); + doc["gateway"] = gateway.toString(); + doc["subnet"] = subnet.toString(); + doc["dns1"] = dns1.toString(); + doc["dns2"] = dns2.toString(); + #ifdef SUPPORT_MQTT doc["rootTopic"] = rootTopic; doc["discoveryTopic"] = discoveryTopic; @@ -1033,7 +1035,18 @@ bool connectToWiFi() { WiFi.disconnect(true); // disconnect form wifi to set new wifi connection delay(100); WiFi.mode(WIFI_STA); - WiFi.config(INADDR_NONE, INADDR_NONE, INADDR_NONE); + + if (useStaticIP) { + if (!WiFi.config(staticIP, gateway, subnet, dns1, dns2)) { + Serial.println("-->[WiFi] Failed to configure static IP and DNS"); + return false; + } + Serial.print("-->[WiFi] Configuring static IP: "); + Serial.println(staticIP); + } else { + WiFi.config(INADDR_NONE, INADDR_NONE, INADDR_NONE); // Use DHCP + } + WiFi.setHostname(hostName.c_str()); Serial.println("-->[WiFi] Setting hostname: " + hostName); #ifdef WIFI_PRIVACY diff --git a/data/index.html.gz b/data/index.html.gz index a0f6941a51008406abe0a38384dc1370dbcee96c..404e7b20d8cd900f7a5ed48fe697a7f326a7ea04 100644 GIT binary patch delta 16 XcmX@cag2jqzMF%?=Zn`yc6$~8EL;TR delta 16 XcmX@cag2jqzMF%Ci@|9lyFCj4B(4Lc diff --git a/data/ota.html.gz b/data/ota.html.gz index 3c88785c7a1729165e46728b7c0f2f862e6975cf..94ddb44c491cac5edc5cc3ae75ee0520aa77bca5 100644 GIT binary patch delta 16 XcmaFB{D7HVzMF%?=Zn`y_M40VFbxHy delta 16 XcmaFB{D7HVzMF$1lhbJ<`%OjwD=q}i diff --git a/data/preferences.html b/data/preferences.html index ce03c987..d327b486 100644 --- a/data/preferences.html +++ b/data/preferences.html @@ -106,6 +106,62 @@

CO2 Gadget Preferences

+
+ Fixed IP + +
+ + +
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+ +
+
+ diff --git a/data/preferences.html.gz b/data/preferences.html.gz index cba6e8eadb72d47e05fd8a888c5969f10d9feb6d..ae05af76783a6461b215b1fc621e8b1091a01227 100644 GIT binary patch literal 4521 zcmV;a5mxRWiwFpVMoVS@0B~|;W@U0^ZewM0E@*UZYyj0=-E!l)k-kq=-T~oF=F}d` zKa)wN&RR;@p7D$;>VG1SLwO zMA_83rbc8FY&5z*G#U+%JpIkV0hve{r#~DX&StaTH|{^mdCwQq!x0ae6yt9^CI<(D zU;paYzdHTR`hK+nWV&@&?IHD@BR32 zdGH6XbSvRrXHCjY}EI9hpJ3Zkq#|~)K7RUNx()dac}&Y zK2d$mBWdE}?Qw#ISmd*`_jBqEP7ief%Sv(?vcbj83HeBaF_Yv%L?b@V5-PcfP7n2U z(A1$(6&wylFt_)kO}@}4K33()kS5vy>SDm3h#%54?Ryb@f@@X>>MAvDhj7P;Q!=I z5q_w?Q{By@IFknU{)G9DL-Fh>RXEH{XLZ@HVVTA>vX+rTgp$Vx98Ba5{`uE`{Oj+3 zgI)tAHsyeQ5^y#VSr`yGVMKcf^c$!{A_bx3Cw|FE#Nvz^H;Ku$)eoWcw zit%s8fyF(GQl7vKzfH;Y{A@bp6uKcfi(?`Z0+p~NUE7Qox9s(wA0E5`{@=#7ic873 zn(y9O7sXn%qc#-|EaWUrIgA031oNynueM!}T#ZO1B=QePz*9O58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k4Ee`_7GVo(-#Pn4`%w9d`GgP`j$q|*hHeS~4#G^C3;t}fmES6ob^Et()s?VO~ zas3w(iHQACX+XVPsO!N`5GvE^$4el*K2x*t&%JrUFGUQlQSXx1>w0z)eMU_CX2lq9 znEU!yj9SKxW$w4gI?x~ElJaKLChe-#=f+6LBjyU?eC`WV2b?HeERp_p**m!XL_j(L vzjK@Noh4^+pqYNuJk@vK%06S}(`4oh0HQzcroQ-wAI|$9k06W;c5eUxyf7rC diff --git a/data/preferences.js b/data/preferences.js index 291883a3..8333e75e 100644 --- a/data/preferences.js +++ b/data/preferences.js @@ -37,6 +37,24 @@ function populateFormWithPreferences(preferences) { if (getPreferencesDebug) console.log('Setting hostName to:', preferences.hostName); document.getElementById("hostName").value = preferences.hostName; + if (getPreferencesDebug) console.log('Setting useStaticIP to:', preferences.useStaticIP); + document.getElementById("useStaticIP").checked = preferences.useStaticIP; + + if (getPreferencesDebug) console.log('Setting staticIP to:', preferences.staticIP); + document.getElementById("staticIP").value = preferences.staticIP; + + if (getPreferencesDebug) console.log('Setting gateway to:', preferences.gateway); + document.getElementById("gateway").value = preferences.gateway; + + if (getPreferencesDebug) console.log('Setting subnet to:', preferences.subnet); + document.getElementById("subnet").value = preferences.subnet; + + if (getPreferencesDebug) console.log('Setting dns1 to:', preferences.dns1); + document.getElementById("dns1").value = preferences.dns1; + + if (getPreferencesDebug) console.log('Setting dns2 to:', preferences.dns2); + document.getElementById("dns2").value = preferences.dns2; + if (getPreferencesDebug) console.log('Setting selCO2Sensor to:', preferences.selCO2Sensor); document.getElementById("selCO2Sensor").value = preferences.selCO2Sensor; @@ -172,6 +190,7 @@ function populateFormWithPreferences(preferences) { toggle('activeWIFI', 'wifiNetworks'); toggle('activeMQTT', 'mqttConfig'); toggle('activeESPNOW', 'espNowConfig'); + toggle('useStaticIP', 'staticIPSettings'); } function loadPreferencesFromServer() { @@ -213,6 +232,12 @@ function collectPreferencesData() { dispOffOnExP: document.getElementById("dispOffOnExP").checked, wifiSSID: document.getElementById("wifiSSID").value, hostName: document.getElementById("hostName").value, + useStaticIP: document.getElementById("useStaticIP").checked, + staticIP: document.getElementById("staticIP").value, + gateway: document.getElementById("gateway").value, + subnet: document.getElementById("subnet").value, + dns1: document.getElementById("dns1").value, + dns2: document.getElementById("dns2").value, selCO2Sensor: document.getElementById("selCO2Sensor").value, debugSensors: document.getElementById("debugSensors").checked, displayReverse: document.getElementById("displayReverse").checked, @@ -464,4 +489,5 @@ document.addEventListener("DOMContentLoaded", function () { toggle('activeWIFI', 'wifiNetworks'); toggle('activeMQTT', 'mqttConfig'); toggle('activeESPNOW', 'espNowConfig'); + toggle('useStaticIP', 'staticIPSettings'); }); \ No newline at end of file diff --git a/data/preferences.js.gz b/data/preferences.js.gz index e037f0b83c5559d0b38482680ed3894eddb275d1..0438712076dd487bcf71df132e83c049e36902ed 100644 GIT binary patch literal 4657 zcmV-163*=(iwFpTMoVS@0B~|;W@U0^ZewM0E^2cC&0KA7+&Gf{9w7gL(^x=ltfxKW z!vcpGzQA_uiT9G&XFHh#27_I;#O~HuE%xZ8JDx%Q`&RKqBqdU6%UEFjA+c4(;=^K* zRVdR6CfmGT^=Em#$= z$d(l)K1lNgFV<8L7X@FFYQ>;~0_d+_Ep#){=8J4HJs^L+ensF%Je@{IOI9gbbRa4C zGXqKav|#0i=OrVj|3mcev)@V-)8SQ^t^pFV|7qy>1H<^dNod8$#mzDKi6+pkH4F*7 zqE%gzEX|qQIN@=%%O~oL9;d>v$c|miSG9Z)bRYteGF5VCyqaq^b z!Q{kf;G3=LnBuIlq5w#sWiYOiXKW@OOruNjT+D2mFMVe6CORa7`QQM$_=XnN*vW=( z>I|mn3YdRRtJQ767OY@-%*yG;{4Oj=LIUe2pj?ab9h=unP<>U@>;z~19$3(B(V+2{ zBrV0tNCYFVt4&==Vd;WQJ;DxbQ_|zj_;MP3;55NuTG()SHdLj?ZyGQFx>chTCWm?< zI~c3@t6(upx3ESn5xQj%odXF*TOlM08r`y=udl9Q%q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9$#IxZs}$q3gEq^#|EhwgBXWlwkyzFT3@m zoPzIKSs6)9oO@DVmZ^A7lD-&BY~Tu7QE>N_2s}N(otLNU416%Q%1f5bLXyE}NZFbf zDv+5O^Cfcwzw=$a@YMNgZ08Ns*q=ka2ek&=Tg$Wem!I@;hM%hg;QOKL4!enUZ;{(i zNw)RfU#>r@M*Yu5KIUb{A7MLIIWL)0TI6L~G#SLmvrdC{QHEE$CJxkVA3BFy`+dn^ Vb@=~x#rfXh{{m4^M;EnI008Ui*i8Tc diff --git a/data/status.html b/data/status.html index eb5d1825..a6c25e06 100644 --- a/data/status.html +++ b/data/status.html @@ -56,6 +56,24 @@

Host Name:
+
+ Use Static IP: +
+
+ Static IP: +
+
+ Gateway: +
+
+ Subnet: +
+
+ DNS1: +
+
+ DNS2: +
Root Topic:
@@ -210,6 +228,42 @@ document.getElementById('hostNameItem').style.display = 'none'; } + if (data.useStaticIP !== undefined) { + document.getElementById('useStaticIP').textContent = data.useStaticIP; + } else { + document.getElementById('useStaticIPItem').style.display = 'none'; + } + + if (data.staticIP !== undefined) { + document.getElementById('staticIP').textContent = data.staticIP; + } else { + document.getElementById('staticIPItem').style.display = 'none'; + } + + if (data.gateway !== undefined) { + document.getElementById('gateway').textContent = data.gateway; + } else { + document.getElementById('gatewayItem').style.display = 'none'; + } + + if (data.subnet !== undefined) { + document.getElementById('subnet').textContent = data.subnet; + } else { + document.getElementById('subnetItem').style.display = 'none'; + } + + if (data.dns1 !== undefined) { + document.getElementById('dns1').textContent = data.dns1; + } else { + document.getElementById('dns1Item').style.display = 'none'; + } + + if (data.dns2 !== undefined) { + document.getElementById('dns2').textContent = data.dns2; + } else { + document.getElementById('dns2Item').style.display = 'none'; + } + if (data.rootTopic !== undefined) { document.getElementById('rootTopic').textContent = data.rootTopic; } else { @@ -340,7 +394,7 @@ hours = hours - (days * 24); minutes = minutes - (days * 24 * 60) - (hours * 60); seconds = seconds - (days * 24 * 60 * 60) - (hours * 60 * 60) - (minutes * 60); - + document.getElementById('uptime').textContent = data.uptime; } else { @@ -377,18 +431,18 @@ xhttp.send(); } - function getMinFreeHeap() { - var xhttp = new XMLHttpRequest(); - xhttp.onreadystatechange = function () { - console.log(this.responseText); - if (this.readyState == 4 && this.status == 200) { - document.getElementById("minFreeHeap").innerHTML = - this.responseText; - } - }; - xhttp.open("GET", "getMinFreeHeap", true); - xhttp.send(); - } + function getMinFreeHeap() { + var xhttp = new XMLHttpRequest(); + xhttp.onreadystatechange = function () { + console.log(this.responseText); + if (this.readyState == 4 && this.status == 200) { + document.getElementById("minFreeHeap").innerHTML = + this.responseText; + } + }; + xhttp.open("GET", "getMinFreeHeap", true); + xhttp.send(); + } setInterval(function () { // Call a function repetatively with 1 Second interval diff --git a/data/status.html.gz b/data/status.html.gz index 19cb1e53c49ac41d6f14ba573ac8fef2f4a5918b..0d61588166b158f227fa40639b34722f15084bc6 100644 GIT binary patch literal 2824 zcmV+j3-|ONiwFpl2TNuE0CRLF1Hy+|?#5D_>Fn&d zmS_AKd&Y{jk&@kggh|LkLy;^2Nl`ob?|T6PB1D2pC<4=$>LFGL+=GL2FF_Ev(D|#A z6Ex>MV`qcGdcE%dLBr2{(+|_dU`AuY)0aPJhE7f{e*EFbAI@LhJY7%!H@*dvMGTkD z#a|TTkjBjGX=7d0Fe3L=roP6Pfkg)*Gb21wS{ei607nejI2dYEx^*N0;8d50t9CD2y>Lc`$VK3xE5Y^#>Rza%F~NSLZT zF0VA$Feyb*T{FQUrz;XDnHmgJj#VR1)625X`2e~kMX2^qd2FYHMsY#pgmSV75RHbx z0@LJ1x^+Tg5^@qfh%&=mLa+=c6^s}^6W}!=2}^UNtom6wA{w?UJ({&7_Ao}5QIr#Ab0W>U^2tH-mW)1t_bgllQdc$$9IDQ? zv`(sdt5yg_pwXtl087A-t_#(#R&3Ea=K9O4w;jMmO&#rxrc} z$pM?T(=lLUn~w>k&I4+i@@bkuM7A7N!4647+t{i>J8MN*n66;zatOs6ZQRIn7ryh; z;CIfiV+yY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Z7g~s8Rl6FZ1^0UB17Y`yOwKRWDTAA}p+3{KtCP3Z#ahrjrgpEC zJ`#5FG*?)5m2_zbPjlm>+`U4(b7?0-OoQ1q+7)*&*vvC~_bL@n#a&2MM6~Nwtm9s^ zYAS(y<;+uhC$p7-SF?vTYIHDTl`Qd3uQp`EoS7 zZh5(T!HW4eT`83%K{-=OpzTvily{|+PQmC(sf+t-cR~T!KAoVrE16U}QdcTH%+B4Z z1YrAAg5s`JQfX1{RWg&0oV*M-@a$TdH9B}5Udq$zPBB+Am5H}sv2JFoa>`hDim9AY zhnh*m{i?}2-RYL+uywFnt!9KdS+rJRYu2yTiXALt?fG@?)hyL`9gQrHGzX;oUYu&K? zI}jcNsGpTxomJjn{mHb1e}J;MB~gEVr3bka^rs4%4Klx{Nxat3J|Sv{hYSS!xRhn? zhh(1l>|`{yPwJG(gm1{>++|!sm(&;S)mQ1O>6RjLzl&ciflftagZ@3azlHyOCV#9* z%KK$cW>tqQ5@UTU2oZmQqh|uvyH=}>h|5f_Ol?rVO>r#&5i(NlhMfAPju4mqR z5GZbEogVyYWADx#64^z8071?@7LfuzRDS+YRyu zxL#b1-7hXjAt0{WFfhL$^TtRJ*IS}NT$V)Ta#V=R9vOxkYl0)Utptc_J-?BX-Rp+_ z9*>FD9u7l(#Pn%yWHS!3pmK6fnjQaO#0VrsS zPs=GnE17B!doW`5cSECqZ6IRBw+;43>3+U1g(Vv_JSANJVit@f*g~ghvmo+|EiqVU z-)~5BlU?xPAh=$`hkKgBx`iZt@9JTq7BTl=Ljv%#?aL7+on~m}7lt&->1g*ArPGo6 V<*n@JxWsRd{TFB)0+hK-003%EDLeoG From 40105751c88b6a974520f66733386df8e92c24b6 Mon Sep 17 00:00:00 2001 From: Mario Mariete <11509521+melkati@users.noreply.github.com> Date: Mon, 20 May 2024 15:00:47 +0200 Subject: [PATCH 08/15] CO2 Gadget Beta v0.12.076-development Remove obsolete defines: WIFI_SSID_CREDENTIALS and WIFI_PW_CREDENTIALS --- platformio.ini | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/platformio.ini b/platformio.ini index efb066f7..f40f8df0 100644 --- a/platformio.ini +++ b/platformio.ini @@ -10,19 +10,10 @@ extra_configs = platformio_extra_configs.ini [version] build_flags = -D CO2_GADGET_VERSION="\"0.12."\" - -D CO2_GADGET_REV="\"075-development"\" + -D CO2_GADGET_REV="\"076-development"\" ;**************************************************************************************** ;*** This is deprecated. It's here only for backward compatibility. -;*** You can set your credentials as you preffer: from the Easy Web Installer after -;*** installing, via BLE with MyAmbiance App or via Serial console. -;**************************************************************************************** -[credentials] -build_flags = - '-DWIFI_SSID_CREDENTIALS=""' - '-DWIFI_PW_CREDENTIALS=""' - -;**************************************************************************************** ;*** Default MQTT Broker and Discovery prefix for Home Assistant. You can set this ;*** directly in CO2 Gadget from the menu or the Web server. Don't need to set this here ;**************************************************************************************** @@ -32,6 +23,7 @@ build_flags = -DMQTT_DISCOVERY_PREFIX="\"homeassistant/\"" ; MQTT Discovery prefix for Home Assistant ;**************************************************************************************** +;*** This is deprecated. It's here only for backward compatibility. ;*** Default ESP-NOW configuration. You can set this directly in CO2 Gadget from the menu ;*** or the Web server. Don't need to set this here ;**************************************************************************************** @@ -146,7 +138,6 @@ lib_deps = ${LIBS.lib_deps} build_flags = ${version.build_flags} - ${credentials.build_flags} ${MQTT.build_flags} ${ESPNOW.build_flags} ${features.build_flags} @@ -157,7 +148,6 @@ build_flags = -Os ; Optimize compilation for use memory -w ; Supress compilation warnings - ;**************************************************************************************** ;*** Environment specific data. You can override the common data for each environment ;**************************************************************************************** From 444af72805c8c7ed11bc32ea0862e4d6262ed323 Mon Sep 17 00:00:00 2001 From: Mario Mariete <11509521+melkati@users.noreply.github.com> Date: Mon, 20 May 2024 15:04:03 +0200 Subject: [PATCH 09/15] Revert "feat: Add support for setting fixed IP in WEB config" This reverts commit 4330f82bfd896468c773911a08101e99fb751fd6. --- CO2_Gadget.ino | 11 ++---- CO2_Gadget_Menu.h | 2 - CO2_Gadget_Preferences.h | 55 --------------------------- CO2_Gadget_WIFI.h | 25 +++--------- data/index.html.gz | Bin 1094 -> 1094 bytes data/ota.html.gz | Bin 480 -> 480 bytes data/preferences.html | 56 --------------------------- data/preferences.html.gz | Bin 4521 -> 4249 bytes data/preferences.js | 26 ------------- data/preferences.js.gz | Bin 4657 -> 4483 bytes data/status.html | 80 +++++++-------------------------------- data/status.html.gz | Bin 2824 -> 2663 bytes 12 files changed, 22 insertions(+), 233 deletions(-) diff --git a/CO2_Gadget.ino b/CO2_Gadget.ino index ff065463..e99c431b 100644 --- a/CO2_Gadget.ino +++ b/CO2_Gadget.ino @@ -28,8 +28,8 @@ String mqttClientId = UNITHOSTNAME; String mqttBroker = MQTT_BROKER_SERVER; String mqttUser = ""; String mqttPass = ""; -String wifiSSID = ""; -String wifiPass = ""; +String wifiSSID = WIFI_SSID_CREDENTIALS; +String wifiPass = WIFI_PW_CREDENTIALS; String MACAddress = "Unset"; uint8_t peerESPNowAddress[] = ESPNOW_PEER_MAC_ADDRESS; @@ -45,12 +45,6 @@ uint64_t timeToRetryTroubledWIFI = 300; // Time in seconds to retry WIFI connec uint16_t WiFiConnectionRetries = 0; uint16_t maxWiFiConnectionRetries = 10; bool wifiChanged = false; -bool useStaticIP = false; // Set to true if you want to use a static IP -IPAddress staticIP(192, 168, 1, 199); // Change this to the desired IP -IPAddress gateway(192, 168, 1, 1); // Change this to your network's gateway -IPAddress subnet(255, 255, 255, 0); // Change this to your network's subnet mask -IPAddress dns1(8, 8, 8, 8); // Change this to your preferred DNS server -IPAddress dns2(8, 8, 4, 4); // Change this to your secondary DNS server // MQTT options bool activeMQTT = true; @@ -136,6 +130,7 @@ bool captivePortalActive = false; uint16_t timeToWaitForCaptivePortal = 60; // Time in seconds to wait for captive portal #endif + #ifdef CUSTOM_I2C_SDA #undef I2C_SDA #define I2C_SDA CUSTOM_I2C_SDA diff --git a/CO2_Gadget_Menu.h b/CO2_Gadget_Menu.h index ba6f38af..278bdafc 100644 --- a/CO2_Gadget_Menu.h +++ b/CO2_Gadget_Menu.h @@ -381,8 +381,6 @@ MENU(wifiConfigMenu, "WIFI Config", doNothing, noEvent, wrapStyle #ifdef SUPPORT_OTA ,SUBMENU(activeOTAMenu) #endif - ,OP("Set fixed IP", doNothing, noEvent) - ,OP("in WEB config.", doNothing, noEvent) ,EXIT("[PREF] wifiPass:\t#" + wifiPass + "#"); #endif Serial.println("-->[PREF] hostName:\t#" + hostName + "#"); - - // Fixed IP - Serial.println("-->[PREF] useStaticIP:\t #" + String(useStaticIP) + "#"); - Serial.println("-->[PREF] staticIP:\t #" + staticIP.toString() + "#"); - Serial.println("-->[PREF] gateway:\t #" + gateway.toString() + "#"); - Serial.println("-->[PREF] subnet:\t #" + subnet.toString() + "#"); - Serial.println("-->[PREF] dns1:\t #" + dns1.toString() + "#"); - Serial.println("-->[PREF] dns2:\t #" + dns2.toString() + "#"); - Serial.println("-->[PREF] selCO2Sensor:\t #" + String(selectedCO2Sensor) + "#"); Serial.println("-->[PREF] debugSensors is:\t#" + String(debugSensors ? "Enabled" : "Disabled") + "# (" + String(debugSensors) + ")"); Serial.println("-->[PREF] displayReverse is:\t#" + String(displayReverse ? "Reversed" : "Normal") + "# (" + String(displayReverse) + ")"); @@ -227,7 +218,6 @@ void printPreferences() { Serial.println("-->[PREF] durationBuzzerBeep is:\t#" + String(durationBuzzerBeep) + "#"); Serial.println("-->[PREF] timeBetweenBuzzerBeeps is:\t#" + String(timeBetweenBuzzerBeeps) + "#"); - Serial.println(); delay(50); } @@ -297,15 +287,6 @@ void initPreferences() { wifiSSID = preferences.getString("wifiSSID", wifiSSID).c_str(); wifiPass = preferences.getString("wifiPass", wifiPass).c_str(); hostName = preferences.getString("hostName", hostName).c_str(); - - // Fixed IP - useStaticIP = preferences.getBool("useStaticIP", false); - staticIP.fromString(preferences.getString("staticIP", staticIP.toString()).c_str()); - gateway.fromString(preferences.getString("gateway", gateway.toString()).c_str()); - subnet.fromString(preferences.getString("subnet", subnet.toString()).c_str()); - dns1.fromString(preferences.getString("dns1", dns1.toString()).c_str()); - dns2.fromString(preferences.getString("dns2", dns2.toString()).c_str()); - selectedCO2Sensor = preferences.getUInt("selCO2Sensor", 0); debugSensors = preferences.getBool("debugSensors", false); displayReverse = preferences.getBool("displayReverse", false); @@ -411,15 +392,6 @@ void putPreferences() { preferences.putString("wifiSSID", wifiSSID); preferences.putString("wifiPass", wifiPass); preferences.putString("hostName", hostName); - - // Fixed IP - preferences.putBool("useStaticIP", useStaticIP); - preferences.putString("staticIP", staticIP.toString()); - preferences.putString("gateway", gateway.toString()); - preferences.putString("subnet", subnet.toString()); - preferences.putString("dns1", dns1.toString()); - preferences.putString("dns2", dns2.toString()); - preferences.putUInt("selCO2Sensor", selectedCO2Sensor); preferences.putBool("debugSensors", debugSensors); preferences.putBool("displayReverse", displayReverse); @@ -507,15 +479,6 @@ String getPreferencesAsJson() { doc["wifiSSID"] = preferences.getString("wifiSSID", wifiSSID); // doc["wifiPass"] = preferences.getString("wifiPass", wifiPass); doc["hostName"] = preferences.getString("hostName", hostName); - - // Fixed IP - doc["useStaticIP"] = preferences.getBool("useStaticIP", false); - doc["staticIP"] = preferences.getString("staticIP", staticIP.toString()); - doc["gateway"] = preferences.getString("gateway", gateway.toString()); - doc["subnet"] = preferences.getString("subnet", subnet.toString()); - doc["dns1"] = preferences.getString("dns1", dns1.toString()); - doc["dns2"] = preferences.getString("dns2", dns2.toString()); - doc["selCO2Sensor"] = preferences.getInt("selCO2Sensor", 0); doc["debugSensors"] = preferences.getBool("debugSensors", false); doc["displayReverse"] = preferences.getBool("displayReverse", false); @@ -593,15 +556,6 @@ String getActualSettingsAsJson(bool includePasswords = false) { doc["wifiPass"] = wifiPass; } doc["hostName"] = hostName; - - // Fixed IP - doc["useStaticIP"] = useStaticIP; - doc["staticIP"] = staticIP.toString(); - doc["gateway"] = gateway.toString(); - doc["subnet"] = subnet.toString(); - doc["dns1"] = dns1.toString(); - doc["dns2"] = dns2.toString(); - doc["selCO2Sensor"] = selectedCO2Sensor; doc["debugSensors"] = debugSensors; doc["displayReverse"] = displayReverse; @@ -699,15 +653,6 @@ bool handleSavePreferencesFromJSON(String jsonPreferences) { displayOffOnExternalPower = JsonDocument["dispOffOnExP"]; wifiSSID = JsonDocument["wifiSSID"].as().c_str(); hostName = JsonDocument["hostName"].as().c_str(); - - // Fixed IP - useStaticIP = JsonDocument["useStaticIP"]; - staticIP.fromString(JsonDocument["staticIP"].as()); - gateway.fromString(JsonDocument["gateway"].as()); - subnet.fromString(JsonDocument["subnet"].as()); - dns1.fromString(JsonDocument["dns1"].as()); - dns2.fromString(JsonDocument["dns2"].as()); - selectedCO2Sensor = JsonDocument["selCO2Sensor"]; debugSensors = JsonDocument["debugSensors"]; displayReverse = JsonDocument["displayReverse"]; diff --git a/CO2_Gadget_WIFI.h b/CO2_Gadget_WIFI.h index 401afd2e..c976622a 100644 --- a/CO2_Gadget_WIFI.h +++ b/CO2_Gadget_WIFI.h @@ -9,6 +9,11 @@ /*****************************************************************************************************/ // clang-format on +#if !defined WIFI_SSID_CREDENTIALS || !defined WIFI_PW_CREDENTIALS +// If not using enviroment variables, you must have a credentials.h file +#include "credentials.h" +#endif + #ifdef SUPPORT_CAPTIVE_PORTAL DNSServer dnsServer; #endif @@ -724,13 +729,6 @@ String getCO2GadgetStatusAsJson() { doc["RSSI"] = WiFi.RSSI(); doc["MACAddress"] = MACAddress; doc["hostName"] = hostName; - doc["useStaticIP"] = useStaticIP; - doc["staticIP"] = staticIP.toString(); - doc["gateway"] = gateway.toString(); - doc["subnet"] = subnet.toString(); - doc["dns1"] = dns1.toString(); - doc["dns2"] = dns2.toString(); - #ifdef SUPPORT_MQTT doc["rootTopic"] = rootTopic; doc["discoveryTopic"] = discoveryTopic; @@ -1035,18 +1033,7 @@ bool connectToWiFi() { WiFi.disconnect(true); // disconnect form wifi to set new wifi connection delay(100); WiFi.mode(WIFI_STA); - - if (useStaticIP) { - if (!WiFi.config(staticIP, gateway, subnet, dns1, dns2)) { - Serial.println("-->[WiFi] Failed to configure static IP and DNS"); - return false; - } - Serial.print("-->[WiFi] Configuring static IP: "); - Serial.println(staticIP); - } else { - WiFi.config(INADDR_NONE, INADDR_NONE, INADDR_NONE); // Use DHCP - } - + WiFi.config(INADDR_NONE, INADDR_NONE, INADDR_NONE); WiFi.setHostname(hostName.c_str()); Serial.println("-->[WiFi] Setting hostname: " + hostName); #ifdef WIFI_PRIVACY diff --git a/data/index.html.gz b/data/index.html.gz index 404e7b20d8cd900f7a5ed48fe697a7f326a7ea04..a0f6941a51008406abe0a38384dc1370dbcee96c 100644 GIT binary patch delta 16 XcmX@cag2jqzMF%Ci@|9lyFCj4B(4Lc delta 16 XcmX@cag2jqzMF%?=Zn`yc6$~8EL;TR diff --git a/data/ota.html.gz b/data/ota.html.gz index 94ddb44c491cac5edc5cc3ae75ee0520aa77bca5..3c88785c7a1729165e46728b7c0f2f862e6975cf 100644 GIT binary patch delta 16 XcmaFB{D7HVzMF$1lhbJ<`%OjwD=q}i delta 16 XcmaFB{D7HVzMF%?=Zn`y_M40VFbxHy diff --git a/data/preferences.html b/data/preferences.html index d327b486..ce03c987 100644 --- a/data/preferences.html +++ b/data/preferences.html @@ -106,62 +106,6 @@

CO2 Gadget Preferences

-
- Fixed IP - -
- - -
-
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
- -
-
- diff --git a/data/preferences.html.gz b/data/preferences.html.gz index ae05af76783a6461b215b1fc621e8b1091a01227..cba6e8eadb72d47e05fd8a888c5969f10d9feb6d 100644 GIT binary patch literal 4249 zcmV;K5N7WmiwFq&WkhBG0B~|;W@U0^ZewM0E@*UZYyj0=&2rnw5x#HLzQZgoYgbm( zkJnpU8HXp%D7^*-F3?)>bP zu0?dry51dUlUO9uBff|vi=ga;2XfR6*d6!Tjym~)@Q6!J!=2QpA?xmU_Hte!k8VlA z!mgLfX~@zMW57&KV_+`Xz1;QF)FY#W4Z2=uSC#1~(yrx@`U#IE3D|%o?v0=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)L*Nl@0 zzbifb1|s^cv;drDAx`3f`S*U`6~s5_MI{4Pjwn+^3_PL;~fO;S@o^{5~2-V-zoUD3>Q=L9@xBwuZH zwe*mDJ2+Ui7jVcaUBkgXBvt~1ektmnLc$2w4Jb_IJA*~}DYG)ILumYovG^=>Tm?8; zq>(cS^36lY`+*7&>=6a4cs80)6m|g_Qy5Zwnl(X%!>M+7Nko&R+Da@q`nFJTNu491 zo? zr5#M3&WLKxwzq<1=NKWcp-UT-vo(99|BIUwBO)AauXkkQ=v;B_Qs1~s`t{(BgU<#! zzr8+rXXJ##-n*`XkwSv)bfws@$AxOD0}S2t?No2SFSc~GndSqX+qj87Jl{efhFKiU zD?x*Qygw(m7;bHc{}N-n_FSs0t6;M#Q#G3~-QrjUnCe+5skU8q=7)@EciS#*|crdRqUT$ zw^@5(pZEGHkr=h`eeTSttV9F71>&pDjP#ROkyDO9|W-my-lxLr=a(0o#36G?GbS9vZ)+To}qlD8?tsjf9?v2em z1DNw|MZNB!09N^)IkPUJEvHZH8nFME#pi}1B0uE*qa`~N@HgM#(moPT5B2>URg0=r(Y8f|{xnEB0L4S-(%3BPZw5wJhMnSRwg)mLiEK4aDU*3GAA)%R)fGr#`^7MpbP HBzOP-gO9T) diff --git a/data/preferences.js b/data/preferences.js index 8333e75e..291883a3 100644 --- a/data/preferences.js +++ b/data/preferences.js @@ -37,24 +37,6 @@ function populateFormWithPreferences(preferences) { if (getPreferencesDebug) console.log('Setting hostName to:', preferences.hostName); document.getElementById("hostName").value = preferences.hostName; - if (getPreferencesDebug) console.log('Setting useStaticIP to:', preferences.useStaticIP); - document.getElementById("useStaticIP").checked = preferences.useStaticIP; - - if (getPreferencesDebug) console.log('Setting staticIP to:', preferences.staticIP); - document.getElementById("staticIP").value = preferences.staticIP; - - if (getPreferencesDebug) console.log('Setting gateway to:', preferences.gateway); - document.getElementById("gateway").value = preferences.gateway; - - if (getPreferencesDebug) console.log('Setting subnet to:', preferences.subnet); - document.getElementById("subnet").value = preferences.subnet; - - if (getPreferencesDebug) console.log('Setting dns1 to:', preferences.dns1); - document.getElementById("dns1").value = preferences.dns1; - - if (getPreferencesDebug) console.log('Setting dns2 to:', preferences.dns2); - document.getElementById("dns2").value = preferences.dns2; - if (getPreferencesDebug) console.log('Setting selCO2Sensor to:', preferences.selCO2Sensor); document.getElementById("selCO2Sensor").value = preferences.selCO2Sensor; @@ -190,7 +172,6 @@ function populateFormWithPreferences(preferences) { toggle('activeWIFI', 'wifiNetworks'); toggle('activeMQTT', 'mqttConfig'); toggle('activeESPNOW', 'espNowConfig'); - toggle('useStaticIP', 'staticIPSettings'); } function loadPreferencesFromServer() { @@ -232,12 +213,6 @@ function collectPreferencesData() { dispOffOnExP: document.getElementById("dispOffOnExP").checked, wifiSSID: document.getElementById("wifiSSID").value, hostName: document.getElementById("hostName").value, - useStaticIP: document.getElementById("useStaticIP").checked, - staticIP: document.getElementById("staticIP").value, - gateway: document.getElementById("gateway").value, - subnet: document.getElementById("subnet").value, - dns1: document.getElementById("dns1").value, - dns2: document.getElementById("dns2").value, selCO2Sensor: document.getElementById("selCO2Sensor").value, debugSensors: document.getElementById("debugSensors").checked, displayReverse: document.getElementById("displayReverse").checked, @@ -489,5 +464,4 @@ document.addEventListener("DOMContentLoaded", function () { toggle('activeWIFI', 'wifiNetworks'); toggle('activeMQTT', 'mqttConfig'); toggle('activeESPNOW', 'espNowConfig'); - toggle('useStaticIP', 'staticIPSettings'); }); \ No newline at end of file diff --git a/data/preferences.js.gz b/data/preferences.js.gz index 0438712076dd487bcf71df132e83c049e36902ed..e037f0b83c5559d0b38482680ed3894eddb275d1 100644 GIT binary patch literal 4483 zcmV-}5q$0+iwFqe-$iBs0B~|;W@U0^ZewM0E^2cCywsPm7dq4pw==1i$+;-@bnJ`qjY!`MKarT95}?<#bsv zA~;ETDJou&iWT%5%Sg@Arpm<=+3<|Leg&+CbYmz-WJQab9crQHO__?Emndz;M7kyq ztg7)rUaokxp^~_&_=bozgAOX7zkanc&19Res>yth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H96PGp>|}~CO${#m8shaXLO911IuE*(~rF$Hd67{g_bUsa+(mVNHOx@j|ewN44)Rf z&XZZoU@%wIej`NUR^#b`ZANUPR!{ptD4+O`|D4{?1RD(NRqYEF*~gf|w3o=}Q+WP4-l z-VWs;#IZnU-~#=D9(_HwEDEDO2s>PDt0N3XBO>3^Jm^-qHS^;{Nf7#rT^9n75{{X& zf~o-rzsp>NU0Jt-vt+B1PFw{owYzKP2@VyPDExzxJ&hzEoMaqK-C`x#>ldC?5X5vp zqlep%y6aFpdwxz256`~O=}94;lU>k7#&rSPbk%e(M60tpOuv?h3lVur+n&dNWNxlX z@|F0$dM~BIJGO9+TbKDZ1*gR_lGkj@!GmSc0T?K95;PoEY}14nuEtAMviBAuc;r0A z{U)d!EWLoSP%%*^}k~^30U^N}~+K zotec|34h5f{_9tuetn@kb=Jlq`B5dxg+N$ous9(uRdJ$N+a;F1Vjo&|6JyBR9O*+S z7y)iwe1Rg@u$G6Wx4XPWr!Z2mI5WA{WrMLvfm^7e!G0<3oH{p6dzEsw;>}wn<4TB_ zIO|r=3#5yrJV(sRl3{^(Byg17;rHWthIDe{}{TkU$zW0L6>1YP?c}c4Wt&QeS~gTIOv1VRX`Mje9Lb!)7sbUExT$Fy|66ScnfU#OGe< zs_i@VaZ8yk069KoXaV{wnH?z?5W5yeMpP2(p4644>(QgAD+UuAxPlfG!hI Host Name: -

- Use Static IP: -
-
- Static IP: -
-
- Gateway: -
-
- Subnet: -
-
- DNS1: -
-
- DNS2: -
Root Topic:
@@ -228,42 +210,6 @@ document.getElementById('hostNameItem').style.display = 'none'; } - if (data.useStaticIP !== undefined) { - document.getElementById('useStaticIP').textContent = data.useStaticIP; - } else { - document.getElementById('useStaticIPItem').style.display = 'none'; - } - - if (data.staticIP !== undefined) { - document.getElementById('staticIP').textContent = data.staticIP; - } else { - document.getElementById('staticIPItem').style.display = 'none'; - } - - if (data.gateway !== undefined) { - document.getElementById('gateway').textContent = data.gateway; - } else { - document.getElementById('gatewayItem').style.display = 'none'; - } - - if (data.subnet !== undefined) { - document.getElementById('subnet').textContent = data.subnet; - } else { - document.getElementById('subnetItem').style.display = 'none'; - } - - if (data.dns1 !== undefined) { - document.getElementById('dns1').textContent = data.dns1; - } else { - document.getElementById('dns1Item').style.display = 'none'; - } - - if (data.dns2 !== undefined) { - document.getElementById('dns2').textContent = data.dns2; - } else { - document.getElementById('dns2Item').style.display = 'none'; - } - if (data.rootTopic !== undefined) { document.getElementById('rootTopic').textContent = data.rootTopic; } else { @@ -394,7 +340,7 @@ hours = hours - (days * 24); minutes = minutes - (days * 24 * 60) - (hours * 60); seconds = seconds - (days * 24 * 60 * 60) - (hours * 60 * 60) - (minutes * 60); - + document.getElementById('uptime').textContent = data.uptime; } else { @@ -431,18 +377,18 @@ xhttp.send(); } - function getMinFreeHeap() { - var xhttp = new XMLHttpRequest(); - xhttp.onreadystatechange = function () { - console.log(this.responseText); - if (this.readyState == 4 && this.status == 200) { - document.getElementById("minFreeHeap").innerHTML = - this.responseText; - } - }; - xhttp.open("GET", "getMinFreeHeap", true); - xhttp.send(); - } + function getMinFreeHeap() { + var xhttp = new XMLHttpRequest(); + xhttp.onreadystatechange = function () { + console.log(this.responseText); + if (this.readyState == 4 && this.status == 200) { + document.getElementById("minFreeHeap").innerHTML = + this.responseText; + } + }; + xhttp.open("GET", "getMinFreeHeap", true); + xhttp.send(); + } setInterval(function () { // Call a function repetatively with 1 Second interval diff --git a/data/status.html.gz b/data/status.html.gz index 0d61588166b158f227fa40639b34722f15084bc6..19cb1e53c49ac41d6f14ba573ac8fef2f4a5918b 100644 GIT binary patch literal 2663 zcmV-t3YhgDiwFpGNJeG=0CRLn+WcDuWej6}zr%A!W1?Rp0J?|Uhd79~+mWKr0c)kEWoyoZP9UQ(oZ?bCOI z0a|b#rzfM)X0sXoN&RnpJM`IdG^Ziq?DfKC#kCZ znBS?fNi!*Abl`um5M1a?nL@7&iMnUX#NLE=rfL}^Rgd08 z+GocNSzbOITbKb(TPpA&CJE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iPKREt&dg=7-dBVTc<%V+{`Fd2&6aIF0>2C9I=3nh`!$lpO z&d7F|ptr{xVwQ&E7~#@oImw7fOIwk6Q=FJOMHBfOtRM58#-wm$;*^ZmLr)q;j6gzFzig*yaZeHmKM zNpW~G18aGPj+G|cAj45~yMix|l)*fNPJ@PFRzN9nf*UG#KN1TRsaCC&}8-i From e2cdbfddaa0883eb18bb43b591298dc088dc9b7f Mon Sep 17 00:00:00 2001 From: Mario Mariete <11509521+melkati@users.noreply.github.com> Date: Mon, 20 May 2024 15:04:43 +0200 Subject: [PATCH 10/15] feat: Add support for setting fixed IP in WEB config --- credentials.h | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 credentials.h diff --git a/credentials.h b/credentials.h deleted file mode 100644 index d34a85a0..00000000 --- a/credentials.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef Credentials_h -#define Credentials_h - -#ifndef CREDENTIALS_H -#define CREDENTIALS_H - -#define WIFI_SSID_CREDENTIALS "MyWiFiSSID" -#define WIFI_PW_CREDENTIALS "some_secret_password" -#define MQTT_USER_CREDENTIAL "MyUser" -#define MQTT_PW_CREDENTIAL "another_secret_password" - -#endif - -#endif // Credentials_h \ No newline at end of file From 476daaa7aeb7134af137c09dfbe1d2eb38713ef6 Mon Sep 17 00:00:00 2001 From: Mario Mariete <11509521+melkati@users.noreply.github.com> Date: Mon, 20 May 2024 15:06:14 +0200 Subject: [PATCH 11/15] CO2 Gadget Beta v0.12.077-development --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index f40f8df0..0a189198 100644 --- a/platformio.ini +++ b/platformio.ini @@ -10,7 +10,7 @@ extra_configs = platformio_extra_configs.ini [version] build_flags = -D CO2_GADGET_VERSION="\"0.12."\" - -D CO2_GADGET_REV="\"076-development"\" + -D CO2_GADGET_REV="\"077-development"\" ;**************************************************************************************** ;*** This is deprecated. It's here only for backward compatibility. From a822d30e5844f6b953ef3c31621fe56cbfa1634d Mon Sep 17 00:00:00 2001 From: Mario Mariete <11509521+melkati@users.noreply.github.com> Date: Mon, 20 May 2024 15:42:53 +0200 Subject: [PATCH 12/15] CO2 Gadget Beta v0.12.077-development Remove obsolete defines: WIFI_SSID_CREDENTIALS and WIFI_PW_CREDENTIALS --- CO2_Gadget_WIFI.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CO2_Gadget_WIFI.h b/CO2_Gadget_WIFI.h index c976622a..ccf1686b 100644 --- a/CO2_Gadget_WIFI.h +++ b/CO2_Gadget_WIFI.h @@ -9,11 +9,6 @@ /*****************************************************************************************************/ // clang-format on -#if !defined WIFI_SSID_CREDENTIALS || !defined WIFI_PW_CREDENTIALS -// If not using enviroment variables, you must have a credentials.h file -#include "credentials.h" -#endif - #ifdef SUPPORT_CAPTIVE_PORTAL DNSServer dnsServer; #endif From 446ba303e1ba4239ab88f7b06aef5cafea328c4a Mon Sep 17 00:00:00 2001 From: Mario Mariete <11509521+melkati@users.noreply.github.com> Date: Mon, 20 May 2024 15:51:50 +0200 Subject: [PATCH 13/15] CO2 Gadget Beta v0.12.077-development Remove obsolete defines: WIFI_SSID_CREDENTIALS and WIFI_PW_CREDENTIALS --- CO2_Gadget.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CO2_Gadget.ino b/CO2_Gadget.ino index e99c431b..ad00b836 100644 --- a/CO2_Gadget.ino +++ b/CO2_Gadget.ino @@ -28,8 +28,8 @@ String mqttClientId = UNITHOSTNAME; String mqttBroker = MQTT_BROKER_SERVER; String mqttUser = ""; String mqttPass = ""; -String wifiSSID = WIFI_SSID_CREDENTIALS; -String wifiPass = WIFI_PW_CREDENTIALS; +String wifiSSID = ""; +String wifiPass = ""; String MACAddress = "Unset"; uint8_t peerESPNowAddress[] = ESPNOW_PEER_MAC_ADDRESS; From 80157a15976c456531eceee7b44df2d981a6357b Mon Sep 17 00:00:00 2001 From: Mario Mariete <11509521+melkati@users.noreply.github.com> Date: Mon, 20 May 2024 18:51:22 +0200 Subject: [PATCH 14/15] CO2 Gadget Beta v0.12.078-development feat: Add support for setting fixed IP (fix - redo) Remove obsolete defines: WIFI_SSID_CREDENTIALS and WIFI_PW_CREDENTIALS --- CO2_Gadget.ino | 7 ++++- CO2_Gadget_Menu.h | 2 ++ CO2_Gadget_Preferences.h | 54 +++++++++++++++++++++++++++++++++++++ CO2_Gadget_WIFI.h | 19 ++++++++++++- data/preferences.html | 56 +++++++++++++++++++++++++++++++++++++-- data/preferences.html.gz | Bin 4249 -> 4537 bytes data/preferences.js | 26 ++++++++++++++++++ data/preferences.js.gz | Bin 4483 -> 4657 bytes data/status.html | 56 ++++++++++++++++++++++++++++++++++++++- data/status.html.gz | Bin 2663 -> 2867 bytes 10 files changed, 215 insertions(+), 5 deletions(-) diff --git a/CO2_Gadget.ino b/CO2_Gadget.ino index ad00b836..ff065463 100644 --- a/CO2_Gadget.ino +++ b/CO2_Gadget.ino @@ -45,6 +45,12 @@ uint64_t timeToRetryTroubledWIFI = 300; // Time in seconds to retry WIFI connec uint16_t WiFiConnectionRetries = 0; uint16_t maxWiFiConnectionRetries = 10; bool wifiChanged = false; +bool useStaticIP = false; // Set to true if you want to use a static IP +IPAddress staticIP(192, 168, 1, 199); // Change this to the desired IP +IPAddress gateway(192, 168, 1, 1); // Change this to your network's gateway +IPAddress subnet(255, 255, 255, 0); // Change this to your network's subnet mask +IPAddress dns1(8, 8, 8, 8); // Change this to your preferred DNS server +IPAddress dns2(8, 8, 4, 4); // Change this to your secondary DNS server // MQTT options bool activeMQTT = true; @@ -130,7 +136,6 @@ bool captivePortalActive = false; uint16_t timeToWaitForCaptivePortal = 60; // Time in seconds to wait for captive portal #endif - #ifdef CUSTOM_I2C_SDA #undef I2C_SDA #define I2C_SDA CUSTOM_I2C_SDA diff --git a/CO2_Gadget_Menu.h b/CO2_Gadget_Menu.h index 278bdafc..ba6f38af 100644 --- a/CO2_Gadget_Menu.h +++ b/CO2_Gadget_Menu.h @@ -381,6 +381,8 @@ MENU(wifiConfigMenu, "WIFI Config", doNothing, noEvent, wrapStyle #ifdef SUPPORT_OTA ,SUBMENU(activeOTAMenu) #endif + ,OP("Set fixed IP", doNothing, noEvent) + ,OP("in WEB config.", doNothing, noEvent) ,EXIT("[PREF] wifiPass:\t#" + wifiPass + "#"); #endif Serial.println("-->[PREF] hostName:\t#" + hostName + "#"); + + // Fixed IP + Serial.println("-->[PREF] useStaticIP:\t #" + String(useStaticIP) + "#"); + Serial.println("-->[PREF] staticIP:\t #" + staticIP.toString() + "#"); + Serial.println("-->[PREF] gateway:\t #" + gateway.toString() + "#"); + Serial.println("-->[PREF] subnet:\t #" + subnet.toString() + "#"); + Serial.println("-->[PREF] dns1:\t #" + dns1.toString() + "#"); + Serial.println("-->[PREF] dns2:\t #" + dns2.toString() + "#"); + Serial.println("-->[PREF] selCO2Sensor:\t #" + String(selectedCO2Sensor) + "#"); Serial.println("-->[PREF] debugSensors is:\t#" + String(debugSensors ? "Enabled" : "Disabled") + "# (" + String(debugSensors) + ")"); Serial.println("-->[PREF] displayReverse is:\t#" + String(displayReverse ? "Reversed" : "Normal") + "# (" + String(displayReverse) + ")"); @@ -287,6 +296,15 @@ void initPreferences() { wifiSSID = preferences.getString("wifiSSID", wifiSSID).c_str(); wifiPass = preferences.getString("wifiPass", wifiPass).c_str(); hostName = preferences.getString("hostName", hostName).c_str(); + + // Fixed IP + useStaticIP = preferences.getBool("useStaticIP", false); + staticIP.fromString(preferences.getString("staticIP", staticIP.toString()).c_str()); + gateway.fromString(preferences.getString("gateway", gateway.toString()).c_str()); + subnet.fromString(preferences.getString("subnet", subnet.toString()).c_str()); + dns1.fromString(preferences.getString("dns1", dns1.toString()).c_str()); + dns2.fromString(preferences.getString("dns2", dns2.toString()).c_str()); + selectedCO2Sensor = preferences.getUInt("selCO2Sensor", 0); debugSensors = preferences.getBool("debugSensors", false); displayReverse = preferences.getBool("displayReverse", false); @@ -392,6 +410,15 @@ void putPreferences() { preferences.putString("wifiSSID", wifiSSID); preferences.putString("wifiPass", wifiPass); preferences.putString("hostName", hostName); + + // Fixed IP + preferences.putBool("useStaticIP", useStaticIP); + preferences.putString("staticIP", staticIP.toString()); + preferences.putString("gateway", gateway.toString()); + preferences.putString("subnet", subnet.toString()); + preferences.putString("dns1", dns1.toString()); + preferences.putString("dns2", dns2.toString()); + preferences.putUInt("selCO2Sensor", selectedCO2Sensor); preferences.putBool("debugSensors", debugSensors); preferences.putBool("displayReverse", displayReverse); @@ -479,6 +506,15 @@ String getPreferencesAsJson() { doc["wifiSSID"] = preferences.getString("wifiSSID", wifiSSID); // doc["wifiPass"] = preferences.getString("wifiPass", wifiPass); doc["hostName"] = preferences.getString("hostName", hostName); + + // Fixed IP + doc["useStaticIP"] = preferences.getBool("useStaticIP", false); + doc["staticIP"] = preferences.getString("staticIP", staticIP.toString()); + doc["gateway"] = preferences.getString("gateway", gateway.toString()); + doc["subnet"] = preferences.getString("subnet", subnet.toString()); + doc["dns1"] = preferences.getString("dns1", dns1.toString()); + doc["dns2"] = preferences.getString("dns2", dns2.toString()); + doc["selCO2Sensor"] = preferences.getInt("selCO2Sensor", 0); doc["debugSensors"] = preferences.getBool("debugSensors", false); doc["displayReverse"] = preferences.getBool("displayReverse", false); @@ -556,6 +592,15 @@ String getActualSettingsAsJson(bool includePasswords = false) { doc["wifiPass"] = wifiPass; } doc["hostName"] = hostName; + + // Fixed IP + doc["useStaticIP"] = useStaticIP; + doc["staticIP"] = staticIP.toString(); + doc["gateway"] = gateway.toString(); + doc["subnet"] = subnet.toString(); + doc["dns1"] = dns1.toString(); + doc["dns2"] = dns2.toString(); + doc["selCO2Sensor"] = selectedCO2Sensor; doc["debugSensors"] = debugSensors; doc["displayReverse"] = displayReverse; @@ -653,6 +698,15 @@ bool handleSavePreferencesFromJSON(String jsonPreferences) { displayOffOnExternalPower = JsonDocument["dispOffOnExP"]; wifiSSID = JsonDocument["wifiSSID"].as().c_str(); hostName = JsonDocument["hostName"].as().c_str(); + + // Fixed IP + useStaticIP = JsonDocument["useStaticIP"]; + staticIP.fromString(JsonDocument["staticIP"].as()); + gateway.fromString(JsonDocument["gateway"].as()); + subnet.fromString(JsonDocument["subnet"].as()); + dns1.fromString(JsonDocument["dns1"].as()); + dns2.fromString(JsonDocument["dns2"].as()); + selectedCO2Sensor = JsonDocument["selCO2Sensor"]; debugSensors = JsonDocument["debugSensors"]; displayReverse = JsonDocument["displayReverse"]; diff --git a/CO2_Gadget_WIFI.h b/CO2_Gadget_WIFI.h index ccf1686b..cf129e7d 100644 --- a/CO2_Gadget_WIFI.h +++ b/CO2_Gadget_WIFI.h @@ -724,6 +724,12 @@ String getCO2GadgetStatusAsJson() { doc["RSSI"] = WiFi.RSSI(); doc["MACAddress"] = MACAddress; doc["hostName"] = hostName; + doc["useStaticIP"] = useStaticIP; + doc["staticIP"] = staticIP.toString(); + doc["gateway"] = gateway.toString(); + doc["subnet"] = subnet.toString(); + doc["dns1"] = dns1.toString(); + doc["dns2"] = dns2.toString(); #ifdef SUPPORT_MQTT doc["rootTopic"] = rootTopic; doc["discoveryTopic"] = discoveryTopic; @@ -1028,7 +1034,18 @@ bool connectToWiFi() { WiFi.disconnect(true); // disconnect form wifi to set new wifi connection delay(100); WiFi.mode(WIFI_STA); - WiFi.config(INADDR_NONE, INADDR_NONE, INADDR_NONE); + + if (useStaticIP) { + if (!WiFi.config(staticIP, gateway, subnet, dns1, dns2)) { + Serial.println("-->[WiFi] Failed to configure static IP and DNS"); + return false; + } + Serial.print("-->[WiFi] Configuring static IP: "); + Serial.println(staticIP); + } else { + WiFi.config(INADDR_NONE, INADDR_NONE, INADDR_NONE); // Use DHCP + } + WiFi.setHostname(hostName.c_str()); Serial.println("-->[WiFi] Setting hostname: " + hostName); #ifdef WIFI_PRIVACY diff --git a/data/preferences.html b/data/preferences.html index ce03c987..450122c0 100644 --- a/data/preferences.html +++ b/data/preferences.html @@ -71,7 +71,6 @@

CO2 Gadget Preferences

Networking -
WiFi Credentials @@ -92,7 +91,6 @@

CO2 Gadget Preferences

-
@@ -106,8 +104,62 @@

CO2 Gadget Preferences

+
+ Fixed IP +
+ + +
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+
+
diff --git a/data/preferences.html.gz b/data/preferences.html.gz index cba6e8eadb72d47e05fd8a888c5969f10d9feb6d..473a6b2e342dd91bb4c755ba3f989589ca6f3c8b 100644 GIT binary patch literal 4537 zcmV;q5k~GGiwFqjeoJNm0B~|;W@U0^ZewM0E@*UZYyjO|&2r;7lD<#GyaR@psg7;S zKQ%Qm(PL@Cc9p9fQ!aaLcXiBMHXss`(547B30hVi_O$nXo!vRkqwEXpD{LlyNKk*I zMA_uFqoPEDU?Q2{heYC!JpJ9l0hve{r#~DX&StaTH|{^mdCwQq!x0ae6yt9^CI<(D z-~Q&ezd8Ng`Hj70fJ>rWN;Qa|CbBmo<-#J%xn z`b70LkEDr@x5o))Vv*0%-p{EwI6c%EtSHH4$OacTC*&gy#!Qk65smmbOQ_@`Iz80a z!BU6DRB$*H!Q9@Dn0%p6e5~@5Ax$&@>SDm3h#%54?Ryb@f@{_W>MAwQ$fJNg_YfU# z@JUSB=^m=}OBC;?ba>9uA5a>71hC~WN$xr-}lZeTgNFM*P#$JcYV5?9m@vC%Y z8}pxk{@@MZza~~k86~4Dp`EdLmNIoZ3^Qmbgq)C2%m|BEGM1WHaVkXbYg1)0{?l zMLYgQw-h`YH)+KSDNY-{l-UMDGd|+xj&vRRn@U|QT{U?Z2@4=(x z7xe*kzQ4bE@9EO;a6@&-B{b&mMoF5-55QQgRz!@*92isz0csVno>HY;ZXH)e=V&U+ zn7Un@KT&8L`<@5Prh$mU`6evaI;=d0q0g3}-GapoXm|)V3AzMaY;;0}m(lBy_dHb& zLuW{tpCu3}R~L(aVD?l*749V0b9)Y0-3uNlV>>+1=Q$6I^IPQ{3N<#gPwRbIo@EQS z@kyi-`kL55tm!Xmd#|FXf{YU=4omZjg1baSRL^=5r%8l9IG%0eO;lm4eMN2q!;#|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9SKxW$w4gI?x~ElJaKLChe-#=f+6LBjyU?eC`WV2b?HeERp_p**m!XL_j(L vzjK@Noh4^+pqYNuJk@vK%06S}(`4oh0HQzcroQ-wAI|$9k06W;c5eUxyf7rC diff --git a/data/preferences.js b/data/preferences.js index 291883a3..8333e75e 100644 --- a/data/preferences.js +++ b/data/preferences.js @@ -37,6 +37,24 @@ function populateFormWithPreferences(preferences) { if (getPreferencesDebug) console.log('Setting hostName to:', preferences.hostName); document.getElementById("hostName").value = preferences.hostName; + if (getPreferencesDebug) console.log('Setting useStaticIP to:', preferences.useStaticIP); + document.getElementById("useStaticIP").checked = preferences.useStaticIP; + + if (getPreferencesDebug) console.log('Setting staticIP to:', preferences.staticIP); + document.getElementById("staticIP").value = preferences.staticIP; + + if (getPreferencesDebug) console.log('Setting gateway to:', preferences.gateway); + document.getElementById("gateway").value = preferences.gateway; + + if (getPreferencesDebug) console.log('Setting subnet to:', preferences.subnet); + document.getElementById("subnet").value = preferences.subnet; + + if (getPreferencesDebug) console.log('Setting dns1 to:', preferences.dns1); + document.getElementById("dns1").value = preferences.dns1; + + if (getPreferencesDebug) console.log('Setting dns2 to:', preferences.dns2); + document.getElementById("dns2").value = preferences.dns2; + if (getPreferencesDebug) console.log('Setting selCO2Sensor to:', preferences.selCO2Sensor); document.getElementById("selCO2Sensor").value = preferences.selCO2Sensor; @@ -172,6 +190,7 @@ function populateFormWithPreferences(preferences) { toggle('activeWIFI', 'wifiNetworks'); toggle('activeMQTT', 'mqttConfig'); toggle('activeESPNOW', 'espNowConfig'); + toggle('useStaticIP', 'staticIPSettings'); } function loadPreferencesFromServer() { @@ -213,6 +232,12 @@ function collectPreferencesData() { dispOffOnExP: document.getElementById("dispOffOnExP").checked, wifiSSID: document.getElementById("wifiSSID").value, hostName: document.getElementById("hostName").value, + useStaticIP: document.getElementById("useStaticIP").checked, + staticIP: document.getElementById("staticIP").value, + gateway: document.getElementById("gateway").value, + subnet: document.getElementById("subnet").value, + dns1: document.getElementById("dns1").value, + dns2: document.getElementById("dns2").value, selCO2Sensor: document.getElementById("selCO2Sensor").value, debugSensors: document.getElementById("debugSensors").checked, displayReverse: document.getElementById("displayReverse").checked, @@ -464,4 +489,5 @@ document.addEventListener("DOMContentLoaded", function () { toggle('activeWIFI', 'wifiNetworks'); toggle('activeMQTT', 'mqttConfig'); toggle('activeESPNOW', 'espNowConfig'); + toggle('useStaticIP', 'staticIPSettings'); }); \ No newline at end of file diff --git a/data/preferences.js.gz b/data/preferences.js.gz index e037f0b83c5559d0b38482680ed3894eddb275d1..caddd332303cf7a4ebb6153eb2985b38bbfdbd06 100644 GIT binary patch literal 4657 zcmV-163*=(iwFp_eM@El0B~|;W@U0^ZewM0E^2cC&0KA7+&Gf{9w7gL(^x=ltfxKW z!vcpGzQA_uiT9G&XFHh#27_I;#O~HuE%xZ8JDx%Q`&RKqBqdU6%UEFjA+c4(;=^K* zRVdR6CfmGT^=Em#$= z$d(l)K1lNgFV<8L7X@FFYQ>;~0_d+_Ep#){=8J4HJs^L+ensF%Je@{IOI9gbbRa4C zGXqKav|#0i=OrVj|3mcev)@V-)8SQ^t^pFV|7qy>1H<^dNod8$#mzDKi6+pkH4F*7 zqE%gzEX|qQIN@=%%O~oL9;d>v$c|miSG9Z)bRYteGF5VCyqaq^b z!Q{kf;G3=LnBuIlq5w#sWiYOiXKW@OOruNjT+D2mFMVe6CORa7`QQM$_=XnN*vW=( z>I|mn3YdRRtJQ767OY@-%*yG;{4Oj=LIUe2pj?ab9h=unP<>U@>;z~19$3(B(V+2{ zBrV0tNCYFVt4&==Vd;WQJ;DxbQ_|zj_;MP3;55NuTG()SHdLj?ZyGQFx>chTCWm?< zI~c3@t6(upx3ESn5xQj%odXF*TOlM08r`y=udl9Q%q>teL)7?!25wlvwBr?v9|7HI zK-$STth;oP-rrxp^B~ovL7bWqP;O~fvld28b`Z99J!hVuKZ09YmVpr<>A+f0y`w

3sVZB)+#yW(Z_iLRLktR@YrTQdfLYVt^fs7rPaTX7m+-+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*q=ka2ek&=Tg$Wem!I@;hM%hg;QOKL4!enUZ;{(i zNw)RfU#>r@M*Yu5KIUb{A7MLIIWL)0TI6L~G#SLmvrdC{QHEE$CJxkVA3BFy`+dn^ Vb@=~x#rfXh{{m4^M;EnI008Ui*i8Tc diff --git a/data/status.html b/data/status.html index eb5d1825..2aedf5bd 100644 --- a/data/status.html +++ b/data/status.html @@ -56,6 +56,24 @@

Host Name:
+
+ Use Static IP: +
+
+ Static IP: +
+
+ Gateway: +
+
+ Subnet: +
+
+ DNS1: +
+
+ DNS2: +
Root Topic:
@@ -210,6 +228,42 @@ document.getElementById('hostNameItem').style.display = 'none'; } + if (data.useStaticIP !== undefined) { + document.getElementById('useStaticIP').textContent = data.useStaticIP; + } else { + document.getElementById('useStaticIPItem').style.display = 'none'; + } + + if (data.staticIP !== undefined) { + document.getElementById('staticIP').textContent = data.staticIP; + } else { + document.getElementById('staticIPItem').style.display = 'none'; + } + + if (data.gateway !== undefined) { + document.getElementById('gateway').textContent = data.gateway; + } else { + document.getElementById('gatewayItem').style.display = 'none'; + } + + if (data.subnet !== undefined) { + document.getElementById('subnet').textContent = data.subnet; + } else { + document.getElementById('subnetItem').style.display = 'none'; + } + + if (data.dns1 !== undefined) { + document.getElementById('dns1').textContent = data.dns1; + } else { + document.getElementById('dns1Item').style.display = 'none'; + } + + if (data.dns2 !== undefined) { + document.getElementById('dns2').textContent = data.dns2; + } else { + document.getElementById('dns2Item').style.display = 'none'; + } + if (data.rootTopic !== undefined) { document.getElementById('rootTopic').textContent = data.rootTopic; } else { @@ -340,7 +394,7 @@ hours = hours - (days * 24); minutes = minutes - (days * 24 * 60) - (hours * 60); seconds = seconds - (days * 24 * 60 * 60) - (hours * 60 * 60) - (minutes * 60); - + document.getElementById('uptime').textContent = data.uptime; } else { diff --git a/data/status.html.gz b/data/status.html.gz index 19cb1e53c49ac41d6f14ba573ac8fef2f4a5918b..be2a92ad4cb85614574145bedbef8f362353e5a6 100644 GIT binary patch literal 2867 zcm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h(1l>|`{yPwJG(gm1{>++|!sm(&;S)mQ1O>6RjLzl&ciflftagZ@3azlHyOCV#9* z%KK$cW>tqQ5@UTU2oZmQqh|uvyH=}>h|5f_Ol?rVO>r#&5i(NlhMfAPju4mqR z5GZbEogVyYWADx#64^z8071?@7LfuzRDS+YRyu zxL#b1-7hXjAt0{WFfhL$^TtRJ*IS}NT$V)Ta#V=R9vOxkYl0)Utptc_J-?BX-Rp+_ z9*>FD9u7l(#Pn%yWHS!3pmK6fnjQaO#0VrsS zPs=GnE17B!doW`5cSECqZ6IRBw+;43>3+U1g(Vv_JSANJVit@f*g~ghvmo+|EiqVU z-)~5BlU?xPAh=$`hkKgBx`iZt@9JTq7BTl=Ljv%#?aL7+on~m}7lt&->1g*ArPGo6 V<*n@JxWsRd{TFB)0+hK-003%EDLeoG From 31a5879f05d59d9a69190ef14a1815091b123f35 Mon Sep 17 00:00:00 2001 From: Mario Mariete <11509521+melkati@users.noreply.github.com> Date: Mon, 20 May 2024 21:42:53 +0200 Subject: [PATCH 15/15] Fix CO2_GADGET_REV to "078-development" --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 0a189198..141b00dc 100644 --- a/platformio.ini +++ b/platformio.ini @@ -10,7 +10,7 @@ extra_configs = platformio_extra_configs.ini [version] build_flags = -D CO2_GADGET_VERSION="\"0.12."\" - -D CO2_GADGET_REV="\"077-development"\" + -D CO2_GADGET_REV="\"078-development"\" ;**************************************************************************************** ;*** This is deprecated. It's here only for backward compatibility.