diff --git a/README.md b/README.md index ce2e580..7bbd4dd 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ First attempt at a library. Lots more changes and fixes to do. Contributions are - ~~add to Arduino Library Manager~~ - ~~add to PlatformIO~~ - add multiple sets of network credentials -- allow users to customize CSS +- ~~allow users to customize CSS~~ ## Quick Start @@ -179,7 +179,7 @@ void loop() { ``` See example for a more complex version. [OnDemandConfigPortal](https://github.com/tzapu/WiFiManager/tree/master/examples/OnDemandConfigPortal) -### Custom Parameters +#### Custom Parameters You can use WiFiManager to collect more parameters than just SSID and password. This could be helpful for configuring stuff like MQTT host and port, [blynk](http://www.blynk.cc) or [emoncms](http://emoncms.org) tokens, just to name a few. **You are responsible for saving and loading these custom values.** The library just collects and displays the data for you as a convenience. @@ -198,32 +198,63 @@ Usage scenario would be: ```cpp mqtt_server = custom_mqtt_server.getValue(); ``` -This feature is a lot more involved than all the others, so here are some examples to fully show how it is done +This feature is a lot more involved than all the others, so here are some examples to fully show how it is done. +You should also take a look at adding custom HTML to your form. + - Save and load custom parameters to file system in json form [AutoConnectWithFSParameters](https://github.com/tzapu/WiFiManager/tree/master/examples/AutoConnectWithFSParameters) - *Save and load custom parameters to EEPROM* (not done yet) +#### Custom IP Configuration +You can set a custom IP for both AP (access point, config mode) and STA (station mode, client mode, normal project state) -### Custom Access Point IP Configuration +##### Custom Access Point IP Configuration This will set your captive portal to a specific IP should you need/want such a feature. Add the following snippet before `autoConnect()` ```cpp //set custom ip for portal wifiManager.setAPStaticIPConfig(IPAddress(10,0,1,1), IPAddress(10,0,1,1), IPAddress(255,255,255,0)); ``` -### Custom Station (client) Static IP Configuration +##### Custom Station (client) Static IP Configuration This will make use the specified IP configuration instead of using DHCP in station mode. ```cpp wifiManager.setSTAStaticIPConfig(IPAddress(192,168,0,99), IPAddress(192,168,0,1), IPAddress(255,255,255,0)); ``` There are a couple of examples in the examples folder that show you how to set a static IP and even how to configure it through the web configuration portal. +#### Custom HTML, CSS, Javascript +There are various ways in which you can inject custom HTML, CSS or Javascript into the configuration portal. +The options are: +- inject custom head element +You can use this to any html bit to the head of the configuration portal. If you add a `"); +``` +- inject a custom bit of html in the configuration form +```cpp +WiFiManagerParameter custom_text("

This is just a text paragraph

"); +wifiManager.addParameter(&custom_text); +``` +- inject a custom bit of html in a configuration form element +Just add the bit you want added as the last parameter to the custom parameter constructor. +```cpp +WiFiManagerParameter custom_mqtt_server("server", "mqtt server", "iot.eclipse", 40, " readonly"); +``` + #### Filter Networks -If you would like to filter low signal quality networks you can tell WiFiManager to not show networks below an arbitrary quality %; +You can filter networks based on signal quality and show/hide duplicate networks. + +- If you would like to filter low signal quality networks you can tell WiFiManager to not show networks below an arbitrary quality %; ```cpp wifiManager.setMinimumSignalQuality(10); ``` will not show networks under 10% signal quality. If you omit the parameter it defaults to 8%; +- You can also remove or show duplicate networks (default is remove). +Use this function to show (or hide) all networks. +```cpp +wifiManager.setRemoveDuplicateAPs(false); +``` + #### Debug Debug is enabled by default on Serial. To disable add before autoConnect ```cpp @@ -242,7 +273,15 @@ If you connect to the created configuration Access Point but the configuration p If trying to connect ends up in an endless loop, try to add `setConnectTimeout(60)` before `autoConnect();`. The parameter is timeout to try connecting in seconds. ## Releases -#### 0.10 +#### 0.11 +- a lot more reliable reconnecting to networks +- custom html in custom parameters (for read only params) +- custom html in custom parameter form (like labels) +- custom head element (like custom css) +- sort networks based on signal quality +- remove duplicate networks + +##### 0.10 - some css changes - bug fixes and speed improvements - added an alternative to waitForConnectResult() for debugging diff --git a/library.json b/library.json index 5c36330..5a5955f 100644 --- a/library.json +++ b/library.json @@ -9,5 +9,5 @@ }, "frameworks": "arduino", "platforms": "espressif", - "version": "0.10" + "version": "0.11" } diff --git a/library.properties b/library.properties index d22ee1d..6184f85 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=WiFiManager -version=0.10 +version=0.11 author=tzapu maintainer=tzapu sentence=ESP8266 WiFi Connection manager with fallback web configuration portal