Docker container with a Raspberry Pi Python script to email or send an SMS (IFTTT) if a garage door is left open. It can also trigger the garage door to open/close.
BASIC RASPBERRY PI SETUP Equipment required
- Raspberry Pi model A or B
- 2GB or larger SD card
- Magnetic sensor (e.g. https://www.amazon.com/uxcell-Stainless-Security-Magnetic-Contact/dp/B005DJLILI/ref=sr_1_10)*
- USB wifi adapter (if not using Ethernet)
- USB power supply for RPi (https://www.amazon.com/Edimax-EW-7811Un-150Mbps-Raspberry-Supports/dp/B003MTTJOY/ref=sr_1_4)
- 2 channel relay (https://www.amazon.com/SunFounder-Channel-Optocoupler-Expansion-Raspberry/dp/B00E0NTPP4/ref=sr_1_1)
- Female to female jumper cables (https://www.amazon.com/40pcs-Female-2-54mm-Jumper-2x40pcs/dp/B00GSE2S98/ref=sr_1_4)
RASPBERRY PI INITIAL SETUP
- Follow the guide at http://elinux.org/RPi_Easy_SD_Card_Setup to write the Raspbian image to the SD card.
- Boot the RPi and at raspi-config, expand the filesystem, set the "pi" account password, and enable SSH.
- Reboot the Raspberry Pi
- Edit /etc/wpa_supplicant/wpa_supplicant.conf and configure the RPi to connect to your wifi network.
- Run
sudo apt update && sudo apt upgrade
- Run
sudo apt install git
PI GARAGE MANAGER WIRING DIAGRAMS
- Check out the wiki for the wiring diagrams - https://github.com/jnk5y/pi_garage_manager/wiki
RUNNING PI_GARAGE_MANAGER
sudo apt-get install python-setuptools python-dev libffi-dev
sudo easy_install pip
sudo pip install requests
sudo pip install requests[security]
sudo pip install httplib2
- Edit the etc/pi_garage_manager_config.py file
- Modify the alert section to suit your alerting needs
- Add your firebase key
- Run the install.sh script
sudo bash ./install.sh
- The install script will copy bin/pi_garage_manager.py to /usr/local/sbin, etc/pi_garage_manager_config.py to /usr/local/etc, init.d/pi_garage_manager to /etc/init.d and make pi_garage_manager.py start on startup
- To run the pi_garage_manager service run
sudo service pi_garage_manager start
- At this point, the Pi Garage Manager software should be running. You can view its log in /var/log/pi_garage_manager.log. You can use the garage_trigger.py script found in bin/ to send commands to the service to open/close the garage door.
Thanks to:
-
Shane Rowley - https://github.com/smrowley
-
Rich Lynch - https://www.richlynch.com/2013/07/27/pi_garage_alert_1/
-
Driscocity's Idiot's Guide - http://www.driscocity.com/idiots-guide-to-a-raspberry-pi-garage-door-opener/