Click here to Skip to main content
15,867,870 members
Articles / Wireless

I've Got My Eye On You.........A Journey Into Home CCTV and a Wireless Bridge

Rate me:
Please Sign up or sign in to vote.
5.00/5 (17 votes)
15 May 2014CPOL25 min read 40.3K   28   8
My adventure into installing a domestic CCTV system and wireless bridge.

Introduction

Crime is an ever present threat and over the last year or so I have seen many reports from more and more people that people seen prowling around gardens scoping out the next job, or garages and sheds being raided during the night etc. Also there have been an increasing number or car related thefts in the Aberdeen area. However these are not straightforward thefts, the criminals have been creeping into houses and taking the keys to the cars and then simply driving away with them.

I felt it was time to increase the deterrent with the presence of CCTV, but on top of this make sure it was a recording solution for the collection of evidence should the worst happen.

In this area we will take a look at the CCTV element, but also due to the selection choice there was an added complication of additional wireless networking.

Background

There are many various types of CCTV system, both in quality of the actual video sensors and also how the video image is transmitted. The conventional analog systems broadcast the CCTV image 'back to base' via coaxial cable and are typically lower resolution images, however these are getting better. Then we have the digital systems that can transmit the video image over standard coaxial cables, and finally we have the IP Camera solution using either WiFi or over ethernet networks.

Now, this isn't an article on the specifics on the different types of systems, but more on my experience in installing a system on my house. If you want to find out more about some of these different types of systems and the specifications check out the references section at the bottom.

I had decided that some of the basic specifications that had to be met were;

  • HD Quality: 1080p = Better clarity in the images
  • Digitial over IP Networks = More flexibility in locating the equipment and possibly use existing networking infrastructure.

There were other factors at play which become apparent when we look at the property layout in the plan below.

Image 1

As you can see, the main house area and the garage area are separated by driveway and a single storey extension. The only cable that runs from the house to the garage is a power feed. To run in cables would require either overhead or along the property boundary wall, or dig up paths and drives. The digging option really wasn't going to fly!

This really pushed me down the IP Camera route as this would either allow me to run ethernet over power to the garage using the power feed cable or wireless options. The other problem I have in the house is that there is a 3-Phase power feed coming into the house. The main house area is off of 1-Phase and the Garage and single storey extension are off another phase. Getting the two areas to talk would probably require a suitable wireless hop anyway, so looks like just as well explore the wireless options.

I had considered pure wireless cameras, but given the distances this could add complications, need even more wireless access points etc. There is also the fact that the coverage area needs to be front garden, back garden, garage (both streetside and garden side) and the shed area.

In the end, I decided on conventional IP Camera and some form of WiFi link between the garage and the house.

After much searching, it is amazing how many sites and suppliers you come across when you looking for a specific subject! Trying to work up both a CCTV option and a Network option throws up a huge amount of possible combinations.

Eventually I came across a CCTV supplier that basically had what appeared to fit the bill. I dropped them a couple of email messages and also engaged in some chatter via their Facebook page. More later...

Likewise with the network side of things eventually found someone that appeared to have all the kit that fits the bill. Given that CCTV is dependant on the network, lets now take a look at that in more detail first.

The Network

The main house already had some networking in place. The internet came into the main Wifi Router and then supplied off to 2 16-port switches and a 5-port switch in various rooms in the house. There was also a Wifi Extender located on the ground floor near to the rear of the property to feed Wifi into the rear extension. The current Wifi is at its limit in terms of reach. Any further expanse would require further extensions or a rejig of the existing arrangements.

The distance from the main house boundary wall and the garage is approx 17m (55ft). I could have tried to get indoor APs to link and extend, but it is amazing how quickly the signal decays through granite walls!

One option I considered was mounting a standard outdoor AP on the wall of the house and another on the garage, having read various forums about the reliability of this solution and potential bandwidth limitations I decided against this.

The option of choice was a dedicated Point-To-Point link. One of the benefits of this approach is a the narrow beam directional wifi that is less prone to interference and can provide the sufficient bandwidth.

The previous relentless searching on specs etc. had drawn me toward the Ubiquiti brand of networking equipment. I had never heard of it before, but the reviews were positive and there were also some good videos on Youtube covering a lot of their equipment.

The equipment of choice was as follows;

The theory was that I would place a ToughSwitch at each end and the PTP link between them, this would then effectively segregate off the CCTV network. Given the ToughSwitch was also "Power Over Ethernet" I could use it to supply the power either directly or via power splitters to both the NanoStation M5 and the CCTV cameras.

The NanoStation M5 were selected given they were capable of up to 150Mbps and over 20Km distance, Obviously the longer the distance the slower the rate, but as I was only needing <20m, in theory, I should get sufficient bandwidth.

Once everything is installed, this is how the new CCTV gear will hook up into the existing network;

Image 2 

In terms of bandwidth a Full HD 1080p camera will require ~8Mbps for the main and sub stream content. I was looking to put a maximum of 6 cameras on the garage, so would need ~48Mbps sustained throughput minimum.

After placing the order for the equipment and suitable mounts, it promptly arrived and it was time to get down to the config.

Opening the equipment and laying it all out as it would be built up in the field meant that I could get it all working before spending a whole lot of time running around up and down ladders etc. Using a spare laptop configured to the same network subnet meant I did not have to touch any of my existing equipment.

The Ubiquiti gear all comes preconfigured with the same default IP and Username/Password, this means that you have to work on one component at a time, change its configuration then add the next.

I setup the two ToughSwitch first, then linked them together so that I no longer needed to keep swapping the laptop connection, then added the first NanoStation followed by the last.

This is where the first problem arrived. I could not get the two NanoStations to talk to each other. I had seen a video on Youtube where they were in relatively close proximity (2 or 3 feet) and looked as if they were talking. I spent quite a while turning down power settings, adjusting distance settings etc. but nothing. in the end I moved one of the NanoStation further away and they found each other. Progress! Next was to tweak some settings and to get the transfer speed up between them. Finally satisfied that they appeared to be working, I disconnected the wired link between the two ToughSwitch and proved using the laptop that I could see the other ToughSwitch at the end of the link. The image below shows the test setup in the house.

Image 3

Now it was time to move the equipment to outside and go and mount everything. Climbing up ladders and peering across open spaces trying to work out if I had good elevation etc. I could have got out a ball of string, or laser pointers etc. but given the distance involved, I was happy that 'by eye' was good enough.

With the equipment all mounted, powering up the ToughSwitch brought the NanoStations into life and the link established itself first time. Using the alignment tools available by logging onto the NanoStation, it was easy to move the antenna until the best signal was found.

Image 4

The image below shows the NanoStation M5 at the garage end of the link. The one at the house end is simply mounted onto a the drainpipe that runs down the corner of the house. Didn't fancy trying to drill the granite wall if I didn't need to. It is currently zip tied onto the mounting bracket (and drain pipe) and once everything is finished and optimised, then I will look to put more sturdy clamps.

Image 5

Point To Point Configuration

The two devices were configured slightly different, one of the points (I chose the house end) was configured as a Wireless Distribution System (WDS) Bridge and the other was configured as a WDS Station. This means that they are acting as Layer 2 (Data Link Layer of OSI model) interfaces which provides increased traffic throughput by not having to repeat packet transmission had it been configured like a traditional access point.

The below images show the two configuration at each end.

Image 6

Image 7

You will also notice in the both the images that there is a setting AirMAX: Disabled. This is a proprietary protocol that claims to provide better throughput, I am planning to enable it at some point, but for the time being left it to off.

Other Useful Features

The ToughSwitch also have a useful feature on each individual port where by you can periodically ping an IP Address and if it cannot be found the switch will kill the power to the Port.

By setting up monitoring across the link it is possible to setup up a self rebooting wireless link. The garage ToughSwitch would ping the house ToughSwitch and the house ToughSwitch would ping the garage ToughSwitch, if the link died, them both Nanostation M5 devices would automatically be rebooted to try and re-establish the link. Again, this is something I plan to setup once the remainder of the system is up and working and if I find the links are unreliable over time. Need to be careful to get the setting times and failure counts correct otherwise it would be possible that the feature could keep the link permanently shutdown.

Both the NanoStation and the ToughSwitch have great web interfaces. The NanoSwitch showing the status of each connection graphically. The image below shows the overview page of the ToughSwitch web interface;

Image 8

The interface provides some great per port statistics and at the time of the grab above, the NVR was located on the existing network, so the camera data from the 1st camera was simply passing across the link, through this switch and onto the main network (From Port 8 to Port 7) for approximately 5 Mbps of traffic.

The Ubiquiti website also offers a AirLink Wireless Outdoor Calculator. Ok, so it maybe isn't really needed for a 20m link, but if you are trying to get one over some distance then it maybe of some use to you.

The calculator allows you to select the type of hardware you are using, set the heights of the radio equipment and location of the equipment on Google Earth. The output shows you a cross sectional profile of the path, the Line of Sight Path and the Fresnel Zone info. The Fresnel Zones are the imaginary slices of the airspace between the sender and receiver. The First Fresnel Zone is effectively the widest slice at the midway point along the transmission path. The transmission path needs to be kept clear of obstructions or reflective surfaces (including waterways) to prevent radio waves being reflected and arriving out of phase at the other end of the link. The image below shows the calculation for my link (not that it added much value).

Image 9

Once I get all the cameras installed I will be able to see the throughput and maybe optimise the link settings such as power output as well as enable the AirMax functionality.

Despite being called ToughSwitch I really think they wouldn't last long being exposed to dust and spiders, bugs etc. all day everyday in the garage so I installed a small 19" 6U cabinet and wired the cameras and a power socket and put the switch in it on a little shelf, all be it a wooden one until I order up a proper cabinet metal shelf. The garage consumer unit was also an old fashioned metal unit, it only had space for 2 of the old wired fuses. I had been meaning to replace this for years, so now seemed as good at time as any.

As you can see below, I think it looks tidy enough for a garage!

Image 10

Image 11

Once I had setup 9 cameras and had them all recording on the NVR the network traffic was around the 40Mbps;

Image 12

Network Next Steps

Once the full camera system is up and working, the next step is to lock everything down. Remove all the default passwords and then open up the relevant ports on my router etc. so that I can connect remotely from the internet.

The house end is a wiring nightmare. The networking gear, the NVR, NAS boxes etc. have wires all over the place. I really need to look at getting an enclosure similar to the garage end and sort everything out.

I am also going to try and sort out the existing house WiFi, at the same time as purchasing this point to point and POE equipment, I also purchased a Ubiquiti UniFi AP AC, wireless access point, offering dual band (2.4GHz + 5GHz) connectivity upto 400ft at combined 1.75 Gbps using a 3x3 internal antenna array. Job and article for another day.

The CCTV

The Cameras

Having looked closely at the layout of my property I had a pretty good idea in my head how I want to cover the key areas. On top of this I also wanted a couple of cameras that could capture an overview of a longer range. When it comes to night time, some cameras have limited IR capability.

During the search for suitable IP Cameras I came across a range of CCTV equipment that had both IP Cameras and suitable Network Video Recorders (NVR). I felt that by keeping to one supplier I had a better chance of ensuring compatibility of equipment and also better support should I need it.

The equipment I selected was a brand called Xvision and these were supplied by a company HDCCTV.

There were two different cameras I selected;

  • XC1080BP - These are 1080p bullet camera with a 78' field of view, 1920x1080 @ 25 FPS, IR to 30m
  • XC1080BAP - These are 1080p bullet camera with VariFocal 23' to 92' field of view, 1920x1080 @ 25 FPS, IR to 50m

Both cameras can see down to low light levels of 0.0003 LUX and are ONVIF Compatible. ONVIF is a standard for IP Based security products.

Image 13

Above: Xvision XC1080-BP Camera

Below: Xvision XC1080-BAP Camera

Image 14

The BAP camera with its wider field of view and longer IR capability were to be used as the longer overview cameras of the front and back gardens. The BP camera was to be used for the more specific monitoring of the various areas e.g. garage doors. To get an idea of what sort of coverage I would get with the various cameras, I took a snapshot off of Google maps and placed it into PowerPoint, then built up triangles with the relevant viewing angles and placed these roughly on the image. It isn't an exact representation, but gives a pretty good idea.

Having taken the first camera out of the box and setting it up to test it etc before mounting, this is when the first problem appeared. The supplier stated that it could take standard POE voltage and would internally regulate down to the required 12v operating range. The ToughSwitch can be programmed to output 0V, 24V or 48V over the port, having set it to 24V, I didn't see any activity on the LEDs of the network port. I decided to dig out a spare 12V power brick I hooked this up to the alternate 12V power plug on the camera loom. Sadly, nothing, not even a blink. Having checked with the supplier once again and having been assured that 48V is the normal supply over POE, putting 24V down shouldn't have made any difference. Given the fact the 12V supply wasn't even working, looks like a dead camera to me. The supplier agreed and a replacement was sent out.

I had ordered 2 off the BAP type, so with the 2nd camera, I hooked this up using the 12V power brick in the interim while I was waiting for the voltage confirmation from the supplier and confirmed the camera was all ok. Now it was time to mount the unit.

The supplier came back confirmed later that day that the POE should be set to 48V for both camera types. I disconnected the 12V power brick, configured the switch to output the required voltage on the port and sure enough the camera came back to life all ok.

The biggest thing to note is the wiring loom and plugs that come from the camera you need quite a large hole to get everything through, I think you could probably get away with a 28mm hole, but the closest I had to hand was a 32mm (however, eventually did purchase a 30mm some of the later installs). Drilling the hole through the board and passing the cables in, and then it was simply a case of screwing the four mounting screws. Using the laptop to access the feed I could then position the camera where I wanted it looking.

The image below is the first BAP camera mounted on the garage and overlooking the rear garden (there is a view from the camera perspective later on).

Image 15

The smaller BP camera has a much simpler wiring loom, with only an ethernet port and an auxilliary 12V feed. One other thing I noted was that this camera also had no ethernet leds on the plug, so only indication of any life was back at the switch.

Both cameras can be configured for different video formats on the main and sub feeds. Sub feeds can be typically used on the overview grids of multiple cameras and then the higher quality main feed is used when you want to view the single camera full screen. There was a huge array of settings for day / night modes, change over times, sensitivity, compression bit rates etc. It is good idea to experiment in various light conditions to get the optimum for your setup.

The cameras at the side of the house were going to be a bit of a headache. The wall is both granite block and covered in granite harling chips. Add to this that it is approx 2 foot thick, there wasn't much chance of me getting a 30mm hole through this easily. I decided to mount the cameras onto junction boxes, and then mount these to the wall. The cable looms for the cameras would then reside in the boxes. I only needed to drill a hole for the 2 ethernet cables. I thought I might have some trouble getting the cables through, but luck was with me and managed to get a hole between the granite blocks on the first attempt. Fortunately on the inside, I have an electricity cupboard which is open above it and can get in to see and get at the cables and also provide an easy route up to the loft where the switch and the NVR reside.

The junction boxes were available from my local Maplin (Part Number N92NH), although they only had 2 in stock and could have done with a 3rd for the last camera.

Below you can see both types of cameras mounted on these junction boxes.

Image 16

Other Camera Features

The cameras have various other features (depending on which one), they support alarm contacts in and out, audio in and out, RS485 pass through, number plate recognition (not that I need it) and smart IR. The IR function automatically dims the IR intensity as a subject approaches the camera. This prevents "White Flaring" and ensure that the subject remains visible.

The Network Video Recorder

The Network Video Recorder (NVR) selected was available in 3 different specifications, these determined the number of cameras that could be supported at either HD (720p) or Full HD (1080p). The model I selected was the XRN2016, this supports 20x HD or 16x Full HD or a combination of both.

The unit also came with or without various hard disk sizes pre-configured up-to a maximum of 16TB. I elected to purchase the unit without a hard drive and add this myself.

It is estimated that each Full HD camera requires approx 107GB per day of storage. Given the cost of HDD storage continues to fall, I initially purchased 1x4TB HDD with a view that would do to get me going then add up to another 3 drives over the coming months (spreading the costs).

To install the hard drive is was simply a case of removing 5x case screws + lid, removing 2x drive support rail screws, remove the rail, attach the drive, remount rail, attach SATA and Power cable to drive, close lid and power on.

The unit took care of all the hard drive management itself.

Image 17

One thing to be aware of is the NVR still had its protecting film on the top and bottom of the unit, as you can see in the image below, this film was obstructing the ventilation holes and had to be removed.

Image 18

Another point to note about this unit is the noise. The fan makes a racket. There does not appear to be any thermal control settings, it is just full on all the time. I originally installed this on my home office desk under my monitor, but the noise was too great, so it was relegated to a cupboard.

Despite the fan in the NVR, I thought the unit was also be susceptible to heat. My loft does get quite warm, especially when one of the computers in there (a folding/mining rig) is on full load. I did notice that after approx 48 hours in service the NVR dropped off the network. Rebooting the unit made activity appear on the network port for approx 15 seconds before it died again. The unit could still be logged into etc without any problem. I turned the mining rig off and let the loft cool down and powered off the NVR overnight. The next day, powered it back on, and the network port was working again.

Sadly, the unit fell off the network again. I fitted a temperature sensor to the main SOC heat sink, and it didn't appear to go excessively high (approximately 37'C). I also noticed that the first signs something was away to happen was the HDD LED also started indicating the loss of the drive. The unit event logs showed that a "Video Lost" and "Network Broken" alerts. Discussing this with the support group and eliminating the HDD had anything to do with it (because it still did the same thing without any drive installed), it was decided to return the unit as clearly there was a problem with it.

Once again the supplier rushed out a replacement overnight and all was good again.

The NVR unit also has a number of BNC Video connectors, VGA port, HDMI, alarm contacts in and out, RS485 for PTZ cameras, and eSATA for external storage. There are 2 USB connectors at the rear, comes supplied with a mouse. There is also a front USB port.

Monitoring Applications

There were various ways of accessing the camera streams.

The most obvious is via the NVR, after all that is what it is for. Simply plug in a suitable HDMI or VGA etc. display and away you go. Alternatively connect to the NVR via its web interface. At the moment though this requires an ActiveX plug-in so this limits you to Internet Explorer (IE). The developers do state they are working on a new version of their control software that will remove this limitation and make it any browser capable. Hopefully see this released in the next few months. (They are also working on the Apple versions of their products.)

It is also possible to connect to the camera's web interface, again using IE.

Both the cameras I selected support RTSP feeds and the main and sub stream can be accessed by using the following formats;

Main feed: rtsp://username:password@xx.xx.xx.xx:554/ch01.264?

Sub feed: rtsp://username:password@xx.xx.xx.xx:554/ch01_sub.264?

where xx.xx.xx.xx is the IP Address of the camera.

The image below is the web interface for the first camera I installed (the XC1080BAP) and shows the view overlooking the rear garden;

Image 19

One thing I did notice is that the NVR web interface doesn't appear to display some of the camera options correctly, i.e. the drop down lists aren't populated correctly. In this instance it was easy enough to just directly connect to the camera's interface and set the setting directly there. Hopefully a future firmware upgrade will address this.

Mobile Software

The company also provides and Android App in the play store, however, I failed to get this working for whatever reasons. There are many others available. The key is to search something that is RTSP (Real Time Streaming Protocol) capable.

RTSP Player which is free from the Android Store came in handy. I installed this onto my mobile phone and then simply enter the camera RTSP string (as above) above and could focus and position the cameras from the top of the ladder! The software wasn't perfect, but it worked enough to make the install just a little bit easier.

The developers also have Apple software in the pipeline which is apparently going through validation and should be available soon.

Desktop Software

There is also free Windows software available for download (MAC in development) and once configured to point at the NVR (or cameras) provides a clean interface for looking at the cameras. The view below is once I had 9 camera's installed (the 10th camera is going on the roof, but it is raining and I also need another junction box).

The layout can be moved around (supports up to 64 cameras) and by double clicking a window it can take you to the full screen main stream view.

The software also support the playback of record video from the NVR, screen grab, video export etc and a bunch of other stuff that I have yet to look into.

Image 20

The image below is a full screen view of the front garden by double clicking on the sub stream image of the overview matrix.

Image 21

CCTV Next Steps

Need to sort some of the camera streams, possible tweak some IR intensity on the rear garden overview camera. Downgrade some of the sub streams to minimise unnecessary traffic.

Once everything is up and running remove all the default user accounts, configure remote access for viewing while away.

Other options will include installation of PIR detectors and tie these into the alarm sensors that will then trigger events in the logs, making it easier to identify when things are happening, e.g. people present.

The Law

The law around CCTV is obviously a very complicated one. It depends on which country you live in, the purpose of the cameras, e.g. commercial or residential.

In the UK, cameras for protecting the home are exempt from the laws in place for commercial property. Data Protection and Privacy Laws do not apply in a domestic home security environment.

If you install cameras for the purposes of protecting your home and they happen to overlook a neighbours property or the public street, it doesn't matter.

If you are considering to install CCTV, then you obviously need to check your legal standing for its use and location/country etc.

In Summary

It has been a bit of a slog, off to a bad start due to some faulty hardware put a dampener on things. I have done some mileage up and door the garden, up and down ladders, but so far so good. Hopefully get the last camera in soon.

Time will tell as to how reliable the connections are etc. but having not skimped on the hardware should provide some decent reliability.

Now, let us just hope I never have to rely on it for providing evidence....a bit like a lifeboat on a ship, you need it, but never want to use it!

An enjoyable project none the less.

A big thanks to Colin Willacy at HDCCTV who supplied the CCTV equipment and provided excellent tech support and turnaround of the faulty gear. Also Boris at Y3K for his tech support input to the NVR issue.

References

History

  • 15th May 2014 - Added Network Topology Image plus a couple of minor corrections. 
  • 13th May 2014 - Article First Release.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Engineer
Scotland Scotland
I have been working in the Oil & Gas Industry for over 30 years now.

Core Discipline is Instrumentation and Control Systems.

Completed Bsc Honours Degree (B29 in Computing) with the Open University in 2012.

Currently, Offshore Installation Manager in the Al Shaheen oil field, which is located off the coast of Qatar. Prior to this, 25 years of North Sea Oil & Gas experience.

Comments and Discussions

 
QuestionConnecting cameras to plastic boxes Pin
Finbar12322-Aug-15 2:25
Finbar12322-Aug-15 2:25 
AnswerRe: Connecting cameras to plastic boxes Pin
DaveAuld22-Aug-15 4:44
professionalDaveAuld22-Aug-15 4:44 
Questionerm :) Pin
bryce20-May-14 12:30
bryce20-May-14 12:30 
AnswerRe: erm :) Pin
DaveAuld20-May-14 20:52
professionalDaveAuld20-May-14 20:52 
GeneralSuperb article Pin
gogbatch14-May-14 1:51
gogbatch14-May-14 1:51 
QuestionGreat article Pin
Mike Hankey13-May-14 10:49
mveMike Hankey13-May-14 10:49 
AnswerRe: Great article Pin
DaveAuld13-May-14 10:52
professionalDaveAuld13-May-14 10:52 
GeneralRe: Great article Pin
Mike Hankey13-May-14 10:57
mveMike Hankey13-May-14 10:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.