Trybotics Logo

Introduction Library WifiManager for Esp8266

DESCRIPTION

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.

WifiManager

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

http://pdacontrolen.com/introduction-library-wifim...

PDAControl: Informacion Completa y mas pruebas.

Introduccion libreria WifiManager

http://pdacontroles.com/introduccion-libreria-wifi...

References

Thanks you for this great contribution...

Tzapu

https://github.com/tzapu/WiFiManager

Ken Taylor

https://github.com/kentaylor/WiFiManager

Description:

Description:

Tests

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.

Mounting

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

Connections

  • 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

Description:

Introduction library WifiManager esp8266 explained - explicado

Description:

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 192.168.4.1.
  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.

Description:

Description:

- 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.

Description:

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

Description:

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

Description:

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.

Description:

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

  • scan reading /scan

Description:

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

Description:

Storage of HTML parameters and functionalities - Wifimanager Version 2 libraries

  • Entering additional parameters
  • Enable checkbox

Description:

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

Description:

Conclusions

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.

UPDATED!!!!!!!!!!!!!

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

https://www.instructables.com/id/WifiManager-Emonc...

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


PDAControl

Downloads, references, more test complete...

Introduction library WifiManager

http://pdacontrolen.com/introduction-library-wifim...

Introduccion libreria WifiManager

http://pdacontroles.com/introduccion-libreria-wifi...

References

https://github.com/kentaylor/WiFiManager

https://github.com/tzapu/WiFiManager

Thanks you for this great contribution...


YOU MIGHT ALSO LIKE