Today we received the question,
“How to control a web cam via internet,
i want to use it for security reasons, always out of the house and my PC connected want to open the cam from time to time to checkout if something wrong!!”
– [Mohamed Saleh]
What a fun project we thought! And so many different ways of tackling it. Find out what we suggested to [Mohamed] after the break.
Initially we wanted to create an extremely complicated setup, using a USB camera, server, webhosting, and a ton of scripts/programming to create a rather sweet camera setup.
But of course, complication breads problems, and while digging through our box of parts and supplies we stumbled upon an old Axis 206 IP Network Camera. What could be easier than all of the above built into one slick device!
The camera comes with an Ethernet cable, wall-wort for power, and a CD with instructions – we just threw the latter away and winged it, by finding out how to reset the device, then its default ip, we had view of the camera within our network in no time.
A simple port forward of 80 and we could view it outside of our network (so long as we typed in our IP). What we would recommend however, is setting up a DNS (DynDNS is great) service on a computer within the network that points to the cameras IP. That way the URL becomes http://www.HADCamera.com, a lot easier than 249.135.184.204:80. (Both are fake URLs sorry).
Taking it further, if you had a computer nearby you could setup a simple stepper motor and control the position of the camera.
This is of course our take on the matter and part of Ask HackADay is what our readers would do, so how would you setup a home security camera?
Must not be getting very many Ask Hackaday submissions.
Anyway, on the subject of buying something off the shelf, the Rovio works as a pretty good IP cam and you can also drive it around. About $100 these days, Hackaday covered the Woot sale a while ago.
WowWee has been stonewalling on the sourcecode for the Rovio the past two years. However, last week I asked nicely and they finally released the code: http://www.robocommunity.com/download/17502/Rovio-eCos-Code/
I would go the harder route. Since I love python, and its super easy for web programming, I would write a server script that shows the images from the webcam. Python already has several library’s for webcams, and even more for web support.
Or if it needed to be a quick setup, I would find a cam-chat site, make a privet profile, and use the site for monitoring needs. My uncle went this route to check on his daughter after she came home from school while he is at work. He said it works great.
I would use zoneminder – not because its 1337, but because its linux awesomeness and free – also does recording and can notify you of motion detected.
http://www.zoneminder.com/
Is it actually the true spirit of the whole project to go out and buy an ip camera that does it all already for you?
I think it would be far better to have the pc and an existing webcam and have the python scripts to capture the images and then host them on your own webserver
is this an ad?
Spy on the cat in 6 easy steps:
1) Ubuntu
2) Camorama
3) DynDNS
4) SSH tunnel
5) VNC
6) Profit.
This is just sad. What is the point of asking HaD when they are just going to tell you to use a commercial product? It started out good, until this part:
“But of course, complication breads problems, and while digging through our box of parts and supplies we stumbled upon an old Axis 206 IP Network Camera. What could be easier than all of the above built into one slick device!”
Seriously? If this had been a comment left on a HaD post about putting together your own networked camera, it would be considered trolling. This is absolutely counter to everything HaD is about. If every project followed this line of logic, we wouldn’t have any content on this site.
You might as well rename this to “Ask Google”, since that would have given you the same answer.
Um…I buy the costco 16 channel one with h.264 and then I read the instructions and pray hackaday would get a clue.
I suggest checking out Yawcam – http://www.yawcam.com/
I’ve used this to turn cheap USB webcams into security cams
“breads problems”
*breeds problems
otherwise an excellent article, more please!
I’d suggest any usb cam and an account with http://www.logmein.com, for those desiring the most simple approach of course. (Plus the benefits of logmein!)
I like to control people’s network cameras for fun. There are quite a few unsecured ones in Japan…
I’m sorry, but I have to agree with MS3FGX; getting a pre-made camera is the opposite of an hack.
Anyway, nice tip, Steve – I’m installing ZoneMinder in my headless server right now. And according to the docs it has scripting support, so I may be able to set up a warning system using SMSes.
Unfortunately, although I have 100 free SMSs per month in my provider’s website, they use a captcha, which is fucking stupid since they use authentication too.
http://cgi.ebay.com/Wired-Security-Internet-IP-Camera-IP-Cam-Webcam-10-LEDS_W0QQitemZ220537075001QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item335908b539
this little bugger is amazing just got one for myself. little arm linux computer with 2 stepper motors to control pan and tilt. got mine for 39 dollers uses USB camera!!! spair USB header for internal wireless card. Working on some amazing ideas with this little guy. nice to have 2 USB 1.1 ports serial and ethernet. oh yea plus 2 way audio!
I VPN into my Macintosh remotely, then run “Photobooth” or any other application that shows a webcam preview. Since you can see the desktop, you can see the video feed, too.
If it’s a fast connection, it’s pretty good, and it’s free (assuming you have a camera already).
I once duck taped a usb web cam to the turret of a USB controlled toy rocket launcher. I used skype, configured with video and auto answer to view the cam. Then controlled the rocket launcher by logging in with gotomypc and just running the little aiming application to point the camera where I wanted to look. No, I did not shoot the little rockets at the cats. Kids, cats, and the wife thought I was really weird, though.
I use Vitamin D, it has free and pay services. Uses your existing camera and I can set up my laptop PC to capture any motion or just people using Vitamin D and email me a pic of the intruder.
All you need is a $20 webcam and Yawcam. Yawcam canport forward itself, set it and forget it. Plus it’s free. Wouldn’t use it to identify a burglar though…
Uh…yeah, my thoughts exactly…I would be coming to this site to do a hack in order to save some money as well as actually hack something together. Otherwise I’m not going to be able to tell the difference between ads and posts anymore…
Meanwhile, at the Evil Axis corporate headquarters –
HaD has come to visit. Jakob Griffith and Caleb Kraft are in attendance.
EA – “All we need to do is to devise a scam to run an advertisement on HaD and drive traffic to our Evil website, but at the same time, fool its readers into thinking that it’s not really an ad!”
JG – “I know, how about we say that we’ve got an old Axis product in our parts box, provide a link to it on your website, and our readers will be none the wiser!”
CK – “Make sure you write ‘after the break’ somewhere in your article”
EA – “MUHAHAHAHAHAHAAAAAA! Great idea!”
(Off-the-shelf product -> not-a-hack.)
I suggest:
* Linux Ubuntu Server
* Motion (web-cam software)
sudo apt-get install motion
man motion
or look a
http://www.lavrsen.dk/foswiki/bin/view/Motion/MotionGuide3x1x20
Motion has a lot of awesome web-cam features wrapped up in a *nix command-line app. So you get all the usual hackability / creative-flexibility of linux, scripting and the command-line.
At the basic level, Motion can serve up images over HTTP to a web-browser (web-cam style). But its much more. (Read the doco.)
Eg You could install Ubuntu Server and Motion on a SheevaPlug or other tiny computer and do all sorts of cool things like turning house lights on and off with movement. Or wire up an old Nokia for SMS when house internet or power goes off.
http://en.wikipedia.org/wiki/SheevaPlug
For controlling stuff a linux server box with a parallel port is quite handy. I was able to control an RC car using one.
Some useful code and info here, http://www.homebrewtechnology.org/2009/03/internet-controled-car-v2-parallel-port.html
Well, considering the never said what Operating System this needs to run on, here are a few Linux options.
VPN and run cheese (works on other OS’s as well, but it’s obvious you are monitoring).
“ssh -X” then run cheese (covert, but the interface laggs).
“ssh -L:localhost: then run cheese (much faster than ssh -X and very customizable, also supports multiple cameras.)
usb cams might be nice but what do you do when you want cams on the 4 corners of your house? usb cables don’t work nice with those types of lengths. you pretty much have to go ip-camera or composite cams running into a pc server.
Haha, Frank, thank you for taking a lighthearted approach to this.
I suppose it should be written in the article that we actually have no affiliation with Axis, and were not sponsored, in short – this is not an ad. We really did have it in our parts bin, back from the FIRST robotics competition (see for yourself, check out our article a few weeks back, all the robots had an Axis camera).
This article was a test for me and HAD, we’ve got a lot of plans in the future (yes I know, we’re a bit slow, but trust us!) and how we want to treat AskHAD. One aspect of it that we are really incorporating (and thus far is a rousing success) is not only HAD answering the question, but our readers input as well.
I would like to point out if we feel the asker might just want something quick and easy (such as in this case) we answer as such. If the question was “I would like to find a way to interface my usb camera over the internet and include the functionality to take over the world while you’re at it”, we might have gone more indepth with the specifics that he/she asked for.
In closing, keep it awesome,
Jakob Griffith
wall-wort => wall wart
Unless it really does come with it’s own power plant. (bad, bad pun)
Jakob – Teehee :) Made you bite :)
I don’t think I wanna bother verifying your claim and check out that article “from a few weeks back”, as that would just ruin the story for me! :)
“One aspect of it that we are really incorporating (and thus far is a rousing success) is not only HAD answering the question, but our readers input as well.”
And that aspect I do appreciate – I got a couple of good links out of it, which is great. Here’s another one I used a couple of years back –
http://www.homecamera.com/
I was interstate visiting the inlaws (in Queensland) a couple of years back, was gone for a couple of weeks and that served its purpose quite nicely with the 2 spare webcams I had lying about.
Also,
h_2_o – To run USB over long distances, you could use a USB/Cat5/5e/6 balun – I think you can get about 50 metres out of ordinary cat 5 for use with USB.
but do you really want to run usb cams to a pc. I wasn’t initially thinking about usb over cat5 similar to hdmi over cat5 i guess but still IMHO not the most elegant or even practical solution at that. I would still rather run ip or another solution for multitude of reasons.
h_2_o: Fair enough, but when you can get USB web cams for $10 a pop, it might work out to be a very cheap solution. Haven’t looked at the costs of the baluns though…
I do not like the “product placement” in hacks :( but, at least you mentioned some alternatives.
Yawcam, free..uses any usb capture ive got easycap with auto rotate camera…self configures..can open stream from my android backflip any where (opera 5 mini ) have fun
Don’t get so annoyed when people say just buy a PTZ IP camera. After you get an old PC, a USB webcam, some steppers or servos and a controller for them (parport or dedicated) you’ve easily spent the money on something that takes up a ton more space.
Try this solution: grab a few PTZ *webcams* and get some cheap USB over ethernet adapters (check out dealextreme or fleabay) and get a linux box with Zoneminder. You’ll have to string your own CAT5e for the cameras but that’s not a hassle.
You could go and use real network cameras but you might need a more powerful linux box to handle multiple MJPEG streams.
How is grabbing an off-the-shelf IP cam and hooking it up considered a hack?
Fail.
have to second the people who suggested yawcam. not necessarily a hack, but for all of us low budget people it can get the job done.
I’ve used axis stuff before and its really nice. Expensive as shit but nice. Also I second zoneminder. It does everything the $1000+ software does but for free.
(note: I do security for a living)
Another free alternative is http://www.orb.com/
This allows you to view USB cams, record events to HDD and even view on a smart phone remotely, in addition to allowing you to listen to your entire MP3 collection on the move. If your machine is fast enough it will also transcode your movies into mobile format for viewing on the go too.
Baz
meh/ I think I’ll build my own.
another thing to think about and granted it is but a small thing is the power usage. Lately i’ve really been keeping an eye on what is using what with a kill a watt and my ip cameras use very little power. if i had to use a couple pc’s even low power ones to control usb cams the difference is massive.
motion && ssh!
http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome
thecrazzyman: I’d like to talk to you more about what you’re doing with that linux camera. Can you email me at hackaday at deadtrout.com. Thanks.
You guys are aware these old Axis cams have known exploits which will give a nasty user shell access into you’re network?
several IP cams +apache+python+stepper motors+and maybe a touch of C++ just because=something thats not just port forwarding and advertising DynDNS
just my 2 cents on it…
I’m currently doing a similar project, but I’m using a webcam, integrated ePIR module, and a FTDI FT245R in combination with some .Net code to glue it all together. The basic idea is to make the computer do all of the hard work: sense motion, send me a notification, and automatically record video to a remote server.
After that, the only thing I need to do is go watch the video when I get notified. That way I don’t have to spend my time watching a camera while nothing’s happening. The best part is that the code is so simple a child could write it.
We have a “cat camera” set up in our house. It is kind of funny but Logitech had the software built in and you can tweak it’s sensitivity to image change (our first pics were of the blinds moving from AC vent) but afterwards, works great. It can do movies or still images. Otherwise you can google for “Catspy” which is over at sourceforge and is free and works with most webcams.
Alas we had to move the cam to watch the parking lot to bust the school kids that like to set off car alarms and try to set off airbags as they walk thru. I did get one of the lil dirtbags with his foot through a headlight which is getting mailed to his mother along with a note warning her that the cops are involved next time. Lil tubby Pokemon master kid. Anyway, best of luck.
Heh, my first take was same as comment #1 – what a contrived-sounding question, of the pedestrian variety no less.
PS I was unable to make zoneminder work with the built-in cam on my HP tx2000.
I have a number of cameras like the one thecrazzyman is linking to. They work perfectly
“complication breads problems”
mmmm bread..
People’s comments:
“This is not a hack”
…true, this problem has been solved so many different ways there are COTS products for just about any scenario.
“Can’t use (cheep) USB cameras in the 4 corners of your house”
…true, but there are USB extending scheme and one can place cheep PCs around the house and cluster cheep USB cameras around them. However the price point of wired network cameras makes this a 50/50 decision.
“People can hack into these things”
…true, but making it more difficult is the usual defence. The down side, it’s usually harder to access your cameras from the outside the more security you put into place. For instance, you may use so much security you need special software making access from a public computer impossible. Your choice.
I like zoneminder, but have always found it a bit unstable.
looking at http://cgi.ebay.com/Wired-Security-Internet-IP-Camera-IP-Cam-Webcam-10-LEDS_W0QQitemZ220537075001QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item335908b539
make sure it is a true FOSCAM or you will brick it when you update it. There are a lot of fake ones out there.
p.s. i have 2 of them and love it for the price
You can use VLC to stream your usb webcam trough the net…cheers!