Most of us have been in a situation when somebody couldn’t get our attention because we were wearing a pair of headphones. It usually ends up fine as long as the attention seeker can poke us, but what if there is a barrier between the two?
For such occasions we made a simple home automation solution: whenever someone knocks on the front door, lights blink and a notification is sent to Slack.
1 Raspberry Pi
1 MicroSD card
1 Prota OS*
Optionally for the lights to blink:
Step 1: Check if you have the following items.
In order to make this instructable make sure that you have Prota OS installed on your SD card. WLAN dongle which is shown in the picture is optional and you can use a LAN cable. However having WLAN makes installation process a lot easier.
Step 2: Connect sound sensor to your Raspberry Pi.
Connect as following:
Sound sensor’s power to Raspberry PI pin #1. VDD -> 5V (#1)
Sound sensor’s ground to Raspberry PI pin #6. GND -> Ground (#6)
Sound sensor’s data to Raspberry PI pin #12. DOUT -> GPIO18 (#12)
Step 3: Plug in SD card and WLAN dongle.
Step 4: Prepare to install on wall or door.
We used Raspberry Pi box and a double sided foam tape to stick the system on the door.
Step 5: Attach the sound sensor where you want people to knock.
We marked where visitors should knock with a red circle and attached the sound sensor in its center.
Step 6: Isolate the sound sensor.
We recommend isolating the sound sensor to reduce the rate of false alarms.
Step 7: Once the hardware is up and running, go to myprota.me and install 2 apps.
Assuming that Prota OS is already in the SD card that you've just put into your Raspberry Pi, you can discover it by going to http://myprota.me.
Then from the App Repository you should install two apps: Webhook andGPIO.
GPIO app is necessary for Prota to interpret data from the sound sensor while Webhook app integrates this data with 3rd party services (like Slack).
Step 8: To get notifications (and for lights to blink) make an automation rule with Prota.
First go to the GPIO app and configure GPIO18 as shown in the video. Then go to the Ambiency app, select GPIO app as your sensor and Webhook app as your actuator. Again, configure as shown in the video. To complete this step you'll need a Slack token. Please read how to get one here.
For lights to blink we used Philips Hue which can be connected to Prota. If you have Hue, you can install the Hue app from the App Repository and add to your automation rule.
Alternatively, you can plug any lamp into a smart socket and make it blink with Prota ON OFF app. See an instructable on how to make smart sockets here.
Step 9: UPDATE: You can also add a camera
Adding a camera to the system is not at all complicated.
Step 10: UPDATE: Simply plug web cam's USB cable into Raspberry Pi
Step 11: UPDATE: Download the Webcam app from the App Repository
Step 12: UPDATE: Now you can see who's knocking on your door
Camera's live feed can be check with a web browser which supports HTML5.
Also you can include the Webcam app as an actuator for automation rules. For example, when someone's knocking, take a snapshot and email it.