The client runs on your Raspberry Pi. It handles interfacing with the exisiting hardware, including the doorbell, mechanical chime, and door/gate strike, if present.
-
This has only been tested on Python 3.6. At the time of writing, this was a pain to install on Raspbian.
-
This has only been tested on a Raspberry Pi B.
-
This has only been tested on the OS
Raspbian GNU/Linux 8 (jessie)
.
-
Clone this repo on your Raspberry Pi somewhere. For the purposes of this guide, we'll assume it's
/home/pi/ding-dong-ditch
. -
Change into the working directory:
cd /home/pi/ding-dong-ditch
-
Setup the python virtual environment:
make setup
-
Create your settings file:
cp env.sh.example env.sh
Edit this file to specify the settings you need. Look at
system_settings.py
for more detailed descriptions. -
Set up your Firebase credentials. This allows the client to communicate with the server.
-
Ensure your server is set up.
-
Log in to the Firebase console and select your project.
-
Click settings (the gear menu next to the "Overview" tab).
-
Copy your "Project ID" and set it to the
DDD_FIREBASE_APP_NAME
variable inenv.sh
. -
Copy the "Web API Key" and set it to the
DDD_FIREBASE_API_KEY
variable inenv.sh
. -
Click on "Service Accounts" in the tab bar.
-
Click "Generate New Private Key" and save the file somewhere.
-
Copy the key file to your Raspberry Pi (scp, rsync, whatever). The default location is
/home/pi/.firebasekey
. -
Ensure the
DDD_FIREBASE_KEY_PATH
variable inenv.sh
points to the file.
-
-
Run the client:
make run
To exit, type
ctrl-c
.
To have this program run upon startup of your Raspberry Pi, you'll need to install
a systemd
service. This is pretty easy:
make install
If you decide it's not for you, uninstalling is equally easy:
make uninstall