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





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

The following implementation using an ESP8266 module and a temperature sensor ds18b20allows the configuration and sending of data to Emoncms without requiring to modify or edit a line of code, facilitating the creation of parameterizable applications.

After testing the Wifimanager libraries, which allow an agile configuration of the network credentials and additionally allow to add parameters or initial configurations before running the final application, in this case we will use the WifiManager version created by tzapu - creator.

Tutorial Recommended: Introduction library WifiManager

The idea is to implement this library in more future integrations and create a kind of wifimanager base template for those who want to test and add parameters is easier.

PDAControl: Complete info, and more test.
WifiManager + Emoncms (OEM) with ESP8266


PDAControl: Informacion Completa y mas pruebas.

WifiManager + Emoncms (OEM) con ESP8266


References Thanks you for this great contribution...

Tzapu http://pdacontroles.com/introduccion-libreria-wif...

OpenEnergyMonitor Project

Step 1: Connections & ​Materials - Where to Buy

Materials and where to buy

Step 2: Introduction

This implementation in Arduino IDE for ESP8266 is very useful to not require that you download firmware or modify code if the network credentials change, making it easier to take our application to other available networks.

In this tutorial we will use WifiManager as a configuration medium and integrate it with an http / json client that sends data to the Emoncms platform, in this specific case we will only perform connection tests on a local network.

Step 3: ​Settings

To enable parameterization from wifimanager we have added 1 pushbutton and 2 led diodes to indicate application status or operation.

  • Normally open button: "WiFi Config": it allows to enable the configuration and parameterization of the ESP8266.
  • Red LED: On indicates ESP8266 in "WiFi Config" mode or WifiManager enabled.
  • Green LED: On Indicates that the application code in this case the Emoncms http client is connected to the server correctly.

Step 4: ​WifiManager

Create a form that will perform the following functions:

Configuration of Network Parameters "SSID" & "PASSWORD" from web form.

We have added 6 fields HMTL input to our form to enter more parameters required in this specific case for our client Emoncms.

More information: custom WifiManager parameters.

Parameters created for Emoncms client:

  1. host or emoncms server allows IP address and host or dns: "" or "serveremoncms.com".
  2. emocms server port, default: "80".
  3. apikey or authentication key for writing / reading emoncms.
  4. time sent data in seconds: "120".
  5. variable name or sensor, in emoncms input: "sensor02_temperature".
  6. emoncms node, is the group to which we assign the sensor: "1".

Note: Download Example code "Basic example esp8266 WifiManager" available in pdacontrolen.com and full explain...

Step 5: ​Emoncms Http/json Client

An http/json client has been created which sends data to emoncms with the following characteristics:

  1. Creating a TCP/IP client"WiFiClient".
  2. Connection to Host "Emoncms " (! Client.connect (host, port)) ".
  3. Reading of variables or sensors "Temperature = float celsius = sensors.getTempCByIndex (0);".
  4. Creating json/http according to example features: Input API emoncms.
  5. Send json as request to server emoncms client.print (String ("GET") + json + "HTTP / 1.1 \ r \ n"
  6. timeout connection 5s or 5000ms in case ofno connection retry.
  7. Print on the terminal Server response "200 ok".

Step 6: Parameters Available - Connection Emoncms

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

First test WiFiManager Integration + Emoncms Client in ESP8266, Configuration and sending of Temperature, without modifying .....

Step 8: Preview Emoncms


The client http/jsonesp8266 will always send the data directly to inputs, the method is determined by the API Inputs.

Full information:API Inputs Emoncms.

The input must become a Feed to be configured in a process associated with the variable or variables "temperature, RSSI" which allows to adjust, integrate, parameterize register or store among many available functions, in this case log to feed, for the later creation of dashboard, graphs and historical.

More information:API Feed Emoncms.

Step 9: Dashboard Emoncms

It allows to associate the Feeds to Widgets and the great variety available graphics.

Step 10: WifiManager + Emoncms + ESP8266 - Configure & No Code Temperature #2

First WiFiManagerIntegration + Emoncms Client on ESP8266,

Test Connection with the 3 variants of the Emoncms platform, node configuration from WifiManager ...

Step 11: Conclusions and More Info

Of course there are other methods, some will say more efficient means to program the esp8266 or do this implementation and but, I have decided to explore the WifiManager scope and it has seemed a very good solution, very practical for applications with Arduino IDE, for people who have already performed some tests.

In order for them to create their own implementations, I would say that although the code seems long and a bit complicated, technically "complicated does not require modifications "after reading the library documentation in github, it is simpler and again I recommend the basic examples Arduino IDE from pdacontrolen.com

Finally I hope someone will serve you this information, they are initial tests if someone tests or has suggestions or recommendations please comment that they will be well received.

In next tutorials - En proximos tutoriales

we will integrate: esp8266 + WifiManager + Modbus TCP / IP

PDAControl: Complete info, Downloads and more test.

WifiManager + Emoncms (OEM) with ESP8266


PDAControl: Informacion, Descargas Completa y mas pruebas.

WifiManager + Emoncms (OEM) con ESP8266


References Thanks you for this great contribution...

Tzapu http://pdacontrolen.com/introduction-library-wifi...

OpenEnergyMonitor Projecthttps://openenergymonitor.org



  • Epilog Challenge 9

    Epilog Challenge 9
  • Paper Contest 2018

    Paper Contest 2018
  • First Time Author Contest 2018

    First Time Author Contest 2018

We have a be nice policy.
Please be positive and constructive.




Great. Emoncms is a very versatile StorageCloud, bit of a steel learning curve but very useful