Skip to content


Repository files navigation


IoT project running on a Raspberry Pi to open/close a garage door and to see if it's opened or closed.


  • Ability to open close garage via website
  • Send notifications via IFTTT/Texting when garage opens/closes
  • MMS photo sent when garage open/closed clicked

Coming soon:

  • Open garage via GPS
  • Wire diagram

Required for setup:

1.Raspberry Pi with 16GB+ class 10 SD card (

2.Power relay (

3.Optional PIR motion sensor (

4.Pi Camera (

5.Door magnent sensor (

6.Optional Hue light bulbs (will need bridge too) (


1.Setup Rasbperry Pi

2.Get packages installed on RPi

3.Rename example files in settings folder. Note the files (login.js, options.js, messengerInfo.js) are .gitignored. Be sure to NOT commit these files as they contain sensitive info! If you mistype this command you might accidently commit these if you use version control. Use command below:

mv optionsExample.js options.js && mv messengerInfoExample.js messengerInfo.js && mv loginExample.js login.js

4.Get a Twilio account (for texting)

4a. Fill out TWILIO_AUTH_TOKEN and TWILIO_ACCOUNT_SID in messengerInfo.js

5.Get an IFTTT account (for push notifications)

5a.Setup a new applet (webhook, receive a request) with the event name that matches the one in messengerInfoExample.js then notification(garage_open_trigger, garage_alert, etc.)
5b. Fill out the text such as: {{Value1}} Garage Door Opened or {{Value1}} Garage Door has been open for more than: {{Value2}} minutes!.
Value1 = iftttValue1 from the messengerInfoExample.js file
Value2 = mins garage has been opened before alert sends.
5c.Download and login to the IFTTT mobile app on your phone and turn notifications on.

6.Add your IFTTT API key from to the messengerInfo file under iftttRecipients -> ApiKey

7.Clone holka-garage repo

8.Fill out information including API keys phone numbers etc in the various setting files

9.Use pm2 to start the program using the following command sudo pm2 start app.js --name hg && pm2 startup && pm2 --save

10.Setup a domain name and point it to your external ip address.

11.Install ssl certificate use ./certbot-auto certonly --manual --email -d -d -d note you will need to make sure app.js is running and add a route to routes.js with the specified info to verify this.

11b.If you're using certbot you will want to check to see if you need to renew this script monthly . You can add a .sh file to /etc/cron.monthly that contains certbot renew --standalone --pre-hook "pm2 stop hg" --post-hook "pm2 start hg" which will run monthly and renew your cert. Also run sudo chmod +x to give permissions to execute it.

12.Change the sslPath variable in login.js to the location of your certificate.

13.Visting should pull up the website.

14.If you've entered geoIpFilter in options.js it will limit ip addresses within those state abbreviations (comma separated) to open the garage door.

15.If you've entered values for vpnIp or localIp it will only allow an ip address from those ip's to open the garage door


IoT project running on a Raspberry Pi to open/close a garage door and to see if it's opened or closed.






No releases published


No packages published

Contributors 4