Closed Eisbaeeer closed 2 years ago
Did you know about this project? https://github.com/rjwats/esp8266-react
Hello @Eisbaeeer , thank you for the pointer, I wasn't aware of esp8266-react that also works on ESP32. Lots of useful features! The UI configurable MQTT feature looks useful for a home lighting project am working on. Taking a deeper look...
Are you still hitting build errors when trying to build these examples using my ESP32 branch forked from maakbaas's framework? https://github.com/aaronse/esp8266-iot-framework/tree/esp32 will try to repro...
Hey @Eisbaeeer, just pushed couple of config tweaks. The following worked for me (Windows 10). Please excuse the verbose write up, planning to eventually update the doc with this content to help others as well.
cd to your usual git/dev enlistment folder, e.g. c:\git, or some temporary scratch folder, e.g. c:\scratch
Clone this repo containing example projects, then clone the my ESP32 branch of maakbaas's framework, until if/when ESP32 pull request is approved and submitted.
git clone https://github.com/aaronse/esp-iot-framework-examples
cd esp-iot-framework-examples\helloWorld\lib
git clone --single-branch --branch esp32 https://github.com/aaronse/esp8266-iot-framework
Ensure esp8266-iot-framework dependencies are installed, and that the framework UI will build and webpack ok.
cd esp8266-iot-framework
npm install
echo verify freshly cloned framework UI bundle builds successfully
npm run build
Open helloworld app in VS Code.
cd ..\..
code .
Use PlatformIO Build task within VS Code... Ctrl + Alt + B
Transition by adding must_exist=False to SConscript calls.
Missing SConscript 'C:\lib\esp8266-iot-framework\scripts\preBuild.py'
File "C:\Users\aaron\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 189, in <module>
C:\Users\aaron.platformio\packages\framework-arduinoespressif32\cores\esp32\esp32-hal-spi.c: In function 'spiTransferBytesNL': C:\Users\aaron.platformio\packages\framework-arduinoespressif32\cores\esp32\esp32-hal-spi.c:922:39: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] ... C:\Users\aaron.platformio\packages\framework-arduinoespressif32\cores\esp32\esp32-hal-spi.c:923:40: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] ...
Use PlatformIO Upload task within VS Code.
Use PlatformIO Monitor task within VS Code.
@aaronse I will try it and give you a feedback here. ;-)
Hi!
I have successfully installed your version using the step by step provided above with ESP32 Wrover-IE.
I didn't more tests yet.
Thanks!
Applying only the changes below to configManager example I have a crash loop.
#ifdef ESP32
#include "LITTLEFS.h"
#define LittleFS LITTLEFS
#elif defined(ESP8266)
#include "LittleFS.h"
#endif
Rebooting...
ets Jul 29 2019 12:21:46
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8
webServer::begin enter
Calling server.begin(); Will fail on ESP32 if tcp stack not initialized. Ensure WiFiManager was called first.
assertion "Invalid mbox" failed: file "/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/api/tcpip.c", line 416, function: tcpip_api_call
abort() was called at PC 0x40108493 on core 1
ELF file SHA256: 0000000000000000
Backtrace: 0x400887bc:0x3ffb1e00 0x40088a39:0x3ffb1e20 0x40108493:0x3ffb1e40 0x401394cf:0x3ffb1e70 0x40174b99:0x3ffb1ea0 0x400dc712:0x3ffb1ef0 0x400d362a:0x3ffb1f10 0x400d4b3e:0x3ffb1f60 0x400ec882:0x3ffb1fb0 0x40089a4a:0x3ffb1fd0
Also remove the initial slash (before lib) in extra_scripts
path to fix this warning.
Applying only the changes below to configManager example I have a crash loop.
#ifdef ESP32 #include "LITTLEFS.h" #define LittleFS LITTLEFS #elif defined(ESP8266) #include "LittleFS.h" #endif
Rebooting... ets Jul 29 2019 12:21:46 rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:1044 load:0x40078000,len:10124 load:0x40080400,len:5828 entry 0x400806a8 webServer::begin enter Calling server.begin(); Will fail on ESP32 if tcp stack not initialized. Ensure WiFiManager was called first. assertion "Invalid mbox" failed: file "/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/api/tcpip.c", line 416, function: tcpip_api_call abort() was called at PC 0x40108493 on core 1 ELF file SHA256: 0000000000000000 Backtrace: 0x400887bc:0x3ffb1e00 0x40088a39:0x3ffb1e20 0x40108493:0x3ffb1e40 0x401394cf:0x3ffb1e70 0x40174b99:0x3ffb1ea0 0x400dc712:0x3ffb1ef0 0x400d362a:0x3ffb1f10 0x400d4b3e:0x3ffb1f60 0x400ec882:0x3ffb1fb0 0x40089a4a:0x3ffb1fd0
Hello @FernandoGarcia, is configManager example that's crashing calling GUI.begin before WifiManager.begin? If so, try moving GUI.begin after WifiManager.begin, for example see... https://github.com/aaronse/esp-iot-framework-examples/blob/main/helloWorld/src/helloWorld.cpp
I have it working now.
Now I have the setup in this order:
LittleFS.begin();
configManager.begin();
configManager.setConfigSaveCallback(saveCallback);
WiFiManager.begin(configManager.data.projectName);
timeSync.begin();
GUI.begin();
Thank you!
Closing as resolved.
Don't forget to fix the extra_scripts path pointed above. :)
Thanks @FernandoGarcia! done, closing...
Hi. I downloaded your example 1:1 and try to compile it. Get following error (installed the wifimanager lib manually, too).
warning: Calling missing SConscript without error is deprecated. Transition by adding must_exist=False to SConscript calls. Missing SConscript 'C:\lib\esp8266-iot-framework\scripts\preBuild.py' File "C:\Users\lars\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 189, in <module> Compiling .pio\build\esp32dev\src\helloWorld.cpp.o Generating partitions .pio\build\esp32dev\partitions.bin Compiling .pio\build\esp32dev\lib126\AsyncTCP\AsyncTCP.cpp.o Compiling .pio\build\esp32dev\lib30b\FS\FS.cpp.o Compiling .pio\build\esp32dev\lib30b\FS\vfs_api.cpp.o In file included from src\helloWorld.cpp:10:0: .pio\libdeps\esp32dev\WiFiManager/WiFiManager.h:16:25: fatal error: ESP8266WiFi.h: No such file or directory
Edit: Hold on. I used the default iot-framework and not your´s. Will report.
New errors:
`warning: Calling missing SConscript without error is deprecated. Transition by adding must_exist=False to SConscript calls. Missing SConscript 'scripts\preBuild.py' File "C:\Users\lars.platformio\penv\lib\site-packages\platformio\builder\main.py", line 189, in
Compiling .pio\build\esp32dev\lib11a\ESP8266 IoT Framework\WiFiManager.cpp.o Compiling .pio\build\esp32dev\lib11a\ESP8266 IoT Framework\certStore.cpp.o Compiling .pio\build\esp32dev\lib11a\ESP8266 IoT Framework\configManager.cpp.o Compiling .pio\build\esp32dev\lib11a\ESP8266 IoT Framework\dashboard.cpp.o .pio/libdeps/esp32dev/ESP8266 IoT Framework/src/WiFiManager.cpp:5:10: fatal error: ESP8266WiFi.h: No such file or directory
include
compilation terminated. *** [.pio\build\esp32dev\lib11a\ESP8266 IoT Framework\WiFiManager.cpp.o] Error 1 In file included from .pio/libdeps/esp32dev/ESP8266 IoT Framework/src/certStore.cpp:1: .pio/libdeps/esp32dev/ESP8266 IoT Framework/src/certStore.h:9:10: fatal error: BearSSLHelpers.h: No such file or directory
include
compilation terminated. *** [.pio\build\esp32dev\lib11a\ESP8266 IoT Framework\certStore.cpp.o] Error 1 In file included from .pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.cpp:4: .pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.h:31:38: error: 'std::function' has not been declared void setConfigSaveCallback( std::function<void()> func ); ^'; did you forget to '#include '?
.pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.h:6:1:
+#include
~~~ .pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.h:31:46: error: expected ',' or '...' before '<' token void setConfigSaveCallback( std::function<void()> func ); ^ .pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.h:35:9: error: 'function' in namespace 'std' does not name a template type std::function<void()> _configsavecallback; ^~~~ .pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.h:35:4: note: 'std::function' is defined in header '.pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.h:35:4: std::function<void()> _configsavecallback; ^~~ .pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.cpp: In member function 'void config::save()':'; did you forget to '#include '?
.pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.cpp:5:1:
+#include
.pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.cpp:76:10: error: '_configsavecallback' was not declared in this scope if ( _configsavecallback != NULL) { ^
~~~~~~ .pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.cpp:76:10: note: suggested alternative: 'setConfigSaveCallback' if ( _configsavecallback != NULL) { ^~~~~~~ setConfigSaveCallback .pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.cpp: At global scope: .pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.cpp:81:42: error: variable or field 'setConfigSaveCallback' declared void void config::setConfigSaveCallback( std::function<void()> func ) { ^~~~ .pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.cpp:81:42: error: 'function' is not a member of 'std' .pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.cpp:81:42: note: 'std::function' is defined in header '.pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.cpp:81:42: void config::setConfigSaveCallback( std::function<void()> func ) { ^
~~~ .pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.cpp:81:59: error: 'func' was not declared in this scope void config::setConfigSaveCallback( std::function<void()> func ) { ^~~~ .pio/libdeps/esp32dev/ESP8266 IoT Framework/src/configManager.cpp:81:59: note: suggested alternative: 'sync'void config::setConfigSaveCallback( std::function<void()> func ) { ^~~~ sync *** [.pio\build\esp32dev\lib11a\ESP8266 IoT Framework\configManager.cpp.o] Error 1 ========================================= [FAILED] Took 26.73 seconds =========================================`