I knew my first home automation project long before even hearing the term “Home Assistant”. You know the feeling. You pull away from your driveway and, before you know it, you’re on the highway. Then… it hits you – _did I close the garage_?
I didn’t want to experience this thought ever again, so I went searching for a solution. There are many different options for creating a “smart” garage. I considered everything from out-of-the-box smart garage motors to various add-on solutions. My requirements were two-fold:
1. **Do-It-Yourself (DIY) with Home Assistant (HA)** – as an HA novice, I wanted to start to get some exposure on how to integrate devices with the software and setup automations. I didn’t want a “perfect” solution out of the box.
2. **Simple** – while exposure to new concepts was key, I also wanted to keep it simple. A failure in my first home automation project would cease any momentum of spousal support for future projects.
Based on these factors, I selected an approach using a Shelly1 and a Reed Switch as inspired by [this video](https://www.youtube.com/watch?v=WEZUxXNiERQ).
### The Equipment
The following equipment was needed for this automation:
- **[Shelly1](https://www.shelly.com/en/products/shop/shelly-1)** – WiFi operated relay switch. It is a switch that controls the flow of electricity to a device, similar to how a light switch works. We will use the Shelly1 to simulate pressing the button on our garage. Requires a [12V power source](https://www.amazon.com/Adapter-Charger-Replacement-Regulated-Transformer/dp/B0852HX9HV/ref=sr_1_5?dib=eyJ2IjoiMSJ9.blAHC9tSuZE7KGwL0ABvC7eblpJqzecq90n9cAHazM89wc7xRgjuAneIvDgZy6FQnB2LEyIUHCmZNIoOk4GlCLuwi0OO_NCfgZFNT5xcak_dPEurF4MQlTVMl5DtcR4_yYyITilx6T62nyLM99dh94mQrVR3S7n2ErJYuvZT-IapzHy_WYBCTZUh-SKiLZgiTi5FLXM0oCRnRFf5vZX4iETGq_IqKk3gM-SnAjLOhiU.UDhsbc9WouBd3brVrQRgE70DLsdSJQiHrWa3EVYhUko&dib_tag=se&keywords=12v+adapter&qid=1721322767&sr=8-5).
- [Reed Switch](https://www.amazon.com/BNYZWOT-Surface-Sensor-Magnetic-Switch/dp/B07VMYG7GF) – magnetic door switch. It is a switch that can detect when a door is closed or not based on the proximity of the magnetic portion of the switch to the other part of the switch.
### The Installation
The Shelly1 is powered by the 12V power adapter. It is connected to the reed switch to determine if the door is open (reed switch is on) or closed (reed switch is off). It is also connected to the garage motor to switch the motor on/off based on signals received from your WiFi device. Please refer to the inspiration video for setting changes to the Shelly to have it perform like a button, along with more detailed instructions on installation.

### The Automations
Now, the fun begins! As part of this project, I created three automations:
1. **Open / Close from Home Assistant** – I linked the Shelly1 to my Home Assistant using the [Shelly integration](https://www.home-assistant.io/integrations/shelly/). From there, I am able to control the Shelly1 remotely and turn it on/off, which also causes the garage to open / close. Eventually, I can add this button to a Home Assistant dashboard for easier use.
2. **Alert When Garage is Open and We Are Home** – using a link between Home Assistant and our family’s cellphones, we can determine if one of us is home. If we are home and the garage has been open for >15 minutes, we get a notification to see if we want to close the garage. Then, we can do so, without leaving our seat using automation number one!
3. **_Did I close the garage_… is a problem no more** – if none of our family is home and the garage is open for >15 minutes, then we set it to automatically close. That sinking feeling in our stomach when we leave is finally gone!
Well, well, well… what to automate next?
#### Tags
#blog-post #home-automation