First of all, a big thanks to all the countless people that I learned from who put their projects on this website. It's definitely opened a whole world up to me. Before this I would have never used a soldering iron, or a multimeter, or gone to get resistors and switches from those Radio Shack drawers, or even think about what I could with a random piece of used electronics. Though I'm still a noob at a lot of the stuff that you all do (as you'll see in some of my handiwork), I feel that I've learned so much in the past few weeks and i really feel good about using so many items that I would have thrown away or e-cycled in the past.
Disclaimer: I know that some of this might seem a little Rube Goldberg-ish but I really tried to use what I had lying around first instead of going out and getting a dedicated microcontroller (which would probably have made everything a lot easier).
This project all started from the time someone had stolen my wife's beloved mountain bike right out of our garage. We live and do ministry in a sketchy part of town, but we had always forgotten to close the garage door (sometimes even all night). After that thief, I would constantly wonder if the garage door was open. I would drive away from our house, thinking is the garage door closed our not. Or before we retired to our bedroom, wondering if the garage door was closed, I would have to go back downstairs to double check.
So I decided I needed solve the following problems: 1) a way to monitor if the garage door was open or not, 2) if open, I would need to be able to open or close the garage door via the internet, 3) if open, an led would light up inside the house, 4) if open for more than an hour, it would be able to automatically text me or my wife stating that the garage door is open and 5) do it really cheap.
Old school network switch
Old laptop with a broken switch
Wireless 2.4GHz presenter mouse
Extra Christmas light leds
Tacky USB hub
Power supply from a unused car GPS unit
Old unused keyboard
Old Radio Shack wall power adapter
$1 bluetooth adapter from Meritline
Samsung HM-1100 Bluetooth headset
VGA, network cables
Using a Bluetooth headset to open the garage door - http://btmate.com/
Keyboard led controller - https://www.instructables.com/id/USB-controlled-mini-lava-lamps/
Using a mouse to relay a signal - https://www.instructables.com/id/Mouse-as-door-alarm/
Garage door indicator light - https://www.instructables.com/id/Garage-Door-Open-Indicator-Light/
Linux keypress to trigger commands - http://crunchbanglinux.org/forums/topic/5952/how-to-bind-volume-keys-with-xbindkeys/
Using sendemail to text - http://ubuntuforums.org/showthread.php?p=7084234
I took one of those old rackmountable network switches instead of buying a new 1U case and gutted it. I then took my old laptop that had a busted screen and mounted it inside the switch and hooked up some cables so that I could have plugs e.g. vga, sound, network on the outside. Before this I had never used linux, so I installed Ubuntu and Apache which people often reference as being the easiest for new users. I had my friend write up a python script for a webpage with a button that would simply connect (and quickly disconnect) with the bluetooth headset to open and close the garage door using the idea from www.btmate.com. At that website, the author takes a bluetooth headset and the "beep" that occurs when the headset is connected and uses that to generate a signal to trigger the garage door opener. The webpage also loads an image from the IP camera so I can visually tell if the garage door is open or not.
After this, I realized that even if the garage door is open we would never realize it if we were inside our house. The only way to check would be to bring it up on our phones or on our computers. It was then I decided that I needed an indicator light. I checked on Instructables to see if anyone did it and sure enough there were many hacks but all of them depended on using a long wire to check if a reed switch was connected or not. I needed something wireless. So I hooked up two reed switches to a wireless 2.4 Ghz presenter mouse that I had lying around to trigger a PgUp (garage door open) and a PgDn (garage door closed) keypress on the server. It was battery operated so I wired it up to using a 3V wall wart. I glued it inside an old broken router case to make it look more presentable and used the router power connector by scratching out the leads to the router and soldering it directly to the wireless mouse. So when the garage door opens, the reed switch magnet passes by first the PgDn switch and then the PgUp switch last (which indicates the garage door is open) and when the garage door closes, the reed switch magnet passes the PgUp switch first and then the PgDn switch last (which indicates the garage door is closed). I did this so that the wireless mouse isn't constantly sending the keypress to the server.
After figuring out how to write a bash script (I've never really programmed before. The last thing I programmed something was in Apple II Basic) and using linux "programs" xbindkeys and blinkd, I had the server capture the PgUp or PgDn keypress and write that as a variable in a text data file. Another script would check that data file (using awk), and if it was PgUp it would then blink the keyboard leds and start counting how long the garage door has been open, and if it was PgDn then it reset that data file and turn off the keyboard leds and wait for the next PgUp keypress.
Once the garage door has been open for 1 hour, the script would send an email to my phone using sendemail through the command line which will show up as a text on my phone.
I was a little hesitant to solder brighter leds directly onto the laptop motherboard, so I used an old USB keyboard (from an idea on Instructables about somebody using the keyboard led lights to turn on or off a lava lamp) removed the keyboard controller and removed the little leds for scroll lock. I found out that the keyboard controller was providing 5V into to each led and wired those up to some spare Christmas led bulbs (with resistors of course) that are mounted on the front panel of the garage door server.