Building A Secure Wi-Fi Garage Door Opener
In my past smart home articles and projects, you may recall a lot of work and emphasis on the garage door. This is by no means an accident or curious obsession with all things garage doors. Unlike conventional doors and windows, attached garage doors are one of the most actively used methods of getting into and out of the house. This, paired with the many articles online referring to a general uptick in garage code and frequency scanners used by thieves, led me to explore alternative methods for opening and closing a garage door.
The IoIIT Movement
This article relies heavily on the principles of Internet of Insecure Things, or IoIT. IoIT is a growing network discipline that acknowledges the need for a separate and secured wireless network to accommodate the vast array of simple connected devices that carry with them known and potential vulnerabilities. How you personally configure your network to reflect the IoIT landscape is up to you, as there are many options and best practices based on not only the type of hardware you’re using, but also what level of concern you may have for securing these devices.
Authentication & Requirements
The illustration below highlights the basic procedures for a more secured garage door opening/closing experience. Observe the two authentication and security parameters and their place as well as function.
To summarize, the IoT device sending the request to open or close the garage door must pass two separate requirements:
- From the network: Is the IoT device recognized and approved to connect to the secured and partitioned IoIT network?
- From the garage door server: Does the IoT device’s ID AND the code/ID inside the sequence match the security requirements necessary to initiate the garage door action?
** A friendly note that there’s significantly more to this sequence and its security layers as it relates to my IoIT layout, but I wanted to at least provide an overview relative to just the garage door functionality. As a best practice, none of the components related to my garage door functions can be accessed outside the local isolated network as well as components directly associated with its function.
The Smallest Smart Garage Door Opener
I have a few articles highlighting all of the fun ways to use ESP8266 chips, and this one is no exception. I did, however, use an ESP32 based chip from M5Stack to complete this project. For about $5, this development kit already included a button as well as some other hardware on-board to make rapid prototyping truly a breeze.
Operating off of a simple button cell battery, this device’s only function is to remain in a sleep state until activated. When activated, the order of operation is as follows:
- Button pressed: Wake up
- Connect to Wi-Fi
- Send garage open/close command
- Go back to sleep
As a proof of concept, it doesn’t get much easier than that. The main benefit here is that I can create as many garage door openers as I need in as many form factors as I may need. Cars, motorcycles, bicycles, and any other need is basically a matter of determining what footprint should exist (hardware or software) and building to match my IoIT requirements.