Ask HackADay: Network Security Camera

posted Apr 10th 2010 2:27pm by
filed under: Ask Hackaday

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 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?



75 Responses to Ask HackADay: Network Security Camera

  • macegr says:

    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/

  • Tech B. says:

    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.

  • Steve says:

    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/

  • mattbeddow says:

    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

  • k0sm0 says:

    Spy on the cat in 6 easy steps:
    1) Ubuntu
    2) Camorama
    3) DynDNS
    4) SSH tunnel
    5) VNC
    6) Profit.

  • MS3FGX says:

    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.

  • Itwork4me says:

    Um…I buy the costco 16 channel one with h.264 and then I read the instructions and pray hackaday would get a clue.

  • Skitchin says:

    I suggest checking out Yawcam – http://www.yawcam.com/

    I’ve used this to turn cheap USB webcams into security cams

  • yivo says:

    “breads problems”

    *breeds problems

    otherwise an excellent article, more please!

  • Vivalie says:

    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!)

  • Little_Neo says:

    I like to control people’s network cameras for fun. There are quite a few unsecured ones in Japan…

  • icebrain says:

    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.

  • thecrazzyman says:

    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!

  • Xandercash says:

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

  • MadAndy says:

    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.

  • DF1204 says:

    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.

  • Birdman says:

    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…

  • pRtkL xLr8r says:

    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…

  • Frank says:

    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!”

  • Reilly says:

    (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

  • BlackCow says:

    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

  • DarwinSurvivor says:

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

  • h_2_o says:

    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.

  • Jakob Griffith says:

    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

  • ChalkBored says:

    wall-wort => wall wart

    Unless it really does come with it’s own power plant. (bad, bad pun)

  • Frank says:

    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.

  • h_2_o says:

    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.

  • Frank says:

    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…

  • davidb says:

    I do not like the “product placement” in hacks :( but, at least you mentioned some alternatives.

  • i_see_u says:

    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

  • adam says:

    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.

  • Jake says:

    How is grabbing an off-the-shelf IP cam and hooking it up considered a hack?

    Fail.

  • phil says:

    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.

  • Wes says:

    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)

  • Baz says:

    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

  • onlywhenprovoked says:

    meh/ I think I’ll build my own.

  • h_2_o says:

    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.

  • Terry says:

    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.

  • wW says:

    You guys are aware these old Axis cams have known exploits which will give a nasty user shell access into you’re network?

  • monkeyslayer56 says:

    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…

  • signal7 says:

    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.

  • blue carbuncle says:

    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.

  • Required says:

    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.

  • Hackius says:

    I have a number of cameras like the one thecrazzyman is linking to. They work perfectly

  • craftyguy says:

    “complication breads problems”

    mmmm bread..

  • st2000 says:

    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.

  • pittom says:

    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

  • gCheko says:

    You can use VLC to stream your usb webcam trough the net…cheers!

  • barry99705 says:

    @ pittom

    Do those cameras require internet exploder to run the pan tilt, or even view the stream? I had one of the older Cisco cams that was that way. Completely useless to me.

  • mad_max says:

    @Vivalie You’ve got it. Just hook up any webcam to your computer and access it remotely with LogMeIn. I do it all the time.

  • Rak0ribz says:

    I think the Axis cam is a fine solution; my only objection is that you should always use example.com for example URLs to avoid unintended consequences.

  • /dev/random says:

    The Axis camera uses an Axis ETRAX SoC, which has an OpenWRT build available. You could then run whatever software you want inside the camera itself, eliminating the need for a separate computer for performing tasks like motion sensing. The ETRAX SoC also has plenty of GPIOs, so if you poke around on the board you may be able to locate them and get the camera to control its own pan/tilt assembly. You could also use one of the serial ports I am sure are brought out to command a microcontroller to control the pan/tilt. If you got the Axis cam from an FRC kit of parts, you may as well use the pan/tilt assembly that comes in the kit as well.

  • sanchoooo says:

    i run a ubuntu(9.04), zoneminder(1.23),ssl setup w/a logitech quickcam pro 4000. Works great.

  • edyagi says:

    Dealextreme has wonderfully cheap internet-based surveillance camera’s for under 100. They recently dropped the price of their pan and tilt camera: http://www.dealextreme.com/details.dx/sku.32073

  • JimSocks says:

    What? You didn’t use an arduino in this project? I’m confused.

  • HAL0_F00 says:

    Thanks, Hack a Day, for making a few more home “surveillance” cameras publicly accessible! :D

    Anyways, a better way to setup remote access would be to restrict the camera to the LAN and SSH tunnel or use a VPN to access the entire lan, instead of relying on the camera’s built in “authentication” which fails horribly…

  • Anton Zalutsky says:

    I actually managed to program my G1 phone with some home automation stuff I did with an apache server. Anyways, I use a free program called YawCam which does several things. It can save a picture to FTP, send it to an HTML address(a preset port), or just save the file on a given time interval, if motion is detected, or on request.

    http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs438.ash1/24191_10150144319405707_547600706_11778955_3313901_n.jpg

    Thats a picture of how my program looks :-)

  • Simon says:

    Just use (a) small Linux-Server(s), Zoneminder (http://www.zoneminder.com) and a bunch of cheap USB-Cams.

    ———–8<—–(snip)————–
    Feature List
    Runs on any Linux distribution!
    Supports video, USB and network cameras.
    Support Pan/Tilt/Zoom cameras, extensible to add new control protocols.
    Built on standard tools, C++, perl and php.
    Uses high performance MySQL database.
    High performance independent video capture and analysis daemons allowing high failure redundancy.
    Multiple Zones (Regions Of Interest) can be defined per camera. Each can have a different sensitivity or be ignored altogether.
    Large number of configuration options allowing maximum performance on any hardware.
    User friendly web interface allowing full control of system or cameras as well as live views and event replays.
    Supports live video in mpeg video, multi-part jpeg and stills formats.
    Supports event replay in mpeg video, multi-part jpeg, stills formats, along with statistics detail.
    User defined filters allowing selection of any number of events by combination of characteristics in any order.
    Event notification by email or SMS including attached still images or video of specific events by filter.
    Automatic uploading of matching events to external FTP storage for archiving and data security.
    Includes bi-directional X.10 (home automation protocol) integration allowing X.10 signals to control when video is captured and for motion detection to trigger X.10 devices.
    Highly partitioned design allow other hardware interfacing protocols to be added easily for support of alarm panels etc.
    Multiple users and user access levels
    Multi-language support with many languages already included
    Full control script support allowing most tasks to be automated or added to other applications.
    Support external triggering by 3rd party applications or equipment.
    xHTML mobile/cellular phone access allowing access to common functions.

    ———–8<—–(snip)————–

  • pittom says:

    @barry99705
    i have it on my cell phone with ptz.
    or look at http://www.ivimg.com/products/vcmobile.htm
    works great

  • pittom says:

    http://www.dealextreme.com/details.dx/sku.32073
    THIS IS A FAKE IT IS NOT A FOSCAM
    go to foscam under support to see there dealers so you don’t get riped off with a fake

  • Brian Gaut says:

    To all those offended by HaD “advertising” a commercial product: stfu.

    Just because this is hackaday doesnt mean everyone wants to BUILD their own camera. Some things need to be bought sometimes. I salute HaD for actually finding a relatively cheap network camera in a sea of expensive ones.

    Im just chiming in to say that the D-Link DCS-900 (wired) and the DCS-910 (wireless) are also good network cam choices and can be found for well under $100 every few months when Amazon has a high inventory.

    Also, I agree with the several other commenters here who have recommended using the linuix package “motion”. Ive been using this for a long time and have been very pleased with it.

    The DCS-900 and motion have been running my Blender Defender setup for a while and I havent had any problems with it. (www.plasma2002.com/blenderdefender)

  • Bob says:

    I’ve used Linux +camserv or you could just buy a wowee rovio. They were $99 on woot a bit ago, they’re $119 on buy.com

  • ClutchDude says:

    Zoneminder is great. I’ve got it doing a wonderful job with motion detector recording and passive monitoring.

    It does have a *small* learning curve, but I’ve been very pleased with it in it’s small use.

  • strider_mt2k says:

    Oh no you didn’t mine the Bauxite for the Aluminum yourself?? NOT A HACK

    LOL Sometimes you just have to enjoy yourself.

  • 5318008 says:

    “wall-wort”
    “wall-wart”

    Also, I know this is a lost cause, but while there is a ‘Duck’ brand of it, it’s called duct tape.

    For all the other misspellings, you guys are on your own.

  • Joe says:

    For those interested in a Windows software that has a HTTP server and does motion detection, check out Zone Trigger:

    http://www.zonetrigger.com

    Plus it’s great for diy projects because it lets you add independent hot spots for motion detection.

  • jeicrash says:

    SheevaPlug + a few usb cameras = cheap security system. Or just plug them into your computer and head over to a webcam site and watch your own stream. Even cheaper.

  • D- says:

    Stop now, if you are looking to read a comment with redeeming qualities, because this most likely has no redeeming qualities. Suggestion to HaD, post the question, and let your readers come up with the suggestions. Because you can’t win no matter what you do.

  • bob says:

    is this hackaday or buyareadymadeproductaday?

  • JonnieCache says:

    Don’t expose the cam’s webserver to the internet directly. Use one of the many hacked router firmwares that support running VPN servers so you can tunnel into your network. Or perhaps some kind of ssh tunnelling.

    I reccomend one of the mods of the tomato firmware: http://en.wikibooks.org/wiki/Tomato_(firmware)

  • Miles says:

    Ah this is always an interesting project to try.

    I bought a couple of those cheap USB cannons you see around. They support a huge pan range (Nearly 360*!) but sadly the tilt isn’t so great, around 45*.

    I combined that with a webcam (enter rubber band) and used a combination of .Net WCF and a simple C# asp.net forms page using Ajax to control the cannon. Then I went ahead and used Windows Media Encoder to stream the video to the page.

    I originally used peice of javascript to pull a snapshot from a custom peice of code on the host machine but it used so much processing power I decided to drop it. The disadvantage is the delay (buffering) makes the cannon hard to control accurately.

  • edyagi says:

    About buying a premade ip camera not being a hack, neither is hooking up a usb cam and installing a app. Some of the cited ip cams are more hackable since it has an embedded unix that you can customize, update firmware, and script custom ftp jobs. I have mine ftp’ing motion captures to godaddy which has a cron using ImageMagick to convert the days image to a animated GIF, which allows me to pull and watch all the captured images in a easily viewed movie, but all the while having the full resolution image stored offsite from my residence securely. More hackery involved than plugging in a usb cam and installing software. Added bonus, fanless, and low powered ip cam humming along rather than a dedicated laptop/desktop just for the usb cam.

  • Leave a Reply

    XHTML: You can use these tags: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    Hack a Day serves up fresh hacks each day, every day from around the web as well as hacking related news.

    Send us your hacks






         




    Hacks

    Resources