Sonoff Basic R3 as a Dry Contact Garage Opener (Low voltage Safe Mode)

I broke the manual toggle button of one of my Basic R3s. As I was about to solder a new one, I thought about making a garage door (gate) opener out of it, in other words, a dry Normally Open contact.
I really didn’t like the pcb butchering method, so I went with the safe low-voltage way to just power the ESP portion of the switch.
An old Samsung phone charger although it states 4.75V on its label gave out a nice 5.058V on my RMS multimeter.

I then soldered the positive and ground cables to the 5V and Ground pins you see in the picture below

Chopped off a few plastic teeth off the tray so i wouldn’t pinch the cable with the pcb when closed.

and this is how it looks from the top

Now the Line in and and Line Out are your Normally Open Contacts.

Plug the charger on the wall, pair it with ewee link app, give it a name (Gate Opener for example).
Go to Device settings and under inching settings set the duration to 0.5 seconds.

I use AlexxIT’s Sonoff Lan add-on, so the rest follows this addon’s instructions.
Rename .sonoff.json to sonoffback.json (I always do that instead of deleting it, just in case something goes horribly wrong)
Configuration -> Server Controls -> Check configuration -> Restart Server

You should now see the new entity under the name you gave it (in my case Gate Opener)

Go to your lovelace UI and add a Button card with the enity you just created.

My code looks like this.

type: button
tap_action:
  action: toggle
hold_action:
  action: more-info
show_icon: true
show_name: true
entity: switch.sonoff_10009094a1
name: Gate Opener
icon: 'mdi:gate-arrow-right'
theme: slate
icon_height: 50px

Enjoy your new (safe-voltage) garage door opener.

3 Likes

Hey Luke,

It doesn’t matter which one. The two contacts are just N. OPEN and they simply “close” for as long as you set your inching time. I use it for my sliding gate too and 0.5s inching time is fine.

Luke, I m sorry but I guess I didnt understand the question. In my case I already had a simple push button with two wires that were coming out of my motor and onto my wall. I wired my Sonoff by splicing those two cables. The simple pushbutton will short the two wires for as long as you press the button. The Sonoff will short the two wires for as long as you set your inching time.

All good mate thanks for helping as I have no idea what I’m doing and not sure if it’s possible.

I have a sonoff R3 flashed with HAA and want to connect it to the gate motor to open the gate as an extra switch with the remote I have.

I originally had that switch ( the link I sent you) which has + and - and NO and COM and NC.
I had it setup as the keypad (image diagram) connected COM to COM and NO to O/S/C

How would I connect the R3 as my original setup? Or is it completely different to what you have done?

EDIT:
Sorry mate can only edit posts now, the home assistant community will fall apart if I write to many posts

I just connected it all up and the motor has no power when I disconnect the sonoff the power comes back. I did have a little trouble with ground solder to stick so might start there.

Or it might be HAA I have flashed

All good Luke. You have to connect one somoff terminal to contact 15 and the other to contact 16.

1 Like