Hi,
I have uploaded a new library version that can be used for testing. It includes a better support for Webconfig both on ESP8266 and ESP32, and improves OTA management. It is not released on the master branch yet, so, for testing it is necessary to configure platformio.ini in the following way (to use the webconfig branch).
lib_deps =
https://github.com/thinger-io/Arduino-Library.git#webconfig
I noticed that sometimes OTA fails due to memory limit on devices, i.e., when you add some other libraries and code. In this case it is possible to reduce the required memory consumption for the OTA process. For example, setting it to 1024 bytes inside the setup():
ota.set_block_size(1024);
I have lowered it for the ESP8266 to 2048 bytes by default (it was set to 8192), and I am investigating if it can be adjusted dynamically depending on the free memory. There is a trade-off between memory footprint and OTA speed. A smaller memory footprint will require more packets being processed and acknowledged, so it will be a bit slower.
This branch also includes some callbacks to know the OTA state by the program. I will update soon an example with an OLED screen.