Skip to content
This repository was archived by the owner on Nov 25, 2021. It is now read-only.

Commit 8a4740b

Browse files
authored
Version v1.0.6
Optimize, fix ESP32 EEPROM size to 2K from 4K, shorten code size, add functions, use dynamically allocated Config Portal WebServer.
1 parent 15cf7aa commit 8a4740b

File tree

17 files changed

+1213
-959
lines changed

17 files changed

+1213
-959
lines changed

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![arduino-library-badge](https://www.ardu-badge.com/badge/Blynk_WiFiManager.svg?)](https://www.ardu-badge.com/Blynk_WiFiManager)
44

5-
I'm inspired by [`EasyBlynk8266`] (https://github.com/Barbayar/EasyBlynk8266)
5+
I'm inspired by [`EasyBlynk8266`](https://github.com/Barbayar/EasyBlynk8266)
66

77
To help you to eliminate `hardcoding` your Wifi and Blynk credentials for ESP8266 and ESP32 (with / wwithout SSL), and updating/reflashing every time when you need to change them.
88

@@ -15,7 +15,7 @@ With version `v1.0.5` or later, you now can configure:
1515

1616
The suggested way to install is to:
1717

18-
1. Navigate to [Blynk_WM] (https://github.com/khoih-prog/Blynk_WM) page.
18+
1. Navigate to [Blynk_WM](https://github.com/khoih-prog/Blynk_WM) page.
1919
2. Download the latest release `Blynk_WM-master.zip`.
2020
3. Extract the zip file to `Blynk_WM-master` directory
2121
4. Copy whole `Blynk_WM-master/src` folder to Arduino libraries' `src` directory such as `~/Arduino/libraries/Blynk/src`.
@@ -41,8 +41,8 @@ to use SPIFFS or
4141
```
4242
#define USE_SPIFFS false
4343
```
44-
to use EEPROM ( 172 bytes from address EEPROM_START ) to save your configuration data.
45-
EEPROM_SIZE can be specified from 256 to 4096 bytes. See examples [ESP32WM_Config] (https://github.com/khoih-prog/Blynk_WM/tree/master/examples/ESP32WM_Config) and [ESP8266WM_Config] (https://github.com/khoih-prog/Blynk_WM/tree/master/examples/ESP8266WM_Config).
44+
to use EEPROM ( 176 bytes from address EEPROM_START ) to save your configuration data.
45+
EEPROM_SIZE can be specified from 256 to 4096 bytes. See examples [ESP32WM_Config](https://github.com/khoih-prog/Blynk_WM/tree/master/examples/ESP32WM_Config) and [ESP8266WM_Config](https://github.com/khoih-prog/Blynk_WM/tree/master/examples/ESP8266WM_Config).
4646

4747

4848
```
@@ -148,8 +148,8 @@ void loop()
148148
```
149149

150150
## Prerequisite
151-
* `ESP8266 core 2.5.2 or later` for Arduino (https://github.com/esp8266/Arduino#installing-with-boards-manager)
152-
* `Blynk library 0.6.1 or later` (https://www.arduino.cc/en/guide/libraries#toc3)
151+
* [`ESP8266 core 2.5.2 or later` for Arduino](https://github.com/esp8266/Arduino#installing-with-boards-manager)
152+
* [`Blynk library 0.6.1 or later`](https://www.arduino.cc/en/guide/libraries#toc3)
153153

154154
## TO DO
155155

@@ -216,7 +216,7 @@ void setup()
216216
//Blynk.setSTAStaticIPConfig(IPAddress(192, 168, 2, 220), IPAddress(192, 168, 2, 1), IPAddress(255, 255, 255, 0),
217217
// IPAddress(192, 168, 2, 1), IPAddress(8, 8, 8, 8));
218218
//Blynk.setSTAStaticIPConfig(IPAddress(192, 168, 2, 220), IPAddress(192, 168, 2, 1), IPAddress(255, 255, 255, 0),
219-
// IPAddress(4, 4, 4, 4), IPAddress(8, 8, 8, 8));
219+
// IPAddress(4, 4, 4, 4), IPAddress(8, 8, 8, 8));
220220
221221
// Use this to default DHCP hostname to ESP8266-XXXXXX or ESP32-XXXXXX
222222
//Blynk.begin();
@@ -231,6 +231,12 @@ void loop()
231231
}
232232
```
233233

234+
### Releases v1.0.6
235+
236+
***Why this version***
237+
238+
Optimize, fix ESP32 EEPROM size to 2K from 4K, shorten code size, add functions, use dynamically allocated Config Portal WebServer.
239+
234240
### Releases v1.0.5
235241

236242
***Why this version***

examples/AM2315_ESP32_SSL/AM2315_ESP32_SSL.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
88
* Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
99
* Licensed under MIT license
10-
* Version: 1.0.5
10+
* Version: 1.0.6
1111
*
1212
* Original Blynk Library author:
1313
* @file BlynkSimpleEsp8266.h
@@ -24,6 +24,7 @@
2424
* 1.0.2 K Hoang 21/11/2019 Fix bug. Add features.
2525
* 1.0.4 K Hoang 07/01/2020 Use configurable personalized RFC-952 DHCP hostname in Blynk_WM v1.0.4
2626
* 1.0.5 K Hoang 20/01/2020 Add configurable static IP, GW, SN, DNS1, DNS2 and Config Portal static IP and Credentials
27+
* 1.0.6 K Hoang 05/02/2020 Optimize, fix ESP32 EEPROM size to 2K from 4K, shorten code size, add functions
2728
*****************************************************************************************************************************/
2829

2930
#ifndef ESP32

examples/AM2315_ESP8266/AM2315_ESP8266.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
88
* Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
99
* Licensed under MIT license
10-
* Version: 1.0.5
10+
* Version: 1.0.6
1111
*
1212
* Original Blynk Library author:
1313
* @file BlynkSimpleEsp8266.h
@@ -24,6 +24,7 @@
2424
* 1.0.2 K Hoang 21/11/2019 Fix bug. Add features.
2525
* 1.0.4 K Hoang 07/01/2020 Use configurable personalized RFC-952 DHCP hostname in Blynk_WM v1.0.4
2626
* 1.0.5 K Hoang 20/01/2020 Add configurable static IP, GW, SN, DNS1, DNS2 and Config Portal static IP and Credentials
27+
* 1.0.6 K Hoang 05/02/2020 Optimize, fix ESP32 EEPROM size to 2K from 4K, shorten code size, add functions
2728
*****************************************************************************************************************************/
2829

2930
#ifndef ESP8266

examples/DHT11ESP32/DHT11ESP32.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
88
* Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
99
* Licensed under MIT license
10-
* Version: 1.0.5
10+
* Version: 1.0.6
1111
*
1212
* Original Blynk Library author:
1313
* @file BlynkSimpleEsp8266.h
@@ -24,6 +24,7 @@
2424
* 1.0.2 K Hoang 21/11/2019 Fix bug. Add features.
2525
* 1.0.4 K Hoang 07/01/2020 Use configurable personalized RFC-952 DHCP hostname in Blynk_WM v1.0.4
2626
* 1.0.5 K Hoang 20/01/2020 Add configurable static IP, GW, SN, DNS1, DNS2 and Config Portal static IP and Credentials
27+
* 1.0.6 K Hoang 05/02/2020 Optimize, fix ESP32 EEPROM size to 2K from 4K, shorten code size, add functions
2728
*****************************************************************************************************************************/
2829

2930
#ifndef ESP32

examples/DHT11ESP32_SSL/DHT11ESP32_SSL.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
88
* Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
99
* Licensed under MIT license
10-
* Version: 1.0.5
10+
* Version: 1.0.6
1111
*
1212
* Original Blynk Library author:
1313
* @file BlynkSimpleEsp8266.h
@@ -24,6 +24,7 @@
2424
* 1.0.2 K Hoang 21/11/2019 Fix bug. Add features.
2525
* 1.0.4 K Hoang 07/01/2020 Use configurable personalized RFC-952 DHCP hostname in Blynk_WM v1.0.4
2626
* 1.0.5 K Hoang 20/01/2020 Add configurable static IP, GW, SN, DNS1, DNS2 and Config Portal static IP and Credentials
27+
* 1.0.6 K Hoang 05/02/2020 Optimize, fix ESP32 EEPROM size to 2K from 4K, shorten code size, add functions
2728
*****************************************************************************************************************************/
2829

2930
#ifndef ESP32

examples/DHT11ESP8266/DHT11ESP8266.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
88
* Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
99
* Licensed under MIT license
10-
* Version: 1.0.5
10+
* Version: 1.0.6
1111
*
1212
* Original Blynk Library author:
1313
* @file BlynkSimpleEsp8266.h
@@ -24,6 +24,7 @@
2424
* 1.0.2 K Hoang 21/11/2019 Fix bug. Add features.
2525
* 1.0.4 K Hoang 07/01/2020 Use configurable personalized RFC-952 DHCP hostname in Blynk_WM v1.0.4
2626
* 1.0.5 K Hoang 20/01/2020 Add configurable static IP, GW, SN, DNS1, DNS2 and Config Portal static IP and Credentials
27+
* 1.0.6 K Hoang 05/02/2020 Optimize, fix ESP32 EEPROM size to 2K from 4K, shorten code size, add functions
2728
*****************************************************************************************************************************/
2829

2930
#ifndef ESP8266

examples/DHT11ESP8266_Debug/DHT11ESP8266_Debug.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
88
* Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
99
* Licensed under MIT license
10-
* Version: 1.0.5
10+
* Version: 1.0.6
1111
*
1212
* Original Blynk Library author:
1313
* @file BlynkSimpleEsp8266.h
@@ -24,6 +24,7 @@
2424
* 1.0.2 K Hoang 21/11/2019 Fix bug. Add features.
2525
* 1.0.4 K Hoang 07/01/2020 Use configurable personalized RFC-952 DHCP hostname in Blynk_WM v1.0.4
2626
* 1.0.5 K Hoang 20/01/2020 Add configurable static IP, GW, SN, DNS1, DNS2 and Config Portal static IP and Credentials
27+
* 1.0.6 K Hoang 05/02/2020 Optimize, fix ESP32 EEPROM size to 2K from 4K, shorten code size, add functions
2728
*****************************************************************************************************************************/
2829

2930
#ifndef ESP8266

examples/DHT11ESP8266_SSL/DHT11ESP8266_SSL.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
88
* Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
99
* Licensed under MIT license
10-
* Version: 1.0.4
10+
* Version: 1.0.6
1111
*
1212
* Original Blynk Library author:
1313
* @file BlynkSimpleEsp8266.h
@@ -24,6 +24,7 @@
2424
* 1.0.2 K Hoang 21/11/2019 Fix bug. Add features.
2525
* 1.0.4 K Hoang 07/01/2020 Use configurable personalized RFC-952 DHCP hostname in Blynk_WM v1.0.4
2626
* 1.0.5 K Hoang 20/01/2020 Add configurable static IP, GW, SN, DNS1, DNS2 and Config Portal static IP and Credentials
27+
* 1.0.6 K Hoang 05/02/2020 Optimize, fix ESP32 EEPROM size to 2K from 4K, shorten code size, add functions
2728
*****************************************************************************************************************************/
2829

2930
#ifndef ESP8266

examples/ESP32WM_Config/ESP32WM_Config.ino

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
88
* Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
99
* Licensed under MIT license
10-
* Version: 1.0.5
10+
* Version: 1.0.6
1111
*
1212
* Original Blynk Library author:
1313
* @file BlynkSimpleEsp8266.h
@@ -24,6 +24,7 @@
2424
* 1.0.2 K Hoang 21/11/2019 Fix bug. Add features.
2525
* 1.0.4 K Hoang 07/01/2020 Use configurable personalized RFC-952 DHCP hostname in Blynk_WM v1.0.4
2626
* 1.0.5 K Hoang 20/01/2020 Add configurable static IP, GW, SN, DNS1, DNS2 and Config Portal static IP and Credentials
27+
* 1.0.6 K Hoang 05/02/2020 Optimize, fix ESP32 EEPROM size to 2K from 4K, shorten code size, add functions
2728
*****************************************************************************************************************************/
2829

2930
#ifndef ESP32
@@ -37,14 +38,14 @@
3738
// #define USE_SPIFFS true => using SPIFFS for configuration data in WiFiManager
3839
// Be sure to define USE_SPIFFS before #include <BlynkSimpleEsp8266_WM.h>
3940

40-
//#define USE_SPIFFS true
41-
#define USE_SPIFFS false
41+
#define USE_SPIFFS true
42+
//#define USE_SPIFFS false
4243

4344
#if (!USE_SPIFFS)
44-
// EEPROM_SIZE must be <= 4096 and >= CONFIG_DATA_SIZE (currently 172 bytes)
45-
#define EEPROM_SIZE (4 * 1024)
45+
// EEPROM_SIZE must be <= 2048 and >= CONFIG_DATA_SIZE (currently 172 bytes)
46+
#define EEPROM_SIZE (2 * 1024)
4647
// EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE
47-
#define EEPROM_START 2048
48+
#define EEPROM_START 1024
4849
#endif
4950

5051
// Force some params in Blynk, only valid for library version 1.0.1 and later
@@ -53,7 +54,8 @@
5354
#define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
5455
// Those above #define's must be placed before #include <BlynkSimpleEsp8266_WM.h>
5556

56-
#define USE_SSL true //false
57+
//#define USE_SSL true
58+
#define USE_SSL false
5759

5860
#if USE_SSL
5961
#include <BlynkSimpleEsp32_SSL_WM.h>

examples/ESP8266WM_Config/ESP8266WM_Config.ino

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
88
* Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
99
* Licensed under MIT license
10-
* Version: 1.0.5
10+
* Version: 1.0.6
1111
*
1212
* Original Blynk Library author:
1313
* @file BlynkSimpleEsp8266.h
@@ -24,6 +24,7 @@
2424
* 1.0.2 K Hoang 21/11/2019 Fix bug. Add features.
2525
* 1.0.4 K Hoang 07/01/2020 Use configurable personalized RFC-952 DHCP hostname in Blynk_WM v1.0.4
2626
* 1.0.5 K Hoang 20/01/2020 Add configurable static IP, GW, SN, DNS1, DNS2 and Config Portal static IP and Credentials
27+
* 1.0.6 K Hoang 05/02/2020 Optimize, fix ESP32 EEPROM size to 2K from 4K, shorten code size, add functions
2728
*****************************************************************************************************************************/
2829

2930
#ifndef ESP8266
@@ -38,14 +39,14 @@
3839
// #define USE_SPIFFS true => using SPIFFS for configuration data in WiFiManager
3940
// Be sure to define USE_SPIFFS before #include <BlynkSimpleEsp8266_WM.h>
4041

41-
//#define USE_SPIFFS true
42-
#define USE_SPIFFS false
42+
#define USE_SPIFFS true
43+
//#define USE_SPIFFS false
4344

4445
#if (!USE_SPIFFS)
4546
// EEPROM_SIZE must be <= 4096 and >= CONFIG_DATA_SIZE (currently 172 bytes)
4647
#define EEPROM_SIZE (4 * 1024)
4748
// EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE
48-
#define EEPROM_START 1024
49+
#define EEPROM_START 256
4950
#endif
5051

5152
// Force some params in Blynk, only valid for library version 1.0.1 and later
@@ -54,6 +55,7 @@
5455
#define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
5556
// Those above #define's must be placed before #include <BlynkSimpleEsp8266_WM.h>
5657

58+
//#define USE_SSL true
5759
#define USE_SSL false
5860

5961
#if USE_SSL

0 commit comments

Comments
 (0)