If the idea of a networked security camera that you can remotely view and receive alerts from appeals to you (but the $$$ of a commercial model does not), read on as we show you how to turn older generation Android phones into sophisticated security cameras.
Why Would I Want to Do This?
Well, we hate to presume, but we imagine you opened this tutorial because you have something you want to keep on eye on. Whether that’s your backdoor to watch for delivered packages, your new ferret cage to see if Mr. Winks actually uses the super-deluxe hammock lounge on the top floor, or your kids in the backyard while you’re in the house tidying up, is your business.
We’re just here to help you do it cheaply with old hardware you likely have laying around already (or can acquire easily off eBay). The Android phone we used for the tutorial, an HTC Hero, can be picked up off eBay for $20-25—a fraction of the cost of Wi-Fi security cameras, and the phone will offer a radically more customizable user experience.
What Do I Need?
For this tutorial you’ll need the following things:
- One Android Phone with Camera.
- One charging cable.
- One copy of IP Webcam (Free) (for continuous streaming).
- One copy of SECuRET SpyCam ($4.50) (for motion-activated capture and alerts).
- Access to a Wi-Fi network local to the Android phone.
- (Optional) Remote access to the Wi-Fi network to monitor continuous video feed away from home/work.
Why two different camera applications? During our testing we had trouble finding an application that could both stream continuous video in an effective and easy to access manner and issue motion-detection alerts effectively. Rather than have you set up a camera system that’s just kind of mediocre at both tasks, we’re highlighting a two prong approach where you can select the best app for your needs and desired level of monitoring.
If you want to get a notice whenever someone, say, drops a package off on your porch or opens your back gate, follow along with the first portion of our tutorial that details setting up SECuRET SpyCam.
If you want to generate a continuous live stream, like you would if you wanted to be able to continually check in on the results of an experiment or children playing in the backyard, follow along with the second portion of our tutorial detailing how to set up IP Webcam.
In addition, there are a few things worth noting before we proceed. First, this tutorial is focused entirely on the software side of things. Because each physical phone and location of installation will be unique, it’s an exercise for the reader to find their own mounting solution for their Android phone-turned-security camera. In our testing we used a suction-cup mount intended to mount the phone to a car windshield as it worked well to mount the camera to windows and smooth surfaces.
Second, if you want to access your camera from outside the network we recommend doing so in a secure fashion. Configuring a VPN is outside of the scope of today’s tutorial but we have plenty of great tutorials on How-To Geek including How to Connect to a VPN on Android and How to Setup a VPN Server Using a DD-WRT Router to get you started.
Finally, if you are reusing one of your old phones we would strongly recommend performing a factory reset on the device and then updating it to the most current version of Android available. Stability is important when deploying a device such as a security camera, so removing any extra applications, freeing up as much memory as possible, and running the most recent stable Android release for your device are all important considerations. Refer to the documentation for your specific phone to reset it and update Android.
Configuring SECuRET SpyCam
In all our tests of Android motion-detection software, SECuRET SpyCam came out ahead in every category. Its motion detection algorithms were the most consistent, it features tons of individual settings you can refine to help it work with the widest number of devices, it also features email and Twitter based notification as well as automated Dropbox-uploading, as well as the ability to capture not only photos but video segments too.
First, grab a copy of SECuRET SpyCam in the Play Store and install it to your device—if you’re wary of purchasing an app without test driving it first there is a demo copy available here.
After you have installed the application, launch it to begin the configuration process:
In the upper right hand corner of the display, next to the help icon, is the settings menu icon. Click on the settings menu. In our testing we found that leaving the majority of the default settings alone was ideal; however there are several settings that need configuration right out of the gate.
The first important decision is to decide whether you want the security camera to capture still photos or video segments when triggered. Navigate to General –> Motion Capture Mode –> and select either Photo or Video. Although we tested both functions, for the purposes of this tutorial we’re configuring the camera for photo capture.
While still in the General menu, select Photo Settings to configure photo and notification settings.
Here you can opt for a color or black and white photo, what resolution you want the photos to be taken in (lower resolution if you’re just monitoring the UPS guy coming and going, higher resolution if you hope to capture a license plate or other identifying information), as well as whether or not your want the camera to capture multiple exposures of each triggered moment (you can set the burst capture mode up to 5 photos per trigger).
Finally under the Actions section you can turn on Email and Twitter notification. While there may be some application for live Tweeting your security camera images, we’re more interested in configuring the email service.
Select Email, then check Auto Email Captures, and then plug in the credentials for a Gmail account. Finally, plug in a delivery address for the alerts. You can customize the email’s Subject/Message lines, but we found no particular need to do so.
The next step is to configure Dropbox syncing. By default all captures are stored on the local device (and emailed to you if have email alerts enabled). We want to go a step further and sync the captures to Dropbox so we have a convenient backup and, should the device itself get taken, we still have the photos. Navigate to General –> Dropbox to plug in your Dropbox login information and settings.
First, check Auto Sync Captures, then click Log In to authenticate SECuRET SpyCam with your Dropbox account. The final setting is to select whether you want the Dropbox syncing to occur over Wi-Fi only or via Wi-Fi and your cellular data plan.
Now that we’ve configured the basics, it’s time to test the camera out. We strongly recommend not messing around with the default settings until you’ve actually tried out your system—in almost every instance the default settings worked fine for us and required no further tinkering.
Exit back to the main menu and select Built-in Camera and press Start.
Once you press start you’ll see a screen like the one above—the smaller screen in the upper left hand corner is there to display the motion detection algorithm in action.
Since it’s a rather dreary, snowy, and gray day outside, we’re going to use something a little more colorful for our test subjects this afternoon: some African Cichlids. Not only are the Yellow Lab test subjects brightly colored but they’re extremely curious fish and we know it won’t take long for them to investigate the camera attached to the side of their tank. To start the actual detection mode tap the screen and then press the play button that appears in the lower menu bar.
It only takes a minute or two of waiting before one of the fish swims over to investigate:
The image is captured, stored to the device, and then an email alert is issued along with the file syncing to our Dropbox account. The email alerts are simple but they get the job done:
That’s all there is to it; once you’ve done the hard work of configuring the app and positioning your camera, there’s nothing left to do but check in on it periodically to make sure it hasn’t fallen off the window or been unplugged.
Configuring IP Webcam
While SECuRET SpyCam was our favorite pick for motion-based capture, it has one glaring oversight which prevented it from being a one-stop-shop for our Android security camera needs: it doesn’t include a simple streaming function. If you want a security camera you can continuously monitor (not just see when it issues you an alert) you’ll need to install a streaming application for that purpose. Fortunately there is a well established, free, and robust solution in IP Webcam.
IP Webcam is a perfect tool for turning your Android device into a streaming security camera. You can monitor the video feed (and take photos from the camera) using any modern web browser, use free cam viewers like IP Cam Viewer to monitor the camera from other Android devices, connect it into Skype, and even stream it right into media players like VLC.
Before we start actively monitoring the feed, however, let’s do some basic configuration (IP Webcam is even easier to setup than SECuRet SpyCam). First, install the application from the Play Store. Once the application is installed, launch it, and you’ll be dumped right into the configuration panel—seen above.
Much like we left the defaults alone in the previous section of the tutorial, we’re going to do the same here—once you have tested the camera you can begin tweaking settings to meet your needs if necessary. Of the few settings we are going to tweak, the first is to scroll down and check Stream on device boot, we want our security camera to turn back on in the event that the Android device crashes and restarts.
The second setting worth looking into right away is the login/password setting. Since we’re the only ones with access to our Wi-Fi network, we opted to make setting up and deploying our device easier by skipping this step.
Once you’ve tweaked these basic settings it’s time to position your device and start up the server. Scroll to the bottom of the configuration panel and click Start server.
You’ll see a screen like the one above—minus the fish of course, unless you’re also setting up your phone to monitor an aquarium.
At this point you need the IP address and port number of the server. It’s printed on the bottom of the screen (you can also click How do I connect? in the upper left hand corner. Navigating to the address provided yields a simple HTML page like so:
There you’ll find feed links and/or instructions for connecting IP Webcam to a wide variety of viewing sources including streaming it to media players, watching it directly in your browser via the Java plugin, and linking it to Android-based camera viewing apps. The fastest way to start monitoring the feed is to use the built-in Java view like so:
It’s not particularly elegant but it displays the video with very little lag. The solution we preferred was to open the video stream in popular video application VLC by running VLC, navigating to Media –> Open Network Stream, and plugging in the playlist link: http://x.x.x.x:8080/playlist.m3u, where x.x.x.x is the camera’s address on the local network:
Watching it through VLC made it extremely easy to hit the record button to record a video of anything interesting that might crop up.
That’s all there is to it: with IP Webcam once you have the server up and running on the phone and you’ve selected one of the many viewing methods to peek in on your camera, you’re done.
Have a great idea for repurposing an old Android phone? Want to see more articles about reusing old hardware? Sound off in the comments with ideas or shoot us an email at email@example.com to let us know.
Jason Fitzpatrick is warranty-voiding DIYer and all around geek. When he's not documenting mods and hacks he's doing his best to make sure a generation of college students graduate knowing they should put their pants on one leg at a time and go on to greatness, just like Bruce Dickinson. You can follow him on Google+ if you'd like.
- Published 03/3/13