Monitoring and controlling your garage door from afar with an IP camera

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.

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.

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’.

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.

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.

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.

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!

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.

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.

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.

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.

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.

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.

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.