Files

copied
Last update 8 years 3 months by Nick
Files
binary
hardware
.gitattributes
.gitignore
LICENSE
eeprom_config.cpp
eeprom_config.h
readme.md
temp_monitor_esp8266.ino
web_content.cpp
web_content.h
webconfig.cpp
webconfig.h
readme.md

Web-configurable ESP8266-based temperature monitor

ESP8266 is an affordable and flexible solution for DIY electronics projects, such as home automation.

However, to integrate ESP8266-based device into the existing wireless network, SSID and password has to set up. As in many cases these parameters are only entered once during configuration, providing physical human-machine interface with the display and rotary encoder (or keypad) solely for this purpose is ineffective.

If the wireless network parameters are hardcoded into the project, connecting the device to the different wireless network (or modify existing wireless network settings) requires re-uploading the firmware, which limits the possibilities of device usage.

This prototype project implements simple web-server for the configuration purposes. During the initial setup user holds Config Button and powers the device on (or alternatively resets the device with Reset Button). In this case device sets up a wireless access point with known SSID and password. User connects to this access point, configures and saves the network settings using web browser.

After setup is complete, the device is powered off-then-on (or reset with Reset Button) with Config Button released. Device connects to configured wireless network and operates routinely.

Highlights

  • Simple prototype project implementing user-friendly configuration via web interface.
  • Collects temperature and humidity data, with additional MQ-2 gas leak detection sensor
  • Uses <![CDATA[]]>Blynk<![CDATA[]]> for data viewing & archiving
  • Hardware platform is based on standalone ESP8266 (ESP-12 module); no Arduino required
  • Project uses Arduino IDE for ESP8266 programming, can be adapted for Arduino & WiFi Shield with minimum effort
  • AM2302 temperature/humidity sensor (e.g. for room temperature)
  • DS18B20 temperature sensor (e.g. for outside temperature)
  • MQ2 gas leak detection sensor; no calibration is possible, raw data from analog input is displayed

Project status

There are no plans to update this project unless a stability issue is discovered.

Devices are in use since end of December 2015 with no problem, they were stopped only once in May 2016 when Blynk Cloud moved to different servers, and the firmware has to be recompiled using latest Blynk libraries and reuploaded to device. The stable operation of the devices is a priority over code improvement and new features.

I would recommend <![CDATA[]]>my new project<![CDATA[]]> instead. It started as a fork from this project and is being updated with new features introduced.

Quick start

Download this <![CDATA[]]>binary file<![CDATA[]]> and upload it into ESP8266.

Setting up Blynk

Note: this device uses <![CDATA[]]>Blynk<![CDATA[]]> for data viewing & archiving. Alternatively the sensor data and debug information can be reviewed with the serial port monitor.

  • Install <![CDATA[]]>Blynk<![CDATA[]]> on your Android or iOS device; install Blynk library for Arduino IDE
  • Create a new Blynk account or log if you already have one
  • <![CDATA[]]>Import the Blynk configuration<![CDATA[]]> using the following link generated by Blynk application: <![CDATA[]]>http://tinyurl.com/h3tu796<![CDATA[]]>
  • Copy an <![CDATA[]]>Auth Token<![CDATA[]]>; you will have to enter it during device setup.

Setting up the device

Note: this device uses <![CDATA[]]>Blynk<![CDATA[]]> for data viewing & archiving. Alternatively the sensor data and debug information can be reviewed with the serial port monitor.

  • Connect the sensors/buttons/resistors/etc. to ESP-12 according to the included wiring diagram
  • <![CDATA[]]>Install ESP8266 extension<![CDATA[]]> for Arduino IDE
  • Connect ESP-12 to UART<->USB adapter (e.g. CP2102)
  • Open the Arduino IDE project, compile and upload to ESP-12
  • Hold Config Button and (re)start the device; press serial monitor button to view wireless network SSID and password, along with device IP address
  • Connect to the wireless network created by the device and enter device IP address in the web browser
  • Enter SSID, password and <![CDATA[]]>Blynk auth token<![CDATA[]]> in web interface form and press Save Settings button.
  • Restart the device and wait for connection with Blynk server to establish (green LED lights)
  • <![CDATA[]]>Run the Blynk project<![CDATA[]]>

External Arduino Libraries

This project uses the following Arduino libraries:

Copyright (C) 2016 Nick Naumenko (<![CDATA[]]>https://github.com/nnaumenko<![CDATA[]]>) All rights reserved

This software may be modified and distributed under the terms of the MIT license. See the LICENSE file for details.

Report a bug