Giter Site home page Giter Site logo

srwi / espessentials Goto Github PK

View Code? Open in Web Editor NEW
25.0 25.0 5.0 57 KB

Essentials to get you started with your Arduino projects using the ESP8266 and ESP32.

License: GNU Lesser General Public License v2.1

C++ 94.91% C 5.09%
arduino esp32 esp32-arduino esp32-library esp8266 esp8266-arduino esp8266-library espressif wifimanager

espessentials's People

Contributors

srwi avatar stnkl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

espessentials's Issues

Need help calling a HTTP request

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

Unable to set custom wifi parameters

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.

Error finding LittleFS when compiling with ESP32

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).

Does not work for me

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

Get IP address

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?

Don't require reset after wifi configuration

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?

OTA not asking for password in browser

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");
}

Automatically format unformatted file systems

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.

password protection

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.