One of the first things I actually automated in my Home, was the garage door. Making your garage door “smart” makes a lot of sense because there are some useful things you can do with it.
To Smarten up your garage doors you’ll need:
- Sonoff SV https://www.itead.cc/sonoff-sv.html
- Reed Switch http://a.co/6qMTS35
- USB cord and wall plug or some other power adapter
- Jumper wires http://a.co/0htfCkL
- Soap dish https://www.walmart.com/ip/iGo-Travel-Soap-Holder/13814222
- There is soldering involved. No way around it on this one
Garage SV setup
- Open sonoff.ino
- Set a project name and your Wifi and MQTT info in user_config.h
- Upload Tasmota
- Find the IP address of your new Tasmotized Sonoff (you can look in your router)
- Put the Sonoff IP address in your browser, go to Configuration Configure Module and and change the Module Type to Sonoff SV. Save and it’ll restart.
- Go back into Configure Module and set GPIO 14 to Switch2 save and it’ll restart again
- Click Console and type: switchmode1 0 and then switchmode2 2, restart one more time
Now we’ve got some work to do in Home Assistant
- Open configuration.yaml
- Make a heading called “cover:” and paste these lines
– platform: mqtt
- Under Customize: set the device class and give it a friendly name
friendly_name: Justin Garage
- If you want to make a card that says Garage Doors instead of Cover then open your groups.yaml. If you don’t have one just create and new empty file with that name and past these lines.
name: Garage Doors
- Save both config and groups. In Home Assistant UI check the config and restart.
- Now go to the Automation editor, make a new automation. The trigger is the MQTT topic that fires whenever the relay is turned ON. The action is to turn it back off after one second. Save and reload Automations.
Now the hardware setup:
- To isolate the power to the ESP chip from what’s being switched by the relay, use a small screwdriver to pop the 2 resistors.
- Solder 2 lengths of small wire, one on the Input + and one on the output +, these wires will connect to the switch contacts on your garage door motor.
- Connect female end of jumper wires to GPIO 14 and Ground. These are going to the reed switch and will tell you if the garage is open or closed.
- Use a USB cable for power. The red wire is + and the uncovered wire and the outer metal sheath are negative.
- Connect those to female jumpers and plug them into + and – for the ESP chip.
- Lay it out. Connect the reed switch, power up the board, and open Home Assistant.
- Move the magnet to test the reed switch
- Click the open/close buttons to check the relay.
- If it all works it’s time to install
I put mine up near the garage motor. You don’t have to do it this way.
- Mount the reed switch. I put mine on the track and the magnet on the top of the door. Took a few tries to find something that would keep them connected. There’s a lot of motion on that track.
- Find the contacts for your open/close button. Connect the wire from the input side of the relay to one contact, and the wire from the output side to the other. It doesn’t matter which.
- On my garage door those wires are 12v.
- Connect the +/- jumpers from the USB cord, for power to the ESP, and plug it in.
- If all went well you’re done!
- Automations to check the garage door at a certain time. Refer to other video. Make sure names match.
I’ve tried to do presence detection to open the doors as I pull up to the house. But it hasn’t been very reliable. If anyone has a good solution I’d love to hear about it.
So there it is, from the ashes of a failed battery button comes the SV garage door Phoenix.