SkillAgentSearch skills...

AutoConnect

An Arduino library for ESP8266/ESP32 WLAN configuration at runtime with the Web interface

Install / Use

/learn @Hieromon/AutoConnect
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

AutoConnect for ESP8266/ESP32

GitHub release Build Status arduino-library-badge PlatformIO Registry License

An Arduino library for ESP8266/ESP32 WLAN configuration at run time with web interface.

Overview

To the dynamic configuration for joining to WLAN with SSID and PSK accordingly. It an Arduino library united with ESP8266WebServer class of ESP8266 or WebServer class of ESP32. Easily implementing the Web interface constituting the WLAN for ESP8266/ESP32 WiFi connection. With this library to make a sketch easily which connects from ESP8266/ESP32 to the access point at runtime by the web interface without hard-coded SSID and password.

<div align="center"><img alt="Overview" width="460" src="docs/images/ov.png" />&emsp;&emsp;&emsp;<img alt="Captiveportal" width="182" src="docs/images/ov.gif" /></div>

No need pre-coded SSID & password

It is no needed hard-coding in advance the SSID and Password into the sketch to connect between ESP8266/ESP32 and WLAN. You can input SSID & Password from a smartphone via the web interface at runtime.

Simple usage

AutoConnect control screen will be displayed automatically for establishing new connections. It aids by the <a href="https://en.wikipedia.org/wiki/Captive_portal">captive portal</a> when vested the connection cannot be detected.<br>By using the AutoConnect menu, to manage the connections convenient.

Store the established connection

The connection authentication data as credentials are saved automatically in EEPROM of ESP8266/ESP32 and You can select the past SSID from the AutoConnect menu.

Easy to embed in

AutoConnect can be embedded easily into your sketch, just "begin" and "handleClient".

Lives with the your sketches

The sketches which provide the web page using ESP8266WebServer/WebServer there is, AutoConnect will not disturb it. AutoConnect can use an already instantiated ESP8266WebServer object(ESP8266) or WebServer object(ESP32), or itself can assign it.

Easily add user-owned web screen and parameters <sup><sub>ENHANCED w/ v0.9.7</sub></sup>

You can easily add your own web screen that can consist of representative HTML elements as the styled TEXT, INPUT, BUTTON, CHECKBOX, RADIO, SELECT, SUBMIT into the menu. It can be invoked from the AutoConnect menu and parameters can be passed.

Just loading the JSON description <sup><sub>ENHANCED w/ v0.9.7</sub></sup>

These HTML elements that make up the user-owned screen can be easily loaded from the JSON description stored in PROGMEM, SPIFFS or SD.

<img width="40%" src="mkdocs/images/aux_json.png"><img width="32px" src="mkdocs/images/arrow_right.png" align="top"><img width="30%" height="400px" src="mkdocs/images/AutoConnectAux.gif">

Quick and easy to equip the OTA update feature <sup><sub>ENHANCED w/ v1.0.0</sub></sup>

You can quickly and easily equip the OTA update feature to your sketch and also you can operate the firmware update process via OTA from AutoConnect menu.

Supported hardware

Apply the Arduino core of the ESP8266 Community.

  • Generic ESP8266 modules
  • Adafruit HUZZAH ESP8266 (ESP-12)
  • ESP-WROOM-02
  • Heltec WiFi Kit 8
  • NodeMCU 0.9 (ESP-12) / NodeMCU 1.0 (ESP-12E)
  • Olimex MOD-WIFI-ESP8266
  • SparkFun Thing
  • SweetPea ESP-210

Alter the platform applying the arduino-esp32 for the ESP32 modules.

  • ESP32Dev Board
  • SparkFun ESP32 Thing
  • WEMOS LOLIN D32
  • Ai-Thinker NodeMCU-32S
  • Heltec WiFi Kit 32
  • M5Stack
  • Unexpected Maker TinyPICO
  • And other ESP32 modules supported by the Additional Board Manager URLs of the Arduino-IDE.

Simple usage

The AutoConnect menu

<img src="mkdocs/images/menu_r.png" width="200"><img src="mkdocs/images/statistics.png" width="200"><img src="mkdocs/images/confignew.png" width="200"><img src="mkdocs/images/openssid.png" width="200">

How embed the AutoConnect to the sketches you have

Most simple approach to applying AutoConnect for the existing sketches, follow the below steps.

<img src="mkdocs/images/beforeafter.png">

More usages and Documentation

Full documentation is available on https://Hieromon.github.io/AutoConnect, some quick links at the list:

  • The Installation is the installation procedure and requirements for the library.
  • Getting started with the most simple sketch for using AutoConnect.
  • The Basic usage guides to using the library correctly.
  • Details are explained in the Advanced usage.
  • Details and usage of custom Web pages are explained in the Custom Web pages.
  • The API reference describes the AutoConnect functions specification.
  • There are hints in Examples for making sketches with AutoConnect.
  • FAQ.

Change log

[1.4.2] Jan. 31, 2023

  • Supports whileConnecting exit called while waiting for WiFi connection. (Discussions #553)
  • Added AutoConnect::portalStatus function.
  • Fixed compilation error with ESP8266 Arduino Core 3.1.0 or later. (Issue #567)

[1.4.1] Jan. 5, 2023

  • Supports asynchronous communication of custom web pages using the Fetch API. This allows interaction with the user without page transitions. See the AutoConnect documentation for details. (Discussions #503)
  • Added the FetchLED example.
  • Added an AutoConnect::locate function.
  • Fixed AutoConnectConfigBase constructor missing to AutoConnectConfigExt. (Issue #551)

[1.4.0] Nov. 20, 2022

  • Custom web page related features were decoupled to allow for two different configurations, AutoConnectCore and AutoConnect. AutoConnectCore reduces memory consumption by focusing only on WiFi connectivity utilities. See the chapter Reducing Binary Size in the documentation for more information.
  • Supports credentials backup and restoration.
  • Added an AutoConnect::getCurrentCredential function.
  • Added an AutoConnectAux::referer function.
  • Added an AutoConnectConfig::preserveIP setting.
  • Added the WebSocketServer example.
  • Allow navigate to a custom URL once a WiFi connection is established. (Discussions #523)
  • Revised mqttRSSI examples program structure.
  • Fixed updateserver.py script security vulnerability. (Issue #526)

[1.3.7] Aug. 20, 2022

  • Fixed an authentication failure in Captive Portal state. (Issue #518)
  • Fixed loss of current SSID.

[1.3.6] Jul. 26, 2022

  • Fixed OTA being incomplete. (Issue #325)

[1.3.5] Jun. 03, 2022

  • Fixed Fixed OTA exit not being called. (Issue #325)
  • Fixed an ambiguous type call with IPAddress. (Issue #480)
  • Fixed loss of response due to OTA session reset occurrence.
  • Made fit the mqttRSSI examples to ThingSpeak's updated channel authentication.

[1.3.4] Mar. 02, 2022

  • Supports LittleFS_esp32 legacy library with ESP32 Arduino core 1.0.6 or less.
  • Added enablement of credentials removal function with Open SSIDs menu. (Discussions #433)
  • Fixed AutoConnectOTA crashing if there is no OTA partition.
  • Fixed AutoConnectUpdate crashing if there is no OTA partition.
  • Migrate the CI platform to GitHub actions.
Breaking changes:
  • Authentication has been applied to RESET menu. This avoids resetting modules in an unauthenticated state by direct access to /_ac/reset.

[1.3.3] Jan. 25, 2022

  • Fixed the missing initialization of MQTT parameter settings of mqttRSSI.ino example sketch.
  • Reverted the MQTT API endpoint of Thingspeak.com in the mqttRSSI example sketches.
  • Changed ESP32Cam XCLK to be attenuated to avoid interference with WiFi signals.

[1.3.2] Jan. 1, 2022

  • Supports AutoConnectRange as a new AutoConnectElement.
  • Added the responsive parameter with AutoConnectAux.
  • Added an AutoConnectAux::redirect function.
  • Added an example for using AutoConnect with the ESP32 camera driver as WebCamServer. This example includes examples of using the new AutoConnectRange and an AutoConnectAux::redirect function.
  • Fixed an issue where password is lost when SoftAP is stopped. (issue #425)

[1.3.1] Oct. 09, 2021

  • Fixed an issue that was incompatible with ArduinoJson version 5. (issue #408)
  • Fixed LittleFS mount check not working with ESP32.
  • Fixed autoReconnect not being able to restore a static IP setting. (issue #400)
  • Fixed that static IP settings were not cleared when loading credential.

[1.3.0] Sep. 25, 2021

  • Supports ESP8266 3.0.0 Arduino core.
  • Supports ESP32 Arduino core 2
View on GitHub
GitHub Stars990
CategoryDevelopment
Updated2d ago
Forks204

Languages

C++

Security Score

100/100

Audited on Mar 22, 2026

No findings