srwi / espessentials Goto Github PK
View Code? Open in Web Editor NEWEssentials to get you started with your Arduino projects using the ESP8266 and ESP32.
License: GNU Lesser General Public License v2.1
Essentials to get you started with your Arduino projects using the ESP8266 and ESP32.
License: GNU Lesser General Public License v2.1
Hi,
I'n a HTTP-dummy, so please forgive me if this question is too silly.
in a sketch using ESPEssentials I try to call a function via a HTTP request. I stored an index.htm file with a button which returns a request to the server: href="/adjust_fine_forward"
In the setup-section of the sketch I initalized this request with these lines:
ESPEssentials::WebServer.on("/adjust_fine_forward", HTTP_GET, & {
fine_forward();
Serial.println("'adjust_fine_forward' found");
});
"fine_forward" is the function I call.
The problem: When I click the button, the function is called repetitively about every second until the connection is interrupted or I stop loading the Web-Page within the browser.
So I assume that there is annother line needed in the initialization which stops loaden the Web-page.
Any help highle appreciated,
Hans
How to configure custom parameters in wifi manager?
I tried this:
`#include <ESPEssentials.h>
char mqtt_address[40];
char mqtt_username[40];
char mqtt_password[40];
void setup()
{
Serial.begin(115200);
ESPEssentials::init("Growatt-Wifi");
WiFiManagerParameter custom_mqtt_address("mqtt_address", "MQTT server address", mqtt_address, 40);
WiFiManagerParameter custom_mqtt_username("mqtt_username", "MQTT username", mqtt_username, 40);
WiFiManagerParameter custom_mqtt_password("mqtt_password", "MQTT password", mqtt_password, 40);
ESPEssentials::Wifi.addParameter(&custom_mqtt_address);
ESPEssentials::Wifi.addParameter(&custom_mqtt_username);
ESPEssentials::Wifi.addParameter(&custom_mqtt_password);
ESPEssentials::WebServer.on("/reset_wifi", HTTP_GET, & {
ESPEssentials::WebServer.send(200, "text/plain", "Wifi settings reset.");
ESPEssentials::Wifi.resetSettings();
});
}
void loop()
{
ESPEssentials::handle();
}`
but when I reset wifi settings first of all no extra fields is shown and when I try to save the new wifi details I get
*wm:[ERROR] WiFiManagerParameter is out of scope
on serial output.
There seems to be a bug when compiling everything with Arduino IDE 1.8.19 "right out of the box" using an ESP32. I get the following error:
ResolveLibrary(LittleFS.h)o\Sketches\libraries\ESPEssentials\src\EEWebServer.cpp:21:23: fatal error: LittleFS.h: No such file or directory
To try and resolve I added the LittleFS_esp32 library by lorol version 1.06 but it throws even more errors (incompatability). Thus that library cannot be the correct one for the ESP32. I next tried to compiler with an ESP8266 chip and that worked ok as I can see the compiler picked up the all the correct libraries for the ESP8266 (including the LittleFS.h version created for the ESP8266).
I flashed your example-code into an ESP8266
The serial monitor shows
*wm:[1] AutoConnect *wm:[2] Connecting as wifi client... *wm:[2] setSTAConfig static ip not set, skipping *wm:[1] Connecting to SAVED AP: FRITZ!Box 7490 *wm:[1] connectTimeout not set, ESP waitForConnectResult... *wm:[2] Connection result: WL_CONNECTED *wm:[1] AutoConnect: SUCCESS *wm:[2] Connected in 946 ms *wm:[1] STA IP Address: 192.168.178.96 [OTA] OTA started [Storage] Couldn't find file at '/'. [Storage] Couldn't find file at '/favicon.ico'. [Storage] Couldn't find file at '/'. [Storage] Couldn't find file at '/'.
If I try to connect to the ESP8266 with the given IP all I get is a
Oops, file not found!
Well beeing so much "essential" that just connecting to WiFi works is a little too less
best regards Stefan
I can't seem to figure out how to get the local IP address of the ESP32 once it's connected to any WIFI. My plan is to show this IP address on a small display once it's connected so I don't need a PC to find the IP address from the serial monitor. Can you help me please?
The wifimanager part works just fine for me, it connects successfully to my network but after that I can't reach any of the routes. I tried every route with the specified http method. The device ip address is also correct and I can ping the ESP without any problems. Anyone has an idea what the problem might be?
First of all, thank you for this awesome library I love it.
Sadly, I have run into an issue using it on an esp8266 (esp01).
I tried the basic example with OTA Password and everything works great but when I go to HTTP:///update it never asks for a password it just lets me update without it.
Using ArduinoIDE 2.0.0-rc6 to push the OTA I get asked for the password.
From Experience, 99% of the Problems I have are just me being stupid but I really don't know what is going wrong here.
My Code:
#include <ESPEssentials.h>
void setup() {
ESPEssentials::init("myproject","mypw");
}
void loop() {
ESPEssentials::handle();
Serial.println("it works");
}
I have used espessentials for a timer for a non profit organization which worked perfect and saved me a lot of work. Now i want to make a webradio for a personal project. I upload the sample sketch of espessentials.ino to the Espressif wroom 32 board. I tried this with arduino ide as well as with vs code. Setting up the wifi works, but after that i get this error on the terminal
./components/esp_littlefs/src/littlefs/lfs.c:1229:error: Corrupted dir pair at {0x0, 0x1}
E (780) esp_littlefs: mount failed, (-84)
E (784) esp_littlefs: Failed to initialize LittleFS
[ 793][E][LittleFS.cpp:95] begin(): Mounting LittleFS failed! Error: -1
[Storage] Couldn't mount file system.
I have looked on the internet how to resolve this issue, but none of the answers online seem to apply to my situation.
I don't know where to put a request. But i was wondering if it's possible to add authentication not only to the upload function, but also to the edit function, and reset and reboot function. So that when the iot is accessed by someone via the internet, that they can't get to anything they shouldn't have access to.
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.