How to set up a webcam security system
17th Nov 2012 | 10:00
Complete with motion detection
The price of computer hardware might be crashing through the floor, but that doesn't make it any less attractive to your neighbourhood criminal.
No matter what the specs, a shiny looking laptop sat in the front room is still going to look attractive to a would-be thief peeking through the curtains when you're out.
You'll need this…
1.ISPY CONNECT Available for free from here, this is an open source project that was originally designed to capture images of ghosts and UFOs. Yes, really!
2. 24/7 PC SYSTEM You'll need a low-end laptop or server running constantly to monitor the webcams, send alerts and run the recognition software.
3. WEBCAM AND CABLES The main use for iSpy Connect is as a security system that monitors security cameras, so you'll need at least one as well as suitable cables.
Crime on the rise
None of this is helped by the fact that hard times breed an increase in criminality - and we're not just talking about looting and summer riots.
Recessions fuel everything from pick-pocketing on the street to home break-ins. But don't have nightmares - we're here to help protect your loved ones and loved things.
It's not even going to cost much.
How does a personal, fully monitored, house-wide CCTV system sound to you? To give you even more peace of mind, we'll throw in remote internet monitoring and alerts too.
The finished security system can be triggered by motion, face 'detection', number plate recognition, and even sound received via microphones.
Video streams can be recorded, multiple systems can be managed remotely, and recordings can be triggered by motion or on a scheduled basis.
We're not going to stop there, either - this project will tie into any home automation systems you may already use or want to add.
Best of all, the essential software is free (though advanced features like text alerts, mobile access and internet control require a subscription).
All you need to do is add a PC and webcams to create your own bespoke home security system.
The iSpy Connect open source project has been running for many years, and has evolved from a UFOhunting tool into a mature package with a local client and streamlined server packages - and that's not to mention the long list of features it supports.
At first our motivation was to try to emulate a traditional home security system, with separate window, door and motion detectors.
However, a webcam-based system can be designed to include all of these types of detection, because it's simply checking for motion within set zones.
We also contemplated using an X10-based alarm system for this project, but doing so incurs the extra expense of a base PC X10 unit.
Although the cost of these and the individual X10 units has dropped a lot recently, it's still £50 for the base, plus extra for controllers and add-ons.
Instead we're going to build our system around the basic abilities of a webcam system, but it's still possible to extend the iSpy capabilities with X10 automation if you decide to do so later.
You may be wondering why we're relying on cameras for our system. This is because a webcam that can detect motion can double as a door and window sensor, on top of general camera features like recording video and audio.
Moving past these basic features, you can add the complex abilities like face and number plate recognition.
How to speed up your wireless network
How to secure a wireless network
How to build the ultimate home media network
The downside of this is that motion detection is fallible. Pets, moving foliage and bright sun can all trigger false alerts - but a little bit of careful placement should eliminate most of these issues.
Seeing in the dark
As we've seen in the past, even the darkest night can't stop a basic webcam, as the low-cost CMOS sensors inside are sensitive to infrared light (also known as IR).
Any dedicated 'security' camera will come with an IR mode and IR illumination in the form of an array of IR LEDs.
In PC Plus 262 we looked at how you can transform any cheap webcam into a night vision camera.
It's a matter of removing the IR filter that usually eliminates this wavelength and replacing it with black negative film, but it would be better to buy dedicated units and use any standard webcams for indoor or illuminated areas.
We're testing a system that uses a standard USB camera and an inexpensive IP-based Wi-Fi night vision camera with pan and tilt. The IP camera is useful because it tests all of iSpy Connect's camera abilities.
It supports all web-based IP cameras, which are a necessity for larger installations that move beyond the practical 10m USB limit, or 5m with passive USB cables.
There's also support for many pan and tilt cameras, though control implementation varies, so not every one of these devices can be supported.
Putting it together
Mounting a webcam can be a pain, as most just come with a clip for attaching them to a monitor's surround.
A few models offer a standard tripod-compatible thread (the Microsoft LifeCam Studio is one such example), and some others have a M6-sized thread that can be attached via a standard adaptor.
If your webcam lacks either of these connections, try using epoxy resin to attach a bracket that can then be screwed directly to a wall or attached to a tripod.
W''re building a modular system, so once you've added and configured one camera it's easy enough to expand the network by doing do the same again.
We've covered adding a remote IP-based camera and microphone and how to assign alerts with actions. The recordings can even be uploaded to YouTube for remote storage, in case the local server machine is stolen.
Setting security: Storage, Camera, action
1. Storage here Grab the iSpy Connect program and install it. Now download the face and plate recognition add-ons from the Plug-ins section.
Extract these files to C:\Program files (x86)\iSpy\iSpy\Plugins. You'll also need VideoLAN for local playback of video files, and we suggest creating an iSpy Connect account, as we'll use this later.
2. Storage there Now fire up iSpy and select 'Options > Settings > Storage'.
If you're going to be saving a lot of recorded video on your system, think about the file sizes and make sure you alter the Media directory to somewhere with plenty of space. It's also worth investigating the storage management option, as it can auto-delete files of a certain age to free up drive space for new footage.
3. Storage everywhere As an easy management option, iSpy can help you monitor your systems via a graphical floorplan.
There are a number of online sites that can help you create these, like Homestyler. Once you've got everything planned, save it as an image file, then right-click a blank area in iSpy and select 'Add floorplan'.
Now it's up and running, drag your cameras onto the plan.
Getting secure: Create a monitored fortress to protect property, possessions and people
1. Add local cameras To get started, right-click on a blank area of iSpy and choose 'Add camera'. In the menu under 'Local Device', select a connected USB camera - we'll look at remote ones later on.
Click on 'OK' and you'll see the main camera settings.
From here you can customise detection zones, alert conditions, recording settings, YouTube uploading options and the details of scheduled recordings.
2. Motion detection Click on the Motion Detection tab. Here you can add and control monitored areas for movement.
Draw rectangles on the preview area to add monitored sections. On the live preview you'll see a blue bar and a green line, which show the detection and trigger levels.
Adjust the sensitivity to control how much movement is required, while Display Style alters tracking modes.
3. Set up alerts You can trigger an alert based on motion, face detection, number of objects or lack of movement.
This can run an EXE file for X10 integration, or send a SMS, email or tweet to you when it detects something.
This last option is done via your iSpy Connect account, though the SMS part requires a paid-for account, which is understandable.
4. Record footage To record video, go to the Recording tab and select either 'Record on Movement' or 'Record on Alert'.
The default settings here are ideal, and the software appends the three-second buffer to the start. The H.264 codec uses around 20MB per minute.
You might want to consider the mobile MP4 settings, but we recommend you avoid the AVI ones like the plague, even for desktop-only use.
5. Motion control We added an IP camera using the 'IP Camera with Wizard' button within the Add Camera dialog.
Just select the model from the drop-down list and enter the username and IP. The PTZ provides motion control if compatible.
Our cheap Tenvis camera worked a treat, although the Track Objects mode was pretty skittish.
6. Microphones You add microphones to your system in the same way as cameras.
Click 'Add microphone', then select the option to add a local mic if your webcam has one built in.
You can then set sensitivity, alerts (you could play a dog barking sound, for example) and also set recordings.
Remote mics can be created by entering the IP of a remote iSpy server.
Serving up cameras: Use iSpy Connect to link up remote cameras
1. Install the server The server system is useful for installing on remote computers like laptops so you can access their built-in webcams or connected cameras.
Install iSpy on the remote machine and once you're in its Start Menu, run the Server Installer.
If you're not prompted, make sure you manually set a Windows Firewall Exception for iSpy Server. Now you can add the local camera as before.
2. Share and share Once the preview of the local camera is running, note down the IP, Port and Cam Id in the bottomleft of the display.
Return to your main iSpy PC and add a camera. For the source choose 'URL MJPEG', and enter the IP address you copied down.
This should be http://192.168.x.x:80/?camid=0, or whatever your local network IP base is.
You can also add a password if you require additional security.
3. Web account The free version of iSpy is limited, but you can still view recent recordings from your networked cameras, wherever you are.
Logging into your iSpy Connect account from any desktop provides you with a basic control panel.
This gives you recently recorded clips, and you should be able to view playback direct from your monitoring computer for 10 seconds. If you can't, then it's been nicked!
4. Mobile access If you subscribe to the paid-for service, there's a dedicated HTML 5-based mobile website that even Apple devices will happily use, and which can be used to control motorised cameras.
The standard website can still be accessed by mobile devices, but the video media player probably won't work. Some owners of Android devices may have more success, but we couldn't get it working on our hardware.
1. Server build We love servers here at PC Plus - they make everything run smoothly in the background, letting us turn off our powerhungry desktop PCs and reduce our energy bills.
The iSpy Connect system offers what it calls a server build, but i''s not what you'd expect from the name.
The idea is to enable you to link remote laptops and computers with cameras and mics installed to your main iSpy Connect system, but with a low-profile service.
You'll still need the main iSpy Connect program to set up your security system, and it's required to serve out data to the remote webserver, while any recognition tasks you implement also have to be run on the main program.
That last aspect can make the server program seem all but pointless, but it exists so you can access cameras on remote systems.
We found we needed to create a Windows Firewall exception on a Windows Vista system, so if you're having connection issues check here first.
2. Subscription services While there's a lot to love about iSpy Connect, its more advanced features require a subscription.
$70 a year is substantial, but compared to paid-for monitor security it's very reasonable. It's not the only option though.
If you want Twitter alerts, we found a simple workaround. Download a command line Twitter client, then install and authorise it with Twitter.
Within iSpy Connect you can launch an Executable for individual device alerts. Add the client executable with its path, then under 'Arguments' add the Twitter account, a suitable message and a timestamp, like 'TWITTERNAME "Camera One Alert" timestamp'.
We were also impressed by how cheap dedicated security cameras have become. These are the wireless IP-based dome devices you see in shops, which can now be picked up for around £35.
At this stage you should only consider the $70 annual subscription fee if you want full remote control.
It's a bargain compared to full commercial packages, but making your own system is much more rewarding.