Monitoring And Controlling Your Garage Door From Afar With An IP Camera

remote-control-garage-door

Last year, [Mark Simonelli’s] wife asked him if he could design something that would allow her to remotely check if their garage door had been left open. [Mark] jumped at the chance to tinker with electronics and designed a system around an old TrendNet IP camera. When remotely connected to the camera using IP Cam Viewer Pro for his Android phone, [Mark] could watch the video stream and also trigger the garage door opener via a small relay circuit he built.

His remote opener worked well, but his camera unfortunately lacked any sort of IR vision/low light capabilities. Since his camera wasn’t very useful in the dark, he decided that he needed to add some way to trigger a light when remotely monitoring his garage. He figured the best way to do this would be to control a power strip-connected light using a circuit similar to the one he built to open the garage door itself.

He stopped by the hardware store and picked up a cheap power strip, disassembling it and removing the power toggle once he got home. He fitted it with a small 5v relay, which he connected to the camera’s terminal block. While he admits that it might not be the absolute safest solution, he can easily control both the light and the garage door with a simple swipe of his phone’s screen.

Continue reading to see his remote controlled power strip in action, and be sure to swing by his site to see more details about his camera-controlled garage door opener.

[youtube=http://www.youtube.com/watch?v=GhQDw3Gr34Q&feature=player_embedded&w=470]

41 thoughts on “Monitoring And Controlling Your Garage Door From Afar With An IP Camera

    1. Andrew,

      Doesn’t a reed switch need a magnetic field? How would you have used it?

      The point of my circuit was to send a pulse on a positive edge. If the relay stays energized (or if the switch stays closed), then the switch at the door won’t work.

      The Cam Viewer Pro app on my Droid has a garage door function that toggles the relay (which is cool), but this doesn’t assure that control from the IP camera web page will work.

      1. Since you ask…

        Yes, a reed switch needs a magnetic field to work. The magnetic field is provided by a magnet. Attach a reed switch to the door frame. Attach a magnet to the door such that it is next to the switch when the door is closed. Connect the one end of the reed switch to a PC serial port input line such as CTS, and the other end to GND. Now write a tiny program to monitor the state of CTS and send it to the internet.

        If you use a microswitch, positioned so that it is closed when the door is closed, you don’t need a magnet.

      2. Ah, that’s only half of the problem.

        Hook up your relay circuit to a serial port output (such as RTS) and write a program to pulse this line to activate the garage door.

        Naturally I am assuming you have a PC connected to the internet somewhere in the house. I am also assuming that the original project was to detect if the door was open, however, feature-creep has turned it into ‘detect if the door is open and allow it to be closed remotely, plus, take a picture of the inside of the garage and let me turn the light on if it’s dark so I can see’.

    2. And how would that work from over an internet connection? I think you failed to grasp the concept that this is REMOTE. He can’t move a magnet to a reed switch when he isn’t there.

      1. The movement of the door engages the switch. The hack reads the status of the switch, via the camera, which (if equipped with relays) also typically includes logic inputs.

    3. Yes, but then the light will be on when it doesn’t need to be, wasting power, and I don’t know about the camera but it seems like you would need an arduino as well, using more power.

      1. Which part of “Last year, [Mark Simonelli’s] wife asked him if he could design something that would allow her to remotely check if their garage door had been left open” involves using a light?

      1. What part of written English does not involve including a synopsis as beginning of the first paragraph?

        Stated project goal: Design a system so that the wife can tell whether the door is open or not.

        Mark devised something that does this, but it is rather far-reaching. A switch would do the same thing.

    4. Ahh, so you think an LED on wired would be good enough to remotely check, say, if she was shopping or at work? I don’t think so. And if you exclude parts of something and don’t take it all into consideration you really need to rethink that. Why focus on one small, and useless thing rather than what the project is now.

    5. Yes indeed cutandpaste has a point, a reed switch+magnet at the door’s edge that was read and fed into the cam’s logic input would also work to tell if the door was closed, and perhaps later mark will go for that option since I understand the cam only has two outputs so if he comes with another idea that needs output then the light thing can be sacrificed then and those outputs re-used.

      But for now this works too and it’s sort of neat to be able to turn on the lights you have to admit, and it keeps away the burglars too.

      come to think of it, you could also use the combined outputs of the cam to multiplex and create a selector and emulate many more outputs, use one output to select which relay and the second to switch the selected relay, while the cam sees what is selected at any point.

  1. Nice work.

    I picked up an Axis P1343 for an absolute song on eBay (obviously, the guy didn’t know what he had) and wired up something similar. In my case, I bypassed the SMD push button on the direct-powered remote and replaced the contacts with two wires on the GPIO relay out. To turn the light on without opening or closing the door, I wrote a 2-line script that toggles the output twice in about 300ms.

    My door opener instantly activates the light but waits ~1000-1500ms before actuating the drive motor, so I guess that I was able to cheat on that part, too.

    Additionally, the camera has an IR Cut Filter with an effective night mode and the ability to perform on-device cross-line detection. While the (actually decent) The cross line detect is great for catching shots of neighborhood cats when my SO forgets to close the door.

    On the Axis, running embedded Linux on the onboard ARM with nice API is helpful, but it would also cost more if I paid retail.

    Either way, good job on the build.
    Why buy a dedicated device with an expensive monitoring/remote access subscription when you can roll your own far cheaper?

    Great work.

    Also, a coworker uses a setup similar to mine, though he uses onboard the Axis API to perform object detection and ID which car is in the garage. He has a three-car setup, three cameras and three daughters with different colored cars. Regardless of which bay they pull into, the camera identifies the color and sends a different email with an image cap so that he knows who returned home when. A bit anal, but nifty, I suppose.

    Keep up the good work!

  2. I think an Arduino is over kill. A TI Launchpad with a serial Bluetooth connection would be plenty to operate the door. Then simply get a DD-WRT enabled router with a serial port (maybe a few USB even). Hook up a second serial bluetooth dongle (in master mode, with alternative firmware). Setup a simple ssh/telnet/php service on the router to login and control if from any number of already made apps.
    Bluetooth: http://www.goodluckbuy.com/serial-bluetooth-rf-transceiver-module-rs232.html
    TI LaunchPad: http://www.ti.com/tool/msp-exp430g2#buy
    serial+2 usb 2.0 port DD-WRT router: http://www.geeks.com/details.asp?invtid=F7D7301&cat=NET
    So thats 2 Bluetooth modules, 1 TI LaunchPad and a Belkin router with a total price of: $62.85 excluding tax’s and possible shipping fees.

    Not a bad price for a start out home automation system with plenty of room to expand for cheap.
    Of course if you could manage to get your hands on a Raspberry Pi that could substitute the router and a Bluetooth module, not to mention give a processing/RAM/Ports boost over the router. you would end up saving even more.
    home automation is getting cheap enough for anyone to afford it.

    I really love this post because it gets me excited about the future. Thanks for all the work!

  3. Is the goal really to detect door-up or door-down? If so, Mark needs to discover the beauty of roller switches. Or reed switches. Or…

    If so: All this hack, to save the expense of a switch.

    If the goal is to see in the dark: The CCD may or not have an IR filter in front of it. Aim an IR remote at it, see if detects sees bright flashes, and then add a few meager Watts of IR LEDs to illuminate the garage.

    If it does have an IR filter, remove it, and add LEDs as above.

    Optionally: Switch LEDs on/off using camera’s contact closures.

    No big deal, and better/simpler/maybe even cheaper than switching visible light(s) on which will scare the hell out of any intruder to such an extent that you’ll never see a clear shot of their face.

    End of hack.

    1. If you’ve ever been involved in one of the ad hoc “what I need” projects, you’ve probably seen that the original goals sometimes change as the project evolves. In this case, I think Mark was wise to use a piece of hardware he had laying around (unused) to fill a need. Such is the essence of Hackaday!!

      Are there better solutions? Sure. Is his solution best for others? Maybe, maybe not. But it works and it meets a need and it does it in a gloriously hacky way. Most of all, he was willing to share it with us.

      Congratulations, Mark.

      1. ^^^^ This.

        I’m sure MacGyver’s life would have been a whole lot easier if he could have ordered the exact parts he needed from digikey, but that would have made for some boring TV. Use what you’ve got!

  4. Is it taboo to state this companies name? I started reading the over complicated ideas, I’m not saying this is best solution, but its by far the easiest.

    X10, they have a garage door opener system. I use it and it works fine, the open/close sensor leaves a lot to be desired, so pick up one of their wifi cameras, not sure how much it would cost, but its sub $200. Might be worth it, depending on how valuable your time is.

    I don’t use their application, I wrote a php page to do the same thing, except the sensor because it never seems accurate for me.

  5. ZoneMinder on Linux with a 4-port NTSC card. Standard video cameras are cheaper. One machine, which can be used for other things as well (FTP, alarm system, whatever).

  6. I have a wireless camera. i hated that i couldnt tell if it was up or down at night with the light off. So i put two bycycle reflectors on the door and the IR from the camera bounces back very well from the reflectors. it may be a dark picture, but there are two very distinct white dots(b&w camera) in the middle of the screen. that way i know the door is down even with the lights out.

  7. Is it secure? I haven’t looked at IP cameras in a while but they used to all use http. In other words your password (as well as the video stream) is wide open to anyone with the widely available (and free) software to sniff a tcp stream.

  8. I did’nt read every comment, so don’t know if this was addressed, but my Garage door opener wallswitch has a button just for the light. I suppose you could cycle this just as you do the open’ close switch, if you just want the light while looking with the camera. Thanks for posting this useful device.

  9. andrew i am a co-owner of a garage door company in wisconsin and i have had a lot of people ask me about putting a camera on their door and be able to program it remotely especially when i comes to deliveries to their high dollar homes. i was wondering if one you ever thought about taking this idea further and also how you would feel about helping us out with that kind of idea? if you could email me id greatly apreciate it.

    thanks nate

Leave a Reply to JayCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.