Introduction Library WifiManager for Esp8266




Introduction: Introduction Library WifiManager for Esp8266

About: Share - Learn - Makers. Projects, Articles, #automation, #PLC, #Arduino, #IoT and More PDAControl

The main disadvantage is to configure the network credentials in a esp8266 without requiring to modify and download the firmware again, I have tested with several methods to dynamically store the SSID and PASSWORD of a network.

In the case of the esp8266 programmed in Arduino IDE for some time I have seen a proposal called WIfiManager presented by Tzapu, which allows an agile and fast connection, the first tests are registered since 2015.


This time we will make a brief introduction to the WifiManager library, I have tested 2 similar versions.

Version 1: WifiManager created by tzapu - creator

Version 2: WifiManagerby Ken Taylormodified and based on WifiManager created by tzapu.

Note: they work perfectly, obviously between the 2 libraries there are variations in code implementations and that generates incompatibilities or errors in some functions between version 1 and 2.

PDAControl: Complete info and more test.

Introduction library WifiManager

PDAControl: Informacion Completa y mas pruebas.

Introduccion libreria WifiManager


Thanks you for this great contribution...


Ken Taylor

Step 1: Materials

Step 2: Test Mounting and Conections


An example has been downloaded from Github and has been cut to make a light and simple version, without the slightly complex functionalities that we will see later, this version will realize the basic configuration of NETWORK credentials.


We have used an ESP8266 12E, we have added a button to configure the Wifi and 2 led diodes as indicators.


  • GPIO 5 (Pin D1) - Wifi Config button + 10K resistor
  • GPIO 14 (Pin D5) - led red + Resistance 220 Ohm
  • GPIO 4 (Pin D2) - led green + Resistance 220 Ohm

Step 3: Video: Introduction Library WifiManager Esp8266 Explained - Explicado

Introduction library WifiManager esp8266 explained - explicado

Step 4: Description of Sequence

Description of Sequence

Basic explanation:

  1. Press "config wifi" button.
  2. esp8266 resets Network parameters and initiates AP mode "Access Point".
  3. Create a new Wifi network from the esp8266.Connect to the ESPXXXX network.
  4. From the browser, enter
  5. From form make SSID and PASS configuration.
  6. Reset esp8266, disappears red ESPXXXX.
  7. esp8266 STA mode will connect and execute void loop code normally.

Step 5: Configuration Network

Step 6: Aditional Parameters

- Custom html text function, allows you to add titles in HTML form.

- Form form to enter string "parameters", create input fields of parameters, to capture parameters and store data requires handling functions SPIFFS and Json.

Step 7: Function Add Css Styles in Html,in This Case Invert Colors

- Function add css styles in html, modify HTML form styles via ccs, in this case invert colors.

Step 8: Boolean Checkbox Function

- Boolean checkbox function to select, enable or disable parameters, to capture parameters and store data requires handling SPIFFS and Json functions.

Step 9: Other Functionalities: Fixed Network Parameters

Fixed Network Parameters

In the case of the previous tests we made a configuration and Wifi connection via DCHP assigned by our router, but there is a method of assigning complete parameters from form:

  1. Fixed IP address
  2. Subnet Mask
  3. Gateway.

Step 10: Parameter Reading Via JSON From Browser in Configuration Mode

Parameter reading via JSON from browser in configuration mode - Version 2.

  • scan reading /scan

Step 11: Serial Debugging Connection

  • ESP8266 in Access Point mode "ESPTest" for configuration of Network parameters.
  • ESP8266 in station mode connected to RED "1503523" executing "void loop".

Step 12: Example Parameters

Storage of HTML parameters and functionalities - Wifimanager Version 2 libraries

  • Entering additional parameters
  • Enable checkbox

Step 13: ​WifiManager + Emoncms + ESP8266 , Configure & Measurement Temperature #1

WifiManager + Emoncms + ESP8266 , Configure & measurement Temperature #1

FirstWiFiManager Integration + Emoncms Client in ESP8266, Configuration and sending of Temperature, without modifying .....

Documentation: WifiManager + Emoncms (OEM) with ESP8266 (Temperature) #1

Step 14: Conclusions More Info


Although we have only done some testing, WifiManager is a good solution fast and easy it works correctly.

We are analyzing the methods used to add and store more parameters, according to the examples a Json file is created in which the parameters are written, this file "config.json" is saved in SPIFFS internal file system the ESP8266, and is written only when configuring parameters and is read every time the module is restarted.


WifiManager + Emoncms (OEM) With ESP8266 (Temperature) #1

In next tutorials - En proximos tutoriales

we will integrate:

esp8266 + WifiManager + Modbus TCP / IP

esp8266 + WifiManager + Modbus RTU

esp8266 + WifiManager + MQTT

esp8266 + WifiManager + CoAP

More information

PDAControl: In English - En español

Industrial Testing

Trialcommand: In English

Trialcommand: En español


Downloads, references, more test complete...

Introduction library WifiManager

Introduccion libreria WifiManager


Thanks you for this great contribution...

1 Person Made This Project!


  • Science Fair Challenge

    Science Fair Challenge
  • Home and Garden Contest

    Home and Garden Contest
  • Origami Speed Challenge

    Origami Speed Challenge



Question 1 year ago

How to make customize ui in android studio for wifi manager library?


3 years ago

I am a bit confused.
take for instance step 12, where extra parameters (e.g. Thingspeak API) appear. Obviously that is something that need to be programmed in your ino file, but I see no explanation of that, just a screenshot of a menu.


Question 4 years ago on Step 5

On Kens version of wifi manager, does anybody have some code to allow to enter a custom ip through the portal?


Question 4 years ago on Step 8

Is this possible with both libraries? And how do you add it?


4 years ago

Thanks for posting this. It addresses one weakness of programming the ESP8266 for IOT devices- the hardcoding of wifi credentials. Well done.


4 years ago

I noticed you have this on the NodeMCU/ESP12, but curious if this can be accomplished with the ESP01 with only 1/2-gig RAM? (512M) The indicators could be just as easily sent out to GPIO0 & 2 (though, I would suggest inverting the outputs as not to pull the device into flash mode with GPIO0 pulling to GND through the LED.)


Reply 4 years ago

Hello, although I have not tried it on an ESP01, considered the memory .. try, it's worth a try and you're right about the gpio0 would be set to (flash mode) in case of an accidental reset,

I would recommend not to use the GPIO0 a serious solution with great patience extend more GPIO:

Here more interesting tests: