Closed tom-dierckx closed 4 years ago
@tom-dierckx
Thanks for using the library and your encouraging words.
The NTP access to cloudflare.com was an enhancement from a request for a special use case. See Feature Request! Firmware and Data (SPIFFS) update OTA and NTP Timezone #5
You can disable it if it's not necessary to avoid above-mentioned issue by either
ESP_WiFiManager.h
, and modify the line to// From v1.0.6 to enable NTP config
#define USE_ESP_WIFIMANAGER_NTP false
from
// From v1.0.6 to enable NTP config
#define USE_ESP_WIFIMANAGER_NTP true
ESP_WiFiManager.h
, and modify the line to#if 0
const char HTTP_SCRIPT_NTP[] PROGMEM = "<script src='https://cdnjs.cloudflare.com/ajax/libs/jstimezonedetect/1.0.4/jstz.min.js'></script><script>var timezone=jstz.determine();console.log('Your timezone is:' + timezone.name());document.getElementById('timezone').innerHTML = timezone.name();</script>";
#else
from
#if 1
const char HTTP_SCRIPT_NTP[] PROGMEM = "<script src='https://cdnjs.cloudflare.com/ajax/libs/jstimezonedetect/1.0.4/jstz.min.js'></script><script>var timezone=jstz.determine();console.log('Your timezone is:' + timezone.name());document.getElementById('timezone').innerHTML = timezone.name();</script>";
#else
In future version, I'll add an option to let you define the option in sketch, instead of modifying the library directly, such as
#define USE_ESP_WIFIMANAGER_NTP true
#define USE_CLOUDFLARE_NTP true
#define USE_ESP_WIFIMANAGER_NTP true
#define USE_CLOUDFLARE_NTP false
or
#define USE_ESP_WIFIMANAGER_NTP false
#define USE_CLOUDFLARE_NTP false
Please test and let me know the results as well as your suggestions
Regards,
The default portal hangs on a request to a Cloadflare link for a javascript library. This effectively breaks the application on connected devices that do not have another link to the internet. Is this as intended? After blocking a request to the Cloadflare cdn on the client the self service portal works.
(The link in question https://cdnjs.cloudflare.com/ajax/libs/jstimezonedetect/1.0.4/jstz.min.js)
Regards and thank you for the amazing work,
Tom