1
0
mirror of https://github.com/s00500/ESPUI.git synced 2025-07-04 06:10:18 +00:00

Add captive portal functionality, update examples and documentation.

This commit is contained in:
Nick Reynolds
2022-09-19 17:38:10 +01:00
parent 70acbc1d2f
commit e81cd1f7f5
7 changed files with 35 additions and 6 deletions

View File

@ -43,6 +43,7 @@ The Library runs on any kind of **ESP8266** and **ESP32** (NodeMCU, AI Thinker,
* [Grouped controls](#grouped-controls)
* [Wide controls](#wide-controls)
* [Graph (Experimental)](#graph--experimental-)
* [Captive Portal](#captive-portal)
- [Notes for Development](#notes-for-development)
- [Contribute](#contribute)
@ -643,6 +644,15 @@ Graph points are saved in the browser in **localstorage** to be persistant, clea
_There are many issues with the graph component currently and work is ongoing. Consider helping us out with development!_
### Captive Portal
You can set ESPUI to redirect all unknown URLs it is asked for to the 'root' the local HTTP server instead of responding with an HTTP code 404. This turns it into a simple 'captive portal'. Note you must also set up the ESP to be a DNS server that responds to all DNS requests with the IP address of the ESP for this to be effective and this is only useful when the ESP is acting as a WiFi hotspot in AP mode. All the example sketches will work as captive portals if not connected to a local WiFi network as a station.
```
ESPUI.captivePortal == true;
```
# Notes for Development
If you want to work on the HTML/CSS/JS files, do make changes in the _data_