mirror of
https://github.com/alexhopeoconnor/DFTE.git
synced 2026-10-03 22:21:59 +10:00
Chunk callbacks may see maxLen==0 or need another tick before progress; plain 0 ends the body and breaks browsers. Provide helpers that use RESPONSE_TRY_AGAIN, bounded template render retries, and disconnect cleanup. Update the README and async examples to use the shared wrapper.
Async Dashboard Demo
Full-featured DFTE demo that combines nested templates, iterators, and a captive portal served via ESPAsyncWebServer. The device exposes its own SoftAP so multiple users can connect and view the dashboard without additional infrastructure.
Highlights:
- SoftAP + DNS captive portal (
DFTE-Dashboard-8266orDFTE-Dashboard-ESP32, passworddfte-dashboard) - Aggregated metrics section populated from RAM getters (uptime, device count, client count)
- Iterator-driven device table with per-entry overrides
- Streaming HTTP responses to avoid buffering the entire page in RAM
Build
pio run -d examples/AsyncDashboardDemo -e dashboard_esp8266
pio run -d examples/AsyncDashboardDemo -e dashboard_esp32
Run
- Flash your target board (
pio run -d examples/AsyncDashboardDemo -e <env> -t upload --upload-port <port>). - Open the serial monitor at 115200 baud to confirm the SoftAP credentials.
- Connect to the advertised network and browse to
http://192.168.4.1/. The captive portal should automatically redirect; if not, navigate manually.