Install A DVR System With Homemade PC And IPCAM
This time I would like to share my experience with the installation of a video surveillance system very simple.
Why A WIFI Instead Of Wire?
Initially I wanted to buy a classic DVR, buy a bunch of cameras and create the plant, running it even from mobile phones, PDAs, etc..
Now these systems are cheap .. But I break to pass wires here and there, having to install a fixed point a DVR and cameras above: change often idea, some of them the position it fixedly other maybe I could change its position … at home or in the garden …
In short: my need is to have the freedom to modify the design at will … without running meters of wire throughout the house and garden, and most have some form of alarm and video recording.
And then some of the material already had at home: other equipment meant other expenses ..
It ‘true that such a system is very safe: it uses as the Modem WiFi network and uses a standard PC; if there is no will power anything could go wrong, and the system may not report any intrusions and stop recording ….
What Were My Needs?
- Using material already available (possibly a PC with Windows or Linux);
- Use of cameras WiFi (to avoid passing cables in half the house and / or garden);
- Record video from cameras only on motion detection;
- Possibility of alarm by email on motion detection;
- Elasticity system (ability to move both DVR cameras at my leisure …)
After several studies and analyzes have arrived at the following conclusions and configurations, that the public in this article.
Main Unit: PC Or DVR?
I immediately discarded the traditional DVR that I place by some customers (example: URMET or the cheaper Chinese) as in my case I was interested only work with wireless units, even if they are ‘theoretically’ less reliable than a closed loop system .
Then I launched into the speech PC, having different. I did not buy a new one and I was interested in something small, with battery (in case of a power outage should last at least half an hour, unless you use a UPS) and resistant.
My choice fell on a NETBOOK lying for months in a drawer, waiting to be used for some purpose.
That’s right, a netbook.
Nothing iperpotente, but …. usually these PCs are famous for being very slow.
An old Acer Aspire One with bodywork:
- Windows XP service pack3
- ATOM dual core processor
- 1GB of RAM
- Hard Disk 160GB
- Display by 11 inches.
Now, many will turn up their nose, thinking that a netbook is not able to manage the recordings capture from 3 or 4 cameras … I can assure you that is not so. Indeed!
Just take some accortenze as:
- Windows XP “EMPTY”, ie without any program, installed to a minimum, not a virus;
- framerate recording from IP cameras slightly reduced (the program);
- registration active for only a few seconds (type 30) and only on alarm (that is, when something moves in front of the cameras);
- recording this for a few weeks (we will configure the system to keep only a few days or weeks);
In this way with a 160GB drive we are well covered: a week with 3 cameras I found a space used by less than 5 GB.
Wishing we could put a SSD drive but I think in this case is a waste of money.
Why Windows And Not Linux?
I tried many software and operating systems, before coming to my conclusions. Surely there are many different avenues, even better than the one I adopted, to create a DVR system with home made use of IPCAM.
To be honest though, with linux despite being practical enough (I’m a former Unix systems engineer) was not able to command simply my IPCAM.
With Windows I tried many programs but only one convinced me .. simple, useful, elastic, affidavile and FREE: it is called iSpy.
This software allows you to manage not only possible but also IPCAM WebCam attached to your PC (via USB) or any other device with a digital scanner … as phones and even the Kinect of XBOX !!
As I said at the beginning, I started from the need to use material already present in the house. Since I bought last summer some IP cameras, I exploit these to create something more reliable and above all to record the video stream from them.
The cameras that I had at home were 3 and are similar to this:
Practically mine were marked “Power Match” but I found that in reality are nothing but IPCAM Foscam with custom firmware.
These cameras are on the market at different prices, depending on the features they offer: start from € 40 and for a model with internal WiFi / LAN, configurable via the web and with the possibility of movement and recording audio, we spend about € 55.
For outdoor models the price rises of course, but they are not expensive.
These cameras actually can live its own life in the sense that they have their own control panel available on the Web and can be configured to act as a sun (no DVR).
The models in my possession in fact I used for some periods attaccatte simply to Modem, home via ADSL were able to send a photo via e-mail on alarm.
They also work at night and can be rotated by remote.
The software of these IP CAM can manage them remotely via a PC browser or mobile phone and allows you to set a DNS to know the current IP of our modem (if dynamic) and can be accessed from outside.
The only flaw is that not all IPCAM record: or rather, can send some photos of space FTP or shared folder, but a flow of direct registration (at least my) not produced it. Other cameras record on MemoryCard but it was not what I was looking for.
Then some software needed to manage them, even remotely, but it could control its recording in a more reliable and centralized.
And another drawback is power: 5Volt my work, but there are others who go to 12Volt. In all cases it is however necessary to power them, and then are WiFi but not entirely.
On the internet however I have seen some that have used battery systems (for me unreliable): in my case I positioned the cameras near some source of energy …
As I Set The Whole Thing …
I then installed on my netbook-DVR quite bare-bones Windows XP. Having to dedicate this pc only DVR service (God forbid we use it for other ..) I made sure that there turns the bare essentials.
The PC I configured on my network, attacking with LAN cable rather than the WiFi to give more reliability to the connection of the central unit.
I assigned a fixed IP and to speed up the pc I turned off all the graphics settings in the properties, in this way:
Right click on “My Computer” -> Properties -> Tab “Advanced” -> In the “Performance” click “Settings” (see picture below):
and then I choose “Adjust for best performance”.
Not satisfied, I also disabled some services to me unnecessary. I go to “Start” -> Run -> and I type “services.msc” to go into the Services panel:
Click on the services to be disabled, and completely inactive (DISABLED I select from the menu) some of the services unnecessary in this case as:
- Secondary Logon
- Automatic Updates
- Bluetooth service (the PC has a Bluetooth card but not used in our case)
- Security Center PC
- Windows firewall
- Routing and Remote Access
You can also disable the other if you know what you are touching: otherwise forget.
That done, the next step is to make sure that Windows starts smoothly at startup: should not ask any password. This setting is important as in the case of restart (also controlled by remote) it is necessary that the PC can run smoothly.
To do this, there are a number of ways: I preferred the more simple and that is the use of a program that allows you to change many settings in Windows XP: Tweak UI Powertoy.
This little program was developed by Microsoft but is no longer available on its website. You can find it HERE .
Once installed and running, just go to Logon -> Autologon -> and check “Log on automatically at system startup” By setting username and password (if the password exists).
After doing this we have to disable ALL settings for screen savers, stand-by and off hard drives. To do so, click on the desktop (an empty spot) with the right mouse button -> Properties -> then select up “Screen saver” and the lower “Power” -> and in the window that opens select the combination “Laptop / Laptop “and set” Never “for all the items of” Turn off hard disks “and” Standby “.
In this way, if we close the lid of the netbook PC will not turn off MAI. Inquire what you do some testing and that everything works as expected.
Finally, as a last step, we set up a program to access remotely as TeamViewer.
The modem used is a common modem: nothing fancy … is a source telecom modem (white ones in distribution in 2013) modified to run on Infostrada.
You can use a modem dedicated only to the cameras and the PC that acts as a DVR: However, if you do not have a second ADSL line, the modem will be isolated and in this case will not have any possibility of remote access to your DVR.
I installed three cameras (but I’ll add soon other 2) both inside and outside the house, where the WiFi modem is reliable: they too have a fixed IP.
The only problem was the energy source for the cameras in the garden: I fed obtaining energy from certain points of light present in the garden;
to avoid running wires in conduits, and above all to jump the switch that controls the lamp which I picked up the energy, I used a cable ground which was not in use in the lamp socket and I stuck to that the small power of the rooms.
Let’s say an electrician might find some simpler solution … my still it was as though aesthetically is not the best (a wire coming out of the socket …) but it is functional.
As for the configuration software, I left DVR functionality to manage the recording of each camera while I set the alarm with sending photos via email : this setting the only active when needed.
From the control panel of IPCAM you can configure them in many ways: for example:
- Configuring DDNS;
- Configuration LAN or Wireless;
- Sending email through SMTP server configuration (it’s OK to Google);
- FTP: to save pictures taken during the alarm on an FTP space;
- Preset configuration for movement horizontal / vertical chamber.
Some of these IPCAM have even taken a relay for remote operation of some equipment or circuit breaker trigger some alarm: a friend for example, has included the opening of the gate by pressing a button on your smartphone ..
The heart of the whole system is the software, iSpy version v.126.96.36.199.
I’ve tried several, but I find this to be the faster and more reliably on Windows.
Here’s how I set up a camera:
In the tab “Camera” I set:
- Room name;
- Label Date / Time (displayed during recording);
- Maximum Frame Rate: 8 (with this value I get video enough fluids)
- Ignore audio: off (not sure if the PC or network is powerful enough to record audio);
- Model room, fixed IP, port, username and password (those are set in the control panel of the single IPCAM)
In the tab “Motion Detection” must:
- Trigger Range: with this we set the sensitivity of the camera or rather the sensitivity of motion detection. We have to do many tests to arrive at a correct value; in the case of outdoor camera I put the trigger all the way left.
In the tab “Registration” I selected “Record on motion detection”, medium-high quality, type of AVI video files, the rest I left as default.
Other configurations that I have applied in the panel “Storage” where I set for every camera to a separate folder on the desktop and I set a management of Storate, with parameters Max Folder Size MB = 60000 and Hours Max Age = 160. They are indicative parameters, you may use as you please perhaps increasing if you have more resources (disk space).
The program is quite complex, I have tested only for what I needed.
One thing I could not have set the PTZ controls that guide the IPCAM: each room has a sort of command that rotates and move and those in my possession have failed to rotate with the configuration of different models Foscam that the program projects .
It matters little, as to move (even remotely) can act on the panel WEB configuration that each room offers.
How Do I Access Remote Cameras Or DVR?
To access outside our network we must expose the ADSL modem on the internet with a FIX IP or use a DDNS service that allows you to automatically associate outside our dynamic IP to a label.
This is the only functionality that we will need in the event of use of a DVR classic among many prefer No-ip.com that with 10 euro per year allows me to configure up to 15 different labels (that is, I can theoretically handle 15 DVR systems separated).
Where to set up this service? Well we could install a small program on your PC that provides No-Ip.com the current IP; or set (recommended) the three cameras.
Council to set up the cameras as well as to know the IP of our network so we can access each camera independently (perhaps to adjust the configuration or orientation).
So we have to associate an IP and a port to each element: for example, I’ve set:
- Room 1: 192.168.1.81 door: 81
- Room 2: 192.168.1.82 door: 82
- Room 3: 192.168.1.83 door: 83
The doors are important for service WEB of each room: These leads are then configured on the modem, practically have to “open them” in the configuration panel.
In the following screen is the configuration that I adopted in my modem that allows external access to IP ports and above:
The panel of single IPCAM can be reached easily from the browser on your smartphone or tablet: I have not tried to test some application made specifically for IPCAM.
To access the DVR, we say we are a bit limited if you use a smartphone.
But with a PC and TeamViewer no problem: we can manage and control the PC-DVR without problems.
The system I am proposing here is a “version 1″ that is an early version of a DVR homemade, using a PC, your LAN / WiFi as infrastructure and economic IPCAM.
It ‘an example of a system of monitoring and recording limitations and advantages, the project has definitely improved.
Obviously I do not assume any responsibility on the reliability of what I present: I can only say that I use this system in parallel with a warning system among the best on the market and the use of both can give you some confidence.
It must be said that a wireless system is attacked and potentially unreliable in the case of radio problems and disorders of any type or in case of electrical problems: the advantage, however, it is that such a system can be optimized in all respects and provides a lot of freedom a classic that DVR can not give.
Among the upcoming changes that making similar to the system:
- Remote recording of video files: almost if I have to test with the resources available, you can record video directly to Cloud as well as hard disk, in order to increase system reliability.
- Using UPS and batteries in parallel to IPCAM (maybe rechargeable): to be shut PC-DVR, modem and cameras in case of power failure;
- Use of alternative policies for Internet connectivity: ability to use a different source to connect the DVR to the Internet, such as a USB / modem, in case of problems with the ADSL;
- Other types of alarms : the PC or from other forms of IPCAM generate alarms in addition to email.