Home Automation Chatbot using Telegram Chat, NodeMCU ESP8266 ESP12E, DHT22, and solid state relay.
There are too many occurrence when one inspired to build home automation but was beaten by the daunting task of setting up the necessary technology.
Why home automation? for convenience and comfort! example, remotely turn on the air conditioning to pre-cool your room when you are5 minutes away from home, or turn off the heater when you recalled you forgotten about it and you are 2 hours away from home.
In this home automation chatbot , there are a few assumptions needed. your home is equipped with wifi, and it is always available, and connected to the Internet. You do not want to modify existing infrastructure of the electrical appliances. Fancy mobile phone app is a good to have, but not a must.
In this instructables, we are going to use an android chat app, the telegram. Create a chatbot with telegram where human is the admin of the chat room. the beloved nodeMCU ESP8266 ESP12E, some sensors, and SSR. I have used an internet enabled multiplug i made in 2014. It is still operation up till now. details of making the multiplug is available here https://www.instructables.com/id/IoT-inspired-multiplug-using-SSR/
Step 1: Electronics
wire DHT22 data pin to GPIO4 e.g D2 on nodemcu.
VCC and GND respectively to nodemcu.
Wire SSR data pin to GPIO14 eg D5 on nodemcu.
ensure the wifi access point SSID & password is at your finger tips. we will need this information.
Step 2: Create Telegram Chatbot
follow the steps outlined here to contact the bot father and acquire the necessary to create a chatbot of your own.
Step 3: Program NodeMCU ESP8266 ESP12E
Program NodeMCU ESP8266 ESP12E to connect to WiFI and respond to the messages sent with Telegram Chatbot. An excellent telegram interface API is used.
source code available here https://gist.github.com/teos0009/677db627fe957dcf9a8fdbf53f4b4976