loading

In this tutorial we will build ESP8266 WiFi Arduino temperature and humidity data logger. Data will be stored on EasyIoT server and displayed in web browser on remote computer or on mobile phone. With ESP8266 EasyIoT Arduino library you can build sensor with couple lines of code. You can add up to 65535 sensor nodes to one EasyIoT server.

EasyIoT server supports secure SSL connection - ESP8266 does not.

Look also to simplified version in EasyIoT Cloud:

https://www.instructables.com/id/ESP8266-WiFi-DHT22-Humidity-Sensor/

See more tutorials at http://iot-playground.com/build

Step 1: Materials

ESP8266 WiFi module

Arduino pro mini 8Mhz 3.3V

DHT22 temperature and humidity sensor

5V power supply

AMS1117 3.3 regulator

Capacitor 1000uF

EasyIoT server (Windows machine or Raspberry Pi)

WiFi network (WiFi router)

Step 2: Build Sensor Node

Conenct Arduino pro mini, ESP8266, power supply and DHT22 temperature humidity sensor.

VCC 3.3 V to Arduino pro mini

VCC 3.3V to DHT22 sensor VCC

VCC 3.3V to ESP8266 VCC module

VCC 3.3V to CH_PHD pin on ESP8266 module

connect GND on Arduino, DHT22, ESP8266 and power supply GND

connect pin 3 on Arduino to pin RST pin on ESP8266

connect pin 10 on Arduino to pin UTXD pin on ESP8266

connect pin 11 on Arduino to pin URXD pin on ESP8266

connect pin 2 on Arduino to pin DATA pin on DHT22

After you connect wires upload program to Arduino sensor node. Before we start using ESP8266 WiFi module we need to update ESP8266 firmware. We use V0.9.2.2 version of firmware. Detail instructions how to update firmware can be found here.

ESP8266 temperature humidity program is on GitHub. Don't forget to set correct access point username and password and EasyIoT serverIP address in Esp8266EasyIoTConfig.h

Step 3: Build EasyIoT Server

EasyIoT server will be responsible for logging sensor data. You can add up to 65535 ESP8266 WiFi sensor nodes to one EasyIoT server.

If you are using Windows machine: just download latest release of EasyIoT server win release and unzip it to Windows machine. Run EasyIoT.exe under administrator privileges.

Or if you are using Raspberry Pi: download latest version of EasyIoT server disc image to SD card. Windows users can write EasyIoT server image to SD card with Win32 Disk Imager.

Put SD card in Raspberry Pi and switch on Raspberry Pi. Raspberry Pi must be on same network as ESP8266 module.

Step 4: Add Sensor Node to EasyIoT Server

In web browser on computer enter Raspberry Pi IP address. Use username admin and password test when asked.

Go to Configure->Drivers->ESP8266 EasyIoT driver and enable driver. Press button Add Node and switch on your ESP8266 Arduino sensor. After couple of seconds you should see two added sensor modules (no timeout message). Then go back and add new modules to Group and modules and enable data logging (see attached pictures).

Step 5: Display Data

Go in Web browser in computer and enter IP address of your Raspberry Pi. On front page you should see current temperature and humidity and chart of temperature and humidity.

Display data in web browser on remote computer or on mobile phone.

<p>I've seen similar configurations that include a resistor but no capacitor. Is the capacitor required?</p>
<p>Could you run this off a coin cell battery? For example, I'd like to put this in my fridge to log temp and alert me if it drops below a certain point. So running a 5V power cord into the fridge would be a pain.</p>
<p>Nice project. By the way ESP8266 does support SSL. Why do you say it doesn't? Maybe it has been added since you posted this? Maybe it is the firmware on the esp8266 serial boards you use that don't support it? Lua and Micropython firmware both support SSL on esp8266.</p><p>If I do this I will likely use an I2C sensor instead. Then you don't need the Arduino. I'll probably use an MQTT server. It is rapidly becoming the standard for simple sensors. I wouldn't be surprised if EasyIot isn't based on MQTT anyway. They are a little short on technical data on their web pages so it is hard to tell. Anyway thanks for the Instructable.. </p>
<p>this looks fun. i have done something <a href="https://www.instructables.com/id/Envolysis/" rel="nofollow">similar</a>. i really like the webpage interface. is that from the easyiot software? </p>
<p>Yes, this is EasyIoT interface. It works good on desktop and mobile devices and supports secure SSL connection (ESP8266 does not suport SSL).</p><p>I noticed that you have many projects supporting &quot;electronic&quot; gardening. I'm also using EasyIoT to monitor and control my balcony garden. Maybe I will write instructable about this.</p><p>Did you try NRF24L01 transceiver? It's really low power - it consumes less than 1/10 power of ESP8266 and it's really suitable for battery sensors. EasyIoT also supports NRF24L01.</p>
<p>Do have tutorials or instructables on how to use NRF24L01 with arduino ? I build something that use moisture sensor with arduino and i want it to connected with EasyIOT using NRF24L01.</p><p>Can you point me to the right direction ? :D</p>
The esp does support ssl!<br>Just use nodeMCU
<p>have you seen <a href="https://www.instructables.com/id/the-Plant-Doctor-family/" rel="nofollow">the plant doctor family</a> ? the reason i chose ESP is that so I don't have to have a base, like raspi to capture data. NRF24L01 is bluetooth right? forgive my simple questions, i'm a true beginner. I am trying to put my system into plant pots and make it run on battery. it needs to be usb-rechargable as well. size/mobility is an issue. for model making my current setup is the smallest in size... i need a lot of help making my system more advanced/stable - especially better battery time. wouldn't you say using a wifi system be more universal/mobile. I can take my plant to anywhere with wifi and it will start uploading data.?! </p>
<p>Nice. NRF24L01 is not bluetooth. If you are using ESP on battery, then put it in sleep mode or it will consume too much battery. See my webpage for <a href="http://iot-playground.com/2-uncategorised/9-arduino-low-power-sensor" rel="nofollow">Arduino low power</a> tips. Some of my sensors will work 10 years on 2 AA alkaline batteries. You can join forum and ask questions.</p>
<p>This might be a silly question but, will it display in fahrenheit? I'm going to build this when the parts get here but i was just curious.</p><p>Mike</p>
<p>I mean this nicely, but it is a silly question. :-) These are just values. It's easy to represent the values as how our Imperial overlords wanted us to (until they switched to Metric anyways). You can also make up your own temperature system, so that water boils at 666 and freezes at 42. It's just scale. </p><p>(See the map() function for some easy ways to scale/convert, although for something like C&lt;-&gt;F or F&lt;-&gt;C there are are dedicated functions).</p>
<p>Ok, it's so easy? but how do you do it? most of us don't know how to do the code, or even know how to start...</p>
<p>See the examples at Arduino.cc and others , sparkfun,etc It is a one line change in the code .very easy</p>
Just to respond to the reply post that isn't showing up (deleted?), the &quot;easy&quot; way to do anything in software is the same as learning a foreign language. You google a few translation (tell Google what you want) and then look over the answers. <br><br>If you are forced to, you can learn phrases, like you can learn to say &quot;Bonjour, je m'apelle Scott. Parle vous Anglais?&quot;. (Apologies to Francophones for any errors here). That's step one: find some code that &quot;works&quot;, but isn't perfect. C-&gt;F temp conversion is very common on Arduino, so I can guarantee Google will uncover something for you.<br><br>What you may find is a code snippet, incomplete and doesn't work for you as-is. That's when you need to do a little short reading about what you're trying to do, to know how something gets used without problem. error messages can be googled also. <br><br>Learning code is an iterative process, can be full of mistakes, but you adapt. It is a wonderful thing if you can learn to code but you don't do it for a living... It's a great surprise skill if your group of friends and hobbyists need something accomplished in code, and you can do it. The Arduino community is full of non-programmers, who can get stuff done by &quot;learning just enough code&quot;.
<p>Can i use Arduino pro mini V5, 16 MHz?</p>
<p>how can i make the esp's IP static(assigned by router,something like 192.168.1.17).</p>
<p>In this case you do not need static IP for ESP8266. It will work automatically even if ESP8266's IP changed. For more questions please join community on forum:</p><p><a href="http://iot-playground.com/forum/index" rel="nofollow">http://iot-playground.com/forum/index</a></p>
Actually, I am making a home automation project. I have connected my ESP8266 to my home's wifi connection. and i am controlling equipment s from my phone's html based app for which i need IP of esp module(assigned by my router) but i gets changed
<p>Ideally you would use DHCP reservations on your router so the devices can remain on DHCP, and you only need to visit one location to assign and view IPs, rather than update each machine/sensor/etc.</p>
<p>I am using ESP8266 with CP2102. For ESP8266 supply I am using LD33v connected to VCC and CH_PD. as soon as serial monitor is open it shows continuous garbage value which is never ending. How to solve this issue?</p>
<p>Maybe serial port speed is not correct or you have power supply with no enough current.</p>
<p>You might need to overwrite the firmware using esptool.py and the latest firmware from Espressif. You'll need a breadboard, a USB-to-Serial adapter (FTDI) that speaks 3v3 logic (NOT 5v, or you'll fry the ESP8266), and some jumper cables. There is plenty of information around the web (plenty on YouTube, too if you're a visual learner) to help you achieve this, so I'll leave the research to you.</p>
<p>Hi,</p><p>Cool project. However: I don't own a Raspberry Pi or a Windoze box; Linux only here. Assuming Raspbian is Debian based and my pc's all run on Debian based distros there would be no obstacle. Wrong assumption, I'll print the errors below. Any chance of getting this running on e.g. Ubuntu 14.04?</p><p>Here's the blurb: </p><p>sudo mono EasyIoT.exe</p><p>2015-03-11T21:01:04.2252470+01:00INFOSystemSystem started</p><p>Unhandled Exception:</p><p>System.DllNotFoundException: librf24-bcm</p><p> at (wrapper managed-to-native) MySensorsDriver.RF24_wrap:new_RF24_2 (byte,byte,uint)</p><p> at MySensorsDriver.RF24..ctor () [0x00000] in &lt;filename unknown&gt;:0 </p><p> at MySensorsDriver.MySensors..ctor () [0x00000] in &lt;filename unknown&gt;:0 </p><p> at EasyIoT.EasyIoTService..ctor () [0x00000] in &lt;filename unknown&gt;:0 </p><p> at EasyIoT.Program.Main (System.String[] args) [0x00000] in &lt;filename unknown&gt;:0 </p><p>[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: librf24-bcm</p><p> at (wrapper managed-to-native) MySensorsDriver.RF24_wrap:new_RF24_2 (byte,byte,uint)</p><p> at MySensorsDriver.RF24..ctor () [0x00000] in &lt;filename unknown&gt;:0 </p><p> at MySensorsDriver.MySensors..ctor () [0x00000] in &lt;filename unknown&gt;:0 </p><p> at EasyIoT.EasyIoTService..ctor () [0x00000] in &lt;filename unknown&gt;:0 </p><p> at EasyIoT.Program.Main (System.String[] args) [0x00000] in &lt;filename unknown&gt;:0 </p>
<p>RPI version does not work on Debian, because it uses RPI HW specific drivers - GPIO. That's why you get librf24-bcm error. You my try with Windows version on Debian, just replace System.Data.SQLite.dll with Debina version.</p><p>If you have more questions please join forum on our website <a href="http://iot-playground.com/" rel="nofollow">http://iot-playground.com/</a> for quicker response.</p>
<p>Update: I realised I have a Windoze 10 image in virtualbox, got the same errors, both in 10 and 8 compatibility mode. Using version 0.6 btw..</p>
<p>Thanks for putting this Ible together. I just bought a ESP8266 and I'm looking forward to what I can do with it, including possibly setting up an interface on my website. Looks like iot-playground.com will be a good resource for info on my project as well. Thanks! <br> <br> </p>
<p>Thx, I will create more interiesting stuff.</p>

About This Instructable

112,814views

208favorites

License:

More by EasyIoT:ESP8266 Controlling 4 Relays ESP8266 Door/window Sensor With SMS Alarm ESP8266 $5 internet connected switch - improved 
Add instructable to: