This project adds some form of IoT capability to my existing garage door.
At the time of creating this project, we were renting our house. This limited our ability to implement smart technology or change out hardware. For over two years our landlord had not supplied us with a second remote control for the garage door, meaning my wife and I had to plan who was going to take the remote with us based on who was likely to be home first. Couple that with frequent incidents of accidentally leaving the garage door open at night, and voila, I had motivation to improve our garage door situation.
- End up with a remote control in each car (2x remotes)
- Provide a capability to open / close the garage door from within the house
- Enable Google Home integration
- Open / Close commands
- Open / Closed query
- Avoid drastic modification of the garage door to ensure we don't break our lease agreement when it's time to turn over the remote controls
This is the Link that the QR Code on the device points to. When the new tenant at our property discovers and scans the QR code, they will end up here. Welcome! Read on for instructions on how to operate the device.
There is only one button on the device. Once pressed, this button will perform a different operation depending on how long it is depressed for:
- < 1s: Activate the garage door (open / close / stop)
- 3s: Register a new 433Mhz remote
- 7s: Enable the WiFi and Reset the WiFi config
- 10s: Disable the WiFi and Reset the WiFi config
- 15s: Perform a full factory reset
To pair a new 433Mhz remote:
- Hold down the front panel button on the GarageBot and release it after 3 seconds.
- Check that the RF LED (the third LED) is blinking in an on-on-on-off pattern. This indicates that the GarageBot is ready to register a new remote. If the Power LED begins to flash in an
on-off
pattern, you have most likely reached the maximum number of 5 registered RF remotes and the device will need to be factory reset to register any new remotes. - Hold down the button on the new remote for at least 1s until all of the lights on the device activate for 3 seconds, indicating a successful registration.
Important Notes:
- The remote must use the 433Mhz band
- The remote must use Amplitude-shift keying (ASK) for signal modulation
- You can only register 5 unique remote codes. Once this limit has been reached, you must factory reset your device to register new remotes.
The GarageBot can be connected to your Wifi to either become part of your smart home or to be controlled directly via a web interface.
To connect the GarageBot to your WiFi:
- Hold down the front panel button on the GarageBot and release it after 7 seconds.
- Any existing WiFi details will be cleared and the GarageBot will reboot.
- Once rebooted, check that the WiFi LED (the second LED) is blinking in an on-on-on-off pattern. This indicates that the device is now broadcasting a HotSpot and is ready for WiFi configuration
- Using a WiFi enabled device (mobile phone, tablet, laptop etc...) scan for available WiFi networks. If you are within range of the GarageBot, you should be able to see the
garagebot
WiFi network. - Connect your device to the
garagebot
network. Your device may immediately take you to the GarageBot WiFi configuration page. If not, open a browser and browse tohttp://192.168.4.1
. - Enter the WiFi SSID and Password of your local WiFi network and click
Submit
. - The GarageBot will save the new WiFi details, reboot and attempt to connect to your WiFi network.
- If the WiFi details were successfully registered and the device was able to connect, the blue WiFi LED (the second LED) will no longer blink and will remain on for as long as the device can access the WiFi network.
Once the GarageBot is connected to your WiFi, you can access it using the url: http://garagebot.local.
If for any reason you want to disable the WiFi functionality of the device, you can do so by following this procedure:
- Hold down the front panel button on the GarageBot and release it after 10 seconds.
- Any existing WiFi details will be cleared, the WiFi functionality will be disabled and the GarageBot will reboot.
- If the WiFi was successfully disabled, the blue WiFi LED (the second LED) will no longer be illuminated.
If you would like to perform a full factory reset and clear all of the configurations of the device, you can do so by following this procedure:
- Hold down the front panel button on the GarageBot and release it after 15 seconds.
- All of the existing configuration will be cleared and the device will reboot.
- If the factory reset was successful, all of the LED Lights will light up momentarily just before the reboot of the device.
There are five LED lights on the GarageBot.
This LED Indicates that the device is on. When holding down the front panel button, this LED will flash in an on-off
repeating pattern where each on-off
cycle is 1 second to assist with counting the number of seconds elapsed.
This LED indicates the state of the device's WiFi connection.
- Off: WiFi is not yet enabled
- Solid On: WiFi connected
- Flashing
on-on-on-off
: Broadcasting hot-spot for WiFi configuration
This LED indicates any RF activity or garage door remote activation.
- Solid On: Activating the legacy Garage Door remote via relay.
- Flashing
on-on-on-off
: Registering a new remote - Flashing
on-off
: Error while registering a new remote (most likely the remote registration count of 5 remotes has been exceeded)
This LED indicates whether the top sensor on the garage door can detect the presence of the door.
- Off: Door is detected (i.e. closed)
- On: Door cannot be detected (i.e. open)
This LED indicates whether the bottom sensor on the garage door can detect the presence of the door.
- Off: Door is detected (i.e. closed)
- On: Door cannot be detected (i.e. open)
If you want to integrate with Home Assistant then you can use the garage_door.yaml
configuration to create a simple cover
control.
Simply modify configuration.yaml
and add
cover: !include garage_door.yaml
If you want to integrate the garage door with Google Home for voice commands, follow JuanMTech's Guide on integrating Google Assistant with Home Assistant
If you want to contribute to this repo, feel free!
There are two main environments, the Arduino code that runs the ESP32 and the React web application that runs the WiFi control / setup page.
To work on the Web App you will need the standard Node.js kit to develop JS/TS applications.
- The app codebase is located in the
/app
path - This project was setup using the yarn package manager, but would still work using NPM if you prefer
- This project uses a custom webpack configuration for build / deploy
git clone https://github.com/dJPoida/garage_bot.git
cd app
yarn
yarn start
Browse to http://localhost:3000
to view the app.
Important note!: At the time of writing this documentation no device emulator existed. Therefore, the device must be running before the web socket will confirm connection and display the app.
If you want to publish new code to be served from the device, run the build task and the bundle will be created in the /app/dist
folder and automatically copied into the /arduino/garage_bot/data
folder for upload using the ESP Sketch Data Upload utility to the device SPIFFS.
yarn build
- REST API
- Provide access to activate Virtual Buttons from an HTTP POST endpoint (perhaps add credentials)
- Documentation
- Provide a BOM so people can build this themselves
- Improve CAD and Schematic documentation
- Improve contribution documentation
- Describe system dependencies for environments
- Provide device emulation documentation
- Create a Device Emulator for web app development