-
2Step 2
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!
You can download Prota OS here. Then burn it on the SD card.
We made an easy guide you can follow to set up your Prota Pi.
Alternatively, you can check this Instructables. -
3Step 3
Step 3: SET UP YOUR GPIO BREADBOARD AND BUTTON
We will now set up the breadboard and its button that will officiate as the ringbell of our project!
To avoid getting lost with your breadboard, follow this visual to remember which dedicated role has each pin.
Position your wires and button as it is on the picture below:
Now connect the ground wire to a ground pin and the other one to (for instance) GPIO18.
- Now let’s open Prota Space.
- If you haven’t done it yet, download the GPIO app in App Libraries.
- In GPIO app, click on GPIO18.
- Select “Interrupt” and “Pull up”. Click on “set”.
The button is now set up.
-
4Step 4
Step 4: SET UP YOUR TELEGRAM BOT AND YOUR WEBCAM
A Telegram bot is a virtual assistant that you can create on Telegram messenger app.
If you want to learn more about Telegram bots, don’t hesitate to read this previous Instructables .
- 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
-
5Step 5
Step 5: WRITE THE AUTOMATION STORY
Stories app is what allows you to set up your automation workflows by writing them in natural language.
We need to automate two things:
- What happens after the guest press the ringbell (various notifications)
- The remote opening of your door (if you have a MicroBot Push)
Let’s set first the notification storyline:- Open Stories app, click on + and then on “when”
- Click on “set sensor” and select GPIO. The event should be “detects a rising interrupt on pin GPIO18”. This means “when your ring bell is pressed”.
- Now we will set the actions that follow this trigger. Select Webcam, the action event should be “webcam take a snapshot”.
- Click on the “then” button on the top right corner. Select Telegram for the next action, select your bot, select “send ? to ?” and for the instructions add a notification text like “Someone is at the door!”
- Click on “then”. Select “send a photo to” and add the instructions for “to” field and select “snapshot file” to be sent.
Optionally, if you have a Philips Hue bulb, add this part “Then Philips Hue alarms rapidly” so that you also have a visual warning at your desk.
Now let’s configure the commands to open the door. If you have a door at home or at the office that can open with a button, MicroBot can automate it! First, install your MicroBot Push on the door lock button as we did in our office.
Then, pair it with your Prota’s MicroBot Push app. Once this is done, write the following storyline:
“When Telegram Bot receives a message” and add the condition “Text equal to ‘Open’” “Then Door Push press the button” Now, once notified of your guest arrival, a simple text “Open” sent to your Telegram Bot will open the door!
DONE! You can now test it before installing it all next to your door
-
6Step 6
Step 6: INSTALL AND USE!
We hoped you liked this tutorial and are ready to create your own smart doorbell.
If you enjoyed reading and testing this project, don't forget to follow us on Hackaday and on Twitter!
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.