Finally I got the temperature and humidity sensor using the ESP8266 WIFI module and a DHT11 temp/hum sensor working like a charm.
The board can be configured via web in a similar way as previous projects. Connect to the ESP8266 station (ESP8266-XXXXXXX) and on a web browser point to IP 192.168.4.1, then you are prompted to enter wifi network SSID and password. Within a few seconds, the IP address of the ESP8266 module will appear on the web page.
Any TCP message sent to the module IP address will return a JSON feed with the current temperature and humidity:
{“dth11″: [{ “Temperature:”: “24”, “Humidity”: “39”,}]}
Now the interesting part. By sending a TCP special string, I can set a minimum and maximum temperature and humidity. When the minimum temperature is reached, then a relay is triggered; similarly, when the maximum temperature that has been set is reached, another relay is triggered and the other one is reset. The same can be done for humidity. Now we have a sensor that reacts.
The control string is of the form
LT=010-HT=020-LH=030-HH=060
and can be sent at any time to set the min/max limits, in return you always get the current temp and hum as
{“dth11″: [{ “Temperature:”: “24”, “Humidity”: “39”,}]}
More details can be found at http://www.horaciobouzas.com
A video of the project can be accessed [url]http://www.youtube.com/watch?v=H42IM8VV9tY&list=UUHPxfpPOnE6o6UGnQl8GFYQ[/url]
Next I will work on a bunch of different sensors, stay tuned.