Question Pi garage door security and opener


Jul 23, 2011
Has anyone built a locking device and garage door opener controller using a Pi, Arduino or similar?
I have an up and over door that I securely lock internally with a couple of gate bolts at the bottom that shoot out to either side of the door frame to prevent the door being pulled open from the bottom. I have got a 24V electric actuator with a 100mm range and 24V power supply that will be used to replace the gate bolts to lock the door. I will then fit a Chamberlain or similar door opener to actually open the door. I have CAT6 to the garage and a POE switch so am looking to control both via my mobile phone over the internet. I want to have the door locking operate and give "open" feedback via a micro-switch so that the opener can then open the door as needed. Similarly I would look to shut the door with the opener and then as needed lock the door with feedback from another micro-switch. I have a Pi 4 with 4GB of memory that I use for a Pi Hole, not sure if I can use that as well for the control of this, or should I use a Zero with a header or another Pi local to the control panel for the door. If its local to the unit then I want to power it with the POE from the switch as well as use the ethernet for the control coms. I could do with some sort of program that can be altered to suit as well as programming is not something I have ever been able to get my head around.
Any pointers would be really appreciated.



Not real sure, full disclosure, about all of the details regarding your plans.

Sounds interesting.

I just googled "How to activate switches with a Raspberry Pi" and the search returned numerous and varying links.

Give that sort of a search a try and then modify search words and phrases to narrow down to results matching the information you seek.

Snap example:

And I believe that using Python is would be a good coding choice.

One side note: Plan for power outages. You mentioned a 24 volt power supply but if that power supply is reliant on public power then, without some UPS, you could be locked out.


May 18, 2019
My approach was different, I have an ISY994i that I use to control my house. I use its cloud connection for the cell phone link. One dry contact switch needed to control the garage door costs more than an RPi! So yes, you're on the right track. In fact, it's easy, particularly if you have the cell phone link already worked out.

Yes, your Pi Hole RPi can do the job. You'd use one input with a micro switch (roller arm) to check the state of the garage door. I mounted my switch to the chain bar of the garage door opener and let the traveler trip. Getting the switch in the right place, especially for you, is important.

One output would be for triggering the garage door. Connect this output to a relay. the Use the outputs, Normally Open (NO) and common. to connect to the same place as the switch in your garage. You turn on the relay for about 1/2 second, then turn it off; just like you do when you press the switch in your garage. Don't forget that pressing the switch does different things depending on the state the garage doo is open (Open, Closed, Opening, Closing)

Another output would tell your 24V Actuator (solenoid) to do its thing. You should use the type of solenoid that changes state on a pulse. If you have the kind that only extends when power it, you'll be using a lot of electricity, Like 100W! (~ 2.5kWhr/day x 30 days a month x 20¢/kWhr = $15/mo) Now, if you flip the actuation so it retracts when energized, the energy use is negligible), But, as Ralston18 noted, you'll be locked out if the power goes off. That shouldn't happen often, so not a big deal.

On the PoE for the RPi. The RPi is a power hungry little sucker. Even if your PoE switch provides 3A, it's the voltage drop that will kill you. 24AWG is 0.026Ω /ft hopefully, your PoE use both extra pairs so that's now 0.013, therefore 10' @ 3A has an IR drop of about 0.4V! RPi's don't like that. Wait! that's A's coming AND going so the drop for the plus wires is 0.4V and the minus wires are also 0.4V, so the total drop is 0.8V ... really don't like that. You could still use PoE, but you'd have to inject the power with a power supply and tweak it for the RPi. You might try a 24VAC to 5VDC power supply, put the power supply next to the RPi and inject 24VAC to the POE. Your 24VAC transformer will need to be: 1A for RPi, + 3A for each solenoid = 160VA minimum

Hope it works out for you.