Open/Close Garage Door

I have a well-developed Photon based IoT alarm system which is completely controlled through my iPhone. Yesterday I forgot to set the alarm as I left, and while at Lunch I realized it was off. When I tried to turn it on I immediately received a text that the garage door was open. Therefor my post. I want to add a feature to open and close the doors, most likely by tying into the manual switch button rather than via the ‘clicker’ system. My question is how to best accomplish this, i.e. a sample circuit, preferably without a relay.

My system is licensed under GPL and both hardware and software is comprehensively documented at My typical (preferred) sensor connection is via 1-wire, such as a GPIO port on a ds2406 type device. I therefore most likely will use this device, with one of the PIO ports to control the switching of the ‘button’ and the other to read the door sensor. The door sensors are currently in place and read with a ds2413, but both garage doors are tied together and reported as one sensor. I may leave that for alarm reporting and add the new feature with everything new. In the past I have used the ds2406 to drive a transistor and relay to switch a siren with 100% reliability so could use that but would like to avoid the relay and the required power to switch it. If the 1-wire device can switch the ‘button’ through a FET or some such circuit I won’t require anything extra.

Has anyone done this? I’d like to hear your ideas, but what is fixed in my plans is to switch the button via a 1-wire GPIO port.

Your going to need more info. Is your button low voltage DC or AC ? How much current does the close state need. I.E. have you used your AC/DC meter and measured the current it takes when you press the button. If you dont want to use a relay and want to do this via a semiconductor you will need to know these 2 things.

The door opener is Sears, and the ‘button’ contains a circuit board with an indicator lamp which stays lit until the button is pressed. With opener disconnected the resistance across the contacts drops to zero upon button press. With the opener connected the voltage across the contacts is 10 VDC. The current through the opener circuit is 20ma when not pressed and 30ma with button pressed.

You could use a transistor like you did before and tie the Emitter and Collector across the switch, but the issue there is that your going to be connecting the GND from the garage door to your system which is not a good idea.
It would be better to take your 1-wire GPIO pin to an Optoisolator, and let opto transistor / fet side close the switch for you.

You say preferably without a relay. The simplest method in my opinion actually is: use a relay over the manual switch button. This is how I do it in my home…
I’m using a couple of these in my setup:

They are very cheap and function well… Only need one to connect to your switch and your done… I solder the wire that comes with it directly to my photon and than use code like this for my firmware of my photon.

int switchrelay1(String dada) {
    return 1;


1 Like

Thanks for all of your input. I think I will probably go with a relay as it seems most robust and eliminates any grounding issues. I still have design unknowns, for example should I include a one-shot multivibrator so that it can handle the timing of how long the ‘button’ is pressed within the control hardware. My alarm system already includes a ds2406 type device used as a switch. All the devices are in a std::list and the main loop scans all of the sensors which are configured to require a scan, i.e. door sensors, motion detectors, thermometers which have high or low values set, etc. The design is to not introduce any delay in this scan since there can be dozens or hundreds of sensors, and they are read about every 1/2 second. Complex tasks such as this, where I don’t want to push the button to close the door if it is already closed, or open the door if the alarm is set, will be implemented as a C++ class with methods which mirror the physical logic requirements to the actions they are intended to model. My photonMasterRemote is moving into the home automation space.

Hey There,

I did something similar in my old house (since sold, system decommissioned). Here are the details:

Let me know if this helps,