It’s common to talk about smart home as the tool that makes your everyday life at home easier and more comfortable, but smart home can also be a great help a lot to set your mind at ease when you’re away for a long period of time, on a vacation and possibly outside of the country. Being able to keep an eye on what’s happening in your house and be alerted when something happens is very helpful on keeping you relaxed and reassured during your off time.
We propose you today to guide you into setting up the necessary tools and automation to have your house monitor itself for you and be remotely accessible at anytime.
- Turn an old webcam into a smart cam that will warn you of any detected motion, take regular snapshots as well as on-demand visual reports
- Sound sensor to detect any unusual activity in the house
- Old smartphone used to monitor the entrance door or a sensitive room
- Remotely control lights to make the house appear occupied
- Trigger an alarm to warn neighbors and scare off intruders
- Remotely control HVAC appliances to come back in a welcoming interior climate
Most smart devices on the market offer similar features but are very costly solutions. If you’re not willing to invest in such products, or if you have already one or two of these devices but want to implement new features for cheap, this project is for you.
You can make this project in around one hour, with a $50 budget and with no specific skills.
Step 1: REQUIRED COMPONENTS
- Raspberry Pi // ~$25-$35
- 16 Gb SD card // ~$8
- Sound sensor // ~$2
- Old webcam // ~$0
- Old smartphone // ~$0
- WeMo Plug // ~$25
OR RF socket + RF transceiver // ~$8/unit
- Optional: MicroBot Push button pusher // ~$49
Step 2: SET UP YOUR PROTA PI
You first need to build the smart hub that will control the automation of your ring bell and connect all devices together. Prota OS for Raspberry Pi is our free smart hub OS which is very easy to install. In no time you will turn your Raspberry Pi into a smart home automation hub!
Alternatively, you can check this Instructables.
Step 3: INSTALL YOUR SOUND SENSOR
A sound sensor can be a great way to quickly detect any problem in your house. Both an intrusion or the smoke alarm turning on will be directly detected by the sound sensor which can then warn you and ask the webcam to take a picture to assess the situation.
Setting such sensor is very easy with your Prota Pi.
First connect your sensor to your Prota Pi with jumper wires as follow
- Connect the GND pin of your sensor to PIN #3 of your Raspberry Pi
- Connect the VCC pin of your sensor to PIN #1 of your Raspberry Pi
- Connect the DOUT (digital output) pin of your sensor to PIN #12 (GPIO18) of your Raspberry PI
Now, via Prota Space:
- Go to App Libraries and download GPIO app
- Open GPIO app
- Click on GPIO 18 and set it to Interrupt // Pull up
- Click on “Set”
Now your Sensor will react to each close-by sound by displaying “Rising interrupt” and “Falling interrupt” on your GPIO interface (as below).
Step 4: SET UP YOUR WEBCAM AND TELEGRAM BOT
A Telegram bot is a virtual assistant that you can create on Telegram messenger app.
- Download Telegram app on your smartphone and create an account
- Download Telegram app on your Prota Pi (in App Libraries)
- Open the Telegram app on Prota and click on “Request Authorization”
- Set a name and username for your bot, then click on "Create"
Your bot is now created! Once the automation is setup (next step), the bot will send you a notification + a photo of the person that rang your smart doorbell. If you have a MicroBot Push, you will also be able to open the door by sending a message to your bot!
Now let’s quickly set up your old webcam to turn it into a smart cam!
- Plug-in the camera’s USB cable to your Raspberry Pi
- Download the Webcam app on your Prota Pi (in App Libraries)
- Open the app to check that the camera is now working (it should start to automatically take screenshots in case of any motion)
Now that the bot and the webcam are set up, we need to create the automation workflow
Step 5: CONNECT YOUR LIGHTS
As we showcased in our Bedside remote project , there are many ways for you to connect your lighting system. We will use here RF (Radio Frequency) sockets connected by a RF transceiver plugged to our Raspberry Pi. It’s a very easy way to connect lights, but you can of course connect your Prota Pi to a WeMo plug, any other plug supported by IFTTT or use a MicroBot Push to turn the light switches on.
Please follow the bedside project for instructions on how to set up your connected lights.
Those connected lights, outside of being very useful when you’re at home, will allow you to remotely trigger lights during your vacation to give the impression it’s being occupied. This century old trick still remain a good way to prevent unwanted intrusions. You can of course create an automation that will turn on and back off your lights at specific times and days, but since this will create a pattern that might be spotted as such, we will see how you can press a simple button on your smartphone to trigger those lights remotely at random hours.
- Go to App Libraries and download the Macro Buttons app
- Click on + and name your button. Call it “Lights on” for instance.
- Create a second button and call it “Lights off”
Step 6: TURN YOUR OLD SMARTPHONE INTO a SMART CAM
As we showcased in our DIY Smart Security project , you can turn an old smartphone into a smart cam by using ManyThing app, which is supported by IFTTT and therefore can be connected to your Prota hub.
- Download the app on iOS or PlayStore depending on the smartphone you will use as a webcam.
- Sign up and choose “Camera” to put it in Webcam mode (Viewer is the mode to use on the device from which you want to monitor).
- Define the Settings according to your preferences
Install your smartphone either facing the entrance door (from outside or inside if you have a glass door or a side window) or in a sensitive room (for instance where you keep your valuables). Requirement: Your smartphone needs to be connected to a power supply to stay on during the whole length of your stay + it needs to be in reach of your WiFi connection.
Step 7: MAKE YOUR HVAC APPLIANCE SMART
To allow you to come back into a warm house during the winter or a chilled one during summer without having a crazy energy bill due to HVAC appliances left on during, smart appliances can hopefully be triggered remotely. Most smart HVAC appliances are however very expensive.
MicroBot Push lets you turn any HVAC appliance that uses buttons to be turned on remotely based on your needs. It’s a much more affordable alternative and lets you keep your old appliance.
Here is how you can set it on your heater (it also works well on an AC appliance):
- Turn on the MicroBot Push
- Go to your Prota Pi homescreen and click on “Pair now” button next to MicroBots
- When the LED statuses are sync, press on the physical button of your MicroBot Push to pair with your Prota Pi
- Install on your HVAC appliance and it’s ready to use!
Step 8: TIME TO AUTOMATE!
Write the automation storylines on Stories app
Stories is the automation tool that allows you to write automation workflows very simply, in natural language.
- When Macro Button Lights On is pressed, On/Off switch turn on
- When Macro Button Lights Off is pressed, On/Off switch turn off
- When TelegramBot receives “Report”, Webcam takes a snapshot then Telegram Bot sends image file.
- When Webcam detects some motion, Telegram Bot writes “Motion has been detected at home!” Then Webcam takes a snapshot Then Telegram Bot sends image file.
- When GPIO18 detects a rising interrupt, Telegram Bot writes “Sound has been detected at home!” Then Webcam takes a snapshot Then Telegram Bot sends image file.
The remote turning on of your HVAC appliance will depend whether you know exactly when you will come back. You can either trigger it by a Telegram message, through the MicroBot app or by writing a scheduled storyline like “When it’s Friday at 5PM, MicroBot Push press the button” (schedule can be done only up to a week).
Connect to IFTTT
- Download the IFTTT app from your Prota’s App Libraries (this app has no interface, it allows connection between your Prota and IFTTT)
- Go to IFTTT.com or on the IFTTT app, create an IFTTT account and search for the “Prota” channel. Click on connect and select your Prota (you need to have granted access to your Prota Space to the device you’re using)
- Search for the “Manything” channel and connect your Manything account to it
- Search for the “Telegram” channel and connect your Telegram account to it
Write connecting storylines in Stories app
You can easily connect your storylines with IFTTT. For that you need to write the storylines before-hand. Write the following:
- When GPIO18 detects a rising interrupt, IFTTT applet runs.
- When Webcam detects some motion, IFTTT applet runs.
Create the following applets on IFTTT
- IF Prota execute the storyline “When webcam detects motion…”, THEN Manything start recording
- IF Prota execute the storyline “When GPIO18 detects a rising interrupt...” (= sound detected), THEN Manything start recording
- IF Telegram receives a message “Alert”, THEN Android Device plays a song
For the last one, it’s necessary that you name a specific song name as registered on your phone. We use this applet to trigger an alarm sound that will either warn the neighbors or scare off the intruders (or both). You can download free sounds on http://soundbible.com/ .
Step 9: INSTALLATION AND CONCLUSION
Time to install your system!
As soon as you get alerted of a detected motion or detected sound, you can also check on your smartphone’s Manything app to see what your old smartphone is recording. This allows you to combine two different views, depending on where you placed the smartphone and the webcam.
Whenever you feel like checking your house, sending ‘Report’ to your Telegram Bot will clear your mind off.
You can of course complete this project with other smart devices (supported by IFTTT) that you might have at home, like a Nest Smoke Detector or a Netatmo smartcam. Our DIY smart doorbell can also help you keep track of who came to your door while you were gone.
We hope you enjoyed this Instructables and will now be able to go on vacation with your mind completely free! Don’t forget to support us by “favoriting” it and following us on both Instructables and Twitter.
If you have any question, please use our forum!
You like Prota OS and want to test our newest apps before their release?
Subscribe your email address here to enroll or get further information on our Beta program.