Intel Galileo Garage Monitor

Introduction: Intel Galileo Garage Monitor

About: I like to tinker with just about anything, sometimes it works out in the end. Have fun looking at the projects, try tearing something open and let me know how it goes. cheers, -Joe

The intel Galileo is an amazing platform to make IoT devices. This is an example of using Python and a few sensors to create a garage monitor/alarm system.

Step 1: Parts

You will need the following parts:

-Intel Galileo

-Intel Galileo compliant Wifi card

- 2x Overhead Door Switch

-1x Magnetic Door Switch

- 3x 1K resistors

- Arduino Proto Shield

- 3x Screw Terminals

- DuinoCase Enclosure

-TMP36 Temp Monitor

- Terminal Block

Step 2: Assemble

Assemble your switches. I wanted to make this modular but also a production service, so I needed to move beyond the solderless breadboard.

To do that I used a Arduino Protoshield and screw terminals. This would allow me to open the case and tinker while also being hardwired.

Step 3: Case

I added a 6 screw terminal block to the outside of the DuinoCase to make wiring it to the switches easier.

Step 4: Switches

Install your switches at the door and attach it to the terminal blocks

Step 5: Software Prerequisites

You will need to install flask and gunicorn. To do that you need to use pip.

Pip relies on ez_setup, so install that first. If you have not installed PIP, follow these instructions.

curl -o

python --insecure

Then you must install PIP. curl -o pip-8.0.2.tar.gz

tar -zxvf pip-8.0.2.tar.gz cd pip-8.0.2

python build install

pip install gunicorn

pip install Flask

Step 6: Code Overview

Now we get to the heart of the matter. This consists of 2 scripts, one which will run every minute to make DB entries and send emails. The other script is the flask web server.

The scripts can be downloaded from GitHub here:

You want to read the door pins with mraa.

In python you will import mraa, define a pin, then read it.


Step 7: Door Code

The script that will monitor your doors for email purposes is called It will run as a systemd process and start on boot.

Edit the mailto and mailfrom lines to receive email.

Step 8: Flask

The web server is written in python using flask. You will want to copy the flask folder from git hub in to /data/flask .

There is a login page... although I am not doing anything with it in this first version.

Step 9: Startup Processes

You will want all of this to start on boot. In this IoT OS we will use the systemd unit files to get this working.

Copy the garage*.service files /lib/systemd/system/

Then add them to the startup process using systemctl enable .

systemctl enable garagemon.service
systemctl enable garagealert.service

Start it up!

systemctl start garagemon

systemctl start garagealert

Step 10: Email

Sample email shown. It will email if a door is open more than 5 minutes.

Step 11: Web Interface

If you browse to http://yourGalileo.local you will see the status of the doors. There is also a temperature read out... because why not?

Next version will allow you to edit the time frame for alerts and email info from the web.

Step 12: Done

I hope you enjoyed checking out an example of a garage monitor/alarm system using the Intel Galileo Gen 2 and python.

Be the First to Share


    • Stick It Challenge

      Stick It Challenge
    • Electronics Contest

      Electronics Contest
    • Make It Modular: Student Design Challenge

      Make It Modular: Student Design Challenge



    6 years ago

    Seems to be quite a lot involved for just a notification of open/close. I was able to build a 100% wireless garage door operator using the Particle Photon. When I leave for the day, I tell my Amazon Echo, “Alexa, open garage”.....based on my iOS proximity and the app, IFTTT, the garage door closes automatically. When I’m 100 yards from my home the garage automatically opens. During the day, I can “check in” both through the streaming camera and by running a recipe on IFTTT to be sure it was closed. Don’t get me wrong, using any type of technology in our lives is great, I was just making comment that it seemed to be a little overkill. Of course, with 4 Edison’s and 4 Galileo’s to my name, I still have not done anything with them...yet.


    Reply 6 years ago

    Hey Andrew - Congrats on making something cool. I'd love to check out your project, is it here on instructables?

    As with most gadgets on instructables there is almost always a better way to accomplish it, it's the journey not the destination as they say. For instance everything in this instructable and the project you described can more or less be done plug and play with a MyQ by Chamberlain

    This is all open source released under the GPL, Feel free to take the code and make it less complex using an Intel Galileo. I'd love to check it out.