This project showcases how to turn your twitter account into a smart home system. You will be using the Twitter API to post and read statuses. With a relay module you can control up to 4 devices. A webcam can be used with the Raspberry Pi to take pictures of an area that you wish to monitor. You should probably make a new Twitter account and follow it, so your current followers can't see what you post. Here are the steps to make it:
After making a new Twitter account, sign it up on the Twitter apps site, and then make a new app. You can call it whatever you want. Open up Notepad and copy/paste four keys. You will see 2 app keys. Then get oauth keys and copy/paste those as well. In the Python code put your four keys in their respective places.
Put the DHT11 sensor in an enclosure and wire it up to the Arduino Nano. Then connect the relay module to the Arduino as well. Next attach the webcam to the Raspberry Pi, and point at a room that you want to keep track of. LEDs or buttons can be added if you wish, but this will have to be added to the code.
A custom enclosure can be made to support a relay module inside of it. It should also include room for a Raspberry Pi and Arduino. The Python code could be consolidated to only need the Raspberry Pi without an Arduino.
To call a function you must tweet at your bot. You can setup custom commands in the Python code. I have put 3 pre-loaded commands in the code. One is "lights on" which turns on the first relay pin. The second command is "lights off" which turns off the relay. The third command is "check house" which makes the Raspberry Pi take a picture using an attached webcam and sends a tweet back to you with the attached picture. When nothing new is tweeted, the Arduino displays the temperature and humidity on its LCD.
That's it! Feel free to change it and add new commands. Let's see what is possible.