Turns on/off a relay based on reading of temperature and humidity of a DHT22 or DHT11 sensor. Optionally you can turn on/off relay manually using the web interface.
Web interface lets you connect to your wifi, configure defaut values, see DHT readings, turn on/off the relay, and other things.
In this version you will find:
- New Web interface, now responsive.
- New configuration web page added.
- New Relay control page.
- Configuration is kept after reset.
- Fallback to AP mode in case of loosing access to AP.
- Tons of code and circuit testing.
- Added circuit schema.
- All configuration is now placed in a single file.
- Added deug mode to reduce console vervosity.
- Compatibility with esp iot sdk v1.5.4
Seccurity issues
- MANY....
- Wifi password is very easy to retrieve from the web interface.
- No support for ssl nor tls, or any other form of encription.
- No password support.
- It is still pending the use of snprintf.
- ETC..
There are a few parameters that can be changed:
- include/config.h: Temperature and humidity boundaries to turn on relay, number of minutes to keey relay on since it was manually turned on, sensor type (DHT11 or DHT22) and poll rate
Make sure the IoT SDK and toolchain are set up according to the instructions on the ESP8266 wiki. The makefile in this project relies on some environment variables that need to be set. It should be enough to add these to your .profile
:
PATH="/opt/Espressif/crosstool-NG/builds/xtensa-lx106-elf/bin/:$PATH"
export SDK_BASE="/opt/Espressif/ESP8266_SDK"
export XTENSA_TOOLS_ROOT="/opt/Espressif/crosstool-NG/builds/xtensa-lx106-elf/bin/"
export ESPTOOL="/opt/Espressif/esptool-py/esptool.py"
From the root of this repository, run make
. This will build the two firmware images.
We have included all information and schemas inside the eagle directory. You can edit them using eagle software.
This application is based on Mathew Hall software, which in turn is based on others, like Martin's DHT22 webserver implementation, which uses sprite_tm's ESP8266 httpd.
Please refer to each file to see the licences.