From 6231003ecb0b424711dce01ae567f2b4d5cf9783 Mon Sep 17 00:00:00 2001
From: Hieromon Ikasamo AutoConnectElements (i.e. they are the elements displayed on the custom Web page) must be contained in AutoConnectAux object. AutoConnectElements declared in sketch must be programmed to add to AutoConnectAux one after another. Elements are automatically included in AutoConnectAux by AutoConnect if you load it from the JSON description. In either method, it is common to use the function of AutoConnectAux to access an element with a sketch. AutoConnectAux is the container for a custom Web page, AutoConnectElement is the component of a page. AutoConnectElements must be contained in AutoConnectAux object. (ie. they are the elements displayed on the custom Web page.) Then AutoConnect makes an AutoConnectAux to a page. AutoConnectElements declared in sketch must be programmed to add to AutoConnectAux one after another. Elements are automatically included in AutoConnectAux by AutoConnect if you load it from the JSON document. In either method, it is common to use the function of AutoConnectAux to access an element with a sketch. The AutoConnectAux class has several functions to manipulate AutoConnectElements. The functions can add, delete, retrieve elements, and get and set values. To add AutoConnectElment(s) to an AutoConnectAux object, use the add function.
+
+
Handling the custom Web pages
- Handing AutoConnectElements with the sketches¶
-Page, Container, Component¶
+Handing AutoConnectElements with the sketches¶
Add AutoConnectElements to the AutoConnectAux object¶
void AutoConnectAux::add(AutoConenctElementVT addons)
The add function adds specified AutoConnectElement to the AutoConnectAux. If specified the collection of AutoConnectElements as a std::vector
of the references to each element, these elements added in bulk.
The AutoConnectElements contained in the AutoConnectAux object are uniquely identified by the name. When adding an AutoConnectElement, if an element with the same name already exists in the AutoConnectAux, checking the type, and if it is the same, the value will be replaced. If another type of AutoConnectElement exists with the same name, that add operation will be invalid.1 In the following example, an AutoConnectButton as button
addition is invalid.
The add function adds the specified AutoConnectElement to AutoConnectAux. The AutoConnectElementVT type is the std::vector of the reference wrapper to AutoConnectElements, and you can add these elements in bulk by using the list initialization with the sketch.
+typedef std::vector<std::reference_wrapper<AutoConnectElement>> AutoConnectElementVT; +
button
addition will invalid because hello
with the same name already exists as AutoConnectText.
AutoConnectAux aux; AutoConnectText text("hello", "hello, world"); AutoConnectButton button("hello", "hello, world", "alert('Hello world!')"); // This is invalid. @@ -1049,13 +1067,13 @@
To retrieve an element from AutoConnectAux, use the getElement or getElements function. Normally, the getElement is needed when accessing the value of AutoConnectElement in the sketch.
-AutoConnectElement* AutoConnectAux::getElement(const String& name); +-AutoConnectElement* AutoConnectAux::getElement(const String& name)template<typename T> T& AutoConnectAux::getElement(const String& name); +-T& AutoConenctAux::getElement<T>(const String& name)-AutoConnectElementVT* AutoConnectAux::getElements(void); +AutoConnectElementVT* AutoConnectAux::getElements(void)The getElement function returns an AutoConnectElement with the specified name as a key. When you use this function, you need to know the type of AutoConnectElement in advance. To retrieve an AutoConnectElement by specifying its type, use the following method.
@@ -1078,11 +1096,10 @@ Serial.println(text.value);To get all the AutoConnectElements of an AutoConnectAux object use the getElements function. This function returns the vector of the reference wrapper as AutoConnectElementVT to all AutoConnectElements registered in the AutoConnectAux.
-AutoConnectElementVT& getElements(void) +To get all the AutoConnectElements in an AutoConnectAux object use the getElements function. This function returns the vector of the reference wrapper as AutoConnectElementVT to all AutoConnectElements registered in the AutoConnectAux.
+-AutoConnectElementVT& AutoConnectAux::getElements(void)AutoConnectElementVT is a predefined type for it and can use methods of std::vector<std::reference_wrapper>.
Loading & saving AutoConnectElements with JSON¶
AutoConnect supports reading the custom Web page definitions written in JSON and also supports loading and saving of AutoConnectElements. In both cases, the target object is a JSON document for AutoConnect. However, it can not save all AutoConnectElements contained in the page as a custom Web page. (ie. AutoConnectAux)
@@ -1450,11 +1467,11 @@ ESP8266WebServer class will parse the query string and rebuilds its arguments wh{ "name" : "Caption", "type" : "ACText", - "style": "text-align:center;font-family:'Avenir','Helvetica Neue','Helvetica';font-size:24px;color:tomato;" + "style": "text-align:center;font-size:24px;font-family:'Impact','Futura',sans-serif;color:tomato;" }
- The sketch (part of code), load above JSON. + The sketch (a part of code), load above JSON.ACText(Caption, "Hello, world"); AutoConnectAux helloPage("/hello", "Hello", true, { Caption }); AutoConnect portal; @@ -1475,7 +1492,7 @@ ESP8266WebServer class will parse the query string and rebuilds its arguments wh }
- It's shown as like: + It's shown as like:Check data against on submission¶
By giving a pattern to AutoConnectInput, you can find errors in data styles while typing in custom Web pages. The pattern is specified by regular expression.2 If the value during input of AutoConnectInput does not match the regular expression specified in the pattern, its background color changes to pink. The following example shows the behavior when checking the IP address in the AutoConnectInput field.
{ diff --git a/docs/acintro.html b/docs/acintro.html index 8af1d65..53fe7be 100644 --- a/docs/acintro.html +++ b/docs/acintro.html @@ -672,8 +672,8 @@
- - Constucting the menu + + Attach the menu diff --git a/docs/acjson.html b/docs/acjson.html index 7318bc6..2597085 100644 --- a/docs/acjson.html +++ b/docs/acjson.html @@ -788,8 +788,8 @@- - Constucting the menu + + Attach the menu diff --git a/docs/advancedusage.html b/docs/advancedusage.html index f43fa4c..f38bd5f 100644 --- a/docs/advancedusage.html +++ b/docs/advancedusage.html @@ -792,8 +792,8 @@- - Constucting the menu + + Attach the menu diff --git a/docs/api.html b/docs/api.html index b075585..bc91185 100644 --- a/docs/api.html +++ b/docs/api.html @@ -781,8 +781,8 @@- - Constucting the menu + + Attach the menu diff --git a/docs/apiaux.html b/docs/apiaux.html index aacd7d8..9b1e7ff 100644 --- a/docs/apiaux.html +++ b/docs/apiaux.html @@ -733,8 +733,8 @@- - Constucting the menu + + Attach the menu diff --git a/docs/apiconfig.html b/docs/apiconfig.html index 3d50645..dc0519d 100644 --- a/docs/apiconfig.html +++ b/docs/apiconfig.html @@ -831,8 +831,8 @@- - Constucting the menu + + Attach the menu diff --git a/docs/apielements.html b/docs/apielements.html index 5271e83..6e36c3b 100644 --- a/docs/apielements.html +++ b/docs/apielements.html @@ -1320,8 +1320,8 @@- - Constucting the menu + + Attach the menu diff --git a/docs/apiextra.html b/docs/apiextra.html index aa9d276..9cf0292 100644 --- a/docs/apiextra.html +++ b/docs/apiextra.html @@ -630,8 +630,8 @@- - Constucting the menu + + Attach the menu diff --git a/docs/basicusage.html b/docs/basicusage.html index d43baee..e699431 100644 --- a/docs/basicusage.html +++ b/docs/basicusage.html @@ -721,8 +721,8 @@- - Constucting the menu + + Attach the menu diff --git a/docs/changelog.html b/docs/changelog.html index 2b730c0..2efc4d9 100644 --- a/docs/changelog.html +++ b/docs/changelog.html @@ -592,8 +592,8 @@- - Constucting the menu + + Attach the menu diff --git a/docs/datatips.html b/docs/datatips.html index bf2d1b4..da0c7e0 100644 --- a/docs/datatips.html +++ b/docs/datatips.html @@ -712,8 +712,8 @@- - Constucting the menu + + Attach the menu @@ -940,7 +940,7 @@Validation for the value¶
To convert input data correctly from the string, it must match its format. The validation implementation with sketches depends on various perspectives. Usually, the tiny devices have no enough power for the lexical analysis completely. But you can reduce the burden for data verification using the pattern of AutoConnectInput.
-By giving a pattern to AutoConnectInput, you can find errors in data format while typing in custom Web pages. Specifying the input data rule as a regular expression will validate the type match during input. If there is an error in the format during input, the background color of the field will change to pink. Refer to section Handling the custom Web pages.
+By giving a pattern to AutoConnectInput, you can find errors in data format while typing in custom Web pages. Specifying the input data rule as a regular expression will validate the type match during input. If there is an error in the format during input, the background color of the field will change to pink. Refer to section Handling the custom Web pages.
However, input data will be transmitted even if the value does not match the pattern. Sketches require the validation of the received data. You can use the AutoConnectInput::isValid function to validate it. The isValid function validates whether the value member variable matches a pattern and returns true or false.
#include <ESP8266WiFi.h> #include <ESP8266WebServer.h> @@ -1046,7 +1046,7 @@The ssanf library function cannot be used with the old Arduino core. ↩
- This regular expression does not fully support the format of the e-mail address requested in RFC5322. ↩
+This regular expressiondoes not fully support the format of the e-mail address requested in RFC5322. ↩
This regular expression does not consider semantic constraints. It is not possible to detect errors that do not exist as actual dates. ↩
@@ -1088,13 +1088,13 @@ - +diff --git a/docs/faq.html b/docs/faq.html index 0912750..9e0c2b0 100644 --- a/docs/faq.html +++ b/docs/faq.html @@ -592,8 +592,8 @@- - Constucting the menu + + Attach the menu @@ -655,6 +655,13 @@ An esp8266ap as SoftAP was connected but Captive portal does not start. + + ++ + Connection refused with the captive portal after established. + + @@ -907,6 +914,13 @@ An esp8266ap as SoftAP was connected but Captive portal does not start. + + ++ + Connection refused with the captive portal after established. + + @@ -1119,6 +1133,15 @@ For AutoConnect menus to work properly, call @@ -940,7 +940,7 @@ Easy implementing the Web interface constituting the WLAN for ESP8266/ESP32 WiFiSee also the explanation here. An esp8266ap as SoftAP was connected but Captive portal does not start.¶
Captive portal detection could not be trapped. It is necessary to disconnect and reset ESP8266 to clear memorized connection data in ESP8266. Also, It may be displayed on the smartphone if the connection information of esp8266ap is wrong. In that case, delete the connection information of esp8266ap memorized by the smartphone once.
+Connection refused with the captive portal after established.¶
+This is a known issue with ESP32 and may occur when the following conditions are satisfied at the same time:
++
+- SoftAP channel on ESP32 and the connecting AP channel you specified are different.
+- Never connected to the AP in the past, or NVS had erased by erase_flash causes the connection data lost.
+- There are receivable multiple WiFi signals which are the same SSID with different channels using the WiFi repeater etc. (This condition is loose, it may occur even if there is no WiFi repeater.)
+To avoid this problem, try changing the channel.
+ESP32 hardware equips only one channel for WiFi signal to carry. At the AP_STA mode, if ESP32 as an AP will connect to another AP on another channel while maintaining the connection with the station, the channel switching will occur and the station may be disconnected. But it may not be just a matter of channel switching causes ESP8266 has the same constraints too. It may be a problem with AutoConnect or the arduino core or SDK issue. Unfortunately, I have not found a solution yet. However, I am continuing trial and error to solve this problem and will resolve in due course.
Does not appear esp8266ap in smartphone.¶
Maybe it is successfully connected at the first WiFi.begin. ESP8266 remembers the last SSID successfully connected and will use at the next. It means SoftAP will only start up when the first WiFi.begin() fails.
The saved SSID would be cleared by WiFi.disconnect() with WIFI_STA mode. If you do not want automatic reconnection, you can erase the memorized SSID with the following simple sketch.
diff --git a/docs/gettingstarted.html b/docs/gettingstarted.html index 06d9059..5022c9e 100644 --- a/docs/gettingstarted.html +++ b/docs/gettingstarted.html @@ -660,8 +660,8 @@- - Constucting the menu + + Attach the menu diff --git a/docs/howtoembed.html b/docs/howtoembed.html index e7d7945..e0dd732 100644 --- a/docs/howtoembed.html +++ b/docs/howtoembed.html @@ -725,8 +725,8 @@- - Constucting the menu + + Attach the menu @@ -924,10 +924,10 @@How to embed
Embed the AutoConnect to the sketch¶
-Here holds two case examples. Both examples perform the same function. Only how to incorporate the AutoConnect into the sketch differs. Also included in the sample folder, HandlePortal.ino also shows how to use the PageBuilder library for HTML assemblies.
+Here hold two case examples. Both examples perform the same function. Only how to incorporate the AutoConnect into the sketch differs. Also included in the sample folder, HandlePortal.ino also shows how to use the PageBuilder library for HTML assemblies.
What does this example do?¶
-Uses the web interface to light the LED connected to the NodeMCU module D0 port (which could be referred to as BUILTIN_LED), the following animation is it.
-Access to the ESP8266 module connected WiFi from the browser then the page contains the current value of the D0 port would be displayed. The page has the buttons to switch the port value. The LED blinks according to the value of the button that was clicked. This example is a typical sketch of manipulating ESP8266's GPIO via WLAN.
+Uses the web interface to light the LED connected to the D0 (sometimes called BUILTIN_LED) port of the NodeMCU module like the following animation.
+Access to the ESP8266 module connected WiFi from the browser then the page contains the current value of the D0 port would be displayed. The page has the buttons to switch the port value. The LED will blink according to the value with clicked by the button. This example is a typical sketch of manipulating ESP8266's GPIO via WLAN.
Embed AutoConnect library into this sketch. There are few places to be changed. And you can use AutoConnect's captive portal function to establish a connection freely to other WiFi spots.
Embed AutoConnect¶
@@ -942,7 +942,7 @@Declare only AutoConnect, performs handleClient.
Used with MQTT as a client application¶
-The effect of AutoConnect is not only for ESP8266/ESP32 as the web server. It has advantages for something WiFi client as well. For example, AutoConnect is also effective for publishing MQTT messages from various measurement points. Even if the SSID is different for each measurement point, it is not necessary to modify the sketch.
+The effect of AutoConnect is not only for ESP8266/ESP32 as the web server. It has advantages for something WiFi client as well. For example, AutoConnect is also convenient for publishing MQTT messages from various measurement points. Even if the SSID is different for each measurement point, it is not necessary to modify the sketch.
This example tries to publish the WiFi signal strength of ESP8266 with MQTT. It uses the ThingSpeak for MQTT broker. ESP8266 publishes the RSSI value to the channel created on ThingSpeak as MQTT client. This example is well suited to demonstrate the usefulness of AutoConnect, as RSSI values are measured at each access point usually. Just adding a few lines of code makes it unnecessary to upload sketches with the different SSIDs rewrite for each access point.
Advance procedures¶
diff --git a/docs/images/acow.png b/docs/images/acow.png index 12d53aee70751c9a13746d73a8da1f91409207e4..7a239d9fdba380eaff19b6ff8e9f5f1b15b1f383 100644 GIT binary patch delta 2770 zcmV;@3N7`68HpH>7YeKh1^@s6o`>8Oks&F63#my&K~#9!?c9BARpkN4@o%Mt8bu?7fU{%6mql=qn&{ZH;ux|JsVJMG z5fo)Ib&+CL9R(@UN@xKs9l87C-ooweZ7F>Ldij15)7$6Vd!BP1AAaZQbDn!rYHDhK z!aw}bKsX#GUN{^kB_$={Hc8U))s)XEDJcoJoqB2-sXzSCz*RSmwY4NE$-KRCIj1;E zm!#wr4u?6#W{{-hWynjCAumZX *tfRg#iZI2`7bMC&UhNj+amN{S cz*FVIotDoY|yiQg# z{6SWf&12G4g)spSkVfW!OS!A$70TxfvlmG+ g J>3`I Za4uB8DWcs7^a*j=?OWqVEJRpvRDGNzSx^}p$C@&Tx2+d4awBtyRQ7QV|D4FK5; zo7mbq_+dP`GWz)7m2 k}J=Nysr6@Ro--!WXN}gKk>wy zU(*1j4H(6um8FzS9L6Aj0M6sGn;&G!%K3~s3!t74Uw*dL)iG_^Ub2*TYoO^1Pvwu_ z!DWR2xm+?~F6Cv@4y~i#v~s>{ @)XPwX3sZTR@YW%wz zs9ZUVJIgxyY?)OQ&pDqJC1V&I3{r6YWS+l%a?3haKgNuOKEFm_N+v!}{ (;99)jz+*mXM?*^Y_0k^Lg@;l*|lylduacld206e|43Vty` qt@$*Q-}A($dm6aG)^~@_qXB z;o!l8gu`K5N0NHDl#~>D_3Fj0T{V%A4+H`P0s%u_l9D9ko214T#BPuz^?a#@yCfwq zmrzQQAumZX rC(h0)p8g-Gq@cygt#u}*J9qnCx zA#?@Yd^-%x=$dLie;t;;3RT}m3(_Gp6mGZ&F6r04eY|iBtlJm;e`OHNeG2k`&!2(c zuR6Tn2bRG=pyD}Lu;TFNuU-t}Lq~t!EvBgk!Q5H!#&2Ll2xb?wecW5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Hq{(}buR^>vwAQr9@nu7zIXwgYKE@EVBW$=`%OUwTeJpF#nL{&aLDZmrCXt5 z7L2@TbLr0DwQ@g9>wnP!V0Z93^8PrCw+w$OZ-p7_;BRk(ufBj#3h f1jQIfXLh2T_3;C1Wy-2z9*u=wR$0_4`~ 3pQ(B+0soWWyDtTmF{Knh2_mvH|zU5#uxb1@pK=xoLEq8re$xDARXm0M@ z?ME9u3A#7K?#R)qd4Eu;j~pI^>5ved+7tQ4?-#JU{K5;a*K@pA(oNcJu1{IXD^8}Y zgNfH5R6?OEOtg5&f!s`Ze>XJeLg_YO6pV;e@%M}kPRCT9fF1{+7RbH-#*8;~B?kiU zu920zVwD{^hg|i^wQ0ZqotJ-Uzv=w8zHvCn @PNc5tdD_wMuCdX0iC;7BR#Ex+)B>vbP*4vc^7349LQ_qX2s z)qW`T7D^fNia8Yj9!B&8jzZzH!54;F&Q{ca0!7aTq1HVQ#`W%4`$Iy&VOahmRDBUu z5pRXU;^2>2b74?Cexb+(*wS}^@4%qwAWnhN!+<^T(M1 Xc_w(RTn@$i&(C|^ zeptR7{_66S=j0W$6nKATC9Ikcwbih;ppAX9q2QS-JCEE}`vogu`2sj~5LW%D^)Bg? zVBST6Tk%VHZ5xmWYv*2Fm!l`an|mOX-}*5IL&gCITVHUEb-W#skq@)0gWq%C64)2L zaWIT%g34-_sFl1FqaJs{(zjs751{X@Q6 z17yfclko)>17yfclko);F+*OGWXMaB40%bCAumZX Original FSbrowser.ino (part of code) + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.88055563px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332">Original FSbrowser.ino (a part of code) Modified FSbrowser.ino (part of code) + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.88055563px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332">Modified FSbrowser.ino (a part of code)"</head>" "<head>" "</head>" "<head>" - - Constucting the menu + + Attach the menu Lives with your sketches¶
The sketches which provide the web page using ESP8266WebServer there is, AutoConnect will not disturb it. AutoConnect can use an already instantiated ESP8266WebServer object, or itself can assign it. This effect also applies to ESP32. The corresponding class for ESP32 will be the WebServer.
Easy to add the custom Web pages ENHANCED w/v0.9.7¶
-You can easily add your owned web screens that can consist of representative HTML elements and invoke them from the menu. Further it possible importing the custom Web pages declarations described with JSON which stored in PROGMEM, SPIFFS, or SD.
+You can easily add your owned web pages that can consist of representative HTML elements and invoke them from the menu. Further it possible importing the custom Web pages declarations described with JSON which stored in PROGMEM, SPIFFS, or SD.
@@ -983,13 +983,13 @@ Install third-party platform using the Boards Manager of Arduino IDE. P Install third-party platform using the Boards Manager of Arduino IDE. You can add multiple URLs into Additional Board Manager URLs field, separating them with commas. Package URL is https://dl.espressif.com/dl/package_esp32_index.json for ESP32.Additional library (Required)
The PageBuilder library to build HTML for ESP8266WebServer is needed.
+To install the PageBuilder library into your Arduino IDE, you can use the Library Manager. Select the board of ESP8266 series in the Arduino IDE, open the library manager and search keyword 'PageBuilder' with the topic 'Communication', then you can see the PageBuilder. The latest version is required 1.3.2 later.1
-To install the PageBuilder library into your Arduino IDE, you can use the Library Manager. Select the board of ESP8266 series in the Arduino IDE, open the library manager and search keyword 'PageBuilder' with the topic 'Communication', then you can see the PageBuilder. The latest version is required 1.3.2 later.1Additional library (Optional)
-By adding the ArduinoJson library, AutoConnect will be able to handle the custom Web pages described with JSON. With AutoConnect v0.9.7 you can insert user-owned screens that can consist of representative HTML elements as styled TEXT, INPUT, BUTTON, CHECKBOX, SELECT, SUBMIT and invoke them from the AutoConnect menu. These HTML elements can be added by sketches using the AutoConnect API. Further it possible importing the custom Web pages declarations described with JSON which stored in PROGMEM, SPIFFS, or SD. ArduinoJson version 5 is required to use this feature.2
+By adding the ArduinoJson library, AutoConnect will be able to handle the custom Web pages described with JSON. With AutoConnect v0.9.7 you can insert user-owned web pages that can consist of representative HTML elements as styled TEXT, INPUT, BUTTON, CHECKBOX, SELECT, SUBMIT and invoke them from the AutoConnect menu. These HTML elements can be added by sketches using the AutoConnect API. Further it possible importing the custom Web pages declarations described with JSON which stored in PROGMEM, SPIFFS, or SD. ArduinoJson version 5 is required to use this feature.2
AutoConnect supports ArduinoJson version 5 only
-And ArduinoJson version 6 is still in beta. The Arduino Library Manager installs the ArduinoJson version 6 by default. Open the Arduino Library Manager and make sure that ArduinoJson version 5 is installed.
+ArduinoJson version 6 is still in beta, but Arduino Library Manager installs the ArduinoJson version 6 by default. Open the Arduino Library Manager and make sure that ArduinoJson version 5 is installed.
Install the AutoConnect¶
Clone or download from the AutoConnect GitHub repository.
diff --git a/docs/license.html b/docs/license.html index 9e8e8d8..096c88e 100644 --- a/docs/license.html +++ b/docs/license.html @@ -588,8 +588,8 @@- - Constucting the menu + + Attach the menu @@ -670,16 +670,17 @@License
MIT License
-Copyright © 2018 Hieromon Ikasamo
+Copyright © 2018-2019 Hieromon Ikasamo
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Acknowledgments
-The Luxbar is licensed under the MIT License.
-
-https://github.com/balzss/luxbarArduinoJson is licensed under the MIT License. -https://arduinojson.org/
+Each of the following libraries used by AutoConnect is under its license:
++
diff --git a/docs/menu.html b/docs/menu.html index 0109ca5..c85c92b 100644 --- a/docs/menu.html +++ b/docs/menu.html @@ -436,8 +436,8 @@- The Luxbar is licensed under the MIT License. https://github.com/balzss/luxbar
+- ArduinoJson is licensed under the MIT License. https://arduinojson.org/
+- - Extend AutoConnect menu with your sketches + + by attaching AutoConnect menu @@ -682,8 +682,8 @@- - Constucting the menu + + Attach the menu @@ -816,8 +816,8 @@- - Extend AutoConnect menu with your sketches + + by attaching AutoConnect menu @@ -887,12 +887,12 @@ Enter SSID and Passphrase and tap "apply" to starts WiFi connecYou can change the HOME path using the AutoConnect API. The AutoConnect::home function sets the URI as a link of the HOME item of the AutoConnect menu.
-Extend AutoConnect menu with your sketches¶
-The AutoConnect menu can contain HTML pages of your sketch as custom items. It works for HTML pages implemented by ESP8266WebServer::on handler or WebServer::on handler for ESP32. That is, you can make it as menu items to invoke the legacy web page. The below screenshot is the result of adding an example sketch for the ESP8266WebServer library known as FSBrowser to the AutoConnect menu item. It adds Edit and List items with little modification of the legacy sketch code.
+by attaching AutoConnect menu¶
+The AutoConnect menu can contain HTML pages of your owns sketch as custom items. It works for HTML pages implemented by ESP8266WebServer::on handler or WebServer::on handler for ESP32. That is, you can make it as menu items to invoke the legacy web page. The below screenshot is the result of adding an example sketch for the ESP8266WebServer library known as FSBrowser to the AutoConnect menu item. It adds Edit and List items with little modification to the legacy sketch code.
-You can extend the AutoConnect menu to improve the original sketches and according to the procedure described in section Advanced Usage section.
+You can extend the AutoConnect menu to improve the original sketches and according to the procedure described in section Advanced Usage.
diff --git a/docs/menuize.html b/docs/menuize.html index 3302600..eda1fa4 100644 --- a/docs/menuize.html +++ b/docs/menuize.html @@ -42,7 +42,7 @@ -Constucting the menu - AutoConnect for ESP8266/ESP32 +Attach the menu - AutoConnect for ESP8266/ESP32 @@ -143,7 +143,7 @@ AutoConnect for ESP8266/ESP32 - Constucting the menu + Attach the menu @@ -603,11 +603,11 @@ - - Constucting the menu + + Attach the menu @@ -759,7 +759,7 @@ -Constucting the menu
+Attach the menu
What menus can be made using AutoConnect¶
AutoConnect generates a menu dynamically depending on the instantiated AutoConnectAux at the sketch executing time. Usually, it is a collection of AutoConnectElement. In addition to this, you can generate a menu from only AutoConnectAux, without AutoConnectElements.
@@ -784,12 +784,18 @@
In other words, you can easily create a built-in menu featuring the WiFi connection facility embedding the legacy web pages.Add the menu item named "Edit" and "List" of AutoConnectAux as each page. Replace the instance of ESP8266WebServer to AutoConnect. Change the menu title to FSBrowser using AutoConnectConfig::title. -Join the legacy pages to AutoConnect declared at step #1 using AutoConnect::join. +
Joining multiple at one time with std::vector's' list initialization.Join the legacy pages to AutoConnect declared at step #1 using AutoConnect::join.
Joining multiple at one time with the list initialization for std::vector.According to the basic procedure of AutoConnect. -
Establish a connection with AutoConnect::begin and perform AutoConnect::handleClient in loop().Modification for FSBrowser (part of sketch code)
+Modification for FSBrowser (a part of sketch code)
+... and embeds a hyperlink with an icon in the bottom of the body section of index.htm contained in the data folder to jump to the AutoConnect menu.
++ )\" ; ACInput(Text1, \"Text1\" ); ACInput(Text2, \"Text2\" ); ACButton(Button, \"COPY\" , \"CopyText()\" ); ACElement(TextCopy, scCopyText); AutoConnectCheckbox \u00b6 AutoConnectCheckbox generates an HTML < input type = \"checkbox\" > tag and a < label > tag. It places horizontally on a custom Web page by default. Sample AutoConnectCheckbox checkbox(\"checkbox\", \"uniqueapid\", \"Use APID unique\", false); On the page: Constructor \u00b6 AutoConnectCheckbox( const char * name, const char * value, const char * label, const bool checked) name \u00b6 It is the name of the AutoConnectCheckbox element and matches the name attribute of the input tag. It also becomes the parameter name of the query string when submitted. value \u00b6 It becomes a value of the value attribute of an HTML < input type = \"checkbox\" > tag. label \u00b6 A label is an optional string. A label is always arranged on the right side of the checkbox. Specification of a label will generate an HTML<p style="padding-top:15px;text-align:center"> + <a href="/_ac"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAC2klEQVRIS61VvWsUQRSfmU2pon9BUIkQUaKFaCBKgooSb2d3NSSFKbQR/KrEIiIKBiGF2CgRxEpjQNHs7mwOUcghwUQ7g58IsbGxEBWsb2f8zR177s3t3S2cA8ftzPu993vzvoaSnMu2vRKlaqgKp74Q/tE8qjQPyHGcrUrRjwlWShmDbFMURd/a6TcQwNiYUmpFCPElUebcuQ2vz6aNATMVReHEPwzfSSntDcNwNo2rI+DcvQzhpAbA40VKyV0p1Q9snzBG1qYVcYufXV1sREraDcxpyHdXgkfpRBj6Uwm2RsC5dxxmZ9pdOY9cKTISRcHTCmGiUCh4fYyplTwG2mAUbtMTBMHXOgK9QfyXEZr+TkgQ1oUwDA40hEgfIAfj+HuQRaBzAs9eKyUZ5Htx+T3ZODKG8DzOJMANhmGomJVMXPll+hx9UUAlzZrJJ4QNCDG3VEfguu7mcpmcB/gkBOtShhQhchAlu5jlLUgc9ENgyP5gf9+y6LTv+58p5zySkgwzLNOIGc8sEoT1Lc53NMlbCQQuvMxeCME1NNPVVkmH/i3IzzXDtCSA0qQQwZWOCJDY50jsQRjJmkslEOxvTcDRO6zPxOh5xZglKkYLhWM9jMVnkIsTyMT6NBj7IbOCEjm6HxNVVTo2WXqEWJZ1T8rytB6GxizyDkPhWVpBqfiXUtbo/HywYJSpA9kMamNNPZ71R9Hcm+TMHHZNGw3EuraXEUldbfvw25UdOjqOt+JhMwJd7+jSTpZaEiIcaCDwPK83jtWnTkwnunFMtxeL/ge9r4XItt1RNNaj/0GAcV2bR3U5sG3nEh6M61US+Qrfd9Bs31GGulI2GOS/8dgcQZV1w+ApjIxB7TDwF9GcNzJzoA+rD0/8HvPnXQJCt2qFCwbBT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