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

Commit d44c404

Browse files
authored
v1.8.1
### Releases v1.8.1 1. Fix bug. 2. Don't display invalid time when not synch yet.
1 parent f7e9e0e commit d44c404

File tree

34 files changed

+402
-137
lines changed

34 files changed

+402
-137
lines changed

README.md

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* [Why Async is better](#why-async-is-better)
1717
* [Currently supported Boards](#currently-supported-boards)
1818
* [Changelog](#changelog)
19+
* [Releases v1.8.1](#releases-v181)
1920
* [Major Releases v1.8.0](#major-releases-v180)
2021
* [Releases v1.7.1](#releases-v171)
2122
* [Releases v1.7.0](#releases-v170)
@@ -224,6 +225,11 @@ This [**ESPAsync_WiFiManager** library](https://github.com/khoih-prog/ESPAsync_W
224225

225226
## Changelog
226227

228+
### Releases v1.8.1
229+
230+
1. Fix bug.
231+
2. Don't display invalid time when not synch yet.
232+
227233
### Major Releases v1.8.0
228234

229235
1. Add auto-Timezone feature with variable `_timezoneName` (e.g. `America/New_York`) and function to retrieve TZ (e.g. `EST5EDT,M3.2.0,M11.1.0`) to use directly to configure ESP32/ESP8266 timezone. Check [How to retrieve timezone? #51](https://github.com/khoih-prog/ESPAsync_WiFiManager/issues/51)
@@ -2364,7 +2370,7 @@ ESPAsync_wifiManager.setRemoveDuplicateAPs(false);
23642370
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
23652371
#endif
23662372

2367-
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.8.0"
2373+
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.8.1"
23682374

23692375
// Use from 0 to 4. Higher number, more debugging messages and memory usage.
23702376
#define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3
@@ -2862,7 +2868,7 @@ void printLocalTime()
28622868

28632869
now = time(nullptr);
28642870

2865-
if ( now > 1000000 )
2871+
if ( now > 1451602800 )
28662872
{
28672873
Serial.print("Local Date/Time: ");
28682874
Serial.print(ctime(&now));
@@ -2871,8 +2877,14 @@ void printLocalTime()
28712877
struct tm timeinfo;
28722878

28732879
getLocalTime( &timeinfo );
2874-
Serial.print("Local Date/Time: ");
2875-
Serial.print( asctime( &timeinfo ) );
2880+
2881+
// Valid only if year > 2000.
2882+
// You can get from timeinfo : tm_year, tm_mon, tm_mday, tm_hour, tm_min, tm_sec
2883+
if (timeinfo.tm_year > 100 )
2884+
{
2885+
Serial.print("Local Date/Time: ");
2886+
Serial.print( asctime( &timeinfo ) );
2887+
}
28762888
#endif
28772889
}
28782890

@@ -3710,7 +3722,7 @@ This is terminal debug output when running [Async_ConfigOnDRD_FS_MQTT_Ptr_Medium
37103722
37113723
```
37123724
Starting Async_ConfigOnDRD_FS_MQTT_Ptr_Medium using LittleFS on ESP32_DEV
3713-
ESPAsync_WiFiManager v1.8.0
3725+
ESPAsync_WiFiManager v1.8.1
37143726
ESP_DoubleResetDetector v1.1.1
37153727
Config File not found
37163728
Can't read Config File, using default values
@@ -3729,7 +3741,7 @@ Opening Configuration Portal. No timeout : DRD or No stored Credentials..
37293741
37303742
```
37313743
Starting Async_ConfigOnDRD_FS_MQTT_Ptr_Medium using LittleFS on ESP32_DEV
3732-
ESPAsync_WiFiManager v1.8.0
3744+
ESPAsync_WiFiManager v1.8.1
37333745
ESP_DoubleResetDetector v1.1.1
37343746
Config File not found
37353747
Can't read Config File, using default values
@@ -3817,7 +3829,7 @@ This is terminal debug output when running [Async_ConfigOnDRD_FS_MQTT_Ptr_Comple
38173829
38183830
```
38193831
Starting Async_ConfigOnDRD_FS_MQTT_Ptr_Complex using LittleFS on ESP8266_NODEMCU
3820-
ESPAsync_WiFiManager v1.8.0
3832+
ESPAsync_WiFiManager v1.8.1
38213833
ESP_DoubleResetDetector Version v1.1.1
38223834
{"AIO_SERVER_Label":"io.adafruit.com","AIO_SERVERPORT_Label":"1883","AIO_USERNAME_Label":"user_name","AIO_KEY_Label":"aio_key"}
38233835
Config File successfully parsed
@@ -3857,7 +3869,7 @@ TWWWW WTWWW
38573869
38583870
```
38593871
Starting Async_ConfigOnDRD_FS_MQTT_Ptr_Complex using LittleFS on ESP8266_NODEMCU
3860-
ESPAsync_WiFiManager v1.8.0
3872+
ESPAsync_WiFiManager v1.8.1
38613873
ESP_DoubleResetDetector Version v1.1.1
38623874
{"AIO_SERVER_Label":"io.adafruit.com","AIO_SERVERPORT_Label":"1883","AIO_USERNAME_Label":"user_name","AIO_KEY_Label":"aio_key"}
38633875
Config File successfully parsed
@@ -3947,7 +3959,7 @@ This is terminal debug output when running [Async_ConfigOnDoubleReset](examples/
39473959
39483960
```cpp
39493961
Starting Async_ConfigOnDoubleReset with DoubleResetDetect using SPIFFS on ESP32_DEV
3950-
ESPAsync_WiFiManager v1.8.0
3962+
ESPAsync_WiFiManager v1.8.1
39513963
ESP_DoubleResetDetector v1.1.1
39523964
[WM] RFC925 Hostname = ConfigOnDoubleReset
39533965
[WM] setSTAStaticIPConfig for USE_CONFIGURABLE_DNS
@@ -4006,7 +4018,7 @@ This is terminal debug output when running [Async_ConfigOnDoubleReset](examples/
40064018

40074019
```cpp
40084020
Starting Async_ConfigOnDoubleReset with DoubleResetDetect using LittleFS on ESP8266_NODEMCU
4009-
ESPAsync_WiFiManager v1.8.0
4021+
ESPAsync_WiFiManager v1.8.1
40104022
ESP_DoubleResetDetector v1.1.1
40114023
[WM] RFC925 Hostname = ConfigOnDoubleReset
40124024
[WM] setSTAStaticIPConfig for USE_CONFIGURABLE_DNS
@@ -4066,7 +4078,7 @@ This is terminal debug output when running [Async_ESP_FSWebServer_DRD](examples/
40664078
40674079
```cpp
40684080
Starting Async_ESP_FSWebServer_DRD using LittleFS on ESP8266_NODEMCU
4069-
ESPAsync_WiFiManager v1.8.0
4081+
ESPAsync_WiFiManager v1.8.1
40704082
ESP_DoubleResetDetector v1.1.1
40714083
Opening / directory
40724084
FS File: CanadaFlag_1.png, size: 40.25KB
@@ -4144,7 +4156,7 @@ This is terminal debug output when running [Async_ESP32_FSWebServer_DRD](example
41444156

41454157
```
41464158
Starting Async_ESP32_FSWebServer_DRD using LittleFS on ESP32_DEV
4147-
ESPAsync_WiFiManager v1.8.0
4159+
ESPAsync_WiFiManager v1.8.1
41484160
ESP_DoubleResetDetector v1.1.1
41494161
FS File: /CanadaFlag_1.png, size: 40.25KB
41504162
FS File: /CanadaFlag_2.png, size: 8.12KB
@@ -4255,7 +4267,7 @@ This is terminal debug output when running [Async_ConfigOnDoubleReset](examples/
42554267

42564268
```
42574269
Starting Async_ConfigOnDoubleReset using LittleFS on ESP32S2_DEV
4258-
ESPAsync_WiFiManager v1.8.0
4270+
ESPAsync_WiFiManager v1.8.1
42594271
ESP_DoubleResetDetector v1.1.1
42604272
ESP Self-Stored: SSID = HueNet1, Pass = 12345678
42614273
[WM] * Add SSID = HueNet1 , PW = 12345678
@@ -4292,7 +4304,7 @@ This is terminal debug output when running [Async_ConfigOnDoubleReset_TZ](exampl
42924304

42934305
```
42944306
Starting Async_ConfigOnDoubleReset_TZ using LittleFS on ESP32_DEV
4295-
ESPAsync_WiFiManager v1.8.0
4307+
ESPAsync_WiFiManager v1.8.1
42964308
ESP_DoubleResetDetector v1.1.1
42974309
ESP Self-Stored: SSID = HueNet1, Pass = password
42984310
[WM] * Add SSID = HueNet1 , PW = password
@@ -4336,7 +4348,7 @@ Local Date/Time: Sat May 1 00:17:30 2021
43364348

43374349
```
43384350
Starting Async_ConfigOnDoubleReset_TZ using LittleFS on ESP32_DEV
4339-
ESPAsync_WiFiManager v1.8.0
4351+
ESPAsync_WiFiManager v1.8.1
43404352
ESP_DoubleResetDetector v1.1.1
43414353
ESP Self-Stored: SSID = HueNet1, Pass = password
43424354
[WM] * Add SSID = HueNet1 , PW = password
@@ -4383,7 +4395,7 @@ This is terminal debug output when running [Async_ESP_FSWebServer_DRD](examples/
43834395

43844396
```
43854397
Starting Async_ESP_FSWebServer_DRD using LittleFS on ESP8266_NODEMCU
4386-
ESPAsync_WiFiManager v1.8.0
4398+
ESPAsync_WiFiManager v1.8.1
43874399
ESP_DoubleResetDetector v1.1.1
43884400
Opening / directory
43894401
FS File: drd.dat, size: 4B
@@ -4456,7 +4468,7 @@ Local Date/Time: Sat May 1 03:12:54 2021
44564468

44574469
```
44584470
Starting Async_ESP_FSWebServer_DRD using LittleFS on ESP8266_NODEMCU
4459-
ESPAsync_WiFiManager v1.8.0
4471+
ESPAsync_WiFiManager v1.8.1
44604472
ESP_DoubleResetDetector v1.1.1
44614473
Opening / directory
44624474
FS File: drd.dat, size: 4B
@@ -4546,6 +4558,11 @@ Submit issues to: [ESPAsync_WiFiManager issues](https://github.com/khoih-prog/ES
45464558

45474559
## Releases
45484560

4561+
### Releases v1.8.1
4562+
4563+
1. Fix bug.
4564+
2. Don't display invalid time when not synch yet.
4565+
45494566
### Major Releases v1.8.0
45504567

45514568
1. Add auto-Timezone feature with variable `_timezoneName` (e.g. `America/New_York`) and function to retrieve TZ (e.g. `EST5EDT,M3.2.0,M11.1.0`) to use directly to configure ESP32/ESP8266 timezone. Check [How to retrieve timezone? #51](https://github.com/khoih-prog/ESPAsync_WiFiManager/issues/51)

examples/Async_AutoConnect/Async_AutoConnect.ino

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager
1515
Licensed under MIT license
16-
Version: 1.8.0
16+
Version: 1.8.1
1717
1818
Version Modified By Date Comments
1919
------- ----------- ---------- -----------
@@ -36,12 +36,13 @@
3636
1.7.0 K Hoang 20/04/2021 Add support to new ESP32-C3 using SPIFFS or EEPROM
3737
1.7.1 K Hoang 25/04/2021 Fix MultiWiFi bug. Fix captive-portal bug if CP AP address is not default 192.168.4.1
3838
1.8.0 K Hoang 30/04/2021 Set _timezoneName. Add support to new ESP32-S2 (METRO_ESP32S2, FUNHOUSE_ESP32S2, etc.)
39+
1.8.1 K Hoang 06/05/2021 Fix bug. Don't display invalid time when not synch yet.
3940
*****************************************************************************************************************************/
4041
#if !( defined(ESP8266) || defined(ESP32) )
4142
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
4243
#endif
4344

44-
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.8.0"
45+
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.8.1"
4546

4647
// Use from 0 to 4. Higher number, more debugging messages and memory usage.
4748
#define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3
@@ -418,7 +419,7 @@ void printLocalTime()
418419

419420
now = time(nullptr);
420421

421-
if ( now > 1000000 )
422+
if ( now > 1451602800 )
422423
{
423424
Serial.print("Local Date/Time: ");
424425
Serial.print(ctime(&now));
@@ -427,8 +428,14 @@ void printLocalTime()
427428
struct tm timeinfo;
428429

429430
getLocalTime( &timeinfo );
430-
Serial.print("Local Date/Time: ");
431-
Serial.print( asctime( &timeinfo ) );
431+
432+
// Valid only if year > 2000.
433+
// You can get from timeinfo : tm_year, tm_mon, tm_mday, tm_hour, tm_min, tm_sec
434+
if (timeinfo.tm_year > 100 )
435+
{
436+
Serial.print("Local Date/Time: ");
437+
Serial.print( asctime( &timeinfo ) );
438+
}
432439
#endif
433440
}
434441

examples/Async_AutoConnectWithFSParameters/Async_AutoConnectWithFSParameters.ino

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager
1515
Licensed under MIT license
16-
Version: 1.8.0
16+
Version: 1.8.1
1717
1818
Version Modified By Date Comments
1919
------- ----------- ---------- -----------
@@ -36,13 +36,14 @@
3636
1.7.0 K Hoang 20/04/2021 Add support to new ESP32-C3 using SPIFFS or EEPROM
3737
1.7.1 K Hoang 25/04/2021 Fix MultiWiFi bug. Fix captive-portal bug if CP AP address is not default 192.168.4.1
3838
1.8.0 K Hoang 30/04/2021 Set _timezoneName. Add support to new ESP32-S2 (METRO_ESP32S2, FUNHOUSE_ESP32S2, etc.)
39+
1.8.1 K Hoang 06/05/2021 Fix bug. Don't display invalid time when not synch yet.
3940
*****************************************************************************************************************************/
4041

4142
#if !( defined(ESP8266) || defined(ESP32) )
4243
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
4344
#endif
4445

45-
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.8.0"
46+
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.8.1"
4647

4748
// Use from 0 to 4. Higher number, more debugging messages and memory usage.
4849
#define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3
@@ -617,7 +618,7 @@ void printLocalTime()
617618

618619
now = time(nullptr);
619620

620-
if ( now > 1000000 )
621+
if ( now > 1451602800 )
621622
{
622623
Serial.print("Local Date/Time: ");
623624
Serial.print(ctime(&now));
@@ -626,8 +627,14 @@ void printLocalTime()
626627
struct tm timeinfo;
627628

628629
getLocalTime( &timeinfo );
629-
Serial.print("Local Date/Time: ");
630-
Serial.print( asctime( &timeinfo ) );
630+
631+
// Valid only if year > 2000.
632+
// You can get from timeinfo : tm_year, tm_mon, tm_mday, tm_hour, tm_min, tm_sec
633+
if (timeinfo.tm_year > 100 )
634+
{
635+
Serial.print("Local Date/Time: ");
636+
Serial.print( asctime( &timeinfo ) );
637+
}
631638
#endif
632639
}
633640

examples/Async_AutoConnectWithFSParametersAndCustomIP/Async_AutoConnectWithFSParametersAndCustomIP.ino

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager
1515
Licensed under MIT license
16-
Version: 1.8.0
16+
Version: 1.8.1
1717
1818
Version Modified By Date Comments
1919
------- ----------- ---------- -----------
@@ -36,13 +36,14 @@
3636
1.7.0 K Hoang 20/04/2021 Add support to new ESP32-C3 using SPIFFS or EEPROM
3737
1.7.1 K Hoang 25/04/2021 Fix MultiWiFi bug. Fix captive-portal bug if CP AP address is not default 192.168.4.1
3838
1.8.0 K Hoang 30/04/2021 Set _timezoneName. Add support to new ESP32-S2 (METRO_ESP32S2, FUNHOUSE_ESP32S2, etc.)
39+
1.8.1 K Hoang 06/05/2021 Fix bug. Don't display invalid time when not synch yet.
3940
*****************************************************************************************************************************/
4041

4142
#if !( defined(ESP8266) || defined(ESP32) )
4243
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
4344
#endif
4445

45-
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.8.0"
46+
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.8.1"
4647

4748
// Use from 0 to 4. Higher number, more debugging messages and memory usage.
4849
#define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3
@@ -451,7 +452,7 @@ void printLocalTime()
451452

452453
now = time(nullptr);
453454

454-
if ( now > 1000000 )
455+
if ( now > 1451602800 )
455456
{
456457
Serial.print("Local Date/Time: ");
457458
Serial.print(ctime(&now));
@@ -460,8 +461,14 @@ void printLocalTime()
460461
struct tm timeinfo;
461462

462463
getLocalTime( &timeinfo );
463-
Serial.print("Local Date/Time: ");
464-
Serial.print( asctime( &timeinfo ) );
464+
465+
// Valid only if year > 2000.
466+
// You can get from timeinfo : tm_year, tm_mon, tm_mday, tm_hour, tm_min, tm_sec
467+
if (timeinfo.tm_year > 100 )
468+
{
469+
Serial.print("Local Date/Time: ");
470+
Serial.print( asctime( &timeinfo ) );
471+
}
465472
#endif
466473
}
467474

examples/Async_AutoConnectWithFeedback/Async_AutoConnectWithFeedback.ino

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager
1515
Licensed under MIT license
16-
Version: 1.8.0
16+
Version: 1.8.1
1717
1818
Version Modified By Date Comments
1919
------- ----------- ---------- -----------
@@ -36,12 +36,13 @@
3636
1.7.0 K Hoang 20/04/2021 Add support to new ESP32-C3 using SPIFFS or EEPROM
3737
1.7.1 K Hoang 25/04/2021 Fix MultiWiFi bug. Fix captive-portal bug if CP AP address is not default 192.168.4.1
3838
1.8.0 K Hoang 30/04/2021 Set _timezoneName. Add support to new ESP32-S2 (METRO_ESP32S2, FUNHOUSE_ESP32S2, etc.)
39+
1.8.1 K Hoang 06/05/2021 Fix bug. Don't display invalid time when not synch yet.
3940
*****************************************************************************************************************************/
4041
#if !( defined(ESP8266) || defined(ESP32) )
4142
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
4243
#endif
4344

44-
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.8.0"
45+
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.8.1"
4546

4647
// Use from 0 to 4. Higher number, more debugging messages and memory usage.
4748
#define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3
@@ -425,7 +426,7 @@ void printLocalTime()
425426

426427
now = time(nullptr);
427428

428-
if ( now > 1000000 )
429+
if ( now > 1451602800 )
429430
{
430431
Serial.print("Local Date/Time: ");
431432
Serial.print(ctime(&now));
@@ -434,8 +435,14 @@ void printLocalTime()
434435
struct tm timeinfo;
435436

436437
getLocalTime( &timeinfo );
437-
Serial.print("Local Date/Time: ");
438-
Serial.print( asctime( &timeinfo ) );
438+
439+
// Valid only if year > 2000.
440+
// You can get from timeinfo : tm_year, tm_mon, tm_mday, tm_hour, tm_min, tm_sec
441+
if (timeinfo.tm_year > 100 )
442+
{
443+
Serial.print("Local Date/Time: ");
444+
Serial.print( asctime( &timeinfo ) );
445+
}
439446
#endif
440447
}
441448

0 commit comments

Comments
 (0)