WiFi enabled ESP8266 garage door opener using the Wemos D1 Mini and 2 relays
Description:
Garage door opener with basic HTML web page with 2 buttons that send GET request
to ESP8266 board to run functions. Each GET request has its own function that
is called aswell as a 404 error page. Get URLs can be called directly without
going through the web interface.
Variables
IPAddress ip(#,#,#,#)
: Static IP of device to request from router
IPAddress gateway(#,#,#,#)
IPAddress subnet(#,#,#,#)
const char* ssid
const char* password
bool doorOpen
: Current position of the door
bool lightOn
: Current state of lights
String webpage
HTML body
Pins Used:
Indicator LED | D1 | GIOP 5 / LED_BUILTIN |
Garage door relay | D2 | GIOP 4 |
Light relay | D3 | GIOP 0 |
Shortcuts & Android App:
For IPhone create web shortcuts to the IP followed by the get string to trigger
each function from the home screen.
For android I created a basic app using Tasker and exported it to APK to
be able to install on multiple devices.
Web interface:
Current static IP : 192.168.1.144
http://InternalIP/DOOR?
& http://InternalIP/LIGHT?
TODO:
- DONE - Make webpage more user friendly with larger buttons and display current door & light status.
- DONE - Find better way to store web page instead of all in one variable
- Put in proximity sensor or limit switch to detect open or closed door
- Put photo resistor to detect day light and turn light on at night when door is opened
Untested:
OTA updating abilities are currently untested but code is in there for possible
future use.
Hardware Setup
- 1x Wemos D1 Mini (or other ESP8266 board)
- 2x Relays
- Jumper/Dupoint Wires
Diagram
Images
Rough Layout. You can tell how rough this is. I am using a solder spool as an antenna haha.This is the top side of the final board that i attaced to the garage door opener.
Bottom side of the board
Bottom attached to the opener; yet to plug in the AC wires to the relay on the bottom side