Search code examples
upgradeesp32otaplatformio

Cannot upgrade to syncElegantOTA v3 in platformIO


In my ESP32 project I want to use asyncElegantOTA. As development enviornment I am using Visual Studio Code (v1.87.2) with platformIO (v3.3.3). When compiling my project I am getting the following warning:

AsyncElegantOTA library is deprecated, Please consider moving to newer ElegantOTA library which now comes with an Async Mode. Learn More: https://docs.elegantota.pro/async-mode/

The current installed version is 2.2.8.

In my platformio.ini file, I have this line inside the lib_deps: ayushsharma82/AsyncElegantOTA @ ^2.2.8

I followed the link, mentioned in the warning which brings you to the following documentation:

If you use PlatformIO then we can use a neat trick! You can set build_flags in your platformio.ini file that enables Async Mode of ElegantOTA.

Open platformio.ini file of your project Paste this line build_flags=-DELEGANTOTA_USE_ASYNC_WEBSERVER=1 at bottom Done! PlatformIO will now compile ElegantOTA in Async Mode!

However, not sure, if it really compiles ElegantOTA in Async Mode, but the problem with the deprecated version is not solved.

I searched the libraries but the highes version which is offered is that I already have.

What else I can try to upgrade to AsyncElegantOTA v3 in platformIO? Or, is my expectation wrong that this upgrade should be possible (despite the warning)?


Solution

  • Open platformio.ini file of your project

    Add

    lib_deps = https://github.com/ayushsharma82/ElegantOTA.git

    You will get the latest version.