sticilface / espmanager Goto Github PK
View Code? Open in Web Editor NEWFull wifi and OTA manager for ESP8266
License: GNU Lesser General Public License v3.0
Full wifi and OTA manager for ESP8266
License: GNU Lesser General Public License v3.0
Hi, I'm sorry but I don't know how to get in touch to you.
I'm trying to get platformio working with 2.1.0-rc2 esp8266/Arduino sdk, but I can't get it working.
I was reading this thread:
platformio/platformio-core#401
So I've followed all the instructions and added -lmesh to the platformio.ini config file, but I'm still getting the error:
/Users/edu/.platformio/packages/framework-arduinoespressif/tools/sdk/lib/libcrypto.a(aes-internal.o):(.irom0.text+0x0): undefined reference to `rcons'
collect2: error: ld returned 1 exit status
scons: *** [.pioenvs/esp12e/firmware.elf] Error 1
Did you solve the issue? Would you mind to tell me how?
Thanks in advance.
It refers to "settings.portal" which I believe has been renamed to "settings.enablePortal."
At any rate, the example as its presented doesn't actually work.
Hi Sticilface,
Nice work with the application, it looks promissing.
I have tested it and I have found some issues with the web server.
If you make fast refreshes the http server crashes (timed out) but the app on the esp continues to run with a heap of 19064 in my case (serilal debug). Do you know anything about this behavior?
I couldn't find a way to disable the web interface (I would like to do this especially that the authentification is not implemented yet). Could you help with disabling the web interface after config is done?
Thank you.
I just tested the example in the ESPmanager but didn't make it through the complete configuration.
I have a lot of Wifi networks in the neighbourhood and since the list of possible networks is rather "short", I simply cannot connect to my own network.
I see 2 possible workarounds: 1) make the list longer or 2) add a input filed to type the SSID of the known network.
Or am I missing something?
First off, great job you've done here. Congrats.
I'm thinking on using this lib with my students in the near future. One thing though is that I wasn't able to use the OTA feature because I couldn't get a hold of the structure your lib expects me to parse. In the /espman/#ota... there's a link to the same page that was supposed to explain such structure. Could you be kind enough to provide a easy-to-follow doc for the OTA feature? I'd really much appreciate it. Thanks and great job again.
problem #1 - DEBUG cauzez problems with arduino.h
problem #2 - after fixing the above issue ESPmanager.cpp:202:10: error: no matching function for call to 'ArduinoOTAClass::onStart(ESPmanager::begin()::__lambda0)'
});
i use latest versions of arduino ide/compiler/libraries + esp8266 sdk/arduino core
Looks like I have managed to mess up my WLAN settings with the result that I seem to be unable to get back in at all. Would be great if there was an easy way to reset all spiffs settings, e.g., by shorting a certain pin on the ESP.
I have a lib https://github.com/sticilface/ESPdeviceFinder
That uses UDP to find other ESP devices. Works very well, and I would like to integrate it into ESPmanager.
See https://github.com/sticilface/Melvanimate for it in action.
C:...\portable\sketchbook\libraries\ESPmanager\src\ESPmanager.cpp: In member function 'String ESPmanager::getSketchMD5()':
C:...\portable\sketchbook\libraries\ESPmanager\src\ESPmanager.cpp:981:16: error: 'class EspClass' has no member named 'getSketchMD5'
return ESP.getSketchMD5();
Arduino IDE 1.8.1
esp8266 : 2.3.0-rc2
String ESPmanager::getSketchMD5()
{
return ESP.getSketchMD5();
}
to
String ESPmanager::getSketchMD5()
{
return "1";//ESP.getSketchMD5();
}
ITS NOT A FIX !!! Only to get it compiling for a first try...
peter
When trying to use You can specify a default hard coded set of credentials
:
ESPmanager-example:38: error: no matching function for call to 'ESPmanager::ESPmanager(AsyncWebServer&, fs::FS&, const char [11], const char*&, const char*&)'
ESPmanager settings(HTTP, SPIFFS, "ESPManager", defaultSSID , defaultPSK);
^
/tmp/arduino_modified_sketch_730001/ESPmanager-example.ino:38:73: note: candidates are:
In file included from /tmp/arduino_modified_sketch_730001/ESPmanager-example.ino:27:0:
/home/me/Arduino/libraries/ESPmanager-master/src/ESPmanager.h:92:9: note: ESPmanager::ESPmanager(AsyncWebServer&, fs::FS&)
ESPmanager(AsyncWebServer & HTTP, FS & fs = SPIFFS);
^
/home/me/Arduino/libraries/ESPmanager-master/src/ESPmanager.h:92:9: note: candidate expects 2 arguments, 5 provided
/home/me/Arduino/libraries/ESPmanager-master/src/ESPmanager.h:89:7: note: ESPmanager::ESPmanager(const ESPmanager&)
class ESPmanager
^
/home/me/Arduino/libraries/ESPmanager-master/src/ESPmanager.h:89:7: note: candidate expects 1 argument, 5 provided
exit status 1
no matching function for call to 'ESPmanager::ESPmanager(AsyncWebServer&, fs::FS&, const char [11], const char*&, const char*&)
Can you add a licence? :)
introduced
#define USE_WEB_UPDATER
which when commented out, disabled the autoupdate feature. This frees about 6K of heap that is currently used by HTTPClient, even though HTTPs is not being used.
esp8266/Arduino#1855
Exception Decoder:
Exception 29: StoreProhibited: A store referenced a page mapped with an attribute that does not permit stores
Decoding 42 results
0x4020decd: AsyncResponseStream::write(unsigned char const*, unsigned int) at C:...\portable\sketchbook\libraries\ESPAsyncWebServer\src/WebResponses.cpp line 471
0x4021d848: AsyncResponseStream::write(unsigned char) at C:...\portable\sketchbook\libraries\ESPAsyncWebServer\src/WebResponses.cpp line 471
0x401006f0: malloc at C:...\portable\packages\esp8266\hardware\esp8266\2.3.0-rc2\cores\esp8266\umm_malloc/umm_malloc.c line 1664
0x4020f067: non-virtual thunk to AsyncResponseStream::write(unsigned char) at ?? line ?
0x4021dad1: ArduinoJson::Internals::JsonWriter::writeRaw(char) at C:...\portable\sketchbook\libraries\ArduinoJson/include/ArduinoJson/Deserialization/../Serialization/JsonWriter.hpp line 153
0x40211fe0: ArduinoJson::Internals::JsonSerializer::serialize(ArduinoJson::JsonObject const&, ArduinoJson::Internals::JsonWriter&) at c:...\portable\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2/functional line 2058
0x40214999: void ESPmanager::sendJsontoHTTP (ArduinoJson::JsonObject const&, AsyncWebServerRequest*) at c:...\portable\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2/functional line 2058
0x401008e0: free at C:...\portable\packages\esp8266\hardware\esp8266\2.3.0-rc2\cores\esp8266\umm_malloc/umm_malloc.c line 1733
0x4020e404: AsyncWebServerResponse::addHeader(String const&, String const&) at C:...\portable\sketchbook\libraries\ESPAsyncWebServer\src/WebResponses.cpp line 471
0x4021c0a4: operator delete(void*) at C:...\portable\packages\esp8266\hardware\esp8266\2.3.0-rc2\cores\esp8266/abi.cpp line 57
0x40207ddc: ESP8266WiFiSTAClass::status() at C:...\portable\packages\esp8266\hardware\esp8266\2.3.0-rc2\libraries\ESP8266WiFi\src/ESP8266WiFiSTA.cpp line 510
0x402172c9: ESPmanager::_HandleDataRequest(AsyncWebServerRequest*) at c:...\portable\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2/functional line 2058
0x401008b8: realloc at C:...\portable\packages\esp8266\hardware\esp8266\2.3.0-rc2\cores\esp8266\umm_malloc/umm_malloc.c line 1714
0x4021b568: String::changeBuffer(unsigned int) at C:...\portable\packages\esp8266\hardware\esp8266\2.3.0-rc2\cores\esp8266/WString.cpp line 720
0x401008e0: free at C:...\portable\packages\esp8266\hardware\esp8266\2.3.0-rc2\cores\esp8266\umm_malloc/umm_malloc.c line 1733
0x4021dba5: std::_Function_handler (ESPmanager*, std::_Placeholder1>)> >::_M_invoke(std::_Any_data const&, AsyncWebServerRequest*) at c:...\portable\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2/functional line 2073
0x4020f229: std::function ::operator()(AsyncWebServerRequest*) const at C:...\portable\sketchbook\libraries\ESPAsyncWebServer\src/WebServer.cpp line 79
: (inlined by) AsyncCallbackWebHandler::handleRequest(AsyncWebServerRequest*) at C:...\portable\sketchbook\libraries\ESPAsyncWebServer\src/WebHandlerImpl.h line 91
0x4020d930: AsyncWebServerRequest::_onData(void*, unsigned int) at C:...\portable\sketchbook\libraries\ESPAsyncWebServer\src/WebRequest.cpp line 674
0x401008e0: free at C:...\portable\packages\esp8266\hardware\esp8266\2.3.0-rc2\cores\esp8266\umm_malloc/umm_malloc.c line 1733
0x4010763c: vPortFree at C:...\portable\packages\esp8266\hardware\esp8266\2.3.0-rc2\cores\esp8266/heap.c line 18
0x4010020c: _umm_free at C:...\portable\packages\esp8266\hardware\esp8266\2.3.0-rc2\cores\esp8266\umm_malloc/umm_malloc.c line 1287
0x4020d9d1: _M_invoke at C:...\portable\sketchbook\libraries\ESPAsyncWebServer\src/WebRequest.cpp line 674
0x40234665: system_pp_recycle_rx_pkt at ?? line ?
0x4020ab70: AsyncClient::_recv(tcp_pcb*, pbuf*, signed char) at C:...\portable\sketchbook\libraries\ESPAsyncTCP\src/ESPAsyncTCP.cpp line 650
0x4023c549: pbuf_free at /Users/igrokhotkov/espressif/arduino/tools/sdk/lwip/src/core/pbuf.c line 758
0x4020abc3: AsyncClient::_s_recv(void*, tcp_pcb*, pbuf*, signed char) at C:...\portable\sketchbook\libraries\ESPAsyncTCP\src/ESPAsyncTCP.cpp line 650
0x40241cbc: tcp_input at /Users/igrokhotkov/espressif/arduino/tools/sdk/lwip/src/core/tcp_in.c line 394 (discriminator 1)
0x4010234b: ppCalFrameTimes at ?? line ?
0x402401bd: ip_input at /Users/igrokhotkov/espressif/arduino/tools/sdk/lwip/src/core/ipv4/ip.c line 559
0x40224b9e: ieee80211_hostap_attach at ?? line ?
0x4021f583: pp_enable_noise_timer at ?? line ?
0x4023f5b9: ethernet_input at /Users/igrokhotkov/espressif/arduino/tools/sdk/lwip/src/netif/etharp.c line 1379
0x4010542a: lmacTxFrame at ?? line ?
0x40101d96: ppEnqueueRxq at ?? line ?
0x402343e0: ets_timer_handler_isr at ?? line ?
0x40101b63: ppProcessTxQ at ?? line ?
0x40101b9e: ppProcessTxQ at ?? line ?
0x40234063: ets_snprintf at ?? line ?
peter
Right now we need to
#include <FS.h>
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <ESP8266httpUpdate.h>
#include <ESPAsyncTCP.h>
#include <ESPAsyncWebServer.h>
#include <AsyncJson.h>
#include <ArduinoOTA.h>
#include <ArduinoJson.h>
#include <Hash.h>
#include <ESP8266mDNS.h>
#include <ESPmanager.h>
Wouldn't it be possible for ESPmanager.h to include the others, so that the main sketch could stay a bit leaner?
Add ability to manage and work with multiple wifi networks.
Can you add http basic auth to the setup area?
This project seemed pretty straightforward to flash, is well-documented, and the features sound awesome. However, I can't get the captive portal and initial config to launch. I've tried a variety of browsers, but I just get a blank page. Also, it doesn't seem to redirect well, but browsing to the IP address gets me to what should be the setup page (the page at least has a title element, so that's why I know I got to the right spot). Did I upload something in the wrong order? Am I missing a library?
I'd like to enable full syslog debugging for ESPManager but also for the main app running on the ESP.
Potential lib I'm interested in using is https://github.com/arcao/Syslog, but i need a feature to easily allow changing of the appName to make it easy. arcao/Syslog#3
Example of API..
ESPmanager manager(HTTP, SPIFFS);
void setup()
{
manager.begin();
manager.log("mainApp", "Booted");
}
void loop()
{
manager.handle();
}
I literally tried everything... on a mac, on windows, on arduino 1.8.10 down to 1.6.7...python 2.7.15,
ajson 5 and ajson6 , i've installed all the libraries that were popping out as missing...
I can't get it to work
This is the error with the tool "esptool write_flash: error: argument
SPIFFS Upload failed!"
This when compiling:"
ESPmanager-example:81:2: error: 'settings' was not declared in this scope
settings.handle();
C:.......\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.1\libraries\ArduinoOTA/ESPmanager.h:38:5: error: 'MQTTClient' does not name a type
MQTTClient mqttCli;
^
ESPmanager-example:31:1: error: 'ESPmanager' does not name a type
ESPmanager settings(HTTP, SPIFFS);
^
C:.....\AppData\Local\Temp\Temp1_ESPmanager-1.2.0.zip\ESPmanager-1.2.0\examples\ESPmanager-example\ESPmanager-example.ino: In function 'void setup()':
ESPmanager-example:53:2: error: 'settings' was not declared in this scope
settings.begin();
^
C:....\AppData\Local\Temp\Temp1_ESPmanager-1.2.0.zip\ESPmanager-1.2.0\examples\ESPmanager-example\ESPmanager-example.ino: In lambda function:
ESPmanager-example:60:10: error: 'settings' is not captured
return settings.portal();
^
C:....\AppData\Local\Temp\Temp1_ESPmanager-1.2.0.zip\ESPmanager-1.2.0\examples\ESPmanager-example\ESPmanager-example.ino: In function 'void setup()':
ESPmanager-example:61:3: error: no matching function for call to 'AsyncWebRewrite::setFilter(setup()::__lambda1)'
I'm literally out of ideas and it's a pitty 'cause it is the most complete manager as far as I'm concerned...
Currently only port 80 is supported by default.
propose:
http://192.168.1.234:8001/manifest.json
as example to allow port specification after IP / server
How to use stored SSID, password, maybe Blynk auth
with my sketch.
The instructions say "Now visit http://X.X.X.X/espman/ and it should work". This is cumbersome and difficult to communicate. It would be better if in AP mode ESPmanager would answer all nameserver requests with its own IP address. This way we could tell users "connect to the AP and then visit any URL, you will be directed automatically".
The DNSServer library has the needed "captive portal" functionality.
Tutorial:
https://www.hackster.io/rayburne/esp8266-captive-portal-5798ff
Site always fails to load first time, on an empty cache. Not sure why...
To help debugging allow the crash dump to be saved to SPIFFS.
The ajax-loader.gif is not shown during setup (waiting for launch button).
Andriod / Chrome
Windows / FF
direct opened in the browser
http://192.168.1.190/espman/ajax-loader.gif
I get: The image "http://http://192.168.1.190/espman/ajax-loader.gif" cannot be displayed because it contains errors.
peter
hi,it's not working
my arduino ide is 1.6.8 ,sdk is 2.1.0
sorry for my english,can you help me ?thanks
C:\Users\Eagle\Documents\Arduino\libraries\ESPmanager-0.1\ESPmanager.cpp:1395:38: error: no match for 'operator=' (operand types are 'ArduinoJson::JsonObjectSubscript<const String&>' and 'FlashMode_t')
root[F("flashchipmode_var")] = ESP.getFlashChipMode();
Hi,
Nice work you can improve the ESPmanager by adding GPIO, NTP, MQTT and Automation uses NTP, OTA by own ESP. That will be amazing.
Hello,
I was trying to run the default example for the OTA update through web browser, but every page I try to visit returns the "not found" error.
I'm using platformio; I've uploaded the files in the SPIFFS on my ESP8266 01 module (1 MB flash, 512 dedicated to SPIFFS). The module correctly connects to my network, but when I try to reach it through Firefox every page yields the same result (empty page, "Not found: ").
I'm using the platformio library example; the one found on Github does not compile.
Am I doing something wrong?
Let's say I want to write a sketch that checks my GitHub Notifications regularly, and lights a LED if there are some.
For this, I would need to somehow enter my GitHub token. I don't want this to be hardcoded in the sketch but to be entered by the user into ESPmanager.
It would be nice if there was a super simple way to pass in the needed variable, and (auto)generate a GUI entry field for it.
Can you show how to do this please?
The OTA fails when SPIFFS is fragmented / getting full as it takes too long to write a block. Sometimes upwards of 200ms.
Proposal to write downloaded files straight to the FLASH section reserved for OTA updates and then copy them to SPIFFS when network activity has reduced.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.