From 86a124df886237ee0d9f7b9f59eacfc952058a51 Mon Sep 17 00:00:00 2001
From: Khoi Hoang <57012152+khoih-prog@users.noreply.github.com>
Date: Wed, 24 Feb 2021 02:37:51 -0500
Subject: [PATCH] ### Major Releases v1.2.0
### Major Releases v1.2.0
1. Configurable **Customs HTML Headers**, including Customs Style, Customs Head Elements, CORS Header.
2. Add support to **ESP32-S2 (ESP32-S2 Saola and AI-Thinker ESP-12K)**. Currently using EEPROM only. To add support to LittleFS and SPIFFS in future releases.
3. Fix Config Portal Bug.
4. Tested with [**Latest ESP32 Core 1.0.5**](https://github.com/espressif/arduino-esp32) for ESP32-based boards.
5. Update examples
---
CONTRIBUTING.md | 4 +-
README.md | 321 +++++++++++++--
.../AM2315_ESP32_SSL/AM2315_ESP32_SSL.ino | 52 ++-
examples/AM2315_ESP32_SSL/defines.h | 46 ++-
examples/AM2315_ESP8266/AM2315_ESP8266.ino | 52 ++-
examples/AM2315_ESP8266/defines.h | 108 +++--
.../Blynk_WM_Template/Blynk_WM_Template.ino | 14 +-
examples/DHT11ESP32/DHT11ESP32.ino | 54 ++-
examples/DHT11ESP32/defines.h | 45 +-
examples/DHT11ESP32_SSL/DHT11ESP32_SSL.ino | 56 ++-
examples/DHT11ESP32_SSL/defines.h | 45 +-
examples/DHT11ESP8266/DHT11ESP8266.ino | 58 ++-
examples/DHT11ESP8266/defines.h | 118 +++---
.../DHT11ESP8266_Debug/DHT11ESP8266_Debug.ino | 60 ++-
examples/DHT11ESP8266_Debug/defines.h | 118 +++---
.../DHT11ESP8266_SSL/DHT11ESP8266_SSL.ino | 56 ++-
examples/DHT11ESP8266_SSL/defines.h | 116 +++---
examples/ESP32WM_Config/ESP32WM_Config.ino | 52 ++-
examples/ESP32WM_Config/defines.h | 29 +-
.../ESP32WM_ForcedConfig.ino | 52 ++-
examples/ESP32WM_ForcedConfig/defines.h | 28 +-
.../ESP32WM_MRD_Config/ESP32WM_MRD_Config.ino | 24 +-
examples/ESP32WM_MRD_Config/defines.h | 34 +-
.../ESP32WM_MRD_ForcedConfig.ino | 52 ++-
examples/ESP32WM_MRD_ForcedConfig/defines.h | 30 +-
.../ESP8266WM_Config/ESP8266WM_Config.ino | 54 ++-
examples/ESP8266WM_Config/defines.h | 19 +-
.../ESP8266WM_ForcedConfig.ino | 54 ++-
examples/ESP8266WM_ForcedConfig/defines.h | 48 ++-
.../ESP8266WM_MRD_Config.ino | 52 ++-
examples/ESP8266WM_MRD_Config/defines.h | 44 +-
.../ESP8266WM_MRD_ForcedConfig.ino | 21 +
examples/ESP8266WM_MRD_ForcedConfig/defines.h | 48 ++-
keywords.txt | 27 +-
library.json | 6 +-
library.properties | 6 +-
pics/esp32_s2_Core_Unzipped.png | Bin 0 -> 45169 bytes
pics/esp32_s2_Toolchain.png | Bin 0 -> 22374 bytes
pics/esp32_s2_esptool.png | Bin 0 -> 46738 bytes
pics/esp32_s2_tools.png | Bin 0 -> 41911 bytes
src/BlynkSimpleEsp32_SSL_WM.h | 360 +++++++++++++---
src/BlynkSimpleEsp32_WM.h | 389 +++++++++++++++---
src/BlynkSimpleEsp8266_SSL_WM.h | 328 ++++++++++++---
src/BlynkSimpleEsp8266_WM.h | 358 +++++++++++++---
44 files changed, 2645 insertions(+), 793 deletions(-)
create mode 100644 pics/esp32_s2_Core_Unzipped.png
create mode 100644 pics/esp32_s2_Toolchain.png
create mode 100644 pics/esp32_s2_esptool.png
create mode 100644 pics/esp32_s2_tools.png
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index cf7300c..de46c6a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -15,7 +15,7 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p
Please ensure to specify the following:
* Arduino IDE version (e.g. 1.8.13) or Platform.io version
-* `ESP8266` or `ESP32` Core Version (e.g. ESP8266 core v2.7.4 or ESP32 v1.0.4)
+* `ESP8266` or `ESP32` Core Version (e.g. ESP8266 core v2.7.4 or ESP32 v1.0.5)
* Contextual information (e.g. what you were trying to achieve)
* Simplest possible steps to reproduce
* Anything that might be relevant in your opinion, such as:
@@ -29,7 +29,7 @@ Please ensure to specify the following:
Arduino IDE version: 1.8.13
ESP8266 Core Version 2.7.4
OS: Ubuntu 20.04 LTS
-Linux Inspiron 5.4.0-60-generic #67-Ubuntu SMP Tue Jan 5 18:31:36 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
+Linux Inspiron 5.4.0-65-generic #73-Ubuntu SMP Mon Jan 18 17:25:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Context:
The board couldn't autoreconnect to Local Blynk Server after router power recycling.
diff --git a/README.md b/README.md
index 6e9206d..f9f28dc 100644
--- a/README.md
+++ b/README.md
@@ -18,6 +18,7 @@
* [Features](#features)
* [Currently supported Boards](#currently-supported-boards)
* [Changelog](#changelog)
+ * [Major Releases v1.2.0](#major-releases-v120)
* [Releases v1.1.3](#releases-v113)
* [Releases v1.1.2](#releases-v112)
* [Releases v1.1.1](#releases-v111)
@@ -33,6 +34,21 @@
* [Installation](#installation)
* [I) For Arduino IDE](#i-for-arduino-ide)
* [II) For VS Code & PlatformIO:](#ii-for-vs-code--platformio)
+* [HOWTO Install esp32-s2 core for ESP32-S2 (Saola, AI-Thinker ESP-12K) boards into Arduino IDE)](#howto-install-esp32-s2-core-for-esp32-s2-saola-ai-thinker-esp-12k-boards-into-arduino-ide)
+ * [1. Save the original esp32 core](#1-save-the-original-esp32-core)
+ * [2. Download esp32-s2 core](#2-download-esp32-s2-core)
+ * [2.1 Download zip](#21-download-zip)
+ * [2.2 Unzip](#22-unzip)
+ * [2.3 Update esp32-s2 core directories](#23-update-esp32-s2-core-directories)
+ * [3. Download tools](#3-download-tools)
+ * [3.1 Download Toolchain for Xtensa (ESP32-S2) based on GCC](#31-download-toolchain-for-xtensa-esp32-s2-based-on-gcc)
+ * [3.2 Download esptool](#32-download-esptool)
+ * [3.3 Unzip](#33-unzip)
+ * [4. Update tools](#4-update-tools)
+ * [4.1 Update Toolchain](#41-update-toolchain)
+ * [4.2 Update esptool](#42-update-esptool)
+ * [5. esp32-s2 WebServer Library Patch](#5-esp32-s2-webserver-library-patch)
+* [Note for Platform IO using ESP32 LittleFS](#note-for-platform-io-using-esp32-littlefs)
* [HOWTO Use analogRead() with ESP32 running WiFi and/or BlueTooth (BT/BLE)](#howto-use-analogread-with-esp32-running-wifi-andor-bluetooth-btble)
* [1. ESP32 has 2 ADCs, named ADC1 and ADC2](#1--esp32-has-2-adcs-named-adc1-and-adc2)
* [2. ESP32 ADCs functions](#2-esp32-adcs-functions)
@@ -44,6 +60,9 @@
* [ 3. Example of Default Credentials](#3-example-of-default-credentials)
* [ 4. How to add dynamic parameters from sketch](#4-how-to-add-dynamic-parameters-from-sketch)
* [ 5. If you don't need to add dynamic parameters](#5-if-you-dont-need-to-add-dynamic-parameters)
+ * [ 6. To use custom HTML Style](#6-to-use-custom-html-style)
+ * [ 7. To use custom Head Elements](#7-to-use-custom-head-elements)
+ * [ 8. To use CORS Header](#8-to-use-cors-header)
* [Important Notes for using Dynamic Parameters' ids](#important-notes-for-using-dynamic-parameters-ids)
* [Important Notes](#important-notes)
* [Why using this Blynk_WiFiManager with MultiWiFi-MultiBlynk features](#why-using-this-blynk_wifimanager-with-multiwifi-multiblynk-features)
@@ -154,7 +173,9 @@ With version `v1.0.5` or later, you can configure:
This [**BlynkESP32_BT_WF** library](https://github.com/khoih-prog/BlynkESP32_BT_WF) currently supports these following boards:
- 1. **ESP8266 and ESP32-based boards using EEPROM, SPIFFS or LittleFS**.
+ 1. **ESP32 using EEPROM, SPIFFS or LittleFS**.
+ 2. **ESP32-S2 (ESP32-S2 Saola, AI-Thinker ESP-12K, etc.) using EEPROM**
+ 3. **ESP8266 using EEPROM, SPIFFS or LittleFS**.
---
@@ -162,6 +183,14 @@ This [**BlynkESP32_BT_WF** library](https://github.com/khoih-prog/BlynkESP32_BT_
## Changelog
+### Major Releases v1.2.0
+
+1. Configurable **Customs HTML Headers**, including Customs Style, Customs Head Elements, CORS Header.
+2. Add support to **ESP32-S2 (ESP32-S2 Saola and AI-Thinker ESP-12K)**. Currently using EEPROM only. To add support to LittleFS and SPIFFS in future releases.
+3. Fix Config Portal Bug.
+4. Tested with [**Latest ESP32 Core 1.0.5**](https://github.com/espressif/arduino-esp32) for ESP32-based boards.
+5. Update examples
+
### Releases v1.1.3
1. To permit autoreset after configurable timeout if DRD/MRD or non-persistent forced-CP. Check [**Good new feature: Blynk.resetAndEnterConfigPortal() Thanks & question #27**](https://github.com/khoih-prog/Blynk_WM/issues/27)
@@ -234,12 +263,13 @@ Thanks to [Thor Johnson](https://github.com/thorathome) to test, suggest and enc
## Prerequisites
1. [`Arduino IDE 1.8.13+`](https://www.arduino.cc/en/Main/Software)
-2. [`Blynk library 0.6.1+`](https://github.com/blynkkk/blynk-library/releases)
-3. [`ESP32 core 1.0.4+`](https://github.com/espressif/arduino-esp32/releases) for ESP32 boards
-4. [`ESP8266 core 2.7.4+`](https://github.com/esp8266/Arduino#installing-with-boards-manager) for ESP8266 boards. To use ESP8266 core 2.7.1+ for LittleFS.
-5. [`ESP_DoubleResetDetector library 1.1.1+`](https://github.com/khoih-prog/ESP_DoubleResetDetector) to use DRD feature. To install, check [](https://www.ardu-badge.com/ESP_DoubleResetDetector).
-6. [`ESP_MultiResetDetector library 1.1.1+`](https://github.com/khoih-prog/ESP_MultiResetDetector) to use MRD feature. To install, check [](https://www.ardu-badge.com/ESP_MultiResetDetector).
-7. [`LittleFS_esp32 v1.0.5+`](https://github.com/lorol/LITTLEFS) to use ESP32 LittleFS.
+2. [`Blynk library 0.6.1+`](https://github.com/blynkkk/blynk-library/releases). [](https://github.com/blynkkk/blynk-library/releases/latest/)
+3. [`ESP32 Core 1.0.5+`](https://github.com/espressif/arduino-esp32) for ESP32-based boards. [](https://github.com/espressif/arduino-esp32/releases/latest/)
+4. [`ESP32S2 Core 1.0.5+`](https://github.com/espressif/arduino-esp32/tree/esp32s2) for ESP32S2-based boards.
+5. [`ESP8266 Core 2.7.4+`](https://github.com/esp8266/Arduino) for ESP8266-based boards. [](https://github.com/esp8266/Arduino/releases/latest/). To use ESP8266 core 2.7.1+ for LittleFS.
+6. [`ESP_DoubleResetDetector library 1.1.1+`](https://github.com/khoih-prog/ESP_DoubleResetDetector) to use DRD feature. To install, check [](https://www.ardu-badge.com/ESP_DoubleResetDetector).
+7. [`ESP_MultiResetDetector library 1.1.1+`](https://github.com/khoih-prog/ESP_MultiResetDetector) to use MRD feature. To install, check [](https://www.ardu-badge.com/ESP_MultiResetDetector).
+8. [`LittleFS_esp32 v1.0.5+`](https://github.com/lorol/LITTLEFS) for ESP32-based boards using LittleFS. To install, check [](https://www.ardu-badge.com/LittleFS_esp32).
---
@@ -288,6 +318,136 @@ Thanks to [Thor Johnson](https://github.com/thorathome) to test, suggest and enc
---
---
+## HOWTO Install esp32-s2 core for ESP32-S2 (Saola, AI-Thinker ESP-12K) boards into Arduino IDE
+
+
+These are instructions demonstrating the steps to install esp32-s2 core on Ubuntu machines. For Windows or other OS'es, just follow the the similar principles and steps.
+
+Assuming you already installed Arduino IDE ESP32 core and the installed directory is
+
+`/home/your_account/.arduino15/packages/esp32`
+
+
+### 1. Save the original esp32 core
+
+First, copy the whole original esp32 core to another safe place. Then delete all the sub-directories of
+
+`/home/your_account/.arduino15/packages/esp32/hardware/esp32/1.0.4`
+
+---
+
+### 2. Download esp32-s2 core
+
+#### 2.1 Download zip
+
+Download [**esp32-s2 core**](https://github.com/espressif/arduino-esp32/tree/esp32s2) in the `zip` format:
+
+`arduino-esp32-esp32s2.zip`
+
+#### 2.2 Unzip
+
+
+
+
+
+#### 2.3 Update esp32-s2 core directories
+
+Copy all subdirectories of esp32-s2 core into `/home/your_account/.arduino15/packages/esp32/hardware/esp32/1.0.4`
+
+---
+
+### 3 Download tools
+
+
+#### 3.1 Download Toolchain for Xtensa (ESP32-S2) based on GCC
+
+Download [**esp32-s2 Toolchain**](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-guides/tools/idf-tools.html#xtensa-esp32s2-elf) corresponding to your environment (linux-amd64, win64, etc.).
+
+For example `xtensa-esp32s2-elf-gcc8_4_0-esp-2020r3-linux-amd64.tar.gz`, then un-archive.
+
+
+
+
+
+
+#### 3.2 Download esptool
+
+
+Download [esptool](https://github.com/espressif/esptool/releases) int the `zip` format:
+
+`esptool-3.0.zip`
+
+#### 3.3 Unzip
+
+
+
+
+
+---
+
+### 4. Update tools
+
+#### 4.1 Update Toolchain
+
+Copy whole `xtensa-esp32s2-elf` directory into `/home/your_account/.arduino15/packages/esp32/hardware/esp32/1.0.4/tools`
+
+
+#### 4.2 Update esptool
+
+Rename `esptool-3.0` directory to `esptool`
+
+
+Copy whole `esptool` directory into `/home/your_account/.arduino15/packages/esp32/hardware/esp32/1.0.4/tools`
+
+
+
+
+
+
+
+### 5. esp32-s2 WebServer Library Patch
+
+If you haven't installed a new version with [WebServer.handleClient delay PR #4350](https://github.com/espressif/arduino-esp32/pull/4350) or haven't applied the above mentioned PR, you have to use the following patch.
+
+
+**To be able to run Config Portal on ESP32-S2 boards**, you have to copy the files in [esp32-s2 WebServer Patch](esp32s2_WebServer_Patch/) directory into esp32-s2 WebServer library directory (~/.arduino15/packages/esp32/hardware/esp32/1.0.4/libraries/WebServer).
+
+Supposing the esp32-s2 version is 1.0.4, these files `WebServer.h/cpp` must be copied into the directory to replace:
+
+- `~/.arduino15/packages/esp32/hardware/esp32/1.0.4/libraries/WebServer/src/WebServer.h`
+- `~/.arduino15/packages/esp32/hardware/esp32/1.0.4/libraries/WebServer/src/WebServer.cpp`
+
+
+---
+
+That's it. You're now ready to compile and test for ESP32-S2 now
+
+---
+---
+
+### Note for Platform IO using ESP32 LittleFS
+
+In Platform IO, to fix the error when using [`LittleFS_esp32 v1.0`](https://github.com/lorol/LITTLEFS) for ESP32-based boards with ESP32 core v1.0.4- (ESP-IDF v3.2-), uncomment the following line
+
+from
+
+```
+//#define CONFIG_LITTLEFS_FOR_IDF_3_2 /* For old IDF - like in release 1.0.4 */
+```
+
+to
+
+```
+#define CONFIG_LITTLEFS_FOR_IDF_3_2 /* For old IDF - like in release 1.0.4 */
+```
+
+It's advisable to use the latest [`LittleFS_esp32 v1.0.5+`](https://github.com/lorol/LITTLEFS) to avoid the issue.
+
+Thanks to [Roshan](https://github.com/solroshan) to report the issue in [Error esp_littlefs.c 'utime_p'](https://github.com/khoih-prog/ESPAsync_WiFiManager/issues/28)
+
+---
+---
+
### HOWTO Use analogRead() with ESP32 running WiFi and/or BlueTooth (BT/BLE)
Please have a look at [**ESP_WiFiManager Issue 39: Not able to read analog port when using the autoconnect example**](https://github.com/khoih-prog/ESP_WiFiManager/issues/39) to have more detailed description and solution of the issue.
@@ -607,6 +767,31 @@ uint16_t NUM_MENU_ITEMS = 0;
```
+#### 6. To use custom HTML Style
+
+```
+const char NewCustomsStyle[] /*PROGMEM*/ = "";
+
+...
+
+Blynk.setCustomsStyle(NewCustomsStyle);
+```
+
+#### 7. To use custom Head Elements
+
+
+```
+Blynk.setCustomsHeadElement("");
+```
+
+#### 8. To use CORS Header
+
+```
+Blynk.setCORSHeader("Your Access-Control-Allow-Origin");
+```
+
+
---
---
@@ -761,7 +946,7 @@ BLYNK_WRITE(BLYNK_PIN_FORCED_CONFIG)
{
if (param.asInt())
{
- Serial.println( F("CP Button Hit. Rebooting") );
+ Serial.println( F("\nCP Button Hit. Rebooting") );
// This will keep CP once, clear after reset, even you didn't enter CP at all.
Blynk.resetAndEnterConfigPortal();
@@ -776,7 +961,7 @@ BLYNK_WRITE(BLYNK_PIN_FORCED_PERS_CONFIG)
{
if (param.asInt())
{
- Serial.println( F("Persistent CP Button Hit. Rebooting") );
+ Serial.println( F("\nPersistent CP Button Hit. Rebooting") );
// This will keep CP forever, until you successfully enter CP, and Save data to clear the flag.
Blynk.resetAndEnterConfigPortalPersistent();
@@ -853,6 +1038,11 @@ void check_status()
}
}
+#if USING_CUSTOMS_STYLE
+const char NewCustomsStyle[] /*PROGMEM*/ = "";
+#endif
+
void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
@@ -902,6 +1092,22 @@ void setup()
//Blynk.setSTAStaticIPConfig(IPAddress(192, 168, 2, 220), IPAddress(192, 168, 2, 1), IPAddress(255, 255, 255, 0),
// IPAddress(4, 4, 4, 4), IPAddress(8, 8, 8, 8));
+//////////////////////////////////////////////
+
+#if USING_CUSTOMS_STYLE
+ Blynk.setCustomsStyle(NewCustomsStyle);
+#endif
+
+#if USING_CUSTOMS_HEAD_ELEMENT
+ Blynk.setCustomsHeadElement("");
+#endif
+
+#if USING_CORS_FEATURE
+ Blynk.setCORSHeader("Your Access-Control-Allow-Origin");
+#endif
+
+ //////////////////////////////////////////////
+
// Use this to default DHCP hostname to ESP8266-XXXXXX or ESP32-XXXXXX
//Blynk.begin();
// Use this to personalize DHCP hostname (RFC952 conformed)
@@ -931,25 +1137,21 @@ void displayCredentials()
{
Serial.println(F("\nYour stored Credentials :"));
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
- Serial.println(String(myMenuItems[i].displayName) + " = " + myMenuItems[i].pdata);
+ Serial.print(myMenuItems[i].displayName);
+ Serial.print(F(" = "));
+ Serial.println(myMenuItems[i].pdata);
}
}
-#endif
-void loop()
+void displayCredentialsInLoop()
{
- Blynk.run();
- timer.run();
- check_status();
-
-#if USE_DYNAMIC_PARAMETERS
static bool displayedCredentials = false;
if (!displayedCredentials)
{
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
if (!strlen(myMenuItems[i].pdata))
{
@@ -963,6 +1165,18 @@ void loop()
}
}
}
+}
+
+#endif
+
+void loop()
+{
+ Blynk.run();
+ timer.run();
+ check_status();
+
+#if USE_DYNAMIC_PARAMETERS
+ displayCredentialsInLoop();
#endif
}
```
@@ -1021,8 +1235,15 @@ void loop()
// (USE_LITTLEFS == false) and (USE_SPIFFS == true) => using SPIFFS for configuration data in WiFiManager
// Those above #define's must be placed before #include
-#define USE_LITTLEFS true
-#define USE_SPIFFS false
+#if ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_PROS2 || ARDUINO_MICROS2 )
+ // Currently, ESP32-S2 only supporting EEPROM. Will fix to support LittleFS and SPIFFS
+ #define USE_LITTLEFS false
+ #define USE_SPIFFS false
+ #warning ESP32-S2 only support supporting EEPROM now.
+#else
+ #define USE_LITTLEFS true
+ #define USE_SPIFFS false
+#endif
#if !( USE_SPIFFS || USE_LITTLEFS)
// EEPROM_SIZE must be <= 2048 and >= CONFIG_DATA_SIZE (currently 172 bytes)
@@ -1031,22 +1252,35 @@ void loop()
#define EEPROM_START 0
#endif
+/////////////////////////////////////////////
+
+// Add customs headers from v1.2.0
+#define USING_CUSTOMS_STYLE true
+#define USING_CUSTOMS_HEAD_ELEMENT true
+#define USING_CORS_FEATURE true
+
+/////////////////////////////////////////////
+
// Force some params in Blynk, only valid for library version 1.0.1 and later
#define TIMEOUT_RECONNECT_WIFI 10000L
#define RESET_IF_CONFIG_TIMEOUT true
#define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
+// Config Timeout 120s (default 60s)
+#define CONFIG_TIMEOUT 120000L
+
#define USE_DYNAMIC_PARAMETERS true
-// Those above #define's must be placed before #include
+// Those above #define's must be placed before #include and
+//////////////////////////////////////////
-//#define USE_SSL true
-#define USE_SSL false
+#define USE_SSL true
+//#define USE_SSL false
#if USE_SSL
-#include
+ #include
#else
-#include
+ #include
#endif
#define PIN_D22 22 // Pin D22 mapped to pin GPIO22/SCL of ESP32
@@ -1150,7 +1384,7 @@ Blynk_WM_Configuration defaultConfig =
#ifndef dynamicParams_h
#define dynamicParams_h
-// USE_DYNAMIC_PARAMETERS defined in defines.h
+// USE_DYNAMIC_PARAMETERS defined in defined.h
/////////////// Start dynamic Credentials ///////////////
@@ -1228,7 +1462,7 @@ The following is the sample terminal output when running example [ESP8266WM_MRD_
```
Starting ESP8266WM_MRD_Config using LittleFS with SSL on ESP8266_NODEMCU
-Blynk_WM SSL for ESP8266 v1.1.3
+Blynk_WM SSL for ESP8266 v1.2.0
ESP_MultiResetDetector v1.1.1
LittleFS Flag read = 0xFFFD0002
multiResetDetectorFlag = 0xFFFD0002
@@ -1308,7 +1542,7 @@ BBBBBB
```
Starting ESP8266WM_MRD_Config using LittleFS with SSL on ESP8266_NODEMCU
-Blynk_WM SSL for ESP8266 v1.1.3
+Blynk_WM SSL for ESP8266 v1.2.0
ESP_MultiResetDetector v1.1.1
LittleFS Flag read = 0xFFFC0003
multiResetDetectorFlag = 0xFFFC0003
@@ -1370,7 +1604,7 @@ The following is the sample terminal output when running example [DHT11ESP8266_S
```
Starting DHT11ESP8266_SSL using LittleFS with SSL on ESP8266_NODEMCU
-Blynk_WM SSL for ESP8266 v1.1.3
+Blynk_WM SSL for ESP8266 v1.2.0
ESP_DoubleResetDetector v1.1.1
[293] Hostname=ESP8266-DHT11-SSL
[316] LoadCfgFile
@@ -1428,7 +1662,7 @@ The following is the sample terminal output when running example [ESP32WM_MRD_Co
```
Starting ESP32WM_MRD_Config using LITTLEFS without SSL on ESP32_DEV
-Blynk_WM for ESP32 v1.1.3
+Blynk_WM for ESP32 v1.2.0
ESP_MultiResetDetector v1.1.1
LittleFS Flag read = 0xFFFE0001
multiResetDetectorFlag = 0xFFFE0001
@@ -1505,7 +1739,7 @@ BBBBBB
```
Starting ESP32WM_MRD_Config using LITTLEFS without SSL on ESP32_DEV
-Blynk_WM for ESP32 v1.1.3
+Blynk_WM for ESP32 v1.2.0
ESP_MultiResetDetector v1.1.1
LittleFS Flag read = 0xFFFC0003
multiResetDetectorFlag = 0xFFFC0003
@@ -1563,7 +1797,7 @@ ets Jun 8 2016 00:22:57
```
Starting ESP32WM_MRD_Config using LITTLEFS without SSL on ESP32_DEV
-Blynk_WM for ESP32 v1.1.3
+Blynk_WM for ESP32 v1.2.0
ESP_MultiResetDetector v1.1.1
LittleFS Flag read = 0xFFFE0001
multiResetDetectorFlag = 0xFFFE0001
@@ -1687,7 +1921,7 @@ The following is the sample terminal output when running example [DHT11ESP8266_S
```
Starting DHT11ESP32_SSL using LITTLEFS with SSL on ESP32_DEV
-Blynk_WM SSL for ESP32 v1.1.3
+Blynk_WM SSL for ESP32 v1.2.0
ESP_DoubleResetDetector v1.1.1
[346] Hostname=ESP32-DHT11-SSL
[385] LoadCfgFile
@@ -1751,7 +1985,7 @@ Blynk.resetAndEnterConfigPortal();
```
Starting ESP8266WM_MRD_ForcedConfig using LittleFS without SSL on ESP8266_NODEMCU
-Blynk_WM for ESP8266 v1.1.3
+Blynk_WM for ESP8266 v1.2.0
ESP_MultiResetDetector v1.1.1
LittleFS Flag read = 0xFFFE0001
multiResetDetectorFlag = 0xFFFE0001
@@ -1837,7 +2071,7 @@ Non-Persistent CP will be removed after first reset, even you didn't enter the C
```
Starting ESP8266WM_MRD_ForcedConfig using LittleFS without SSL on ESP8266_NODEMCU
-Blynk_WM for ESP8266 v1.1.3
+Blynk_WM for ESP8266 v1.2.0
ESP_MultiResetDetector v1.1.1
LittleFS Flag read = 0xFFFE0001
multiResetDetectorFlag = 0xFFFE0001
@@ -1919,7 +2153,7 @@ Blynk.resetAndEnterConfigPortalPersistent();
```
Starting ESP8266WM_MRD_ForcedConfig using LittleFS without SSL on ESP8266_NODEMCU
-Blynk_WM for ESP8266 v1.1.3
+Blynk_WM for ESP8266 v1.2.0
ESP_MultiResetDetector v1.1.1
LittleFS Flag read = 0xFFFE0001
multiResetDetectorFlag = 0xFFFE0001
@@ -2006,7 +2240,7 @@ Persistent CP will remain after resets. The only way to get rid of Config Portal
```
Starting ESP8266WM_MRD_ForcedConfig using LittleFS without SSL on ESP8266_NODEMCU
-Blynk_WM for ESP8266 v1.1.3
+Blynk_WM for ESP8266 v1.2.0
ESP_MultiResetDetector v1.1.1
LittleFS Flag read = 0xFFFE0001
multiResetDetectorFlag = 0xFFFE0001
@@ -2104,6 +2338,14 @@ Sometimes, the library will only work if you update the board core to the latest
## Releases
+### Major Releases v1.2.0
+
+1. Configurable **Customs HTML Headers**, including Customs Style, Customs Head Elements, CORS Header.
+2. Add support to **ESP32-S2 (ESP32-S2 Saola and AI-Thinker ESP-12K)**. Currently using EEPROM only. To add support to LittleFS and SPIFFS in future releases.
+3. Fix Config Portal Bug.
+4. Tested with [**Latest ESP32 Core 1.0.5**](https://github.com/espressif/arduino-esp32) for ESP32-based boards.
+5. Update examples
+
### Releases v1.1.3
1. To permit autoreset after configurable timeout if DRD/MRD or non-persistent forced-CP. Check [**Good new feature: Blynk.resetAndEnterConfigPortal() Thanks & question #27**](https://github.com/khoih-prog/Blynk_WM/issues/27)
@@ -2251,6 +2493,7 @@ Submit issues to: [Blynk_WM issues](https://github.com/khoih-prog/Blynk_WM/issue
## TO DO
1. Fix bug. Add enhancement
+2. Add support to **ESP32-S2 (ESP32-S2 Saola, AI-Thinker ESP-12K, etc.) using LittleFS and SPIFFS**
## DONE
@@ -2281,6 +2524,8 @@ Submit issues to: [Blynk_WM issues](https://github.com/khoih-prog/Blynk_WM/issue
24. Add Table of Contents
25. Add Version String
26. Add functions to control Config Portal from software or Virtual Switches.
+27. Add support to **ESP32-S2 (ESP32-S2 Saola, AI-Thinker ESP-12K, etc.) using EEPROM**
+28. Configurable **Customs HTML Headers**, including Customs Style, Customs Head Elements, CORS Header
---
---
diff --git a/examples/AM2315_ESP32_SSL/AM2315_ESP32_SSL.ino b/examples/AM2315_ESP32_SSL/AM2315_ESP32_SSL.ino
index a990225..6da6c12 100644
--- a/examples/AM2315_ESP32_SSL/AM2315_ESP32_SSL.ino
+++ b/examples/AM2315_ESP32_SSL/AM2315_ESP32_SSL.ino
@@ -7,7 +7,7 @@
Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
Licensed under MIT license
- Version: 1.1.3
+ Version: 1.2.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -32,6 +32,7 @@
1.1.1 K Hoang 16/01/2021 Add functions to control Config Portal from software or Virtual Switches
1.1.2 K Hoang 28/01/2021 Fix Config Portal and Dynamic Params bugs
1.1.3 K Hoang 31/01/2021 To permit autoreset after timeout if DRD/MRD or non-persistent forced-CP
+ 1.2.0 K Hoang 24/02/2021 Add customs HTML header feature and support to ESP32-S2.
*****************************************************************************************************************************/
#include "defines.h"
@@ -126,6 +127,11 @@ void check_status()
}
}
+#if USING_CUSTOMS_STYLE
+const char NewCustomsStyle[] /*PROGMEM*/ = "";
+#endif
+
void setup()
{
Serial.begin(115200);
@@ -178,6 +184,22 @@ void setup()
//Blynk.setSTAStaticIPConfig(IPAddress(192, 168, 2, 220), IPAddress(192, 168, 2, 1), IPAddress(255, 255, 255, 0),
// IPAddress(4, 4, 4, 4), IPAddress(8, 8, 8, 8));
+//////////////////////////////////////////////
+
+#if USING_CUSTOMS_STYLE
+ Blynk.setCustomsStyle(NewCustomsStyle);
+#endif
+
+#if USING_CUSTOMS_HEAD_ELEMENT
+ Blynk.setCustomsHeadElement("");
+#endif
+
+#if USING_CORS_FEATURE
+ Blynk.setCORSHeader("Your Access-Control-Allow-Origin");
+#endif
+
+ //////////////////////////////////////////////
+
// Use this to default DHCP hostname to ESP8266-XXXXXX or ESP32-XXXXXX
//Blynk.begin();
// Use this to personalize DHCP hostname (RFC952 conformed)
@@ -220,25 +242,21 @@ void displayCredentials()
{
Serial.println(F("\nYour stored Credentials :"));
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
- Serial.println(String(myMenuItems[i].displayName) + " = " + myMenuItems[i].pdata);
+ Serial.print(myMenuItems[i].displayName);
+ Serial.print(F(" = "));
+ Serial.println(myMenuItems[i].pdata);
}
}
-#endif
-void loop()
+void displayCredentialsInLoop()
{
- Blynk.run();
- timer.run();
- check_status();
-
-#if (USE_BLYNK_WM && USE_DYNAMIC_PARAMETERS)
static bool displayedCredentials = false;
if (!displayedCredentials)
{
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
if (!strlen(myMenuItems[i].pdata))
{
@@ -252,5 +270,17 @@ void loop()
}
}
}
+}
+
+#endif
+
+void loop()
+{
+ Blynk.run();
+ timer.run();
+ check_status();
+
+#if (USE_BLYNK_WM && USE_DYNAMIC_PARAMETERS)
+ displayCredentialsInLoop();
#endif
}
diff --git a/examples/AM2315_ESP32_SSL/defines.h b/examples/AM2315_ESP32_SSL/defines.h
index 727ac92..3587522 100644
--- a/examples/AM2315_ESP32_SSL/defines.h
+++ b/examples/AM2315_ESP32_SSL/defines.h
@@ -28,8 +28,15 @@
// (USE_LITTLEFS == false) and (USE_SPIFFS == true) => using SPIFFS for configuration data in WiFiManager
// Those above #define's must be placed before #include
-#define USE_LITTLEFS true
-#define USE_SPIFFS false
+#if ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_PROS2 || ARDUINO_MICROS2 )
+ // Currently, ESP32-S2 only supporting EEPROM. Will fix to support LittleFS and SPIFFS
+ #define USE_LITTLEFS false
+ #define USE_SPIFFS false
+ #warning ESP32-S2 only support supporting EEPROM now.
+#else
+ #define USE_LITTLEFS true
+ #define USE_SPIFFS false
+#endif
#if !( USE_SPIFFS || USE_LITTLEFS)
@@ -39,24 +46,36 @@
#define EEPROM_START 0
#endif
-// Force some params in Blynk, only valid for library version 1.0.1 and later
-#define TIMEOUT_RECONNECT_WIFI 10000L
-#define RESET_IF_CONFIG_TIMEOUT true
-#define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
-
-#define USE_DYNAMIC_PARAMETERS true
-// Those above #define's must be placed before #include
-
//You have to download Blynk WiFiManager Blynk_WM library at //https://github.com/khoih-prog/Blynk_WM
// In order to enable (USE_BLYNK_WM = true). Otherwise, use (USE_BLYNK_WM = false)
#define USE_BLYNK_WM true
-//#define USE_BLYNK_WM false
-
-//#define USE_SSL true
#define USE_SSL false
#if USE_BLYNK_WM
+
+ /////////////////////////////////////////////
+
+ // Add customs headers from v1.2.0
+ #define USING_CUSTOMS_STYLE true
+ #define USING_CUSTOMS_HEAD_ELEMENT true
+ #define USING_CORS_FEATURE true
+
+ /////////////////////////////////////////////
+
+ // Force some params in Blynk, only valid for library version 1.0.1 and later
+ #define TIMEOUT_RECONNECT_WIFI 10000L
+ #define RESET_IF_CONFIG_TIMEOUT true
+
+ #define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
+
+ // Config Timeout 120s (default 60s)
+ #define CONFIG_TIMEOUT 120000L
+
+ #define USE_DYNAMIC_PARAMETERS true
+ // Those above #define's must be placed before #include and
+ //////////////////////////////////////////
+
#if USE_SSL
#include //https://github.com/khoih-prog/Blynk_WM
#else
@@ -83,7 +102,6 @@
#endif
#define USE_LOCAL_SERVER true
- //#define USE_LOCAL_SERVER false
// If local server
#if USE_LOCAL_SERVER
diff --git a/examples/AM2315_ESP8266/AM2315_ESP8266.ino b/examples/AM2315_ESP8266/AM2315_ESP8266.ino
index f18f303..a6d6dcf 100644
--- a/examples/AM2315_ESP8266/AM2315_ESP8266.ino
+++ b/examples/AM2315_ESP8266/AM2315_ESP8266.ino
@@ -7,7 +7,7 @@
Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
Licensed under MIT license
- Version: 1.1.3
+ Version: 1.2.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -32,6 +32,7 @@
1.1.1 K Hoang 16/01/2021 Add functions to control Config Portal from software or Virtual Switches
1.1.2 K Hoang 28/01/2021 Fix Config Portal and Dynamic Params bugs
1.1.3 K Hoang 31/01/2021 To permit autoreset after timeout if DRD/MRD or non-persistent forced-CP
+ 1.2.0 K Hoang 24/02/2021 Add customs HTML header feature and support to ESP32-S2.
*****************************************************************************************************************************/
#include "defines.h"
@@ -124,6 +125,11 @@ void check_status()
}
}
+#if USING_CUSTOMS_STYLE
+const char NewCustomsStyle[] /*PROGMEM*/ = "";
+#endif
+
void setup()
{
Serial.begin(115200);
@@ -170,6 +176,22 @@ void setup()
//Blynk.setSTAStaticIPConfig(IPAddress(192, 168, 2, 220), IPAddress(192, 168, 2, 1), IPAddress(255, 255, 255, 0),
// IPAddress(4, 4, 4, 4), IPAddress(8, 8, 8, 8));
+//////////////////////////////////////////////
+
+#if USING_CUSTOMS_STYLE
+ Blynk.setCustomsStyle(NewCustomsStyle);
+#endif
+
+#if USING_CUSTOMS_HEAD_ELEMENT
+ Blynk.setCustomsHeadElement("");
+#endif
+
+#if USING_CORS_FEATURE
+ Blynk.setCORSHeader("Your Access-Control-Allow-Origin");
+#endif
+
+ //////////////////////////////////////////////
+
// Use this to default DHCP hostname to ESP8266-XXXXXX or ESP32-XXXXXX
//Blynk.begin();
// Use this to personalize DHCP hostname (RFC952 conformed)
@@ -214,25 +236,21 @@ void displayCredentials()
{
Serial.println(F("\nYour stored Credentials :"));
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
- Serial.println(String(myMenuItems[i].displayName) + " = " + myMenuItems[i].pdata);
+ Serial.print(myMenuItems[i].displayName);
+ Serial.print(F(" = "));
+ Serial.println(myMenuItems[i].pdata);
}
}
-#endif
-void loop()
+void displayCredentialsInLoop()
{
- Blynk.run();
- timer.run();
- check_status();
-
-#if (USE_BLYNK_WM && USE_DYNAMIC_PARAMETERS)
static bool displayedCredentials = false;
if (!displayedCredentials)
{
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
if (!strlen(myMenuItems[i].pdata))
{
@@ -246,5 +264,17 @@ void loop()
}
}
}
+}
+
+#endif
+
+void loop()
+{
+ Blynk.run();
+ timer.run();
+ check_status();
+
+#if (USE_BLYNK_WM && USE_DYNAMIC_PARAMETERS)
+ displayCredentialsInLoop();
#endif
}
diff --git a/examples/AM2315_ESP8266/defines.h b/examples/AM2315_ESP8266/defines.h
index d43171e..f48dd60 100644
--- a/examples/AM2315_ESP8266/defines.h
+++ b/examples/AM2315_ESP8266/defines.h
@@ -13,7 +13,7 @@
#define defines_h
#ifndef ESP8266
-#error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting.
+ #error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting.
#endif
#define BLYNK_PRINT Serial
@@ -34,72 +34,90 @@
//#define USE_SPIFFS true
#if USE_LITTLEFS
-//LittleFS has higher priority
-#define CurrentFileFS "LittleFS"
-#ifdef USE_SPIFFS
-#undef USE_SPIFFS
-#endif
-#define USE_SPIFFS false
+ //LittleFS has higher priority
+ #define CurrentFileFS "LittleFS"
+ #ifdef USE_SPIFFS
+ #undef USE_SPIFFS
+ #endif
+ #define USE_SPIFFS false
#elif USE_SPIFFS
-#define CurrentFileFS "SPIFFS"
+ #define CurrentFileFS "SPIFFS"
#endif
#if !( USE_LITTLEFS || USE_SPIFFS)
-// EEPROM_SIZE must be <= 4096 and >= CONFIG_DATA_SIZE (currently 172 bytes)
-#define EEPROM_SIZE (4 * 1024)
-// EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE
-#define EEPROM_START 768
+ // EEPROM_SIZE must be <= 4096 and >= CONFIG_DATA_SIZE (currently 172 bytes)
+ #define EEPROM_SIZE (4 * 1024)
+ // EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE
+ #define EEPROM_START 768
#endif
//You have to download Blynk WiFiManager Blynk_WM library at //https://github.com/khoih-prog/Blynk_WM
// In order to enable (USE_BLYNK_WM = true). Otherwise, use (USE_BLYNK_WM = false)
#define USE_BLYNK_WM true
-//#define USE_BLYNK_WM false
#define USE_SSL false
#if USE_BLYNK_WM
-#define USE_DYNAMIC_PARAMETERS true
+ /////////////////////////////////////////////
+
+ // Add customs headers from v1.2.0
+ #define USING_CUSTOMS_STYLE true
+ #define USING_CUSTOMS_HEAD_ELEMENT true
+ #define USING_CORS_FEATURE true
+
+ /////////////////////////////////////////////
+
+ // Force some params in Blynk, only valid for library version 1.0.1 and later
+ #define TIMEOUT_RECONNECT_WIFI 10000L
+ #define RESET_IF_CONFIG_TIMEOUT true
+
+ #define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
+
+ // Config Timeout 120s (default 60s)
+ #define CONFIG_TIMEOUT 120000L
+
+ #define USE_DYNAMIC_PARAMETERS true
+ // Those above #define's must be placed before #include and
+ //////////////////////////////////////////
+
+ #if USE_SSL
+ #include //https://github.com/khoih-prog/Blynk_WM
+ #else
+ #include //https://github.com/khoih-prog/Blynk_WM
+ #endif
+
+ #include "Credentials.h"
+ #include "dynamicParams.h"
-#if USE_SSL
-#include //https://github.com/khoih-prog/Blynk_WM
#else
-#include //https://github.com/khoih-prog/Blynk_WM
-#endif
-
-#include "Credentials.h"
-#include "dynamicParams.h"
-#else
-
-#if USE_SSL
-#include
-#define BLYNK_HARDWARE_PORT 9443
-#else
-#include
-#define BLYNK_HARDWARE_PORT 8080
-#endif
+ #if USE_SSL
+ #include
+ #define BLYNK_HARDWARE_PORT 9443
+ #else
+ #include
+ #define BLYNK_HARDWARE_PORT 8080
+ #endif
#endif
#if !USE_BLYNK_WM
-#ifndef LED_BUILTIN
-#define LED_BUILTIN 2 // Pin D2 mapped to pin GPIO2/ADC12 of ESP32, control on-board LED
-#endif
-
-#define USE_LOCAL_SERVER true
-//#define USE_LOCAL_SERVER false
-
-// If local server
-#if USE_LOCAL_SERVER
-char blynk_server[] = "yourname.duckdns.org";
-#endif
-
-char auth[] = "***";
-char ssid[] = "***";
-char pass[] = "***";
+ #ifndef LED_BUILTIN
+ #define LED_BUILTIN 2 // Pin D2 mapped to pin GPIO2/ADC12 of ESP32, control on-board LED
+ #endif
+
+ #define USE_LOCAL_SERVER true
+
+ // If local server
+ #if USE_LOCAL_SERVER
+ char blynk_server[] = "yourname.duckdns.org";
+ #endif
+
+ char auth[] = "***";
+ char ssid[] = "***";
+ char pass[] = "***";
#endif
diff --git a/examples/Blynk_WM_Template/Blynk_WM_Template.ino b/examples/Blynk_WM_Template/Blynk_WM_Template.ino
index 0ca7071..aa72cd8 100644
--- a/examples/Blynk_WM_Template/Blynk_WM_Template.ino
+++ b/examples/Blynk_WM_Template/Blynk_WM_Template.ino
@@ -8,7 +8,7 @@
Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
Licensed under MIT license
- Version: 1.1.3
+ Version: 1.2.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -33,6 +33,7 @@
1.1.1 K Hoang 16/01/2021 Add functions to control Config Portal from software or Virtual Switches
1.1.2 K Hoang 28/01/2021 Fix Config Portal and Dynamic Params bugs
1.1.3 K Hoang 31/01/2021 To permit autoreset after timeout if DRD/MRD or non-persistent forced-CP
+ 1.2.0 K Hoang 24/02/2021 Add customs HTML header feature and support to ESP32-S2.
*****************************************************************************************************************************/
// Sketch uses Arduino IDE-selected ESP32 and ESP8266 to select compile choices
@@ -175,8 +176,15 @@
// (USE_LITTLEFS == false) and (USE_SPIFFS == true) => using SPIFFS for configuration data in WiFiManager
// Those above #define's must be placed before #include
- #define USE_LITTLEFS true
- #define USE_SPIFFS false
+ #if ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_PROS2 || ARDUINO_MICROS2 )
+ // Currently, ESP32-S2 only supporting EEPROM. Will fix to support LittleFS and SPIFFS
+ #define USE_LITTLEFS false
+ #define USE_SPIFFS false
+ #warning ESP32-S2 only support supporting EEPROM now.
+ #else
+ #define USE_LITTLEFS true
+ #define USE_SPIFFS false
+ #endif
#if USE_LITTLEFS
#warning Using LittleFS for ESP32
diff --git a/examples/DHT11ESP32/DHT11ESP32.ino b/examples/DHT11ESP32/DHT11ESP32.ino
index 1f7f598..2482aeb 100644
--- a/examples/DHT11ESP32/DHT11ESP32.ino
+++ b/examples/DHT11ESP32/DHT11ESP32.ino
@@ -7,7 +7,7 @@
Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
Licensed under MIT license
- Version: 1.1.3
+ Version: 1.2.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -32,6 +32,7 @@
1.1.1 K Hoang 16/01/2021 Add functions to control Config Portal from software or Virtual Switches
1.1.2 K Hoang 28/01/2021 Fix Config Portal and Dynamic Params bugs
1.1.3 K Hoang 31/01/2021 To permit autoreset after timeout if DRD/MRD or non-persistent forced-CP
+ 1.2.0 K Hoang 24/02/2021 Add customs HTML header feature and support to ESP32-S2.
*****************************************************************************************************************************/
#include "defines.h"
@@ -107,6 +108,11 @@ void check_status()
}
}
+#if USING_CUSTOMS_STYLE
+const char NewCustomsStyle[] /*PROGMEM*/ = "";
+#endif
+
void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
@@ -155,6 +161,22 @@ void setup()
//Blynk.setSTAStaticIPConfig(IPAddress(192, 168, 2, 220), IPAddress(192, 168, 2, 1), IPAddress(255, 255, 255, 0),
// IPAddress(4, 4, 4, 4), IPAddress(8, 8, 8, 8));
+//////////////////////////////////////////////
+
+#if USING_CUSTOMS_STYLE
+ Blynk.setCustomsStyle(NewCustomsStyle);
+#endif
+
+#if USING_CUSTOMS_HEAD_ELEMENT
+ Blynk.setCustomsHeadElement("");
+#endif
+
+#if USING_CORS_FEATURE
+ Blynk.setCORSHeader("Your Access-Control-Allow-Origin");
+#endif
+
+ //////////////////////////////////////////////
+
// Use this to default DHCP hostname to ESP8266-XXXXXX or ESP32-XXXXXX
//Blynk.begin();
// Use this to personalize DHCP hostname (RFC952 conformed)
@@ -197,25 +219,21 @@ void displayCredentials()
{
Serial.println(F("\nYour stored Credentials :"));
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
- Serial.println(String(myMenuItems[i].displayName) + " = " + myMenuItems[i].pdata);
+ Serial.print(myMenuItems[i].displayName);
+ Serial.print(F(" = "));
+ Serial.println(myMenuItems[i].pdata);
}
}
-#endif
-void loop()
+void displayCredentialsInLoop()
{
- Blynk.run();
- timer.run();
- check_status();
-
-#if (USE_BLYNK_WM && USE_DYNAMIC_PARAMETERS)
static bool displayedCredentials = false;
if (!displayedCredentials)
{
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
if (!strlen(myMenuItems[i].pdata))
{
@@ -229,5 +247,17 @@ void loop()
}
}
}
-#endif
+}
+
+#endif
+
+void loop()
+{
+ Blynk.run();
+ timer.run();
+ check_status();
+
+#if (USE_BLYNK_WM && USE_DYNAMIC_PARAMETERS)
+ displayCredentialsInLoop();
+#endif
}
diff --git a/examples/DHT11ESP32/defines.h b/examples/DHT11ESP32/defines.h
index 1dc467f..f8d0759 100644
--- a/examples/DHT11ESP32/defines.h
+++ b/examples/DHT11ESP32/defines.h
@@ -28,9 +28,15 @@
// (USE_LITTLEFS == false) and (USE_SPIFFS == true) => using SPIFFS for configuration data in WiFiManager
// Those above #define's must be placed before #include
-#define USE_LITTLEFS true
-#define USE_SPIFFS false
-
+#if ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_PROS2 || ARDUINO_MICROS2 )
+ // Currently, ESP32-S2 only supporting EEPROM. Will fix to support LittleFS and SPIFFS
+ #define USE_LITTLEFS false
+ #define USE_SPIFFS false
+ #warning ESP32-S2 only support supporting EEPROM now.
+#else
+ #define USE_LITTLEFS true
+ #define USE_SPIFFS false
+#endif
#if !( USE_SPIFFS || USE_LITTLEFS)
// EEPROM_SIZE must be <= 2048 and >= CONFIG_DATA_SIZE (currently 172 bytes)
@@ -39,24 +45,35 @@
#define EEPROM_START 0
#endif
-// Force some params in Blynk, only valid for library version 1.0.1 and later
-#define TIMEOUT_RECONNECT_WIFI 10000L
-#define RESET_IF_CONFIG_TIMEOUT true
-#define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
-
-#define USE_DYNAMIC_PARAMETERS true
-// Those above #define's must be placed before #include
-
//You have to download Blynk WiFiManager Blynk_WM library at //https://github.com/khoih-prog/Blynk_WM
// In order to enable (USE_BLYNK_WM = true). Otherwise, use (USE_BLYNK_WM = false)
#define USE_BLYNK_WM true
-//#define USE_BLYNK_WM false
-
-//#define USE_SSL true
#define USE_SSL false
#if USE_BLYNK_WM
+ /////////////////////////////////////////////
+
+ // Add customs headers from v1.2.0
+ #define USING_CUSTOMS_STYLE true
+ #define USING_CUSTOMS_HEAD_ELEMENT true
+ #define USING_CORS_FEATURE true
+
+ /////////////////////////////////////////////
+
+ // Force some params in Blynk, only valid for library version 1.0.1 and later
+ #define TIMEOUT_RECONNECT_WIFI 10000L
+ #define RESET_IF_CONFIG_TIMEOUT true
+
+ #define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
+
+ // Config Timeout 120s (default 60s)
+ #define CONFIG_TIMEOUT 120000L
+
+ #define USE_DYNAMIC_PARAMETERS true
+ // Those above #define's must be placed before #include and
+ //////////////////////////////////////////
+
#if USE_SSL
#include //https://github.com/khoih-prog/Blynk_WM
#else
diff --git a/examples/DHT11ESP32_SSL/DHT11ESP32_SSL.ino b/examples/DHT11ESP32_SSL/DHT11ESP32_SSL.ino
index 2a902cb..83f6b2b 100644
--- a/examples/DHT11ESP32_SSL/DHT11ESP32_SSL.ino
+++ b/examples/DHT11ESP32_SSL/DHT11ESP32_SSL.ino
@@ -7,7 +7,7 @@
Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
Licensed under MIT license
- Version: 1.1.3
+ Version: 1.2.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -32,6 +32,7 @@
1.1.1 K Hoang 16/01/2021 Add functions to control Config Portal from software or Virtual Switches
1.1.2 K Hoang 28/01/2021 Fix Config Portal and Dynamic Params bugs
1.1.3 K Hoang 31/01/2021 To permit autoreset after timeout if DRD/MRD or non-persistent forced-CP
+ 1.2.0 K Hoang 24/02/2021 Add customs HTML header feature and support to ESP32-S2.
*****************************************************************************************************************************/
#include "defines.h"
@@ -107,6 +108,11 @@ void check_status()
}
}
+#if USING_CUSTOMS_STYLE
+const char NewCustomsStyle[] /*PROGMEM*/ = "";
+#endif
+
void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
@@ -155,6 +161,22 @@ void setup()
//Blynk.setSTAStaticIPConfig(IPAddress(192, 168, 2, 220), IPAddress(192, 168, 2, 1), IPAddress(255, 255, 255, 0),
// IPAddress(4, 4, 4, 4), IPAddress(8, 8, 8, 8));
+//////////////////////////////////////////////
+
+#if USING_CUSTOMS_STYLE
+ Blynk.setCustomsStyle(NewCustomsStyle);
+#endif
+
+#if USING_CUSTOMS_HEAD_ELEMENT
+ Blynk.setCustomsHeadElement("");
+#endif
+
+#if USING_CORS_FEATURE
+ Blynk.setCORSHeader("Your Access-Control-Allow-Origin");
+#endif
+
+ //////////////////////////////////////////////
+
// Use this to default DHCP hostname to ESP8266-XXXXXX or ESP32-XXXXXX
//Blynk.begin();
// Use this to personalize DHCP hostname (RFC952 conformed)
@@ -193,29 +215,25 @@ void setup()
}
#if (USE_BLYNK_WM && USE_DYNAMIC_PARAMETERS)
-void displayCredentials(void)
+void displayCredentials()
{
Serial.println(F("\nYour stored Credentials :"));
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
- Serial.println(String(myMenuItems[i].displayName) + " = " + myMenuItems[i].pdata);
+ Serial.print(myMenuItems[i].displayName);
+ Serial.print(F(" = "));
+ Serial.println(myMenuItems[i].pdata);
}
}
-#endif
-void loop()
+void displayCredentialsInLoop()
{
- Blynk.run();
- timer.run();
- check_status();
-
-#if (USE_BLYNK_WM && USE_DYNAMIC_PARAMETERS)
static bool displayedCredentials = false;
if (!displayedCredentials)
{
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
if (!strlen(myMenuItems[i].pdata))
{
@@ -229,5 +247,17 @@ void loop()
}
}
}
-#endif
+}
+
+#endif
+
+void loop()
+{
+ Blynk.run();
+ timer.run();
+ check_status();
+
+#if (USE_BLYNK_WM && USE_DYNAMIC_PARAMETERS)
+ displayCredentialsInLoop();
+#endif
}
diff --git a/examples/DHT11ESP32_SSL/defines.h b/examples/DHT11ESP32_SSL/defines.h
index 59825ba..bdb983e 100644
--- a/examples/DHT11ESP32_SSL/defines.h
+++ b/examples/DHT11ESP32_SSL/defines.h
@@ -28,9 +28,15 @@
// (USE_LITTLEFS == false) and (USE_SPIFFS == true) => using SPIFFS for configuration data in WiFiManager
// Those above #define's must be placed before #include
-#define USE_LITTLEFS true
-#define USE_SPIFFS false
-
+#if ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_PROS2 || ARDUINO_MICROS2 )
+ // Currently, ESP32-S2 only supporting EEPROM. Will fix to support LittleFS and SPIFFS
+ #define USE_LITTLEFS false
+ #define USE_SPIFFS false
+ #warning ESP32-S2 only support supporting EEPROM now.
+#else
+ #define USE_LITTLEFS true
+ #define USE_SPIFFS false
+#endif
#if !( USE_SPIFFS || USE_LITTLEFS)
// EEPROM_SIZE must be <= 2048 and >= CONFIG_DATA_SIZE (currently 172 bytes)
@@ -38,24 +44,36 @@
// EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE
#define EEPROM_START 0
#endif
-// Force some params in Blynk, only valid for library version 1.0.1 and later
-#define TIMEOUT_RECONNECT_WIFI 10000L
-#define RESET_IF_CONFIG_TIMEOUT true
-#define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
-
-#define USE_DYNAMIC_PARAMETERS true
-// Those above #define's must be placed before #include
//You have to download Blynk WiFiManager Blynk_WM library at //https://github.com/khoih-prog/Blynk_WM
// In order to enable (USE_BLYNK_WM = true). Otherwise, use (USE_BLYNK_WM = false)
#define USE_BLYNK_WM true
-//#define USE_BLYNK_WM false
-
#define USE_SSL true
-//#define USE_SSL false
#if USE_BLYNK_WM
+ /////////////////////////////////////////////
+
+ // Add customs headers from v1.2.0
+ #define USING_CUSTOMS_STYLE true
+ #define USING_CUSTOMS_HEAD_ELEMENT true
+ #define USING_CORS_FEATURE true
+
+ /////////////////////////////////////////////
+
+ // Force some params in Blynk, only valid for library version 1.0.1 and later
+ #define TIMEOUT_RECONNECT_WIFI 10000L
+ #define RESET_IF_CONFIG_TIMEOUT true
+
+ #define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
+
+ // Config Timeout 120s (default 60s)
+ #define CONFIG_TIMEOUT 120000L
+
+ #define USE_DYNAMIC_PARAMETERS true
+ // Those above #define's must be placed before #include and
+ //////////////////////////////////////////
+
#if USE_SSL
#include //https://github.com/khoih-prog/Blynk_WM
#else
@@ -82,7 +100,6 @@
#endif
#define USE_LOCAL_SERVER true
- //#define USE_LOCAL_SERVER false
// If local server
#if USE_LOCAL_SERVER
diff --git a/examples/DHT11ESP8266/DHT11ESP8266.ino b/examples/DHT11ESP8266/DHT11ESP8266.ino
index 282d176..16ac6a7 100644
--- a/examples/DHT11ESP8266/DHT11ESP8266.ino
+++ b/examples/DHT11ESP8266/DHT11ESP8266.ino
@@ -7,7 +7,7 @@
Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
Licensed under MIT license
- Version: 1.1.3
+ Version: 1.2.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -32,6 +32,7 @@
1.1.1 K Hoang 16/01/2021 Add functions to control Config Portal from software or Virtual Switches
1.1.2 K Hoang 28/01/2021 Fix Config Portal and Dynamic Params bugs
1.1.3 K Hoang 31/01/2021 To permit autoreset after timeout if DRD/MRD or non-persistent forced-CP
+ 1.2.0 K Hoang 24/02/2021 Add customs HTML header feature and support to ESP32-S2.
*****************************************************************************************************************************/
#include "defines.h"
@@ -107,6 +108,11 @@ void check_status()
}
}
+#if USING_CUSTOMS_STYLE
+const char NewCustomsStyle[] /*PROGMEM*/ = "";
+#endif
+
void setup()
{
pinMode(PIN_LED, OUTPUT);
@@ -155,6 +161,22 @@ void setup()
//Blynk.setSTAStaticIPConfig(IPAddress(192, 168, 2, 220), IPAddress(192, 168, 2, 1), IPAddress(255, 255, 255, 0),
// IPAddress(4, 4, 4, 4), IPAddress(8, 8, 8, 8));
+//////////////////////////////////////////////
+
+#if USING_CUSTOMS_STYLE
+ Blynk.setCustomsStyle(NewCustomsStyle);
+#endif
+
+#if USING_CUSTOMS_HEAD_ELEMENT
+ Blynk.setCustomsHeadElement("");
+#endif
+
+#if USING_CORS_FEATURE
+ Blynk.setCORSHeader("Your Access-Control-Allow-Origin");
+#endif
+
+ //////////////////////////////////////////////
+
// Use this to default DHCP hostname to ESP8266-XXXXXX or ESP32-XXXXXX
//Blynk.begin();
// Use this to personalize DHCP hostname (RFC952 conformed)
@@ -195,29 +217,25 @@ void setup()
}
#if (USE_BLYNK_WM && USE_DYNAMIC_PARAMETERS)
-void displayCredentials(void)
+void displayCredentials()
{
- Serial.println("\nYour stored Credentials :");
+ Serial.println(F("\nYour stored Credentials :"));
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
- Serial.println(String(myMenuItems[i].displayName) + " = " + myMenuItems[i].pdata);
+ Serial.print(myMenuItems[i].displayName);
+ Serial.print(F(" = "));
+ Serial.println(myMenuItems[i].pdata);
}
}
-#endif
-void loop()
+void displayCredentialsInLoop()
{
- Blynk.run();
- timer.run();
- check_status();
-
-#if (USE_BLYNK_WM && USE_DYNAMIC_PARAMETERS)
static bool displayedCredentials = false;
if (!displayedCredentials)
{
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
if (!strlen(myMenuItems[i].pdata))
{
@@ -231,5 +249,17 @@ void loop()
}
}
}
-#endif
+}
+
+#endif
+
+void loop()
+{
+ Blynk.run();
+ timer.run();
+ check_status();
+
+#if (USE_BLYNK_WM && USE_DYNAMIC_PARAMETERS)
+ displayCredentialsInLoop();
+#endif
}
diff --git a/examples/DHT11ESP8266/defines.h b/examples/DHT11ESP8266/defines.h
index 5197afc..07e41db 100644
--- a/examples/DHT11ESP8266/defines.h
+++ b/examples/DHT11ESP8266/defines.h
@@ -13,7 +13,7 @@
#define defines_h
#ifndef ESP8266
-#error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting.
+ #error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting.
#endif
#define BLYNK_PRINT Serial
@@ -34,77 +34,89 @@
//#define USE_SPIFFS true
#if USE_LITTLEFS
-//LittleFS has higher priority
-#define CurrentFileFS "LittleFS"
-#ifdef USE_SPIFFS
-#undef USE_SPIFFS
-#endif
-#define USE_SPIFFS false
+ //LittleFS has higher priority
+ #define CurrentFileFS "LittleFS"
+ #ifdef USE_SPIFFS
+ #undef USE_SPIFFS
+ #endif
+ #define USE_SPIFFS false
#elif USE_SPIFFS
-#define CurrentFileFS "SPIFFS"
+ #define CurrentFileFS "SPIFFS"
#endif
#if !( USE_LITTLEFS || USE_SPIFFS)
-// EEPROM_SIZE must be <= 4096 and >= CONFIG_DATA_SIZE (currently 172 bytes)
-#define EEPROM_SIZE (4 * 1024)
-// EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE
-#define EEPROM_START 768
+ // EEPROM_SIZE must be <= 4096 and >= CONFIG_DATA_SIZE (currently 172 bytes)
+ #define EEPROM_SIZE (4 * 1024)
+ // EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE
+ #define EEPROM_START 768
#endif
-// Force some params in Blynk, only valid for library version 1.0.1 and later
-#define TIMEOUT_RECONNECT_WIFI 10000L
-#define RESET_IF_CONFIG_TIMEOUT true
-#define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
-
-#define USE_DYNAMIC_PARAMETERS true
-// Those above #define's must be placed before #include
+//////////////////////////////////////////
//You have to download Blynk WiFiManager Blynk_WM library at //https://github.com/khoih-prog/Blynk_WM
// In order to enable (USE_BLYNK_WM = true). Otherwise, use (USE_BLYNK_WM = false)
-#define USE_BLYNK_WM true
-//#define USE_BLYNK_WM false
+#define USE_BLYNK_WM true
-//#define USE_SSL true
-#define USE_SSL false
+#define USE_SSL false
#if USE_BLYNK_WM
-#if USE_SSL
-#include //https://github.com/khoih-prog/Blynk_WM
-#else
-#include //https://github.com/khoih-prog/Blynk_WM
-#endif
-
-#include "Credentials.h"
-#include "dynamicParams.h"
+ /////////////////////////////////////////////
+
+ // Add customs headers from v1.2.0
+ #define USING_CUSTOMS_STYLE true
+ #define USING_CUSTOMS_HEAD_ELEMENT true
+ #define USING_CORS_FEATURE true
+
+ /////////////////////////////////////////////
+
+ // Force some params in Blynk, only valid for library version 1.0.1 and later
+ #define TIMEOUT_RECONNECT_WIFI 10000L
+ #define RESET_IF_CONFIG_TIMEOUT true
+
+ #define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
+
+ // Config Timeout 120s (default 60s)
+ #define CONFIG_TIMEOUT 120000L
+
+ #define USE_DYNAMIC_PARAMETERS true
+
+ // Those above #define's must be placed before #include and
+ #if USE_SSL
+ #include //https://github.com/khoih-prog/Blynk_WM
+ #else
+ #include //https://github.com/khoih-prog/Blynk_WM
+ #endif
+
+ #include "Credentials.h"
+ #include "dynamicParams.h"
#else
-#if USE_SSL
-#include
-#define BLYNK_HARDWARE_PORT 9443
-#else
-#include
-#define BLYNK_HARDWARE_PORT 8080
-#endif
+ #if USE_SSL
+ #include
+ #define BLYNK_HARDWARE_PORT 9443
+ #else
+ #include
+ #define BLYNK_HARDWARE_PORT 8080
+ #endif
#endif
#if !USE_BLYNK_WM
-#ifndef LED_BUILTIN
-#define LED_BUILTIN 2 // Pin D2 control on-board LED
-#endif
-
-#define USE_LOCAL_SERVER true
-//#define USE_LOCAL_SERVER false
-
-// If local server
-#if USE_LOCAL_SERVER
-char blynk_server[] = "yourname.duckdns.org";
-#endif
-
-char auth[] = "***";
-char ssid[] = "***";
-char pass[] = "***";
+ #ifndef LED_BUILTIN
+ #define LED_BUILTIN 2 // Pin D2 control on-board LED
+ #endif
+
+ #define USE_LOCAL_SERVER true
+
+ // If local server
+ #if USE_LOCAL_SERVER
+ char blynk_server[] = "yourname.duckdns.org";
+ #endif
+
+ char auth[] = "***";
+ char ssid[] = "***";
+ char pass[] = "***";
#endif
diff --git a/examples/DHT11ESP8266_Debug/DHT11ESP8266_Debug.ino b/examples/DHT11ESP8266_Debug/DHT11ESP8266_Debug.ino
index 650182e..3d27da7 100644
--- a/examples/DHT11ESP8266_Debug/DHT11ESP8266_Debug.ino
+++ b/examples/DHT11ESP8266_Debug/DHT11ESP8266_Debug.ino
@@ -7,7 +7,7 @@
Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
Licensed under MIT license
- Version: 1.1.3
+ Version: 1.2.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -32,6 +32,7 @@
1.1.1 K Hoang 16/01/2021 Add functions to control Config Portal from software or Virtual Switches
1.1.2 K Hoang 28/01/2021 Fix Config Portal and Dynamic Params bugs
1.1.3 K Hoang 31/01/2021 To permit autoreset after timeout if DRD/MRD or non-persistent forced-CP
+ 1.2.0 K Hoang 24/02/2021 Add customs HTML header feature and support to ESP32-S2.
*****************************************************************************************************************************/
#include "defines.h"
@@ -107,6 +108,11 @@ void check_status()
}
}
+#if USING_CUSTOMS_STYLE
+const char NewCustomsStyle[] /*PROGMEM*/ = "";
+#endif
+
void setup()
{
pinMode(PIN_LED, OUTPUT);
@@ -120,7 +126,7 @@ void setup()
#if ( USE_LITTLEFS || USE_SPIFFS)
Serial.print(F("\nStarting DHT11ESP8266_Debug using "));
Serial.print(CurrentFileFS);
-#else)
+#else
Serial.print(F("\nStarting DHT11ESP8266_Debug using EEPROM");
#endif
@@ -155,6 +161,22 @@ void setup()
//Blynk.setSTAStaticIPConfig(IPAddress(192, 168, 2, 220), IPAddress(192, 168, 2, 1), IPAddress(255, 255, 255, 0),
// IPAddress(4, 4, 4, 4), IPAddress(8, 8, 8, 8));
+//////////////////////////////////////////////
+
+#if USING_CUSTOMS_STYLE
+ Blynk.setCustomsStyle(NewCustomsStyle);
+#endif
+
+#if USING_CUSTOMS_HEAD_ELEMENT
+ Blynk.setCustomsHeadElement("");
+#endif
+
+#if USING_CORS_FEATURE
+ Blynk.setCORSHeader("Your Access-Control-Allow-Origin");
+#endif
+
+ //////////////////////////////////////////////
+
// Use this to default DHCP hostname to ESP8266-XXXXXX or ESP32-XXXXXX
//Blynk.begin();
// Use this to personalize DHCP hostname (RFC952 conformed)
@@ -195,29 +217,25 @@ void setup()
}
#if (USE_BLYNK_WM && USE_DYNAMIC_PARAMETERS)
-void displayCredentials(void)
+void displayCredentials()
{
- Serial.println("\nYour stored Credentials :");
+ Serial.println(F("\nYour stored Credentials :"));
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
- Serial.println(String(myMenuItems[i].displayName) + " = " + myMenuItems[i].pdata);
+ Serial.print(myMenuItems[i].displayName);
+ Serial.print(F(" = "));
+ Serial.println(myMenuItems[i].pdata);
}
}
-#endif
-void loop()
+void displayCredentialsInLoop()
{
- Blynk.run();
- timer.run();
- check_status();
-
-#if (USE_BLYNK_WM && USE_DYNAMIC_PARAMETERS)
static bool displayedCredentials = false;
if (!displayedCredentials)
{
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
if (!strlen(myMenuItems[i].pdata))
{
@@ -231,5 +249,17 @@ void loop()
}
}
}
-#endif
+}
+
+#endif
+
+void loop()
+{
+ Blynk.run();
+ timer.run();
+ check_status();
+
+#if (USE_BLYNK_WM && USE_DYNAMIC_PARAMETERS)
+ displayCredentialsInLoop();
+#endif
}
diff --git a/examples/DHT11ESP8266_Debug/defines.h b/examples/DHT11ESP8266_Debug/defines.h
index 2f546b2..d55c4cc 100644
--- a/examples/DHT11ESP8266_Debug/defines.h
+++ b/examples/DHT11ESP8266_Debug/defines.h
@@ -13,7 +13,7 @@
#define defines_h
#ifndef ESP8266
-#error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting.
+ #error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting.
#endif
#define BLYNK_PRINT Serial
@@ -34,77 +34,89 @@
//#define USE_SPIFFS true
#if USE_LITTLEFS
-//LittleFS has higher priority
-#define CurrentFileFS "LittleFS"
-#ifdef USE_SPIFFS
-#undef USE_SPIFFS
-#endif
-#define USE_SPIFFS false
+ //LittleFS has higher priority
+ #define CurrentFileFS "LittleFS"
+ #ifdef USE_SPIFFS
+ #undef USE_SPIFFS
+ #endif
+ #define USE_SPIFFS false
#elif USE_SPIFFS
-#define CurrentFileFS "SPIFFS"
+ #define CurrentFileFS "SPIFFS"
#endif
#if !( USE_LITTLEFS || USE_SPIFFS)
-// EEPROM_SIZE must be <= 4096 and >= CONFIG_DATA_SIZE (currently 172 bytes)
-#define EEPROM_SIZE (4 * 1024)
-// EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE
-#define EEPROM_START 768
+ // EEPROM_SIZE must be <= 4096 and >= CONFIG_DATA_SIZE (currently 172 bytes)
+ #define EEPROM_SIZE (4 * 1024)
+ // EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE
+ #define EEPROM_START 768
#endif
-// Force some params in Blynk, only valid for library version 1.0.1 and later
-#define TIMEOUT_RECONNECT_WIFI 10000L
-#define RESET_IF_CONFIG_TIMEOUT true
-#define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
-
-#define USE_DYNAMIC_PARAMETERS true
-// Those above #define's must be placed before #include
+//////////////////////////////////////////
//You have to download Blynk WiFiManager Blynk_WM library at //https://github.com/khoih-prog/Blynk_WM
// In order to enable (USE_BLYNK_WM = true). Otherwise, use (USE_BLYNK_WM = false)
-#define USE_BLYNK_WM true
-//#define USE_BLYNK_WM false
+#define USE_BLYNK_WM true
-//#define USE_SSL true
-#define USE_SSL false
+#define USE_SSL false
#if USE_BLYNK_WM
-#if USE_SSL
-#include //https://github.com/khoih-prog/Blynk_WM
-#else
-#include //https://github.com/khoih-prog/Blynk_WM
-#endif
-
-#include "Credentials.h"
-#include "dynamicParams.h"
+ /////////////////////////////////////////////
+
+ // Add customs headers from v1.2.0
+ #define USING_CUSTOMS_STYLE true
+ #define USING_CUSTOMS_HEAD_ELEMENT true
+ #define USING_CORS_FEATURE true
+
+ /////////////////////////////////////////////
+
+ // Force some params in Blynk, only valid for library version 1.0.1 and later
+ #define TIMEOUT_RECONNECT_WIFI 10000L
+ #define RESET_IF_CONFIG_TIMEOUT true
+
+ #define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
+
+ // Config Timeout 120s (default 60s)
+ #define CONFIG_TIMEOUT 120000L
+
+ #define USE_DYNAMIC_PARAMETERS true
+ // Those above #define's must be placed before #include and
+
+ #if USE_SSL
+ #include //https://github.com/khoih-prog/Blynk_WM
+ #else
+ #include //https://github.com/khoih-prog/Blynk_WM
+ #endif
+
+ #include "Credentials.h"
+ #include "dynamicParams.h"
#else
-#if USE_SSL
-#include
-#define BLYNK_HARDWARE_PORT 9443
-#else
-#include
-#define BLYNK_HARDWARE_PORT 8080
-#endif
+ #if USE_SSL
+ #include
+ #define BLYNK_HARDWARE_PORT 9443
+ #else
+ #include
+ #define BLYNK_HARDWARE_PORT 8080
+ #endif
#endif
#if !USE_BLYNK_WM
-#ifndef LED_BUILTIN
-#define LED_BUILTIN 2 // Pin D2 control on-board LED
-#endif
-
-#define USE_LOCAL_SERVER true
-//#define USE_LOCAL_SERVER false
-
-// If local server
-#if USE_LOCAL_SERVER
-char blynk_server[] = "yourname.duckdns.org";
-#endif
-
-char auth[] = "***";
-char ssid[] = "***";
-char pass[] = "***";
+ #ifndef LED_BUILTIN
+ #define LED_BUILTIN 2 // Pin D2 control on-board LED
+ #endif
+
+ #define USE_LOCAL_SERVER true
+
+ // If local server
+ #if USE_LOCAL_SERVER
+ char blynk_server[] = "yourname.duckdns.org";
+ #endif
+
+ char auth[] = "***";
+ char ssid[] = "***";
+ char pass[] = "***";
#endif
diff --git a/examples/DHT11ESP8266_SSL/DHT11ESP8266_SSL.ino b/examples/DHT11ESP8266_SSL/DHT11ESP8266_SSL.ino
index 3427e03..318efec 100644
--- a/examples/DHT11ESP8266_SSL/DHT11ESP8266_SSL.ino
+++ b/examples/DHT11ESP8266_SSL/DHT11ESP8266_SSL.ino
@@ -7,7 +7,7 @@
Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
Licensed under MIT license
- Version: 1.1.3
+ Version: 1.2.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -32,6 +32,7 @@
1.1.1 K Hoang 16/01/2021 Add functions to control Config Portal from software or Virtual Switches
1.1.2 K Hoang 28/01/2021 Fix Config Portal and Dynamic Params bugs
1.1.3 K Hoang 31/01/2021 To permit autoreset after timeout if DRD/MRD or non-persistent forced-CP
+ 1.2.0 K Hoang 24/02/2021 Add customs HTML header feature and support to ESP32-S2.
*****************************************************************************************************************************/
#include "defines.h"
@@ -107,6 +108,11 @@ void check_status()
}
}
+#if USING_CUSTOMS_STYLE
+const char NewCustomsStyle[] /*PROGMEM*/ = "";
+#endif
+
void setup()
{
pinMode(PIN_LED, OUTPUT);
@@ -154,6 +160,22 @@ void setup()
//Blynk.setSTAStaticIPConfig(IPAddress(192, 168, 2, 220), IPAddress(192, 168, 2, 1), IPAddress(255, 255, 255, 0),
// IPAddress(4, 4, 4, 4), IPAddress(8, 8, 8, 8));
+//////////////////////////////////////////////
+
+#if USING_CUSTOMS_STYLE
+ Blynk.setCustomsStyle(NewCustomsStyle);
+#endif
+
+#if USING_CUSTOMS_HEAD_ELEMENT
+ Blynk.setCustomsHeadElement("");
+#endif
+
+#if USING_CORS_FEATURE
+ Blynk.setCORSHeader("Your Access-Control-Allow-Origin");
+#endif
+
+ //////////////////////////////////////////////
+
// Use this to default DHCP hostname to ESP8266-XXXXXX or ESP32-XXXXXX
//Blynk.begin();
// Use this to personalize DHCP hostname (RFC952 conformed)
@@ -194,29 +216,25 @@ void setup()
}
#if (USE_BLYNK_WM && USE_DYNAMIC_PARAMETERS)
-void displayCredentials(void)
+void displayCredentials()
{
Serial.println(F("\nYour stored Credentials :"));
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
- Serial.println(String(myMenuItems[i].displayName) + " = " + myMenuItems[i].pdata);
+ Serial.print(myMenuItems[i].displayName);
+ Serial.print(F(" = "));
+ Serial.println(myMenuItems[i].pdata);
}
}
-#endif
-void loop()
+void displayCredentialsInLoop()
{
- Blynk.run();
- timer.run();
- check_status();
-
-#if (USE_BLYNK_WM && USE_DYNAMIC_PARAMETERS)
static bool displayedCredentials = false;
if (!displayedCredentials)
{
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
if (!strlen(myMenuItems[i].pdata))
{
@@ -230,5 +248,17 @@ void loop()
}
}
}
-#endif
+}
+
+#endif
+
+void loop()
+{
+ Blynk.run();
+ timer.run();
+ check_status();
+
+#if (USE_BLYNK_WM && USE_DYNAMIC_PARAMETERS)
+ displayCredentialsInLoop();
+#endif
}
diff --git a/examples/DHT11ESP8266_SSL/defines.h b/examples/DHT11ESP8266_SSL/defines.h
index b27fe94..73d4d27 100644
--- a/examples/DHT11ESP8266_SSL/defines.h
+++ b/examples/DHT11ESP8266_SSL/defines.h
@@ -13,7 +13,7 @@
#define defines_h
#ifndef ESP8266
-#error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting.
+ #error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting.
#endif
#define BLYNK_PRINT Serial
@@ -29,82 +29,92 @@
// Select USE_LITTLEFS (higher priority) or USE_SPIFFS
#define USE_LITTLEFS true
-//#define USE_LITTLEFS false
#define USE_SPIFFS false
-//#define USE_SPIFFS true
#if USE_LITTLEFS
-//LittleFS has higher priority
-#define CurrentFileFS "LittleFS"
-#ifdef USE_SPIFFS
-#undef USE_SPIFFS
-#endif
-#define USE_SPIFFS false
+ //LittleFS has higher priority
+ #define CurrentFileFS "LittleFS"
+ #ifdef USE_SPIFFS
+ #undef USE_SPIFFS
+ #endif
+ #define USE_SPIFFS false
#elif USE_SPIFFS
-#define CurrentFileFS "SPIFFS"
+ #define CurrentFileFS "SPIFFS"
#endif
#if !( USE_LITTLEFS || USE_SPIFFS)
-// EEPROM_SIZE must be <= 4096 and >= CONFIG_DATA_SIZE (currently 172 bytes)
-#define EEPROM_SIZE (4 * 1024)
-// EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE
-#define EEPROM_START 0
+ // EEPROM_SIZE must be <= 4096 and >= CONFIG_DATA_SIZE (currently 172 bytes)
+ #define EEPROM_SIZE (4 * 1024)
+ // EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE
+ #define EEPROM_START 0
#endif
-// Force some params in Blynk, only valid for library version 1.0.1 and later
-#define TIMEOUT_RECONNECT_WIFI 10000L
-#define RESET_IF_CONFIG_TIMEOUT true
-#define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
-
-#define USE_DYNAMIC_PARAMETERS true
-// Those above #define's must be placed before #include
+//////////////////////////////////////////
//You have to download Blynk WiFiManager Blynk_WM library at //https://github.com/khoih-prog/Blynk_WM
// In order to enable (USE_BLYNK_WM = true). Otherwise, use (USE_BLYNK_WM = false)
#define USE_BLYNK_WM true
-//#define USE_BLYNK_WM false
#define USE_SSL true
-//#define USE_SSL false
#if USE_BLYNK_WM
-#if USE_SSL
-#include //https://github.com/khoih-prog/Blynk_WM
-#else
-#include //https://github.com/khoih-prog/Blynk_WM
-#endif
-
-#include "Credentials.h"
-#include "dynamicParams.h"
+ /////////////////////////////////////////////
+
+ // Add customs headers from v1.2.0
+ #define USING_CUSTOMS_STYLE true
+ #define USING_CUSTOMS_HEAD_ELEMENT true
+ #define USING_CORS_FEATURE true
+
+ /////////////////////////////////////////////
+
+ // Force some params in Blynk, only valid for library version 1.0.1 and later
+ #define TIMEOUT_RECONNECT_WIFI 10000L
+ #define RESET_IF_CONFIG_TIMEOUT true
+
+ #define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
+
+ // Config Timeout 120s (default 60s)
+ #define CONFIG_TIMEOUT 120000L
+
+ #define USE_DYNAMIC_PARAMETERS true
+ // Those above #define's must be placed before #include and
+
+ #if USE_SSL
+ #include //https://github.com/khoih-prog/Blynk_WM
+ #else
+ #include //https://github.com/khoih-prog/Blynk_WM
+ #endif
+
+ #include "Credentials.h"
+ #include "dynamicParams.h"
#else
-#if USE_SSL
-#include
-#define BLYNK_HARDWARE_PORT 9443
-#else
-#include
-#define BLYNK_HARDWARE_PORT 8080
-#endif
+ #if USE_SSL
+ #include
+ #define BLYNK_HARDWARE_PORT 9443
+ #else
+ #include
+ #define BLYNK_HARDWARE_PORT 8080
+ #endif
#endif
#if !USE_BLYNK_WM
-#ifndef LED_BUILTIN
-#define LED_BUILTIN 2 // Pin D2 control on-board LED
-#endif
-
-#define USE_LOCAL_SERVER true
-//#define USE_LOCAL_SERVER false
-
-// If local server
-#if USE_LOCAL_SERVER
-char blynk_server[] = "yourname.duckdns.org";
-#endif
-
-char auth[] = "***";
-char ssid[] = "***";
-char pass[] = "***";
+ #ifndef LED_BUILTIN
+ #define LED_BUILTIN 2 // Pin D2 control on-board LED
+ #endif
+
+ #define USE_LOCAL_SERVER true
+
+ // If local server
+ #if USE_LOCAL_SERVER
+ char blynk_server[] = "yourname.duckdns.org";
+ #endif
+
+ char auth[] = "***";
+ char ssid[] = "***";
+ char pass[] = "***";
#endif
diff --git a/examples/ESP32WM_Config/ESP32WM_Config.ino b/examples/ESP32WM_Config/ESP32WM_Config.ino
index a240d14..b1552de 100644
--- a/examples/ESP32WM_Config/ESP32WM_Config.ino
+++ b/examples/ESP32WM_Config/ESP32WM_Config.ino
@@ -7,7 +7,7 @@
Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
Licensed under MIT license
- Version: 1.1.3
+ Version: 1.2.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -32,6 +32,7 @@
1.1.1 K Hoang 16/01/2021 Add functions to control Config Portal from software or Virtual Switches
1.1.2 K Hoang 28/01/2021 Fix Config Portal and Dynamic Params bugs
1.1.3 K Hoang 31/01/2021 To permit autoreset after timeout if DRD/MRD or non-persistent forced-CP
+ 1.2.0 K Hoang 24/02/2021 Add customs HTML header feature and support to ESP32-S2.
*****************************************************************************************************************************/
#include "defines.h"
@@ -112,6 +113,11 @@ void check_status()
}
}
+#if USING_CUSTOMS_STYLE
+const char NewCustomsStyle[] /*PROGMEM*/ = "";
+#endif
+
void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
@@ -156,6 +162,22 @@ void setup()
//Blynk.setSTAStaticIPConfig(IPAddress(192, 168, 2, 220), IPAddress(192, 168, 2, 1), IPAddress(255, 255, 255, 0),
// IPAddress(4, 4, 4, 4), IPAddress(8, 8, 8, 8));
+//////////////////////////////////////////////
+
+#if USING_CUSTOMS_STYLE
+ Blynk.setCustomsStyle(NewCustomsStyle);
+#endif
+
+#if USING_CUSTOMS_HEAD_ELEMENT
+ Blynk.setCustomsHeadElement("");
+#endif
+
+#if USING_CORS_FEATURE
+ Blynk.setCORSHeader("Your Access-Control-Allow-Origin");
+#endif
+
+ //////////////////////////////////////////////
+
// Use this to default DHCP hostname to ESP8266-XXXXXX or ESP32-XXXXXX
//Blynk.begin();
// Use this to personalize DHCP hostname (RFC952 conformed)
@@ -185,25 +207,21 @@ void displayCredentials()
{
Serial.println(F("\nYour stored Credentials :"));
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
- Serial.println(String(myMenuItems[i].displayName) + " = " + myMenuItems[i].pdata);
+ Serial.print(myMenuItems[i].displayName);
+ Serial.print(F(" = "));
+ Serial.println(myMenuItems[i].pdata);
}
}
-#endif
-void loop()
+void displayCredentialsInLoop()
{
- Blynk.run();
- timer.run();
- check_status();
-
-#if USE_DYNAMIC_PARAMETERS
static bool displayedCredentials = false;
if (!displayedCredentials)
{
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
if (!strlen(myMenuItems[i].pdata))
{
@@ -217,5 +235,17 @@ void loop()
}
}
}
+}
+
+#endif
+
+void loop()
+{
+ Blynk.run();
+ timer.run();
+ check_status();
+
+#if USE_DYNAMIC_PARAMETERS
+ displayCredentialsInLoop();
#endif
}
diff --git a/examples/ESP32WM_Config/defines.h b/examples/ESP32WM_Config/defines.h
index 8fc2f98..28fdd30 100644
--- a/examples/ESP32WM_Config/defines.h
+++ b/examples/ESP32WM_Config/defines.h
@@ -25,8 +25,15 @@
// (USE_LITTLEFS == false) and (USE_SPIFFS == true) => using SPIFFS for configuration data in WiFiManager
// Those above #define's must be placed before #include
-#define USE_LITTLEFS true
-#define USE_SPIFFS false
+#if ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_PROS2 || ARDUINO_MICROS2 )
+ // Currently, ESP32-S2 only supporting EEPROM. Will fix to support LittleFS and SPIFFS
+ #define USE_LITTLEFS false
+ #define USE_SPIFFS false
+ #warning ESP32-S2 only support supporting EEPROM now.
+#else
+ #define USE_LITTLEFS true
+ #define USE_SPIFFS false
+#endif
#if !( USE_SPIFFS || USE_LITTLEFS)
@@ -36,13 +43,27 @@
#define EEPROM_START 0
#endif
+/////////////////////////////////////////////
+
+// Add customs headers from v1.2.0
+#define USING_CUSTOMS_STYLE true
+#define USING_CUSTOMS_HEAD_ELEMENT true
+#define USING_CORS_FEATURE true
+
+/////////////////////////////////////////////
+
// Force some params in Blynk, only valid for library version 1.0.1 and later
#define TIMEOUT_RECONNECT_WIFI 10000L
#define RESET_IF_CONFIG_TIMEOUT true
+
#define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
-#define USE_DYNAMIC_PARAMETERS true
-// Those above #define's must be placed before #include
+// Config Timeout 120s (default 60s)
+#define CONFIG_TIMEOUT 120000L
+
+#define USE_DYNAMIC_PARAMETERS true
+// Those above #define's must be placed before #include and
+//////////////////////////////////////////
//#define USE_SSL true
#define USE_SSL false
diff --git a/examples/ESP32WM_ForcedConfig/ESP32WM_ForcedConfig.ino b/examples/ESP32WM_ForcedConfig/ESP32WM_ForcedConfig.ino
index 9a11aaa..7a1abce 100644
--- a/examples/ESP32WM_ForcedConfig/ESP32WM_ForcedConfig.ino
+++ b/examples/ESP32WM_ForcedConfig/ESP32WM_ForcedConfig.ino
@@ -7,7 +7,7 @@
Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
Licensed under MIT license
- Version: 1.1.3
+ Version: 1.2.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -32,6 +32,7 @@
1.1.1 K Hoang 16/01/2021 Add functions to control Config Portal from software or Virtual Switches
1.1.2 K Hoang 28/01/2021 Fix Config Portal and Dynamic Params bugs
1.1.3 K Hoang 31/01/2021 To permit autoreset after timeout if DRD/MRD or non-persistent forced-CP
+ 1.2.0 K Hoang 24/02/2021 Add customs HTML header feature and support to ESP32-S2.
*****************************************************************************************************************************/
#include "defines.h"
@@ -145,6 +146,11 @@ void check_status()
}
}
+#if USING_CUSTOMS_STYLE
+const char NewCustomsStyle[] /*PROGMEM*/ = "";
+#endif
+
void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
@@ -189,6 +195,22 @@ void setup()
//Blynk.setSTAStaticIPConfig(IPAddress(192, 168, 2, 220), IPAddress(192, 168, 2, 1), IPAddress(255, 255, 255, 0),
// IPAddress(4, 4, 4, 4), IPAddress(8, 8, 8, 8));
+//////////////////////////////////////////////
+
+#if USING_CUSTOMS_STYLE
+ Blynk.setCustomsStyle(NewCustomsStyle);
+#endif
+
+#if USING_CUSTOMS_HEAD_ELEMENT
+ Blynk.setCustomsHeadElement("");
+#endif
+
+#if USING_CORS_FEATURE
+ Blynk.setCORSHeader("Your Access-Control-Allow-Origin");
+#endif
+
+ //////////////////////////////////////////////
+
// Use this to default DHCP hostname to ESP8266-XXXXXX or ESP32-XXXXXX
//Blynk.begin();
// Use this to personalize DHCP hostname (RFC952 conformed)
@@ -218,25 +240,21 @@ void displayCredentials()
{
Serial.println(F("\nYour stored Credentials :"));
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
- Serial.println(String(myMenuItems[i].displayName) + " = " + myMenuItems[i].pdata);
+ Serial.print(myMenuItems[i].displayName);
+ Serial.print(F(" = "));
+ Serial.println(myMenuItems[i].pdata);
}
}
-#endif
-void loop()
+void displayCredentialsInLoop()
{
- Blynk.run();
- timer.run();
- check_status();
-
-#if USE_DYNAMIC_PARAMETERS
static bool displayedCredentials = false;
if (!displayedCredentials)
{
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
if (!strlen(myMenuItems[i].pdata))
{
@@ -250,5 +268,17 @@ void loop()
}
}
}
+}
+
+#endif
+
+void loop()
+{
+ Blynk.run();
+ timer.run();
+ check_status();
+
+#if USE_DYNAMIC_PARAMETERS
+ displayCredentialsInLoop();
#endif
}
diff --git a/examples/ESP32WM_ForcedConfig/defines.h b/examples/ESP32WM_ForcedConfig/defines.h
index 672a348..ad67495 100644
--- a/examples/ESP32WM_ForcedConfig/defines.h
+++ b/examples/ESP32WM_ForcedConfig/defines.h
@@ -26,8 +26,15 @@
// (USE_LITTLEFS == false) and (USE_SPIFFS == true) => using SPIFFS for configuration data in WiFiManager
// Those above #define's must be placed before #include
-#define USE_LITTLEFS true
-#define USE_SPIFFS false
+#if ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_PROS2 || ARDUINO_MICROS2 )
+ // Currently, ESP32-S2 only supporting EEPROM. Will fix to support LittleFS and SPIFFS
+ #define USE_LITTLEFS false
+ #define USE_SPIFFS false
+ #warning ESP32-S2 only support supporting EEPROM now.
+#else
+ #define USE_LITTLEFS true
+ #define USE_SPIFFS false
+#endif
#if !( USE_SPIFFS || USE_LITTLEFS)
@@ -37,16 +44,29 @@
#define EEPROM_START 0
#endif
+/////////////////////////////////////////////
+
+// Add customs headers from v1.2.0
+#define USING_CUSTOMS_STYLE true
+#define USING_CUSTOMS_HEAD_ELEMENT true
+#define USING_CORS_FEATURE true
+
+/////////////////////////////////////////////
+
// Force some params in Blynk, only valid for library version 1.0.1 and later
#define TIMEOUT_RECONNECT_WIFI 10000L
#define RESET_IF_CONFIG_TIMEOUT true
+
#define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
+// Config Timeout 120s (default 60s)
+#define CONFIG_TIMEOUT 120000L
+
#define USE_DYNAMIC_PARAMETERS true
-// Those above #define's must be placed before #include
+// Those above #define's must be placed before #include and
+//////////////////////////////////////////
#define USE_SSL true
-//#define USE_SSL false
#if USE_SSL
#include
diff --git a/examples/ESP32WM_MRD_Config/ESP32WM_MRD_Config.ino b/examples/ESP32WM_MRD_Config/ESP32WM_MRD_Config.ino
index 53339d0..3fedf8b 100644
--- a/examples/ESP32WM_MRD_Config/ESP32WM_MRD_Config.ino
+++ b/examples/ESP32WM_MRD_Config/ESP32WM_MRD_Config.ino
@@ -7,7 +7,7 @@
Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
Licensed under MIT license
- Version: 1.1.3
+ Version: 1.2.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -32,6 +32,7 @@
1.1.1 K Hoang 16/01/2021 Add functions to control Config Portal from software or Virtual Switches
1.1.2 K Hoang 28/01/2021 Fix Config Portal and Dynamic Params bugs
1.1.3 K Hoang 31/01/2021 To permit autoreset after timeout if DRD/MRD or non-persistent forced-CP
+ 1.2.0 K Hoang 24/02/2021 Add customs HTML header feature and support to ESP32-S2.
*****************************************************************************************************************************/
#include "defines.h"
@@ -112,6 +113,11 @@ void check_status()
}
}
+#if USING_CUSTOMS_STYLE
+const char NewCustomsStyle[] /*PROGMEM*/ = "";
+#endif
+
void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
@@ -161,6 +167,22 @@ void setup()
//Blynk.setSTAStaticIPConfig(IPAddress(192, 168, 2, 220), IPAddress(192, 168, 2, 1), IPAddress(255, 255, 255, 0),
// IPAddress(4, 4, 4, 4), IPAddress(8, 8, 8, 8));
+//////////////////////////////////////////////
+
+#if USING_CUSTOMS_STYLE
+ Blynk.setCustomsStyle(NewCustomsStyle);
+#endif
+
+#if USING_CUSTOMS_HEAD_ELEMENT
+ Blynk.setCustomsHeadElement("");
+#endif
+
+#if USING_CORS_FEATURE
+ Blynk.setCORSHeader("Your Access-Control-Allow-Origin");
+#endif
+
+ //////////////////////////////////////////////
+
// Use this to default DHCP hostname to ESP8266-XXXXXX or ESP32-XXXXXX
//Blynk.begin();
// Use this to personalize DHCP hostname (RFC952 conformed)
diff --git a/examples/ESP32WM_MRD_Config/defines.h b/examples/ESP32WM_MRD_Config/defines.h
index c6576f5..0ccc5db 100644
--- a/examples/ESP32WM_MRD_Config/defines.h
+++ b/examples/ESP32WM_MRD_Config/defines.h
@@ -60,8 +60,15 @@
// (USE_LITTLEFS == false) and (USE_SPIFFS == true) => using SPIFFS for configuration data in WiFiManager
// Those above #define's must be placed before #include
-#define USE_LITTLEFS true
-#define USE_SPIFFS false
+#if ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_PROS2 || ARDUINO_MICROS2 )
+ // Currently, ESP32-S2 only supporting EEPROM. Will fix to support LittleFS and SPIFFS
+ #define USE_LITTLEFS false
+ #define USE_SPIFFS false
+ #warning ESP32-S2 only support supporting EEPROM now.
+#else
+ #define USE_LITTLEFS true
+ #define USE_SPIFFS false
+#endif
#if !( USE_SPIFFS || USE_LITTLEFS)
// EEPROM_SIZE must be <= 2048 and >= CONFIG_DATA_SIZE (currently 172 bytes)
@@ -70,22 +77,35 @@
#define EEPROM_START 0
#endif
+/////////////////////////////////////////////
+
+// Add customs headers from v1.2.0
+#define USING_CUSTOMS_STYLE true
+#define USING_CUSTOMS_HEAD_ELEMENT true
+#define USING_CORS_FEATURE true
+
+/////////////////////////////////////////////
+
// Force some params in Blynk, only valid for library version 1.0.1 and later
#define TIMEOUT_RECONNECT_WIFI 10000L
#define RESET_IF_CONFIG_TIMEOUT true
#define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
+// Config Timeout 120s (default 60s)
+#define CONFIG_TIMEOUT 120000L
+
#define USE_DYNAMIC_PARAMETERS true
-// Those above #define's must be placed before #include
+// Those above #define's must be placed before #include and
+//////////////////////////////////////////
-//#define USE_SSL true
-#define USE_SSL false
+#define USE_SSL true
+//#define USE_SSL false
#if USE_SSL
-#include
+ #include
#else
-#include
+ #include
#endif
#define PIN_D22 22 // Pin D22 mapped to pin GPIO22/SCL of ESP32
diff --git a/examples/ESP32WM_MRD_ForcedConfig/ESP32WM_MRD_ForcedConfig.ino b/examples/ESP32WM_MRD_ForcedConfig/ESP32WM_MRD_ForcedConfig.ino
index 38dd877..2b8a28d 100644
--- a/examples/ESP32WM_MRD_ForcedConfig/ESP32WM_MRD_ForcedConfig.ino
+++ b/examples/ESP32WM_MRD_ForcedConfig/ESP32WM_MRD_ForcedConfig.ino
@@ -7,7 +7,7 @@
Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
Licensed under MIT license
- Version: 1.1.3
+ Version: 1.2.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -32,6 +32,7 @@
1.1.1 K Hoang 16/01/2021 Add functions to control Config Portal from software or Virtual Switches
1.1.2 K Hoang 28/01/2021 Fix Config Portal and Dynamic Params bugs
1.1.3 K Hoang 31/01/2021 To permit autoreset after timeout if DRD/MRD or non-persistent forced-CP
+ 1.2.0 K Hoang 24/02/2021 Add customs HTML header feature and support to ESP32-S2.
*****************************************************************************************************************************/
#include "defines.h"
@@ -145,6 +146,11 @@ void check_status()
}
}
+#if USING_CUSTOMS_STYLE
+const char NewCustomsStyle[] /*PROGMEM*/ = "";
+#endif
+
void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
@@ -194,6 +200,22 @@ void setup()
//Blynk.setSTAStaticIPConfig(IPAddress(192, 168, 2, 220), IPAddress(192, 168, 2, 1), IPAddress(255, 255, 255, 0),
// IPAddress(4, 4, 4, 4), IPAddress(8, 8, 8, 8));
+//////////////////////////////////////////////
+
+#if USING_CUSTOMS_STYLE
+ Blynk.setCustomsStyle(NewCustomsStyle);
+#endif
+
+#if USING_CUSTOMS_HEAD_ELEMENT
+ Blynk.setCustomsHeadElement("");
+#endif
+
+#if USING_CORS_FEATURE
+ Blynk.setCORSHeader("Your Access-Control-Allow-Origin");
+#endif
+
+ //////////////////////////////////////////////
+
// Use this to default DHCP hostname to ESP8266-XXXXXX or ESP32-XXXXXX
//Blynk.begin();
// Use this to personalize DHCP hostname (RFC952 conformed)
@@ -223,25 +245,21 @@ void displayCredentials()
{
Serial.println(F("\nYour stored Credentials :"));
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
- Serial.println(String(myMenuItems[i].displayName) + " = " + myMenuItems[i].pdata);
+ Serial.print(myMenuItems[i].displayName);
+ Serial.print(F(" = "));
+ Serial.println(myMenuItems[i].pdata);
}
}
-#endif
-void loop()
+void displayCredentialsInLoop()
{
- Blynk.run();
- timer.run();
- check_status();
-
-#if USE_DYNAMIC_PARAMETERS
static bool displayedCredentials = false;
if (!displayedCredentials)
{
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
if (!strlen(myMenuItems[i].pdata))
{
@@ -255,5 +273,17 @@ void loop()
}
}
}
+}
+
+#endif
+
+void loop()
+{
+ Blynk.run();
+ timer.run();
+ check_status();
+
+#if USE_DYNAMIC_PARAMETERS
+ displayCredentialsInLoop();
#endif
}
diff --git a/examples/ESP32WM_MRD_ForcedConfig/defines.h b/examples/ESP32WM_MRD_ForcedConfig/defines.h
index 1ba4920..0ccc5db 100644
--- a/examples/ESP32WM_MRD_ForcedConfig/defines.h
+++ b/examples/ESP32WM_MRD_ForcedConfig/defines.h
@@ -60,8 +60,15 @@
// (USE_LITTLEFS == false) and (USE_SPIFFS == true) => using SPIFFS for configuration data in WiFiManager
// Those above #define's must be placed before #include
-#define USE_LITTLEFS true
-#define USE_SPIFFS false
+#if ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_PROS2 || ARDUINO_MICROS2 )
+ // Currently, ESP32-S2 only supporting EEPROM. Will fix to support LittleFS and SPIFFS
+ #define USE_LITTLEFS false
+ #define USE_SPIFFS false
+ #warning ESP32-S2 only support supporting EEPROM now.
+#else
+ #define USE_LITTLEFS true
+ #define USE_SPIFFS false
+#endif
#if !( USE_SPIFFS || USE_LITTLEFS)
// EEPROM_SIZE must be <= 2048 and >= CONFIG_DATA_SIZE (currently 172 bytes)
@@ -70,22 +77,35 @@
#define EEPROM_START 0
#endif
+/////////////////////////////////////////////
+
+// Add customs headers from v1.2.0
+#define USING_CUSTOMS_STYLE true
+#define USING_CUSTOMS_HEAD_ELEMENT true
+#define USING_CORS_FEATURE true
+
+/////////////////////////////////////////////
+
// Force some params in Blynk, only valid for library version 1.0.1 and later
#define TIMEOUT_RECONNECT_WIFI 10000L
#define RESET_IF_CONFIG_TIMEOUT true
#define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
+// Config Timeout 120s (default 60s)
+#define CONFIG_TIMEOUT 120000L
+
#define USE_DYNAMIC_PARAMETERS true
-// Those above #define's must be placed before #include
+// Those above #define's must be placed before #include and
+//////////////////////////////////////////
#define USE_SSL true
//#define USE_SSL false
#if USE_SSL
-#include
+ #include
#else
-#include
+ #include
#endif
#define PIN_D22 22 // Pin D22 mapped to pin GPIO22/SCL of ESP32
diff --git a/examples/ESP8266WM_Config/ESP8266WM_Config.ino b/examples/ESP8266WM_Config/ESP8266WM_Config.ino
index c60244c..4761ff6 100644
--- a/examples/ESP8266WM_Config/ESP8266WM_Config.ino
+++ b/examples/ESP8266WM_Config/ESP8266WM_Config.ino
@@ -7,7 +7,7 @@
Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
Licensed under MIT license
- Version: 1.1.3
+ Version: 1.2.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -32,6 +32,7 @@
1.1.1 K Hoang 16/01/2021 Add functions to control Config Portal from software or Virtual Switches
1.1.2 K Hoang 28/01/2021 Fix Config Portal and Dynamic Params bugs
1.1.3 K Hoang 31/01/2021 To permit autoreset after timeout if DRD/MRD or non-persistent forced-CP
+ 1.2.0 K Hoang 24/02/2021 Add customs HTML header feature and support to ESP32-S2.
*****************************************************************************************************************************/
#include "defines.h"
@@ -115,6 +116,11 @@ void check_status()
}
}
+#if USING_CUSTOMS_STYLE
+const char NewCustomsStyle[] /*PROGMEM*/ = "";
+#endif
+
void setup()
{
pinMode(PIN_LED, OUTPUT);
@@ -158,6 +164,22 @@ void setup()
//Blynk.setSTAStaticIPConfig(IPAddress(192, 168, 2, 220), IPAddress(192, 168, 2, 1), IPAddress(255, 255, 255, 0),
// IPAddress(4, 4, 4, 4), IPAddress(8, 8, 8, 8));
+//////////////////////////////////////////////
+
+#if USING_CUSTOMS_STYLE
+ Blynk.setCustomsStyle(NewCustomsStyle);
+#endif
+
+#if USING_CUSTOMS_HEAD_ELEMENT
+ Blynk.setCustomsHeadElement("");
+#endif
+
+#if USING_CORS_FEATURE
+ Blynk.setCORSHeader("Your Access-Control-Allow-Origin");
+#endif
+
+ //////////////////////////////////////////////
+
// Use this to default DHCP hostname to ESP8266-XXXXXX or ESP32-XXXXXX
//Blynk.begin();
// Use this to personalize DHCP hostname (RFC952 conformed)
@@ -184,29 +206,25 @@ void setup()
}
#if USE_DYNAMIC_PARAMETERS
-void displayCredentials(void)
+void displayCredentials()
{
Serial.println(F("\nYour stored Credentials :"));
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
- Serial.println(String(myMenuItems[i].displayName) + " = " + myMenuItems[i].pdata);
+ Serial.print(myMenuItems[i].displayName);
+ Serial.print(F(" = "));
+ Serial.println(myMenuItems[i].pdata);
}
}
-#endif
-void loop()
+void displayCredentialsInLoop()
{
- Blynk.run();
- timer.run();
- check_status();
-
-#if USE_DYNAMIC_PARAMETERS
static bool displayedCredentials = false;
if (!displayedCredentials)
{
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
if (!strlen(myMenuItems[i].pdata))
{
@@ -220,5 +238,17 @@ void loop()
}
}
}
+}
+
+#endif
+
+void loop()
+{
+ Blynk.run();
+ timer.run();
+ check_status();
+
+#if USE_DYNAMIC_PARAMETERS
+ displayCredentialsInLoop();
#endif
}
diff --git a/examples/ESP8266WM_Config/defines.h b/examples/ESP8266WM_Config/defines.h
index 3e593a8..809d478 100644
--- a/examples/ESP8266WM_Config/defines.h
+++ b/examples/ESP8266WM_Config/defines.h
@@ -29,9 +29,7 @@
// Select USE_LITTLEFS (higher priority) or USE_SPIFFS
#define USE_LITTLEFS true
-//#define USE_LITTLEFS false
#define USE_SPIFFS false
-//#define USE_SPIFFS true
#if USE_LITTLEFS
//LittleFS has higher priority
@@ -52,15 +50,28 @@
#define EEPROM_START 768
#endif
+/////////////////////////////////////////////
+
+// Add customs headers from v1.2.0
+#define USING_CUSTOMS_STYLE true
+#define USING_CUSTOMS_HEAD_ELEMENT true
+#define USING_CORS_FEATURE true
+
+/////////////////////////////////////////////
+
// Force some params in Blynk, only valid for library version 1.0.1 and later
#define TIMEOUT_RECONNECT_WIFI 10000L
#define RESET_IF_CONFIG_TIMEOUT true
+
#define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
+// Config Timeout 120s (default 60s)
+#define CONFIG_TIMEOUT 120000L
+
#define USE_DYNAMIC_PARAMETERS true
-// Those above #define's must be placed before #include
+// Those above #define's must be placed before #include and
+//////////////////////////////////////////
-//#define USE_SSL true
#define USE_SSL false
#if USE_SSL
diff --git a/examples/ESP8266WM_ForcedConfig/ESP8266WM_ForcedConfig.ino b/examples/ESP8266WM_ForcedConfig/ESP8266WM_ForcedConfig.ino
index a3f8993..fda1a3f 100644
--- a/examples/ESP8266WM_ForcedConfig/ESP8266WM_ForcedConfig.ino
+++ b/examples/ESP8266WM_ForcedConfig/ESP8266WM_ForcedConfig.ino
@@ -7,7 +7,7 @@
Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
Licensed under MIT license
- Version: 1.1.3
+ Version: 1.2.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -32,6 +32,7 @@
1.1.1 K Hoang 16/01/2021 Add functions to control Config Portal from software or Virtual Switches
1.1.2 K Hoang 28/01/2021 Fix Config Portal and Dynamic Params bugs
1.1.3 K Hoang 31/01/2021 To permit autoreset after timeout if DRD/MRD or non-persistent forced-CP
+ 1.2.0 K Hoang 24/02/2021 Add customs HTML header feature and support to ESP32-S2.
*****************************************************************************************************************************/
#include "defines.h"
@@ -148,6 +149,11 @@ void check_status()
}
}
+#if USING_CUSTOMS_STYLE
+const char NewCustomsStyle[] /*PROGMEM*/ = "";
+#endif
+
void setup()
{
pinMode(PIN_LED, OUTPUT);
@@ -191,6 +197,22 @@ void setup()
//Blynk.setSTAStaticIPConfig(IPAddress(192, 168, 2, 220), IPAddress(192, 168, 2, 1), IPAddress(255, 255, 255, 0),
// IPAddress(4, 4, 4, 4), IPAddress(8, 8, 8, 8));
+//////////////////////////////////////////////
+
+#if USING_CUSTOMS_STYLE
+ Blynk.setCustomsStyle(NewCustomsStyle);
+#endif
+
+#if USING_CUSTOMS_HEAD_ELEMENT
+ Blynk.setCustomsHeadElement("");
+#endif
+
+#if USING_CORS_FEATURE
+ Blynk.setCORSHeader("Your Access-Control-Allow-Origin");
+#endif
+
+ //////////////////////////////////////////////
+
// Use this to default DHCP hostname to ESP8266-XXXXXX or ESP32-XXXXXX
//Blynk.begin();
// Use this to personalize DHCP hostname (RFC952 conformed)
@@ -217,29 +239,25 @@ void setup()
}
#if USE_DYNAMIC_PARAMETERS
-void displayCredentials(void)
+void displayCredentials()
{
Serial.println(F("\nYour stored Credentials :"));
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
- Serial.println(String(myMenuItems[i].displayName) + " = " + myMenuItems[i].pdata);
+ Serial.print(myMenuItems[i].displayName);
+ Serial.print(F(" = "));
+ Serial.println(myMenuItems[i].pdata);
}
}
-#endif
-void loop()
+void displayCredentialsInLoop()
{
- Blynk.run();
- timer.run();
- check_status();
-
-#if USE_DYNAMIC_PARAMETERS
static bool displayedCredentials = false;
if (!displayedCredentials)
{
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
if (!strlen(myMenuItems[i].pdata))
{
@@ -253,5 +271,17 @@ void loop()
}
}
}
+}
+
+#endif
+
+void loop()
+{
+ Blynk.run();
+ timer.run();
+ check_status();
+
+#if USE_DYNAMIC_PARAMETERS
+ displayCredentialsInLoop();
#endif
}
diff --git a/examples/ESP8266WM_ForcedConfig/defines.h b/examples/ESP8266WM_ForcedConfig/defines.h
index cb7352b..b79b33d 100644
--- a/examples/ESP8266WM_ForcedConfig/defines.h
+++ b/examples/ESP8266WM_ForcedConfig/defines.h
@@ -13,7 +13,7 @@
#define defines_h
#ifndef ESP8266
-#error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting.
+ #error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting.
#endif
#define BLYNK_PRINT Serial
@@ -29,44 +29,56 @@
// Select USE_LITTLEFS (higher priority) or USE_SPIFFS
#define USE_LITTLEFS true
-//#define USE_LITTLEFS false
#define USE_SPIFFS false
-//#define USE_SPIFFS true
#if USE_LITTLEFS
-//LittleFS has higher priority
-#define CurrentFileFS "LittleFS"
-#ifdef USE_SPIFFS
-#undef USE_SPIFFS
-#endif
-#define USE_SPIFFS false
+ //LittleFS has higher priority
+ #define CurrentFileFS "LittleFS"
+ #ifdef USE_SPIFFS
+ #undef USE_SPIFFS
+ #endif
+ #define USE_SPIFFS false
#elif USE_SPIFFS
-#define CurrentFileFS "SPIFFS"
+ #define CurrentFileFS "SPIFFS"
#endif
#if !( USE_LITTLEFS || USE_SPIFFS)
-// EEPROM_SIZE must be <= 4096 and >= CONFIG_DATA_SIZE (currently 172 bytes)
-#define EEPROM_SIZE (4 * 1024)
-// EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE
-#define EEPROM_START 768
+ // EEPROM_SIZE must be <= 4096 and >= CONFIG_DATA_SIZE (currently 172 bytes)
+ #define EEPROM_SIZE (4 * 1024)
+ // EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE
+ #define EEPROM_START 768
#endif
+/////////////////////////////////////////////
+
+// Add customs headers from v1.2.0
+#define USING_CUSTOMS_STYLE true
+#define USING_CUSTOMS_HEAD_ELEMENT true
+#define USING_CORS_FEATURE true
+
+/////////////////////////////////////////////
+
// Force some params in Blynk, only valid for library version 1.0.1 and later
#define TIMEOUT_RECONNECT_WIFI 10000L
#define RESET_IF_CONFIG_TIMEOUT true
+
#define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
-#define USE_DYNAMIC_PARAMETERS true
-// Those above #define's must be placed before #include
+// Config Timeout 120s (default 60s)
+#define CONFIG_TIMEOUT 120000L
+
+#define USE_DYNAMIC_PARAMETERS true
+// Those above #define's must be placed before #include and
+//////////////////////////////////////////
//#define USE_SSL true
#define USE_SSL false
#if USE_SSL
-#include
+ #include
#else
-#include
+ #include
#endif
#define PIN_LED 2 // Pin D4 mapped to pin GPIO2/TXD1 of ESP8266, NodeMCU and WeMoS, control on-board LED
diff --git a/examples/ESP8266WM_MRD_Config/ESP8266WM_MRD_Config.ino b/examples/ESP8266WM_MRD_Config/ESP8266WM_MRD_Config.ino
index c9df984..ec0c172 100644
--- a/examples/ESP8266WM_MRD_Config/ESP8266WM_MRD_Config.ino
+++ b/examples/ESP8266WM_MRD_Config/ESP8266WM_MRD_Config.ino
@@ -7,7 +7,7 @@
Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
Licensed under MIT license
- Version: 1.1.3
+ Version: 1.2.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -32,6 +32,7 @@
1.1.1 K Hoang 16/01/2021 Add functions to control Config Portal from software or Virtual Switches
1.1.2 K Hoang 28/01/2021 Fix Config Portal and Dynamic Params bugs
1.1.3 K Hoang 31/01/2021 To permit autoreset after timeout if DRD/MRD or non-persistent forced-CP
+ 1.2.0 K Hoang 24/02/2021 Add customs HTML header feature and support to ESP32-S2.
********************************************************************************************************************************/
#include "defines.h"
@@ -115,6 +116,11 @@ void check_status()
}
}
+#if USING_CUSTOMS_STYLE
+const char NewCustomsStyle[] /*PROGMEM*/ = "";
+#endif
+
void setup()
{
pinMode(PIN_LED, OUTPUT);
@@ -163,6 +169,22 @@ void setup()
//Blynk.setSTAStaticIPConfig(IPAddress(192, 168, 2, 220), IPAddress(192, 168, 2, 1), IPAddress(255, 255, 255, 0),
// IPAddress(4, 4, 4, 4), IPAddress(8, 8, 8, 8));
+//////////////////////////////////////////////
+
+#if USING_CUSTOMS_STYLE
+ Blynk.setCustomsStyle(NewCustomsStyle);
+#endif
+
+#if USING_CUSTOMS_HEAD_ELEMENT
+ Blynk.setCustomsHeadElement("");
+#endif
+
+#if USING_CORS_FEATURE
+ Blynk.setCORSHeader("Your Access-Control-Allow-Origin");
+#endif
+
+ //////////////////////////////////////////////
+
// Use this to default DHCP hostname to ESP8266-XXXXXX or ESP32-XXXXXX
//Blynk.begin();
// Use this to personalize DHCP hostname (RFC952 conformed)
@@ -193,25 +215,21 @@ void displayCredentials()
{
Serial.println(F("\nYour stored Credentials :"));
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
- Serial.println(String(myMenuItems[i].displayName) + " = " + myMenuItems[i].pdata);
+ Serial.print(myMenuItems[i].displayName);
+ Serial.print(F(" = "));
+ Serial.println(myMenuItems[i].pdata);
}
}
-#endif
-void loop()
+void displayCredentialsInLoop()
{
- Blynk.run();
- timer.run();
- check_status();
-
-#if USE_DYNAMIC_PARAMETERS
static bool displayedCredentials = false;
if (!displayedCredentials)
{
- for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
if (!strlen(myMenuItems[i].pdata))
{
@@ -225,5 +243,17 @@ void loop()
}
}
}
+}
+
+#endif
+
+void loop()
+{
+ Blynk.run();
+ timer.run();
+ check_status();
+
+#if USE_DYNAMIC_PARAMETERS
+ displayCredentialsInLoop();
#endif
}
diff --git a/examples/ESP8266WM_MRD_Config/defines.h b/examples/ESP8266WM_MRD_Config/defines.h
index 5261d1a..add7de4 100644
--- a/examples/ESP8266WM_MRD_Config/defines.h
+++ b/examples/ESP8266WM_MRD_Config/defines.h
@@ -61,44 +61,56 @@
// Select USE_LITTLEFS (higher priority) or USE_SPIFFS
#define USE_LITTLEFS true
-//#define USE_LITTLEFS false
#define USE_SPIFFS false
-//#define USE_SPIFFS true
#if USE_LITTLEFS
-//LittleFS has higher priority
-#define CurrentFileFS "LittleFS"
-#ifdef USE_SPIFFS
-#undef USE_SPIFFS
-#endif
-#define USE_SPIFFS false
+ //LittleFS has higher priority
+ #define CurrentFileFS "LittleFS"
+ #ifdef USE_SPIFFS
+ #undef USE_SPIFFS
+ #endif
+ #define USE_SPIFFS false
#elif USE_SPIFFS
-#define CurrentFileFS "SPIFFS"
+ #define CurrentFileFS "SPIFFS"
#endif
#if !( USE_LITTLEFS || USE_SPIFFS)
-// EEPROM_SIZE must be <= 4096 and >= CONFIG_DATA_SIZE (currently 172 bytes)
-#define EEPROM_SIZE (4 * 1024)
-// EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE
-#define EEPROM_START 768
+ // EEPROM_SIZE must be <= 4096 and >= CONFIG_DATA_SIZE (currently 172 bytes)
+ #define EEPROM_SIZE (4 * 1024)
+ // EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE
+ #define EEPROM_START 768
#endif
+/////////////////////////////////////////////
+
+// Add customs headers from v1.2.0
+#define USING_CUSTOMS_STYLE true
+#define USING_CUSTOMS_HEAD_ELEMENT true
+#define USING_CORS_FEATURE true
+
+/////////////////////////////////////////////
+
// Force some params in Blynk, only valid for library version 1.0.1 and later
#define TIMEOUT_RECONNECT_WIFI 10000L
#define RESET_IF_CONFIG_TIMEOUT true
+
#define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
+// Config Timeout 120s (default 60s)
+#define CONFIG_TIMEOUT 120000L
+
#define USE_DYNAMIC_PARAMETERS true
-// Those above #define's must be placed before #include
+// Those above #define's must be placed before #include and
+//////////////////////////////////////////
//#define USE_SSL true
#define USE_SSL false
#if USE_SSL
-#include
+ #include
#else
-#include
+ #include
#endif
#define PIN_LED 2 // Pin D4 mapped to pin GPIO2/TXD1 of ESP8266, NodeMCU and WeMoS, control on-board LED
diff --git a/examples/ESP8266WM_MRD_ForcedConfig/ESP8266WM_MRD_ForcedConfig.ino b/examples/ESP8266WM_MRD_ForcedConfig/ESP8266WM_MRD_ForcedConfig.ino
index 223cb7d..7abd1e1 100644
--- a/examples/ESP8266WM_MRD_ForcedConfig/ESP8266WM_MRD_ForcedConfig.ino
+++ b/examples/ESP8266WM_MRD_ForcedConfig/ESP8266WM_MRD_ForcedConfig.ino
@@ -148,6 +148,11 @@ void check_status()
}
}
+#if USING_CUSTOMS_STYLE
+const char NewCustomsStyle[] /*PROGMEM*/ = "";
+#endif
+
void setup()
{
pinMode(PIN_LED, OUTPUT);
@@ -196,6 +201,22 @@ void setup()
//Blynk.setSTAStaticIPConfig(IPAddress(192, 168, 2, 220), IPAddress(192, 168, 2, 1), IPAddress(255, 255, 255, 0),
// IPAddress(4, 4, 4, 4), IPAddress(8, 8, 8, 8));
+//////////////////////////////////////////////
+
+#if USING_CUSTOMS_STYLE
+ Blynk.setCustomsStyle(NewCustomsStyle);
+#endif
+
+#if USING_CUSTOMS_HEAD_ELEMENT
+ Blynk.setCustomsHeadElement("");
+#endif
+
+#if USING_CORS_FEATURE
+ Blynk.setCORSHeader("Your Access-Control-Allow-Origin");
+#endif
+
+ //////////////////////////////////////////////
+
// Use this to default DHCP hostname to ESP8266-XXXXXX or ESP32-XXXXXX
//Blynk.begin();
// Use this to personalize DHCP hostname (RFC952 conformed)
diff --git a/examples/ESP8266WM_MRD_ForcedConfig/defines.h b/examples/ESP8266WM_MRD_ForcedConfig/defines.h
index 5261d1a..27507cb 100644
--- a/examples/ESP8266WM_MRD_ForcedConfig/defines.h
+++ b/examples/ESP8266WM_MRD_ForcedConfig/defines.h
@@ -61,44 +61,56 @@
// Select USE_LITTLEFS (higher priority) or USE_SPIFFS
#define USE_LITTLEFS true
-//#define USE_LITTLEFS false
#define USE_SPIFFS false
-//#define USE_SPIFFS true
#if USE_LITTLEFS
-//LittleFS has higher priority
-#define CurrentFileFS "LittleFS"
-#ifdef USE_SPIFFS
-#undef USE_SPIFFS
-#endif
-#define USE_SPIFFS false
+ //LittleFS has higher priority
+ #define CurrentFileFS "LittleFS"
+ #ifdef USE_SPIFFS
+ #undef USE_SPIFFS
+ #endif
+ #define USE_SPIFFS false
#elif USE_SPIFFS
-#define CurrentFileFS "SPIFFS"
+ #define CurrentFileFS "SPIFFS"
#endif
#if !( USE_LITTLEFS || USE_SPIFFS)
-// EEPROM_SIZE must be <= 4096 and >= CONFIG_DATA_SIZE (currently 172 bytes)
-#define EEPROM_SIZE (4 * 1024)
-// EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE
-#define EEPROM_START 768
+ // EEPROM_SIZE must be <= 4096 and >= CONFIG_DATA_SIZE (currently 172 bytes)
+ #define EEPROM_SIZE (4 * 1024)
+ // EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE
+ #define EEPROM_START 768
#endif
+/////////////////////////////////////////////
+
+// Add customs headers from v1.2.0
+#define USING_CUSTOMS_STYLE true
+#define USING_CUSTOMS_HEAD_ELEMENT true
+#define USING_CORS_FEATURE true
+
+/////////////////////////////////////////////
+
// Force some params in Blynk, only valid for library version 1.0.1 and later
#define TIMEOUT_RECONNECT_WIFI 10000L
#define RESET_IF_CONFIG_TIMEOUT true
+
#define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
+// Config Timeout 120s (default 60s)
+#define CONFIG_TIMEOUT 120000L
+
#define USE_DYNAMIC_PARAMETERS true
-// Those above #define's must be placed before #include
+// Those above #define's must be placed before #include and
+//////////////////////////////////////////
-//#define USE_SSL true
-#define USE_SSL false
+#define USE_SSL true
+//#define USE_SSL false
#if USE_SSL
-#include
+ #include
#else
-#include
+ #include
#endif
#define PIN_LED 2 // Pin D4 mapped to pin GPIO2/TXD1 of ESP8266, NodeMCU and WeMoS, control on-board LED
diff --git a/keywords.txt b/keywords.txt
index a09536e..a174884 100644
--- a/keywords.txt
+++ b/keywords.txt
@@ -1,6 +1,7 @@
#######################################
# Data types (KEYWORD1)
#######################################
+
Blynk KEYWORD1
BlynkTimer KEYWORD1
WidgetBridge KEYWORD1
@@ -21,6 +22,7 @@ Blynk_WM_Configuration KEYWORD1
#######################################
# Methods and Functions (KEYWORD2)
#######################################
+
begin KEYWORD2
config KEYWORD2
run KEYWORD2
@@ -57,8 +59,17 @@ getFullConfigData KEYWORD2
clearConfigData KEYWORD2
resetAndEnterConfigPortal KEYWORD2
resetAndEnterConfigPortalPersistent KEYWORD2
+setCustomsStyle KEYWORD2
+getCustomsStyle KEYWORD2
+setCustomsHeadElement KEYWORD2
+getCustomsHeadElement KEYWORD2
+setCORSHeader KEYWORD2
+getCORSHeader KEYWORD2
+
+#############################
+# Handler helpers (KEYWORD2)
+#############################
-# Handler helpers
BLYNK_READ KEYWORD2
BLYNK_WRITE KEYWORD2
BLYNK_READ_DEFAULT KEYWORD2
@@ -74,13 +85,19 @@ BLYNK_INPUT KEYWORD2
BLYNK_OUTPUT_DEFAULT KEYWORD2
BLYNK_INPUT_DEFAULT KEYWORD2
-# Variables binding
+###############################
+# Variables binding (KEYWORD2)
+###############################
+
BLYNK_VAR_INT KEYWORD2
BLYNK_VAR_LONG KEYWORD2
BLYNK_VAR_DOUBLE KEYWORD2
BLYNK_VAR_STRING KEYWORD2
-# Special defines
+###############################
+# Special defines (KEYWORD2)
+###############################
+
BLYNK_DEBUG KEYWORD2
BLYNK_DEBUG_ALL KEYWORD2
BLYNK_PRINT KEYWORD2
@@ -95,7 +112,9 @@ BLYNK_USE_DIRECT_CONNECT KEYWORD2
BLYNK_MAX_SENDBYTES KEYWORD2
BLYNK_MAX_READBYTES KEYWORD2
-# Periodic actions
+###############################
+# Periodic actions (KEYWORD2)
+###############################
#BLYNK_EVERY_N_MILLIS KEYWORD2
#BLYNK_EVERY_N_SECONDS KEYWORD2
#BLYNK_EVERY_N_MINUTES KEYWORD2
diff --git a/library.json b/library.json
index d08a9d2..ebb18b7 100644
--- a/library.json
+++ b/library.json
@@ -1,8 +1,8 @@
{
"name": "Blynk_WM",
- "version": "1.1.3",
- "description": "Library for configuring/auto(re)connecting ESP8266/ESP32 modules to best or available MultiWiFi APs and MultiBlynk servers at runtime. Enable adding dynamic custom parameters from sketch and input using the same Config Portal. Config Portal will be auto-adjusted to match the number of dynamic parameters. Optional default Credentials to be autoloaded into Config Portal to use or change instead of manually input. Static STA IP and DHCP Hostname as well as Config Portal AP channel, IP, SSID, Password can be configured. Multi, Double DetectDetector or Virtual ConfigPortal Switch feature permits entering Config Portal as requested.",
- "keywords": "sensors, control, device, smartphone, mobile, app, web, cloud, communication, protocol, iot, m2m, wifi, ble, bluetooth, ethernet, usb, serial, gsm, gprs, 3g, data, esp8266, esp32, http, drd, mrd, double-reset, multi-reset, configportal, portal, credentials",
+ "version": "1.2.0",
+ "description": "Library for configuring/auto(re)connecting ESP32 (including ESP32-S2), ESP8266 modules to best or available MultiWiFi APs and MultiBlynk servers at runtime. Enable adding dynamic custom parameters from sketch and input using the same Config Portal (CP). CP will be auto-adjusted to match the number of dynamic parameters. Optional default Credentials to be autoloaded into CP to use or change instead of manually input. Static STA IP and DHCP Hostname as well as Config Portal AP channel, IP, SSID, Password can be configured. Config. Data saved in ESP8266/ESP32 LittleFS, SPIFFS or EEPROM. Multi, Double DetectDetector or Virtual CP Switch feature permits entering CP as requested. Configurable Customs HTML Headers, including Customs Style, Customs Head Elements, CORS Header.",
+ "keywords": "sensors, control, device, smartphone, mobile, app, web, cloud, communication, protocol, iot, m2m, wifi, ble, bluetooth, ethernet, usb, serial, gsm, gprs, 3g, data, esp8266, esp32, esp32-s2, http, drd, mrd, double-reset, multi-reset, configportal, config-portal, portal, credentials, Manager, DynamicParameters, dynamic-params, dynamic, customs-header",
"authors":
{
"name": "Khoi Hoang",
diff --git a/library.properties b/library.properties
index b2fd21d..a3bec29 100644
--- a/library.properties
+++ b/library.properties
@@ -1,10 +1,10 @@
name=Blynk_WiFiManager
-version=1.1.3
+version=1.2.0
author=Khoi Hoang
license=MIT
maintainer=Khoi Hoang
-sentence=Simple WiFiManager for Blynk and ESP8266/ESP32 with or without SSL, configuration data saved in either LittleFS, SPIFFS or EEPROM
-paragraph=Library for configuring/auto(re)connecting ESP8266/ESP32 modules to best or available MultiWiFi APs and MultiBlynk servers at runtime. Enable adding dynamic custom parameters from sketch and input using the same Config Portal. Config Portal will be auto-adjusted to match the number of dynamic parameters. Optional default Credentials to be autoloaded into Config Portal to use or change instead of manually input. Static STA IP and DHCP Hostname as well as Config Portal AP channel, IP, SSID, Password can be configured. Multi, Double DetectDetector or Virtual ConfigPortal Switch feature permits entering Config Portal as requested.
+sentence=Simple WiFiManager for Blynk and ESP32 (including ESP32-S2), ESP8266 with or without SSL, configuration data saved in either LittleFS, SPIFFS or EEPROM
+paragraph=Library for configuring/auto(re)connecting ESP32 (including ESP32-S2), ESP8266 modules to best or available MultiWiFi APs and MultiBlynk servers at runtime. Enable adding dynamic custom parameters from sketch and input using the same Config Portal. Config Portal will be auto-adjusted to match the number of dynamic parameters. Optional default Credentials to be autoloaded into Config Portal to use or change instead of manually input. Static STA IP and DHCP Hostname as well as Config Portal AP channel, IP, SSID, Password can be configured. Multi, Double DetectDetector or Virtual ConfigPortal Switch feature permits entering Config Portal as requested. Configurable Customs HTML Headers, including Customs Style, Customs Head Elements, CORS Header.
category=Communication
url=https://github.com/khoih-prog/Blynk_WM
architectures=esp8266,esp32
diff --git a/pics/esp32_s2_Core_Unzipped.png b/pics/esp32_s2_Core_Unzipped.png
new file mode 100644
index 0000000000000000000000000000000000000000..76286a20ed5d904cfefaa4e97ff5d6294cfdd67d
GIT binary patch
literal 45169
zcmZ^L1y~jD(>97qBOzVV-O?r9-7O#>UD73pbV@fU4TnQ_DBaz4=Dyh%hiPDAH15DljlFqF`X2g~LAwjx6wD=>h-2
zI*CZD!NbGPuP819f1-UB*ZQn#XZG3E$k7x=^^^1G&!&zh{v!x5FmGX`#e~(|=JwNF
z^)R)qX@#{Pct
z*P%sfV`C#2%H{+YFJ6g@OWVwwjo`AQu;o#6L%2emRVMs`cU8D0j6qhL{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