/async-esp-fs-webserver

ESP32/ESP8266 WebServer, WiFi manager and ACE web editor Arduino library. Based on ESPAsyncWebServer visual timeslots scheduler

Primary LanguageC++Apache License 2.0Apache-2.0


added a directory docs for flash esp32 from browser webpage

It looks like you're interested in a serverless home automation system using ESP8266 or ESP32 devices. Each device operates its own web server and communicates over the network using mDNS (Multicast DNS), making it possible to interact with them without needing a centralized home automation system like Home Assistant.

Here's a simplified overview of how you can set up such a system:

Step 1: Flashing Your ESP8266/ESP32

  1. Prepare Your Environment: Ensure you have a Chromium-based browser (Google Chrome, Edge, Opera) ready, and all serial connections to the ESP device are closed.

  2. Flash the Firmware: Visit the provided GitHub repository and follow the instructions to flash your ESP8266/ESP32 with the async-esp-fs-webserver firmware. This step involves using the browser to flash the device directly.

Step 2: Setting Up the Web Server

After flashing, each device runs an ESPAsyncWebServer and includes a filesystem browser and an Ace Editor interface. This setup allows you to easily modify, upload, or delete files on the ESP's web server.

  1. Access Point (AP) Mode: Initially, your ESP device will create its own Wi-Fi Access Point (e.g., "ESP32_AP1234"). Connect your PC or smartphone to this AP.
  2. Configuration: Navigate to http://8.8.8.8/setup on your browser while connected to the ESP's Wi-Fi network to configure the ESP to connect to your home Wi-Fi router.
  3. File Management and Editing: Use http://8.8.8.8/edit to access the built-in Ace Editor, allowing you to edit or upload files directly to the ESP.

Step 3: Using mDNS for Easy Access

Once configured to connect to your home network, the ESP device will be accessible via an mDNS address (e.g., http://garage.local). This simplifies accessing the device without needing to remember its IP address.

Troubleshooting

  • Wi-Fi Connection Issues: If you encounter issues connecting the ESP to your Wi-Fi network, a reboot of the ESP device might be necessary.
  • Accessing the Device: If mDNS does not resolve, you may need to use the ESP's IP address directly. This can typically be found on your router's device list.

Additional Notes

  • Browser-Based Serial Monitor: The project provides a Chromium browser-based serial monitor (WebSerialMonitor) for debugging and monitoring output from the ESP devices.
  • In-Browser Flashing: The system supports flashing ESP devices directly from the browser, simplifying the initial setup process.

This setup offers a flexible and user-friendly approach to DIY home automation, allowing for direct web-based interaction with each device and the ability to easily customize the web server's files and functionality.


Flash 4mb ESP8266 or ESP32 from InBrowser



fork from

https://github.com/cotestatnt/async-esp-fs-webserver/


If you like this work, please consider sponsoring this project!

async-esp-fs-webserver

ESP32/ESP8266 WebServer, WiFi manager and ACE web editor Arduino library. Based on ESPAsyncWebServer from @me-no-dev

This is the equivalent to esp-fs-webserver Arduino library, but working with the very good ESPAsyncWebServer library instead default webserver library. From some tests I have done, I have been able to observe that a webserver created with this library is much faster and more responsive, which is why I decided to develop this variant of the library.

Note: Starting from version 2.0.0 ESP32 core for Arduino introduced the LittlsFS library like ESP8266. The examples in this library is written to work with this for both platform by default. Change according to your needs if you prefer other filesystems.

WiFi, OTA firmware update and Options manager

Thanks to the built-in page /setup (about 6.9Kb of program space) it is possible to scan and set the WiFi credentials and other freely configurable parameters.

With /setup webpage it is also possible to perform remote firmware update (OTA-update).

image

This web page can be injected also with custom HTML and Javascript code in order to create very smart and powerful web application.

In the image below, for example, the HTML and Javascript code to provision the devices in the well-known ThingsBoard IoT platform has been added at runtime starting from the Arduino sketch (check example customHTML.ino).

image

ACE web file editor/browser

Thanks to the built-in /edit page, it is possible to upload, delete and edit the HTML/CSS/JavaScript source files directly from browser and immediately display the changes introduced at runtime without having to recompile the device firmware. The page can be enabled at runtime using the method enableFsCodeEditor() and it occupies about 6.7Kb of program space.

image