Files
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.mdWeb-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 Blynk 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 my new project instead. It started as a fork from this project and is being updated with new features introduced.
Quick start
Download this binary file and upload it into ESP8266.
Setting up Blynk
Note: this device uses Blynk for data viewing & archiving. Alternatively the sensor data and debug information can be reviewed with the serial port monitor.
- Install Blynk on your Android or iOS device; install Blynk library for Arduino IDE
- Create a new Blynk account or log if you already have one
- Import the Blynk configuration using the following link generated by Blynk application: http://tinyurl.com/h3tu796
- Copy an Auth Token ; you will have to enter it during device setup.
Setting up the device
Note: this device uses Blynk 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
- Install ESP8266 extension 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 Blynk auth token in web interface form and press Save Settings button.
- Restart the device and wait for connection with Blynk server to establish (green LED lights)
- Run the Blynk project
External Arduino Libraries
This project uses the following Arduino libraries:
- OneWire library for Dallas/Maxim 1-Wire Chips
- [Arduino plug and go library for the Maxim (previously Dallas) DS18B20 (and similar) temperature ICs] (https://github.com/milesburton/Arduino-Temperature-Control-Library )
- [Arduino library for DHT11DHT22, etc Temp & Humidity Sensors] (https://github.com/adafruit/DHT-sensor-library )
- Blynk library for embedded hardware
Copyright and License
Copyright (C) 2016 Nick Naumenko (https://github.com/nnaumenko ) All rights reserved
This software may be modified and distributed under the terms of the MIT license. See the LICENSE file for details.