Hi, I am trying to run this repo it is an esp32 webserver for mppt converter.
“Michael Erhart / TUM EduGrid · GitLab”. It uses elegantOTA library but I got this error and couldnt fix it no matter what. What should I do can someone direct me ?
"
#include <AsyncElegantOTA.h>
^~~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pio\build\esp32doit-devkit-v1\src\edugrid_filesystem.cpp.o] Error 1
*** [.pio\build\esp32doit-devkit-v1\src\edugrid_lcd.cpp.o] Error 1
*** [.pio\build\esp32doit-devkit-v1\src\edugrid_logging.cpp.o] Error 1
*** [.pio\build\esp32doit-devkit-v1\src\edugrid_measurement.cpp.o] Error 1
*** [.pio\build\esp32doit-devkit-v1\src\edugrid_mpp_algorithm.cpp.o] Error 1
*** [.pio\build\esp32doit-devkit-v1\src_edugrid_template.cpp.o] Error 1
In file included from include/edugrid_filesystem.h:17,
from include/edugrid_simulation.h:16,
from include/edugrid_states.h:13,
from include/edugrid_pwm_control.h:15,
from src/edugrid_pwm_control.cpp:10:
include/edugrid_webserver.h:19:10: fatal error: AsyncElegantOTA.h: No such file or directory"
Error comments, are like below
#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (C:\Users\Altiok\Documents\PlatformIO\Projects\tum-edugrid\propens_edugrid\src\edugrid_webserver.cpp).C/C++(1696)
#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (C:\Users\Altiok\Documents\PlatformIO\Projects\tum-edugrid\propens_edugrid\src\main.cpp).C/C++(1696)
cannot open source file “AsyncElegantOTA.h” (dependency of “edugrid_pwm_control.h”)C/C++(1696)
The problem is the missing AsyncElegantOTA library.
It can be added to the platformio.ini in the lib_deps section
lib_deps =
...
https://github.com/ayushsharma82/AsyncElegantOTA
But then the real problem comes up. That library is deprecated and does not work anymore.
The project has to be rewritten, without the use of the AsyncElegantOTA library or by using an alternative library.
I made the project compile by changing:
platformio.ini
Adding the library mikaeltulldahl/AsyncOta@^1.0.2:
lib_deps =
...
mikaeltulldahl/AsyncOta@^1.0.2
edugrid_webserver.h Line 19:
#include <AsyncOTA.h>
edugrid_webserver.cpp Line 250:
AsyncOTA.begin(&server);
Note: The project does not compile with Espressif Arduino 3.x! You may need to fix the platform version like platform = espressif32 @ 6.12.0
Thanks a lot, in the github link it says please use GitHub - ayushsharma82/ElegantOTA: OTA updates made slick and simple for everyone! (ESP8266, ESP32, RP2040+W, RP2350+W). If I use this then I need to change every include to ElegantOTA and also the functions to ElegantOTA right? Why do you recommend the AsyncOta ?
Also can you elaborate a bit more about " The project does not compile with Espressif Arduino 3.x! You may need to fix the platform version like platform = espressif32 @ 6.12.0" I Use ESP32-WROOM-32E-N8 with CH340C converter that I soldered every parts myself (I mean its not a ready to use board) on a PCB. What should I use as platform and devboard?
No special reason. Just saw it in the registry and it compiles without issues. Removing the library is also a possible solution 
If no version is specified, the version installed on your computer with the highest version number is used. If you have used pioarduino before, to get Espressif Arduino 3.x, this version will be used. Your project does not compile on Espressif Arduino 3.x due to breaking API changes. See migration guide from 2.x to 3.x for details: Migration from 2.x to 3.0 - - — Arduino ESP32 latest documentation