Cheap Smart Garage Door Opener
Introduction: Cheap Smart Garage Door Opener
Credit
I pretty much copied Savjee's implementation but instead of using a Shelly I used a Sonoff Basic. Check out his web site and YouTube Channel!
https://www.savjee.be/2020/06/make-garage-door-ope...
https://www.youtube.com/c/Savjee/
Assumptions
* You have a Home Assistant instance running and you know how to use it
* You have a ESPHome instance running and you know how to use it
Supplies
Sonoff Basic - https://www.amazon.com/Sonoff-Remote-Control-Comp...
Contact Sensor - https://www.amazon.com/gp/product/B07F314V3Z/ref=...
USB To Serial - https://www.amazon.com/gp/product/B00IJXZQ7C/ref=...
Heat Gun - https://www.amazon.com/gp/product/B00IJXZQ7C/ref=...
Soldering Iron - https://www.amazon.com/gp/product/B00IJXZQ7C/ref=...
Heat Shrink Tubing - https://www.amazon.com/gp/product/B00IJXZQ7C/ref=...
Wire - https://www.amazon.com/gp/product/B00IJXZQ7C/ref=...
Wire Sleeve - https://www.amazon.com/gp/product/B00IJXZQ7C/ref=...
Dupont Cables - https://www.amazon.com/gp/product/B00IJXZQ7C/ref=...
Software:
Home Assistant - https://www.home-assistant.io/
ESPhome - https://www.home-assistant.io/
ESP Easy - https://www.home-assistant.io/
Step 1: Modifying the Sonoff RF R2 Power
DISCLAIMER
I am not an electrical engineer and do not pretend to play one on the internet. If you decide to modify a Sonoff Basic you are doing it at your own risk. This is how I have modified my Sonoff Basic but do not recommend that you do the same. I am also not implying that I am doing it correctly or safely.
Getting started
<PERSON> makes a good point in his video about it not being safe to modify this version of the Sonoff like the previous version by cutting the trace. See more here. The solder connection for the relay and the solder connection for the fuse that supplies power to the circuitry are too close to do the cutting trace method. I got around this by removing most of the trace and relocating the fuse.
1. 33
Locate the fuse that supplies power to the circuitry
2. Location where the neutral wire in soldered onto the inlet
3. Desolder the fuse, remove, and set aside
4. Desolder the neutral wire from the inlet and remove
5. Cut out the trace as seen in the photo on step five
6. Cut out a notch as seen in the photo on step 6
7. Solder the fuse the opposite way you took it out and solder the long end to the line inlet
8. Strip the neutral wire and solder it to the board as seen in photo on step 8
Step 2: ESPHome - Creating the Software
A switch to configure the relay. This will be internal so that it isn't directly exposed to Home Assistant.
switch:
- platform: gpio
pin: 12
id: relay_1
name: "sonoff_basic_4_switch"
internal: true
We will need a binary sensor for the contact sensor that will tell us if the garage door is closed or open.
binary_sensor:
- platform: gpio
pin:
number: 3
mode: INPUT_PULLUP
name: "Garage Door Contact Sensor"
id: contact_sensor
internal: true
filters:
delayed_on_off: 500ms
We can configure the button on the Sonoff to toggle the relay.
- platform: gpio
id: button_0
pin:
number: 0
inverted: True
mode: INPUT_PULLUP
on_click:
then:
- switch.turn_on: relay_1
- delay: 500ms
- switch.turn_off: relay_1
Finally, a cover with the attribute garage. 977