Giter Club home page Giter Club logo

garage-pi-v3's Introduction

Garage-Pi-v3 Docker Image CI

Control your garage door using a secure web application running on your Raspberry Pi.

Originally based on this howchoo article by Tyler Jones.

Compatibility

Raspberry Pi Hardware

  • Rasberry Pi 1 Model A/B/B+ (not compatible)
  • Raspberry Pi Zero W
  • Raspberry Pi Zero 2W
  • Raspberry Pi 2 Model B
  • Raspberry Pi 2 Model B v1.2
  • Raspberry Pi 3 Model B
  • Rasberry Pi 3 Model B+
  • Rasberry Pi 4 Model B

Garage Door Opener

Any garage door opener that uses a wired wall opener. We will be wiring our Pi to the same connectors that your wired wall opener is connected to. See the example photo below in the wiring section.

OS Version

  • Raspbian Stretch
  • Raspbian Buster (Buster 10.1-10.9)
  • Raspberry Pi OS (Buster 10.10)

Setup

Hardware Purchase

Links are to Amazon (not affiliate links)

Setup Raspberry Pi OS

You can find instructions on How to set up your Raspberry Pi without a keyboard, monitor, or mouse.

Wiring

You will need to be comfortable using wire strippers in order to install the hardware for this project. The relay and the 2 magnetic reed switches are much easier to connect to the Raspberry Pi if you cut your wires and use a butt connector to attach it to a female jumper wire.

Garage Door Opener

First, we will connect the Raspberry Pi to the garage door opener. Find the correct connections for your garage door opener. You can find them by tracing the wires from your wall mounted button to the opener. See the picture below.

garage door wires

Attach wires from the garage door opener to your relay.

door to relay

Connect Relay to Raspberry Pi

  • Connect the VCC pin on the relay to pin 2 on the Raspberry Pi (5v).
  • Connect the ground pin on the relay to pin 6 on the Raspberry Pi (ground).
  • Connect IN1 pin on the relay to pin 11 on the Raspberry Pi (GPIO).

relay to pi

Place and Connect Sensors to Raspberry Pi

Close your garage door and then find a place on the garage door frame where you can attach one of the magnetic reed switches. Attach the side with the wire connections to the frame using tape/screws/nails, and then connect the magnet half to the actual garage door. Make sure that when you open and close the garage door, the reed switches don't get knocked off.

door sensor

  • Attach a wire from the NC connection on the magnetic reed switch to pin 13 on the Raspberry Pi (GPIO)
  • Attach a wire from the COM/Ground connection on the magnetic reed switch to pin 14 on the Raspberry Pi (ground)

Open your garage door and then find a place on the garage door grame where you can attach the second magnetic reed switch. Attach the side with the wire connections to the frame using tape/screws/nails, and then connect the magnet half to the actual garage door. If you have a wooden garage door, then you may find it easier to attach near the top of the frame. If you have a sectional/roll-up garage door, then you may find it easier to attach this to the metal structure near the ceiling.

door sensor

  • Attach a wire from the NC connection on the magnetic reed switch to pin 19 on the Raspberry Pi (GPIO)
  • Attach a wire from the COM/Ground connection on the magnetic reed switch to pin 20 on the Raspberry Pi (ground)

Custom Pin Connections

The open sensor, close sensor, and relay can be wired to the following physical pins:

  • 3, 5, 7, 8, 10, 11, 12, 13, 15, 16, 18, 19, 21, 22, 23, 24, 26, 29, 31, 32, 33, 35, 36, 37, 38, 40.
  • These are the physical pins of the Raspberry Pi
  • Default Pins:
    • Open Sensor - Pin 19
    • Close Sensor - Pin 13
    • Relay - Pin 11

Full Wire Diagram

Wire Diagram

Setup the to the world Service

You should use a reverse proxy like traefik or nginx to make a secure web server. Do NOT run this to the public on http ONLY run on https. Without https it poses a large cybersecurity risk.

Installing Software

You have two options for installing the Garage-Pi-v3 Software. It is recommended that you build the software from source. This will ensure that any small changes made to your raspberry pi's setup and OS are accounted for when the software is setup.

Building Garage-Pi-v3 From Source (recommended but slower)

  1. Open up a terminal
  2. ssh into your Pi
  3. Install docker
    • curl -sSL https://get.docker.com | sh
    • This will run the install script right from docker.com
  4. Copy the source files to the Pi from Github
    • sudo apt-get -y install git
    • sudo git clone https://github.com/TJJP/garage-pi-v3.git
  5. Build the Docker Image
    • sudo ./garage-pi-v3/scripts/build.sh --setup
    • This may take some time. Be patient.

Running Garage-Pi-v3 directly dockerhub (fastest way to get started)

  1. Open up a terminal
  2. ssh into your Pi
  3. Install docker
    • curl -sSL https://get.docker.com | sh
    • This will run the install script right from docker.com
  4. Download Docker image & run the image by running
    • sudo docker run -v /etc/timezone:/etc/timezone --restart=always --device=/dev/mem:/dev/mem --name=garage-pi --privileged --publish 7119:7119 -d tjjp/garage-pi-v3:master

Install Garage-Pi-v3 From Repository script (faster)

Don't do this step if you installed Garage-Pi-v3 by Building from source

  1. Open up a terminal
  2. ssh into your Pi
  3. Install docker
    • curl -sSL https://get.docker.com | sh
    • This will run the install script right from docker.com
  4. Download Docker & Garage-Pi by running
    • bash <(curl -s https://raw.githubusercontent.com/TJJP/garage-pi-v3/master/scripts/download.sh)

First Time Use

  1. Open a web browser to the domain you setup
  2. Follow the onscreen instructions to create your first user
  3. After logging in, click the setting to add users, delete users, change your password, set up your Amazon Alexa or Google Assistant, adjust the logs, etc.

Acknowledgements

  • Original Garage-Pi Created by Tyler Jones at Howchoo.com and on GitHub
  • Thanks kylejramstad for the original project
  • Favicon made by Freepik from www.flaticon.com is licensed by CC 3.0 BY

garage-pi-v3's People

Contributors

kylejramstad avatar tjjp avatar dependabot[bot] avatar josephtyler avatar zlevine avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.