Have you ever been out of town and wondered if your food would be good to eat when you got back? What about if the power's out and you don't know the internal temperature of your fridge?
What if your AC broke during the middle of July? With an ESP8266, a battery, and a temperature sensor, and Cayenne, now you can monitor and be alerted remotely, no more guessing!
For this project I used an ESP8266 ESP12e module with NodeMCU and Lua, along with a DHT11 for sensing the temperature. I also used a 10k ohm resistor between DHT11 data and DHT11 VCC.
First, I created a prototype by just connecting the ESP8266 and a DHT11 temperature sensor. I loaded up the DHT11 example sketch, and wallah, it can print out the temperature on a serial monitor! Next, I added the Cayenne ESP8266 library to the sketch,
enabling it to easily send data to the Cayenne IoT website. I also made it battery powered via the Adafruit Micro Poly charger and a 1200 mAh lithium ion battery. All that was left to do was create the device on the Cayenne website and enter the credentials into the sketch.
I made a new device called "Fridge" using the ESP8266 board. I then added a channel and made it alert me whenever the temperature goes above 40 degrees F. The ESP8266 sends data every 2 hours, and then goes into a deep sleep to conserve battery power. I could also have it alert me if my house's temperature goes over 80 F, such as if a door is left open.
This device allows for you to leave your house, and be confident that your food will still be good when you return.