Skip to content
couldbejake edited this page Jun 13, 2019 · 17 revisions

The doorBellThatCould logo

Doorbell image alerts using the Raspberry Pi, and a bit of handy work. The application is based around fswebcam, along with a PHP, Python and the phone messaging service 'PUSHED'. Follow Setup to install the application. Should you have any questions or bugs to report, feel free to post them in the Issues tab, or contact me via GitHub.

Prerequisites

  • A Raspberry Pi 2/3 (a, b, b+) .
  • An SD card.
  • An SD card reader.
  • An old webcam.
  • (Optional) A protection resistor of 1k-5k ohms (depending on your doorbell).

More information coming soon

Step 1

Flash your Raspberry Pi with either Raspbian Stretch or Raspbian Stretch lite.

  1. Download Etcher, an application for formatting SD cards.
  2. Download either Raspbian Stretch with desktop or Raspbian Stretch Lite from raspberrypi.org.
  3. Unzip the downloaded file onto your local computer.
  4. Run etcher, select your downloaded .img/.iso and select the SD card you want to run your Raspberry Pi off.
  5. Double check your selections and press 'Flash!' to continue writing to the SD card.
  6. Go brew yourself a coffee, you deserve it!

Step 2

  1. Plug your SD card into the Raspberry Pi and either connect your monitor or SSH into it over Ethernet.
  2. Update your system by typing: sudo apt-get update sudo apt-get upgrade

Step 3

Step 3.5 Port Forwarding

Clone this repository into /var/www/html/doorbell

Step 4

Optionally create a CRONTAB job to automatically restart the script.

(more info coming soon)

Step 5

Install Python 3.7, using the following

wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz

tar xf Python-3.7.0.tar.xz

cd Python-3.7.0

./configure

make -j 4

sudo make altinstall

Step 6

Setup a PUSHED account (this application will send a notification to the channel you create)

Step 7

Go to your settings.json and keys and replace the default values in settings.json with the ones you find on the site.

Step 8

Plug in your USB webcam.

Supported Webcams is a list of supported webcams, although despite mine not being on the list it still works. You can test fswebcam by typing sudo fswebcam image.jpg . If your webcam is supported a file should be saved to the directory named "image.jpg"

Step 9

Connect your doorbell's bell to the raspberry pi using the following configuration:

Circuit Diagram

Step 10

To run the script, type

sudo python3 automate.py