DoPi


About DoPi

DoPi (Door Opener Pi) is a RaspberryPi based garage door opener. The instructions here are meant to help you build your own. Eventually, I may offer the hardware components as a standalone plug in board for the RaspberryPi. I wanted to make something secure, so I started with a pretty secure password protected web page running on a LAMP server and added SSL. The default password is 'gpio' (without the quotes). I suggest as soon as you get it running that you change the password. Technically it is possible to set a blank password, but this isn't recommended. After getting things setup, I setup port forwarding on TCP 443 to DoPi's IP address. Since I already have a dynamic DNS entry pointing to my home router's IP address, I'm able to access DoPi from anywhere on the internet. If you aren't sure about this or want to be more secure, don't setup port forwarding and the only way you can access DoPi is when you're on your own local WiFi.

How To Install

Installs on Raspbian. Download and run this file from the default user's home directory (/home/pi). (Don't forget to sudo chmod +x install.sh.)

The install will prompt you for your Gmail credentials. This is to allow DoPi to send email. Your password is currently stored in plain text in the ssmtp.conf file (encrypting this is on the roadmap). If you're concerned about safety, sign up for a dummy gmail account and use that one.

To log in for the first time, go to http://<ipaddress> where <ipaddress> is the IP address of your RaspberryPi.

Depending on your browser/settings, you may be prompted about a security problem. This is not actually a significant security problem but your browser complaining that you didn't purchase an SSL certificate. This message is actually good because it means that the communication between your device and DoPi is encrypted. Just click 'Proceed' or 'Continue'.

You may also not get a page that doesn't look anything like the above screenshots. This is because the style information is maintained by me in a separate file on my website. Look in your address bar for a shield and click the link that says 'load unsafe script'. It's not actually an unsafe script; your browser may consider it unsafe based only on the fact that the style comes from my website instead of DoPi. During testing I didn't have this problem on Chrome or Safari through my iPhone running iOS7.

Features

  • Compatible with all smart phones, tablets, and computers.
  • Supports up to 5 doors
  • Secure - Uses SSL and password protection
  • Push button on phone to push the physical garage door button (works same as if you were standing there)
  • Send an email when the door is left open, when closed, or when moving for too long (like it's stuck)
  • Full log of open/close events in the database regardless of control input option
  • Raspberry Pi Camera board support - add a Raspberry Pi Camera board to DoPi to have the option to visibly see the door(s). 

Hardware Required

  • RaspberryPi
  • I used Model B so I could just use the ethernet port. You can always go with Model A and connect your own WiFi dongle.
  • You'll also need a way to power it because it's not included. If you have a phone charger that uses USB micro, you're in business.
  • 4GB SD Card with Raspbian image loaded - You can get this just about any way you want.

Hardware Required per Door

Tools Required

  • Miscellaneous wires (cannibalize a network cable)
  • alligator clips
  • wire strippers
  • soldering iron w/ solder
  • I also cannibalized an old floppy drive cable to turn the RPi header from male into female. You could alternatively get a Pi Cobbler or buy a 26 pin header cable.

Circuit Diagram


Here is how you should connect the pins. For unused doors, just don't connect them. Also, the pins are not pin numbers, but the GPIO pin names as specified here (so 7 is actually GPIO7, which is pin #26 on the header).
Door A Door B Door C Door D Door E
Opened 7 10 2 27 24
Closed 8 11 17 22 25
Button 4 9 14 18 23

Planned Features

Here are some of the features that I'd like to build into DoPi:

  • iOS App
  • Schedule based locks - disable using DoPi to control the door during certain hours
  • Temporal guest access - ability to give a link to another person that will allow them to control the door for a specific amount of time (i.e. 24 hours)
  • Multi-user access - currently only one user is allowed, I'd like to expand that to multiple users and allow each user to have permissions to specific doors (this will pave the way for a cloud offering)
  • Encrypted password for ssmtp.conf file
  • URL passthrough to allow for bookmarking actions (after signing in, the user is brought back to the original URL requested)