diff options
author | KaufHA <[email protected]> | 2021-12-18 11:02:18 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2021-12-18 11:02:18 -0700 |
commit | 5ed34bddaa259f0d4ed6ad269ecd70192daab943 (patch) | |
tree | aab487959d4961b127a90983237b15aa1a932499 | |
parent | 7f8ce08d1a62a558a34b1aa17408399dfe961200 (diff) | |
download | PLF10-5ed34bddaa259f0d4ed6ad269ecd70192daab943.tar.gz PLF10-5ed34bddaa259f0d4ed6ad269ecd70192daab943.zip |
v1.83 update
-rw-r--r-- | components/captive_portal/captive_portal.cpp | 6 | ||||
-rw-r--r-- | components/web_server/web_server.cpp | 4 | ||||
-rw-r--r-- | components/wifi/wifi_component.cpp | 3 |
3 files changed, 4 insertions, 9 deletions
diff --git a/components/captive_portal/captive_portal.cpp b/components/captive_portal/captive_portal.cpp index fb1557b..464096f 100644 --- a/components/captive_portal/captive_portal.cpp +++ b/components/captive_portal/captive_portal.cpp @@ -22,10 +22,8 @@ void CaptivePortal::handle_index(AsyncWebServerRequest *request) { stream->print(F("<body><div class=\"main\"><h1>WiFi Networks</h1>")); if (request->hasArg("save")) { - // KAUF edit stream->print(F("<div class=\"info\">The KAUF Smart Plug will now try to connect to the network...<br/><br/>Please give it some " "time to connect.</div>")); - // KAUF edit end } for (auto &scan : wifi::global_wifi_component->get_scan_result()) { @@ -56,15 +54,11 @@ void CaptivePortal::handle_index(AsyncWebServerRequest *request) { stream->print(F("<h3>WiFi Settings</h3><form method=\"GET\" action=\"/wifisave\"><input id=\"ssid\" name=\"ssid\" " "length=32 placeholder=\"SSID\"><br/><input id=\"psk\" name=\"psk\" length=64 type=\"password\" " "placeholder=\"Password\"><br/><br/><button type=\"submit\">Save</button></form><br><hr><br>")); - - // KAUF edit // add warning about not flashing tasmota-minimal. stream->print(F("<h1>OTA Update: </h1>" "<br />**** DO NOT USE <b>TASMOTA-MINIMAL</b>.BIN or .BIN.GZ. **** Use tasmota.bin.gz." "<form method=\"POST\" action=\"/update\" enctype=\"multipart/form-data\"><input " "type=\"file\" name=\"update\"><button type=\"submit\">Update</button></form>")); - // KAUF edit end - stream->print(F("</div></body></html>")); request->send(stream); } diff --git a/components/web_server/web_server.cpp b/components/web_server/web_server.cpp index 719de4f..d11b214 100644 --- a/components/web_server/web_server.cpp +++ b/components/web_server/web_server.cpp @@ -187,7 +187,7 @@ void WebServer::handle_index_request(AsyncWebServerRequest *request) { stream->print(F("</h1>")); stream->print(F("<p>KAUF Plug by <a href=\"https://kaufha.com/plf10\" target=\"_blank\" rel=\"noopener noreferrer\">Kaufman Home Automation</a></p>")); - stream->print(F("<p>Firmware version 1.82 made using <a href=\"https://esphome.io\" target=\"_blank\" rel=\"noopener noreferrer\">ESPHome</a> version 2021.12.0</p>")); + stream->print(F("<p>Firmware version 1.83 made using <a href=\"https://esphome.io\" target=\"_blank\" rel=\"noopener noreferrer\">ESPHome</a> version 2021.12.1</p>")); stream->print(F("<p><a href=\"https://github.com/KaufHA/PLF10/releases\" target=\"_blank\" rel=\"noopener noreferrer\">Check for Updates</a></p>")); @@ -403,8 +403,6 @@ void WebServer::handle_switch_request(AsyncWebServerRequest *request, const UrlM #ifdef USE_BUTTON void WebServer::handle_button_request(AsyncWebServerRequest *request, const UrlMatch &match) { for (button::Button *obj : App.get_buttons()) { - if (obj->is_internal()) - continue; if (obj->get_object_id() != match.id) continue; diff --git a/components/wifi/wifi_component.cpp b/components/wifi/wifi_component.cpp index 1ec4541..221b025 100644 --- a/components/wifi/wifi_component.cpp +++ b/components/wifi/wifi_component.cpp @@ -67,6 +67,9 @@ void WiFiComponent::setup() { // tells ESPHome yaml file boot routine that WiFi credentials were successfully loaded loaded_creds = true; + + // always use fast connect for saved credentials + this->set_fast_connect(true); } // tells ESPHome yaml file boot routine that an attempt was made to load credentials |