Plays a chime when the Envoy front door is opened.
- RPi GPIO library
- Pygame
- Raspberry Pi (we used Adafruit Raspberry Pi Rev. B+)
- Internet connection (wired or wireless, for remote debugging)
- Reed Switch on GPIO pin 23
- Green LED on GPIO pin 17
- Red LED on GPIO pin 4
- Mono USB-powered speaker
Note: These are very loose instructions to help get you started. This guide won't cover the basics of electronic wiring, and Raspbian (the Raspberry Pi flavored Linux distro)
- Install Raspbian Wheezy – I recommend using NOOBS (linked) because it's easier.
- Use the
raspi-config
menu to change the default password, set the charset to UTF-8, and set your time zone. Don't skip this step. - Add the wi-fi config
- Once at the command prompt, run
sudo apt-get update
andsudo apt-get upgrade
to update your base system. - Run
apt-get install git
- Clone the repo
git clone git@github.com:OutrageousLabs/doorpi.git
sudo mv rc.local /etc/rc.local
– this overwrites the default rc.local with one that runs the required scripts on boot.- Try running
sudo python chime.py
– it should return the following:
listening…
_
If so, the Chime script is now running and listening for the reed switch to activate. When the door opens, it will play a sound from the speaker and light the green LED. When the door is closed, it will return back to the red LED.
- Restart your Pi
sudo shutdown -r now
- When the Pi reboots, it will automatically start the network monitor (which will auto-reconnect WiFi if disconnected) and the
chime.py
script.