Skip to content
This repository was archived by the owner on Feb 9, 2022. It is now read-only.

Commit 85b15eb

Browse files
authored
v1.2.3
### Releases v1.2.3 1. To permit auto-reset after configurable timeout if DRD/MRD or non-persistent forced-CP. Check [**Good new feature: Blynk.resetAndEnterConfigPortal() Thanks & question #27**](khoih-prog/Blynk_WM#27)
1 parent 82687a5 commit 85b15eb

7 files changed

+93
-28
lines changed

README.md

+25-13
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* [Why using Async](#why-using-async)
1818
* [Currently supported Boards](#currently-supported-boards)
1919
* [Changelog](#changelog)
20+
* [Releases v1.2.3](#releases-v123)
2021
* [Releases v1.2.2](#releases-v122)
2122
* [Releases v1.2.1](#releases-v121)
2223
* [Major Releases v1.2.0](#major-releases-v120)
@@ -144,6 +145,10 @@ This [**BlynkESP32_BT_WF** library](https://github.com/khoih-prog/BlynkESP32_BT_
144145

145146
## Changelog
146147

148+
### Releases v1.2.3
149+
150+
1. To permit auto-reset 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)
151+
147152
### Releases v1.2.2
148153

149154
1. Fix rare Config Portal bug not updating Config and dynamic Params data successfully in very noisy or weak WiFi situation
@@ -1208,7 +1213,7 @@ The following is the sample terminal output when running example [Async_ESP8266W
12081213

12091214
```
12101215
Starting Async_ESP8266WM_MRD_Config using LittleFS with SSL on ESP8266_NODEMCU
1211-
Blynk_Async_WM SSL for ESP8266 v1.2.2
1216+
Blynk_Async_WM SSL for ESP8266 v1.2.3
12121217
ESP_MultiResetDetector v1.1.1
12131218
LittleFS Flag read = 0xFFFE0001
12141219
multiResetDetectorFlag = 0xFFFE0001
@@ -1288,7 +1293,7 @@ BBBBBB
12881293

12891294
```
12901295
Starting Async_ESP8266WM_MRD_Config using LittleFS with SSL on ESP8266_NODEMCU
1291-
Blynk_Async_WM SSL for ESP8266 v1.2.2
1296+
Blynk_Async_WM SSL for ESP8266 v1.2.3
12921297
ESP_MultiResetDetector v1.1.1
12931298
LittleFS Flag read = 0xFFFC0003
12941299
multiResetDetectorFlag = 0xFFFC0003
@@ -1399,7 +1404,7 @@ F[229521] id: = HueNet1
13991404

14001405
```
14011406
Starting Async_ESP8266WM_MRD_Config using LittleFS with SSL on ESP8266_NODEMCU
1402-
Blynk_Async_WM SSL for ESP8266 v1.2.2
1407+
Blynk_Async_WM SSL for ESP8266 v1.2.3
14031408
ESP_MultiResetDetector v1.1.1
14041409
LittleFS Flag read = 0xFFFE0001
14051410
multiResetDetectorFlag = 0xFFFE0001
@@ -1485,7 +1490,7 @@ The following is the sample terminal output when running example [Async_ESP32WM_
14851490

14861491
```
14871492
Starting Async_ESP32WM_MRD_Config using LittleFS with SSL on ESP32_DEV
1488-
Blynk_Async_WM SSL for ESP32 v1.2.2
1493+
Blynk_Async_WM SSL for ESP32 v1.2.3
14891494
ESP_MultiResetDetector v1.1.1
14901495
LittleFS Flag read = 0xFFFE0001
14911496
multiResetDetectorFlag = 0xFFFE0001
@@ -1564,7 +1569,7 @@ Pubs Topics = default-mqtt-PubTopic
15641569

15651570
```
15661571
Starting Async_ESP32WM_MRD_Config using LittleFS with SSL on ESP32_DEV
1567-
Blynk_Async_WM SSL for ESP32 v1.2.2
1572+
Blynk_Async_WM SSL for ESP32 v1.2.3
15681573
ESP_MultiResetDetector v1.1.1
15691574
LittleFS Flag read = 0xFFFC0003
15701575
multiResetDetectorFlag = 0xFFFC0003
@@ -1669,7 +1674,7 @@ RFRFRF[188660] id: = HueNet1
16691674

16701675
```
16711676
Starting Async_ESP32WM_MRD_Config using LittleFS with SSL on ESP32_DEV
1672-
Blynk_Async_WM SSL for ESP32 v1.2.2
1677+
Blynk_Async_WM SSL for ESP32 v1.2.3
16731678
ESP_MultiResetDetector v1.1.1
16741679
LittleFS Flag read = 0xFFFE0001
16751680
multiResetDetectorFlag = 0xFFFE0001
@@ -1806,7 +1811,7 @@ The following is the sample terminal output when running example [Async_ESP32_Mu
18061811

18071812
```
18081813
Starting Async_ESP32_MultiTask using LittleFS without SSL on ESP32_DEV
1809-
Blynk_Async_WM for ESP32 v1.2.2
1814+
Blynk_Async_WM for ESP32 v1.2.3
18101815
ESP_DoubleResetDetector v1.1.1
18111816
[1431] Hostname=ESP32-Async-MTask
18121817
[1517] LoadCfgFile
@@ -2018,7 +2023,7 @@ Blynk.resetAndEnterConfigPortal();
20182023

20192024
```
20202025
Starting Async_ESP32WM_MRD_ForcedConfig using LittleFS with SSL on ESP32_DEV
2021-
Blynk_Async_WM SSL for ESP32 v1.2.2
2026+
Blynk_Async_WM SSL for ESP32 v1.2.3
20222027
ESP_MultiResetDetector v1.1.1
20232028
LittleFS Flag read = 0xFFFE0001
20242029
multiResetDetectorFlag = 0xFFFE0001
@@ -2109,7 +2114,7 @@ Non-Persistent CP will be removed after first reset, even you didn't enter the C
21092114

21102115
```
21112116
Starting Async_ESP32WM_MRD_ForcedConfig using LittleFS with SSL on ESP32_DEV
2112-
Blynk_Async_WM SSL for ESP32 v1.2.2
2117+
Blynk_Async_WM SSL for ESP32 v1.2.3
21132118
ESP_MultiResetDetector v1.1.1
21142119
LittleFS Flag read = 0xFFFE0001
21152120
multiResetDetectorFlag = 0xFFFE0001
@@ -2224,7 +2229,7 @@ RF[66298] id: = HueNet1
22242229

22252230
```
22262231
Starting Async_ESP32WM_MRD_ForcedConfig using LittleFS with SSL on ESP32_DEV
2227-
Blynk_Async_WM SSL for ESP32 v1.2.2
2232+
Blynk_Async_WM SSL for ESP32 v1.2.3
22282233
ESP_MultiResetDetector v1.1.1
22292234
LittleFS Flag read = 0xFFFE0001
22302235
multiResetDetectorFlag = 0xFFFE0001
@@ -2323,7 +2328,7 @@ Blynk.resetAndEnterConfigPortalPersistent();
23232328

23242329
```
23252330
Starting Async_ESP32WM_MRD_ForcedConfig using LittleFS with SSL on ESP32_DEV
2326-
Blynk_Async_WM SSL for ESP32 v1.2.2
2331+
Blynk_Async_WM SSL for ESP32 v1.2.3
23272332
ESP_MultiResetDetector v1.1.1
23282333
LittleFS Flag read = 0xFFFE0001
23292334
multiResetDetectorFlag = 0xFFFE0001
@@ -2414,7 +2419,7 @@ Persistent CP will remain after resets. The only way to get rid of Config Portal
24142419

24152420
```
24162421
Starting Async_ESP32WM_MRD_ForcedConfig using LittleFS with SSL on ESP32_DEV
2417-
Blynk_Async_WM SSL for ESP32 v1.2.2
2422+
Blynk_Async_WM SSL for ESP32 v1.2.3
24182423
ESP_MultiResetDetector v1.1.1
24192424
LittleFS Flag read = 0xFFFE0001
24202425
multiResetDetectorFlag = 0xFFFE0001
@@ -2526,7 +2531,7 @@ Enter CP, input (even fake data or none) and `Save` config data to exit persiste
25262531

25272532
```
25282533
Starting Async_ESP32WM_MRD_ForcedConfig using LittleFS with SSL on ESP32_DEV
2529-
Blynk_Async_WM SSL for ESP32 v1.2.2
2534+
Blynk_Async_WM SSL for ESP32 v1.2.3
25302535
ESP_MultiResetDetector v1.1.1
25312536
LittleFS Flag read = 0xFFFE0001
25322537
multiResetDetectorFlag = 0xFFFE0001
@@ -2640,6 +2645,10 @@ Sometimes, the library will only work if you update the board core to the latest
26402645

26412646
## Releases
26422647

2648+
### Releases v1.2.3
2649+
2650+
1. To permit auto-reset 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)
2651+
26432652
### Releases v1.2.2
26442653

26452654
1. Fix rare Config Portal bug not updating Config and dynamic Params data successfully in very noisy or weak WiFi situation
@@ -2682,6 +2691,8 @@ Submit issues to: [Blynk_Async_WM issues](https://github.com/khoih-prog/Blynk_As
26822691

26832692
1. Fix bug. Add enhancement
26842693

2694+
---
2695+
26852696
## DONE
26862697

26872698
1. Permit EEPROM size and location configurable to avoid conflict with others.
@@ -2724,6 +2735,7 @@ Submit issues to: [Blynk_Async_WM issues](https://github.com/khoih-prog/Blynk_As
27242735
Check these new features thanks to his direct contribution and/or enhancement requests :
27252736
* [WM Config Portal using BlynkSimpleEsp32/8266_WM.h](https://community.blynk.cc/t/wm-config-portal-using-blynksimpleesp32-8266-wm-h/45402).
27262737
* [How to trigger a Config Portal from code #25](https://github.com/khoih-prog/Blynk_WM/issues/25)
2738+
* [Good new feature: Blynk.resetAndEnterConfigPortal() Thanks & question #27](https://github.com/khoih-prog/Blynk_WM/issues/27)
27272739
4. Thanks to good work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip) for working with, developing, debugging and testing.
27282740

27292741

library.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Blynk_Async_WM",
3-
"version": "1.2.2",
3+
"version": "1.2.3",
44
"description": "Library, using AsyncWebServer instead of (ESP8266)WebServer, 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 or Double DetectDetector feature permits entering Config Portal as requested.",
55
"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, async",
66
"authors":

library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Blynk_Async_WM
2-
version=1.2.2
2+
version=1.2.3
33
author=Khoi Hoang
44
license=MIT
55
maintainer=Khoi Hoang <[email protected]>

src/BlynkSimpleEsp32_Async_WM.h

+17-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@date Jan 2015
1818
@brief
1919
20-
Version: 1.2.2
20+
Version: 1.2.3
2121
2222
Version Modified By Date Comments
2323
------- ----------- ---------- -----------
@@ -27,6 +27,7 @@
2727
1.2.0 K Hoang 01/01/2021 Add support to ESP32 LittleFS. Remove possible compiler warnings. Update examples. Add MRD
2828
1.2.1 K Hoang 16/01/2021 Add functions to control Config Portal from software or Virtual Switches
2929
1.2.2 K Hoang 28/01/2021 Fix Config Portal and Dynamic Params bugs
30+
1.2.3 K Hoang 31/01/2021 To permit autoreset after timeout if DRD/MRD or non-persistent forced-CP
3031
********************************************************************************************************************************/
3132

3233
#pragma once
@@ -35,7 +36,7 @@
3536
#error This code is intended to run on the ESP32 platform! Please check your Tools->Board setting.
3637
#endif
3738

38-
#define BLYNK_ASYNC_WM_VERSION "Blynk_Async_WM for ESP32 v1.2.2"
39+
#define BLYNK_ASYNC_WM_VERSION "Blynk_Async_WM for ESP32 v1.2.3"
3940

4041
#define BLYNK_SEND_ATOMIC
4142

@@ -488,8 +489,9 @@ class BlynkWifi
488489
clearForcedCP();
489490
}
490491

492+
hadConfigData = isForcedConfigPortal ? true : (noConfigPortal ? false : true);
493+
491494
// failed to connect to Blynk server, will start configuration mode
492-
hadConfigData = false;
493495
startConfigurationMode();
494496
}
495497
}
@@ -2281,10 +2283,22 @@ class BlynkWifi
22812283
}
22822284

22832285
// If there is no saved config Data, stay in config mode forever until having config Data.
2286+
// or SSID, PW, Server,Token ="nothing"
22842287
if (hadConfigData)
2288+
{
22852289
configTimeout = millis() + CONFIG_TIMEOUT;
2290+
2291+
#if ( BLYNK_WM_DEBUG > 2)
2292+
BLYNK_LOG4(BLYNK_F("s:millis() = "), millis(), BLYNK_F(", configTimeout = "), configTimeout);
2293+
#endif
2294+
}
22862295
else
2296+
{
22872297
configTimeout = 0;
2298+
#if ( BLYNK_WM_DEBUG > 2)
2299+
BLYNK_LOG1(BLYNK_F("s:configTimeout = 0"));
2300+
#endif
2301+
}
22882302

22892303
configuration_mode = true;
22902304
}

src/BlynkSimpleEsp32_SSL_Async_WM.h

+17-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@date Jan 2015
1818
@brief
1919
20-
Version: 1.2.2
20+
Version: 1.2.3
2121
2222
Version Modified By Date Comments
2323
------- ----------- ---------- -----------
@@ -27,6 +27,7 @@
2727
1.2.0 K Hoang 01/01/2021 Add support to ESP32 LittleFS. Remove possible compiler warnings. Update examples. Add MRD
2828
1.2.1 K Hoang 16/01/2021 Add functions to control Config Portal from software or Virtual Switches
2929
1.2.2 K Hoang 28/01/2021 Fix Config Portal and Dynamic Params bugs
30+
1.2.3 K Hoang 31/01/2021 To permit autoreset after timeout if DRD/MRD or non-persistent forced-CP
3031
********************************************************************************************************************************/
3132

3233
#pragma once
@@ -35,7 +36,7 @@
3536
#error This code is intended to run on the ESP32 platform! Please check your Tools->Board setting.
3637
#endif
3738

38-
#define BLYNK_ASYNC_WM_VERSION "Blynk_Async_WM SSL for ESP32 v1.2.2"
39+
#define BLYNK_ASYNC_WM_VERSION "Blynk_Async_WM SSL for ESP32 v1.2.3"
3940

4041
#if defined(BLYNK_SSL_USE_LETSENCRYPT)
4142
static const char BLYNK_DEFAULT_ROOT_CA[] =
@@ -557,8 +558,9 @@ class BlynkWifi
557558
clearForcedCP();
558559
}
559560

561+
hadConfigData = isForcedConfigPortal ? true : (noConfigPortal ? false : true);
562+
560563
// failed to connect to Blynk server, will start configuration mode
561-
hadConfigData = false;
562564
startConfigurationMode();
563565
}
564566
}
@@ -2348,10 +2350,22 @@ class BlynkWifi
23482350
}
23492351

23502352
// If there is no saved config Data, stay in config mode forever until having config Data.
2353+
// or SSID, PW, Server,Token ="nothing"
23512354
if (hadConfigData)
2355+
{
23522356
configTimeout = millis() + CONFIG_TIMEOUT;
2357+
2358+
#if ( BLYNK_WM_DEBUG > 2)
2359+
BLYNK_LOG4(BLYNK_F("s:millis() = "), millis(), BLYNK_F(", configTimeout = "), configTimeout);
2360+
#endif
2361+
}
23532362
else
2363+
{
23542364
configTimeout = 0;
2365+
#if ( BLYNK_WM_DEBUG > 2)
2366+
BLYNK_LOG1(BLYNK_F("s:configTimeout = 0"));
2367+
#endif
2368+
}
23552369

23562370
configuration_mode = true;
23572371
}

src/BlynkSimpleEsp8266_Async_WM.h

+16-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@date Jan 2015
1818
@brief
1919
20-
Version: 1.2.2
20+
Version: 1.2.3
2121
2222
Version Modified By Date Comments
2323
------- ----------- ---------- -----------
@@ -27,6 +27,7 @@
2727
1.2.0 K Hoang 01/01/2021 Add support to ESP32 LittleFS. Remove possible compiler warnings. Update examples. Add MRD
2828
1.2.1 K Hoang 16/01/2021 Add functions to control Config Portal from software or Virtual Switches
2929
1.2.2 K Hoang 28/01/2021 Fix Config Portal and Dynamic Params bugs
30+
1.2.3 K Hoang 31/01/2021 To permit autoreset after timeout if DRD/MRD or non-persistent forced-CP
3031
********************************************************************************************************************************/
3132

3233
#pragma once
@@ -35,7 +36,7 @@
3536
#error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting.
3637
#endif
3738

38-
#define BLYNK_ASYNC_WM_VERSION "Blynk_Async_WM for ESP8266 v1.2.2"
39+
#define BLYNK_ASYNC_WM_VERSION "Blynk_Async_WM for ESP8266 v1.2.3"
3940

4041
#include <version.h>
4142

@@ -470,8 +471,9 @@ class BlynkWifi
470471
clearForcedCP();
471472
}
472473

474+
hadConfigData = isForcedConfigPortal ? true : (noConfigPortal ? false : true);
475+
473476
// failed to connect to Blynk server, will start configuration mode
474-
hadConfigData = false;
475477
startConfigurationMode();
476478
}
477479
}
@@ -2265,10 +2267,20 @@ class BlynkWifi
22652267
// If there is no saved config Data, stay in config mode forever until having config Data.
22662268
// or SSID, PW, Server,Token ="nothing"
22672269
if (hadConfigData)
2270+
{
22682271
configTimeout = millis() + CONFIG_TIMEOUT;
2272+
2273+
#if ( BLYNK_WM_DEBUG > 2)
2274+
BLYNK_LOG4(BLYNK_F("s:millis() = "), millis(), BLYNK_F(", configTimeout = "), configTimeout);
2275+
#endif
2276+
}
22692277
else
2278+
{
22702279
configTimeout = 0;
2271-
2280+
#if ( BLYNK_WM_DEBUG > 2)
2281+
BLYNK_LOG1(BLYNK_F("s:configTimeout = 0"));
2282+
#endif
2283+
}
22722284
configuration_mode = true;
22732285
}
22742286
};

0 commit comments

Comments
 (0)