With Instructables you can share what you make with the world, and tap into an ever-growing community of creative experts.
Tell us about yourself!
Raspberry Pi Garage Door Opener
does this have anything to do with the directories you are using? newer updates of apache moved the default directory to /var/www/html if I am not mistaken. I followed the instructions above and was able to get it working with only this small modification.
To update a little, I went on my laptop command prompt and did a ping 192.168.1.xxx and am not getting any packet loss at all so it can see that I am connected to the same wifi, but still get the 404 Not Found
To update a little, I went on my laptop command prompt and did a ping 192.168.1.xxx and am not getting any packet loss at all so it can see that I am connected to the same wifi, but still get the 404 Not FoundI have not connected it to my garage door yet, but I am assuming that would not be the cause. I suppose I could connect it to test this theory out though.
I had been wanting to make this project for months, and the wall switch for my garage door broke so that was my excuse to do this. I'm so excited to have a smart garage door opener. I made several tweaks to the code which can be seen on Github at https://github.com/JoshuaCarroll/Raspberry-Pi-Garage-Opener. Thanks for sharing your knowledge on this!
As kyle D, I get 404 not found error with the garage door opener website :/
I checked my Pi's IP address after doing the apache part like mentioned and I saw the "It Works" screen. Before I brought it out and hooked up to my garage door I went to check again and am getting a Not Found error. Any ideas how to fix this?
I am also looking for that same status notification. Thank you in advance!
Hi there. Thanks for the tutorial. I built something similar but I wrote the server code in nodejs. Since I start the node server at boot I could add the initialisation code for the pins (to make sure the door stays closed at startup) inside the nodejs script. No need for a separate bash file.
I've made it to Step 3, trying to get Apache and PHP but I'm running into errors. I said yes to allowing the 23.9 MD of additional disk space, then it asked if I would allow a number of packages to be installed although they couldn't be verified. I said yes, but it returned a ton of errors stating "Could not resolve 'mirrordirector.raspbian.org'." What am I missing?
THANK YOU for posting this - what a great system and guide! I built this two years ago and just had to re-build it due to an SD card failure. Mine wouldn't work until I added a "-g" to the two commands in the /etc/init.d/garagerelay scripts as such:# Turn 7 on which keeps relay off/usr/local/bin/gpio write -g 7 1#Start Gpio/usr/local/bin/gpio mode -g 7 outI vaguely remember having to do the same thing 2 years ago. You might want to edit the instructions to include the -g, which as you probably know tells the Pi to refer to the GPIO pin number, and not the "actual" or numeric pin number. Also, one other tip. The photos you show are for an older RPi Model A, which is fine. Personally I'm running on a Model B. You may want a note saying to refer to your own pin-out diagrams (and specifically the GPIO pins) if anyone is using a more modern Pi 2 Model B or B+, or even a Pi 3 Model B... Thank you again - I am running this to provide access to an entire Club so they can open the access gate from their phones via wifi when the RF-remotes won't reach the base station. Now... the next project is for me to turn it into an app instead of "just" a local web server! (Hah, that's what I said ~2 years ago too...!)
Also, I had to initialize GPIO as off, or zero, not 1 as in the example. After rebooting the relay was pegged and connected (causing the remote to trigger and open the gate), so I manually issued the gpio -g write 7 0 command, fixed the startup script with the "0", and rebooted to confirm that it worked... which it did! Thanks again, and I hope some of this helps others as well!
I will plan to create an instructable when I get time since it is too many details to include in the comments area. I will provide a link here when I have completed it.
Hi ChrisG212,Iam looking for the exact same functions. Any chance you could share yours ?Thanks in advance. - JesperR2
Oh Nice ! I'm looking for this too, can you share please ? :) - SofianeM3
Completed the project but just one little issue that I found.I have a LCD garage door remote that has time/temperature and light option and when I leave it connected to the garage door and when pressing the button through the web interface the relay clicks all the time but sometimes the garage door won’t open. When I remove the stock garage door remote wire from the garage door system everything works perfectly.I am assuming there is an issue with the flow of current and if I assume if I use a regular push button then it wont be an issue but in this case it is a LCD remote that has features on it and all running on one wire to the garage door. Anybody seen this issue and if so what did they do to fix it, I have a craftsman die hard garage door opener. Would I need an resitor somewhere?
I have a problem. when I type in: sudo chown -R pi:root /var/www into the ssh, nothing happens. no folder is created or anything :( plz help - shermy99
So I set up and follow the instructions to do the Garage Opener. When I got through all the steps I wanted to test it and make sure it was getting the power when pushing the button. So before hooking it up to the Garage Opener I attached a small LED light to the wires and it appears that the LED is ALWAYS dimly lit/on. When the button is pushed, the LED gets brighter. Should I be concerned that the Pi is always pushing out some power? - jake_tie
This is exactly what I am trying to do! Could you provide any more information please ChrisG212? Any help will be great
Thanks to the author for the great instructable, it really helped me get started! Additional tweaks I implemented were adding two reed (magnetic) switches to inform the pi when the door is either fully open or fully closed. My web page displays the status of the door in real time (via websockets), regardless whether the door is controlled by the app or other openers. I also have it send me a text message if the door has been left open for more than 5 minutes. I found node.js a good language to use for the software- it can host the website, control the door, listen to the sensors, send text messages and emails as you like when events happen, all from one running app.
Power spikes, line conditioner on the net router will help
That called endrush, its caused when a motor or valves are energized.You can get an in line filter/line conditioner from Radio Shack or electrical supply (MOV)
Your best bet is finding two terminals at the opener that are for a normal open button. There's no telling what they are sending down the wires to any kind of fancy wall button control module- it could even be some kind of data and not a simple open/short operation. If your model just doesn't have any other easy way to attach a normal button, your next best option (and this is a tricky one) is to figure out on the inside of the opener which relay is flipping to cause the motor to go. The rest of it (open vs close, stop when you hit the top or bottom) should be mechanically controlled-- between the fancy controller parts and the mechanical up/down/stop/start parts should be a single relay (maybe two) that kick off the open or close procedure. If you can find those (look for relays, measure their input voltage when the system is doing different things) and if you can control power to those externally (note that they likely are 120v coils so please don't kill yourself) then you can control the up/down. This will void your warranty. Don't operate appliances of any kind with covers removed. 120 volts is enough to kill you if it hits you the right way. And remember kids, have fun!!
Here's the thing about GPIO ports on a pi, or an arduino, or just about anything that has a GPIO port. They [typically always] start up as INPUT, not OUTPUT, which means they are waiting for you to ask if they are "high" or "low" (3 volts or 0 volts, or 5 volts or 0 volts usually, this depends on what system. High and low can mean a lot of different things here, but low is almost always zero volts referenced to the other voltage.) Let's say that for the purposes of explanation our system uses +3 to mean high and 0 volts to mean low. Since the pins are just sitting there waiting for you to ask if it's high or low, they don't have 0 volts on them and they don't have +3 volts on them either, they are what we call "floating". Now sometimes, it will be closer to high and sometimes it will be closer to low, but there are a lot of variables that can affect this (like static in the air even!) so if your relay knows to turn itself "on" when it sees 0 volts (low) and "off" when it sees +3 volts (high) and your pin is "somewhere between 0 and +3" then it might be close enough to one end to turn it on or close enough to the other end to turn it off. So it doesn't matter if you use the NC or the NO, even if you reverse the logic in the software to make one way on and the other way off, you're still going to have this "I'm not in an output mode yet so I'm somewhere between high and low" problem and you're not really going to know for sure if the relay is going to be on or off. For our purposes though, we really should have it set up so that the relay is off *most* of the time, and just clicks on to "press the button" as it were.The way we fix this, in electronics terms, is to "pull it down" or "pull it up" with a resistor. That's the fancy term, usually a "pull-up resistor". It sounds complicated, but the reality is, you just connect the pin over to 0 or to +3 with a resistor. Just about any resistor will do. The resistor will drag that pin "high" or "low" (depending on if you connected the other end to high (+3) or low(0) when the pin would otherwise be in a floating mode. A lot of relays have a pull-up resistor built in, a lot of systems with GPIO pins have a way to "turn on" a pull-up resistor built into the hardware so that you don't even have to physically wire one in. But what about if the resistor is pulling your output pin to +3 and you need it to go to 0? That's easy, when you "write" to the pin and tell it to go to 0, that 0 has a resistance that is much much less (like, about 0 ohms) than whatever resistor you've put in so your resistor basically does nothing. It's like you trying to whisper to someone at a rock concert. (your whisper is the pull up resistor and the concert is the near zero-resistance connection that the system made when you said to go LOW.) Then when you write to the pin and tell it to go to +3 that resistance is also much much less than whatever resistor you've put in so it ignores the resistor then too. So the only time your pull up resistor does anything really is when the pin is in a state where it isn't high and it isn't low (remember, when it's "floating?") so that resistor prevents the float.In the author's case, it seems like most of the time (enough of the time) his float is in a certain direction so he's just counting on that to not change. But you really need a pull-up (or down) resistor (or a way to enable one built into the pi?) to make for sure you know if that pin is high (+3) or low (0). On another note- if you're going to try this, you really need some basic security on the web server running on the pi. I guess if your home wifi is secured with something real (not WEP!) then that's a good start but you're basically giving access to your garage door to anyone with your home wifi password. Or anyone who plugs into your home wifi... which would probably be someone inside your house already... but this really should have an extra layer of security. I'm not a pi wiz or an apache wiz but since we're talking ethernet and mac addresses there's probably a not-too-complicated way to tell the pi not to talk to anyone except your known devices, by mac address. (mac addresses can be spoofed, but that takes more work than anyone who wants access to your garage is going to do unless you're keeping gold bars in there?)If the pi uses 5 volts on it's GPIO (but I think it is 3) then change every +3 above to +5! :)
I think, but don't quote me, if you used Pi GPIO pin 5 (wiring pin 9) instead of GPIO pin 7 (wiring pin 7) you wouldn't ever have the issue at all, because that pin has a fixed 1.8 KOhm pull up resistor on board.
This system needs a pull up resistor between the output pin(s) and pin 1 on the pi (3v3) to pull that pin high when the pi is starting up. That will fix the problem. Your step 6 will probably work about half the time. (if it works every time for you, there's someone else in the world that will find it works none of the times.)
Perhaps you got the PI pin's mixed up, the code look for input related to pins and then use that to fire the relay, each one have number, in my case 1 and 2Some time back I made this now, but Im happy to share my files with you if you need,
Works great! Just wish it would work outside of my WiFi. I don't want to open any TCP ports for security reasons. Great project!
I have not hooked up the relay to the garage door yet but have the relay triggering on my workbench when I push the gray button. Then I read this statement in the "Some Technical Notes" section. (It will still only work when your on your home wifi though )Will this not work from anywhere? Thanks
does anyone know how to change the code for raspberry pi II? I have the raspberry pi 2 and what file do I go into to change the PIN numbers? - JoshS95
Hi everyone. I have this project done but can't get the garage door to open. When I hit the button on my smartphone I can see the wifi adapter light activate as well as the indicator light on the relay. I do not hear the relay click when this occurs. I am using the provided canakit 2.5 amp power adapter so i dont think this is an issue of lack of power. Your input and ideas are welcome Thank you - imjustapiboy
I receiving the following messageNot FoundThe requested URL / was not found on this server.Apache/2.4.10 (Raspbian) Server at 192.168.1.XXX Port XXnot sure what i am missing everything went well until i got to test the page
Most relays including the one I purchased, operate like this - when the signal is ON the circuit stays off. When the signal is OFF then the circuit is on.I'm totally new to this and don't understand this part. I assume you have either NO or NC terminal connected to the garage door opener. If normally when the signal is ON, the circuit stays off and vice versa, can't you just switch the garage door connection from NO to NC or NC to NO? - ShunY1
I need the software package/code for raspberry pi 2 version 1
See step #6 for explanation and potential solution.
Can anyone tell me why this happens. If the power in the house blinks, or goes out and comes on later, as the RasPi reboots the door will open with out a command from me. There have been times I come home and garage is open and i didnt do it, but can see the power blinked or went out.
What is the difference between your relay module and this one? other than the obvious 2 additional channels?http://www.microcenter.com/product/437826/4_Channe...Can I use it in the same fashion as you have without the need of additional power sources or other parts? Yours seems so simple, but I read others who used this part had to provide additional transistors and what not.
Join 2 million + to receive instant DIY inspiration in your inbox.
Download our apps!
© 2016 Autodesk, Inc.