Commit Graph
1396 Commits
Author SHA1 Message Date
alex da99137023 Clean stale portal-save wording in comments.
Update remaining references to the removed wifisave flow so the source comments match the SPA/API portal architecture.
2026-04-27 23:36:16 +10:00
alex 86d9004c9b Portal SPA: single shell, JSON /api surface, remove legacy portal routes
Replace multi-page portal with hash-routed SPA, DFTE shell placeholders, and
data-first JSON APIs. Remove legacy routes, root-template override path, and
HTML-derived info pipeline. Add bootstrap feature flags, in-DOM toast/dialog UX,
OTA via POST /u, and tests for shell, bootstrap, API JSON, and captive host rule.
Rewrite README as fork disclaimer and modernization overview.
2026-04-22 12:09:08 +10:00
alex 350f19cd93 Remove GitHub Actions compile workflow (CI used local DFTE symlink). 2026-04-20 23:34:22 +10:00
alex 5776341b86 Remove temporary tools/ directory (migrate_debug_wm helper). 2026-04-20 23:31:57 +10:00
alex ac42d9a342 WiFiManager: structured logging, SPA portal, DFTE bridge.
Replace DEBUG_WM with WiFiManagerLogLevel/log(), optional WiFiManagerLogSink,
and WM_NO_LOG stripping. Add JSON API handlers and shell templates (RootShell,
PortalAppJS). Bridge DFTE logging with owner-scoped teardown; add migrate_debug_wm
helper; document and set WM_LOG_LEVEL in platformio.
2026-04-20 23:28:57 +10:00
alex a7d1755bcf DFTE docs, single root library.json, optional DFTE logging bridge
- Document fork/DFTE in README; WiFiManager template setup API forwards to server
- Remove nested lib/WiFiManager/library.json; rely on root library.json only
- Delete legacy extras/ tooling; point HTML help link at this fork
- Add WiFiManagerDfteLogger and WM_DFTE_LOGGING integration in WiFiManagerServer
- Pin ESP8266 Arduino core (postmortem jump fix) in platformio.ini for tests
2026-04-19 21:16:02 +10:00
alex 55f1fd7ce6 Add root library manifest for git consumers.
Point local test builds at the local DFTE checkout while keeping the published WiFiManager metadata usable from the repository root.
2026-04-18 01:23:24 +10:00
alex 9401c20df6 WiFiManager: fragment templates, handler refactor, and tests.
Split reusable HTML into Fragments, Message, and Param headers; route
more pages through DFTE streaming. Update handlers, WiFi polling JS,
and configuration/scanning tests; add template rendering coverage.
2026-04-18 00:23:57 +10:00
alex 69aea5ce35 WiFiManager: stream info and wifi pages through DFTE.
Harden the root placeholder path, add direct render-isolation coverage, move simple status pages and /info onto request-scoped streamed templates, and switch /wifi to a streamed shell while keeping scan/form sections string-built for now.
2026-04-17 06:41:44 +10:00
alex 9f111ab8bd WiFiManager: stabilize root rendering and reduce page reallocations.
Keep root template state request-scoped so dynamic placeholders stay consistent during chunked renders, add reserve() coverage for non-streamed pages, and add compile/test coverage for the new root render lifecycle.
2026-04-16 20:54:03 +10:00
alex bb1008435f Update library.json and platformio.ini 2025-11-30 00:55:31 +10:00
alex d8046146b5 WiFiManager: add template customization hooks (callback, granular default registrations, rebuild); switch to RootSelector for overridable WM_ROOT_TEMPLATE; minor menu logic fixes 2025-11-16 23:05:12 +10:00
alex 3054123b7f WiFiManager: add DFTE root template and chunked rendering for handleRoot; introduce shared placeholder registry via server singleton; add getMenuOut(String*) overload and menu logic for params/close 2025-11-16 22:21:47 +10:00
alex 3b488423a8 WiFiManager: remove legacy web customization API; simplify handlers to static templates; drop custom menu; keep title and parameter customization; update tests; remove renderer abstraction; build/test clean 2025-11-16 18:09:59 +10:00
alex aa4705e1e3 deps: align with platformio.ini; add ESP32Async/ESPAsyncWebServer@3.8.1 and DFTE 2025-11-16 17:21:17 +10:00
alex ac38bc20f5 chore: tidy comments, remove dead code, add actionable TODOs, improve API docs 2025-11-16 17:05:15 +10:00
alex 10c068178e Remove multi-language support and reorganize constants
- Delete language files (wm_strings_*/wm_consts_*) and wm_consts_en.h
- Move constants to appropriate headers (routes/menu tokens to Server, CSS/forms/headers to Handlers)
- Extract utility functions to WiFiManagerUtils.h/cpp
- Create template files (HTML.h, CSS.h, JS.h) for web interface
- Update version to 2.0.18
- Remove unused HTTP_HEAD_CL constant
2025-11-16 00:07:10 +10:00
alex 1b2cc44bc3 Update author attribution in headers and documentation 2025-11-15 22:24:54 +10:00
alex 9cd5f62f9b Refactor WiFiManager: extract server and handlers into separate modules
- Move server lifecycle management to WiFiManagerServer
- Move HTTP handlers and rendering to WiFiManagerHandlers
- Move DEBUG_WM template definitions to WiFiManagerDebug
- Implement lazy initialization of server manager to save memory
- Add proper cleanup in destructor and on multiple createServer calls
- Update tests to use getServer() and getDNSServer() accessors
2025-11-15 22:22:36 +10:00
alex 1788aa3c4a Refactor WiFiManagerParameter 2025-11-14 16:18:44 +10:00
alex c4ab152566 Pin ESPAsyncWebServer version 2025-11-13 07:42:45 +10:00
alex e5174d1009 Merge branch 'device-framework' of github.com:alexhopeoconnor/WiFiManager into device-framework 2025-11-05 23:25:31 +10:00
alex f056893f87 Implement comprehensive test suite improvements
- Added 42 new tests covering critical functionality:
  * WiFi connection flow tests (6 tests)
  * Callback firing verification tests (4 tests)
  * DNS server lifecycle tests (3 tests)
  * Error condition tests (7 tests)
  * Parameter value management tests (5 tests)
  * WiFi scanning tests (4 tests)
  * State transition tests (4 tests)
  * Integration tests (5 tests)
  * Stress tests (5 tests)

- Fixed compilation errors by replacing protected connectWifi() calls with public autoConnect()
- Fixed config reset callback test to use resetSettings() instead of erase()
- Added delays around resetSettings() calls to prevent ESP8266 WiFi stack crashes
- Reduced stress test iterations to avoid excessive output
- Improved test stability with better state checking and error handling

Total test count: 86 tests (up from 44)
All tests passing successfully
2025-11-05 23:25:06 +10:00
alex f119b02815 Fix async WiFi scanning and captive portal redirects
- Fix captive portal redirect to preserve URL path and query params
- Fix password field rendering for WiFi networks (encryption detection)
- Add WiFiPollingJS template for AJAX polling (currently disabled due to size limit)
- Remove blocking WiFi scan operations
- Add debug output for response handling
2025-11-05 23:19:26 +10:00
alex f5db6b13d1 Merge branch 'device-framework' of github.com:alexhopeoconnor/WiFiManager into device-framework 2025-11-05 20:52:17 +10:00
alex b94f34f06a Remove blocking config portal mode and refactor API
- Remove setConfigPortalBlocking() API and _configPortalIsBlocking member variable
- Remove blocking while(1) loop from startConfigPortal()
- Change startConfigPortal() return type from boolean to void
- Change stopConfigPortal() return type from bool to void
- Make stopConfigPortal() immediately shutdown portal (call shutdownConfigPortal() directly)
- Remove unused portalAbortResult and portalTimeoutResult variables
- Update all comments to remove blocking mode references
- Simplify debug messages (remove 'non-blocking' references)
- Update tests to remove setConfigPortalBlocking() calls
- All 43 tests passing

The config portal is now always non-blocking, requiring users to call
process() periodically in their main loop. This aligns with the async
web server architecture and simplifies the API.
2025-11-05 20:49:22 +10:00
alex a0a7b7e263 Refactor WiFi scanning JavaScript to use raw string literal template
- Remove async parameter from WiFi_scanNetworks() method signatures
- Move JavaScript code to templates/WiFiPollingJS.h using R"rawliteral" format
- Fix JavaScript syntax errors by eliminating quote escaping issues
- Change scan status route from /wifi/scanstatus to /wifistatus to avoid route conflicts
- Cleaner code structure with JavaScript in separate template file
2025-11-05 20:47:10 +10:00
alex d533f4d754 Refactor WiFi scanning to be fully async for ESPAsyncWebServer
- Remove blocking WiFi scan operations from HTTP handlers
- Make WiFi_scanNetworks() always async, remove sync path
- Remove blocking wait loop that caused WDT resets
- Add scan status polling in process() function
- Make getScanItemOut() cache-only, never triggers scans
- Add /wifi/scanstatus JSON endpoint for AJAX polling
- Add client-side JavaScript for async network list updates
- Remove _asyncScan toggle, always use async scanning
- Add scan state management variables (_scanInProgress, _scanRequested)
2025-11-05 19:18:48 +10:00
alex d62f680132 Refactor to use ESPAsyncWebServer instead of ESP8266WebServer/WebServer
- Replace ESP8266WebServer/WebServer with ESPAsyncWebServer
- Update all route handlers to async pattern with AsyncWebServerRequest*
- Replace synchronous HTTPSend() with request->send()
- Add configurable delay constants (REBOOT_DELAY_MS, EXIT_DELAY_MS, ERASE_REBOOT_DELAY_MS)
- Implement scheduled reboot/abort flags instead of blocking delays
- Update WiFiManagerRequestArgs to use AsyncWebServerRequest
- Remove server->handleClient() and server->stop() calls (not needed for AsyncWebServer)
- Update parameter access to use request->getParam() instead of server->arg()
- Add ESPAsyncWebServer to platformio.ini dependencies
2025-11-04 22:51:22 +10:00
alex c2e1e7f95c Bump version to 2.0.18 2025-11-04 20:16:44 +10:00
alex 4b1226bd05 Add WiFiManagerRequestArgs class and update saveParamsCallback to pass request arguments
- Created WiFiManagerRequestArgs nested class to encapsulate HTTP request arguments
- Updated setSaveParamsCallback to accept WiFiManagerRequestArgs by value
- Updated handleWifiSave() and handleParamSave() to build RequestArgs early
- Updated doParamSave() to accept and use RequestArgs for custom HTML params
- Updated test callbacks to match new signature
- All tests passing (43/43)
2025-11-04 20:06:24 +10:00
alex 64c987a560 Remove examples directory and update tests for ESP32 compatibility
- Remove examples directory (not maintained)
- Remove ArduinoJson dependency from platformio.ini (only needed for examples)
- Update platformio.ini comments for test configuration
- Fix test_reset_settings to handle ESP32 NVS behavior differences
2025-11-02 14:17:07 +10:00
alex ca373b2b8e Consolidate and optimize test suite (80 -> 43 tests) 2025-11-02 13:44:49 +10:00
alex afb5bb61b8 Add comprehensive test suite for WiFiManager (80 tests) 2025-11-02 13:25:58 +10:00
alex b2a17d81bf Restructure project for PlatformIO best practices and add test framework
- Move library code from src/ to lib/WiFiManager/src/
- Move headers from include/ to lib/WiFiManager/include/
- Move library.json to lib/WiFiManager/
- Update platformio.ini with Unity test framework configuration
- Add test structure following PlatformIO unit testing best practices
- Remove empty src/ directory (not needed for library-only projects)
2025-11-02 12:50:57 +10:00
alex e6a0813666 Tidy up fork: remove .github, update LICENSE and README 2025-11-02 12:02:32 +10:00
alex 2b40362ff7 Refactor to proper PlatformIO library structure
- Move source files to src/ and headers to include/ directories
- Remove Arduino IDE specific files (.travis.yml, keywords.txt, library.properties, CMakeLists.txt, travis/)
- Update library.json with export section pointing to include/
- Add platformio.ini for development and testing
- Update .gitignore with PlatformIO-specific entries
- Update LICENSE with fork attribution
- Update README.md with PlatformIO-focused installation instructions

Verified working with:
- ESP8266 examples (Basic, Advanced)
- ESP32 examples (Basic)

All builds successful ✅
2025-11-02 01:05:34 +10:00
Rob Aleck 32655b7226 Update WiFiManager.cpp (#1812) 2025-03-28 19:32:57 -05:00
Pascal Brunot b67b7828b9 Fix compilation warning (#1740)
Compiler warning : format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'uint32_t'
he compiler warning arises because the format specifier %lu expects a long unsigned int, but the variable free is of type uint32_t (which is typically unsigned int). The ESP32, part of the Espressif32 family, typically defines uint32_t as unsigned int, so using the %u format specifier is appropriate.
2025-02-04 20:11:10 -06:00
Dave MadisonandAndreas Breitschopp 8e4c612fa3 Add user custom header/footer functions (#1769)
* Added setCustomTopBodyElement allowing to define custom HTML to be added at the top of the "<body>" tag.

* Change custom top body element to 'header'

This will make more sense once a footer is added. No functional changes.

* Make custom header concat conditional

Matching the _bodyClass comparison above

* Create getHTTPEnd function

* Add custom body footer functionality

* Fix <small> close tag on update page

* Add missing HTTP ends to exit and close

* Remove 'immediately' from header/footer desc

It's not immediate, the 'wrap' div is added before/after.

---------

Co-authored-by: Andreas Breitschopp <a-breitschopp@ab-tools.com>
2024-12-12 16:40:11 -06:00
Shawn A 7e2fa84daf Update cpp_lint.yml
remove line length
2024-12-12 16:39:33 -06:00
Jos Zuijderwijk 0fad7f50d1 Replace deprecated type (#1748) 2024-12-10 21:06:50 -06:00
Jack 47342ed6f7 Force remove DNS input from Captive portal issue #1733 (#1745) 2024-12-10 21:02:41 -06:00
Dave Madison 9333ec68ed Add CSS body classes for each page (#1767)
* Add body classes argument

Note that the additional function argument for getHTTPHead() includes a default argument for backwards compatibility with the API.

* Add page-specific classes

Allows easy styling of each page

* Change root CSS class to 'home'

Trying to avoid confusion between the class for the root level and the CSS ":root" pseudo-class

* Use conditional body class spacing

Avoids an extra space if a body class is set, but an empty string is passed to the function
2024-12-10 20:56:58 -06:00
Anil Raj Rimal 922059b472 fix(compile_example.yaml): Fix cache key inconsistency and correct typo in 'Compile examples' workflow (#1776) 2024-12-10 20:53:25 -06:00
Dave Madison b541d9cd9c Do not fill child backgrounds in dark mode (#1768)
Small change which allows users to style the body background with dark mode enabled, without having to style the child elements (a, h1) as well.
2024-12-10 20:26:18 -06:00
Anil Raj Rimal 7ebbcfe360 Enhance cache strategy with board-specific cache keys (#1777)
* fix(compile_example.yaml): Fix cache key inconsistency and correct typo in 'Compile examples' workflow

* feat(compile_library.yml): Use board-specific cache keys to avoid conflicts
2024-12-10 20:17:25 -06:00
David RAMBEAU a37f4fc41c FR Translation (#1755)
Proposal of French translation
2024-08-07 21:42:01 -05:00
Shawn A e978bc059c Update compile_examples.yaml 2024-03-29 20:40:20 -05:00
Shawn A 94020043a5 Update compile_examples.yaml 2024-03-29 20:39:46 -05:00