📜 ⬆️ ⬇️

Home Security System

Good day, dear Habrovchani! I decided to share with you my little weakness, from childhood I love to know everything and watch everybody! It was this idea that led me to the desire to build my own video surveillance system within an apartment. My path was somewhat thorny, but first things first.

First stage

The first thing I started building my system with was learning the basics of building video surveillance systems. In fact, any video surveillance system represents a video camera connected to a digital device that is responsible for processing the video signal from a camera, recording a picture and issuing alarm messages. Recording can be done in continuous mode or only in the event of any event (motion detection, camera cover, camera shutdown, or a sensor triggering). Modern video surveillance systems are closely connected with the Internet, which allows you to see live images from cameras, view recorded videos and control video surveillance systems at the other end of the globe.

To simplify my task, I decided to stay on the most modern platform - IP cameras. This is perhaps not only the most modern, but also the most expensive option. In fact, each IP camera is a separate video surveillance system in which all the necessary functionality is implemented.

Next, I needed to find a way to store video information, because I have long abandoned a stationary PC in favor of a laptop, I decided to implement another of my long-time wishes: the home server. No sooner said than done, the HP ProLiant MicroServer G7 N54L was on my shelf, since its cost is now 8,870 rubles, which is very interesting for a piece of hardware of this class to it acquired HDD WD Red WD20EFRX , 2TB for 3 920 rubles. It was installed Windows Home Server 2011 . In this preparation for the emergence of IP cameras was ready.
')
image


To be honest, this whole idea is quite spontaneous, and neither the budget, nor the resources that I had thought about were calculated in advance, I did everything in the course of the outbreaks.

Second phase

The second is the choice of IP camera. The main criterion when choosing was the presence of Wi-Fi, so as not to pull the wires throughout the apartment. Properly, without examining the question, I chose the most affordable and simple IP camera D-LINK DCS-931L for 2,080 rubles. and here I realized that you need to carefully study the characteristics of what you buy.



In fact, all that she can do is show the picture in real time, and everything related to the issue of storing images from the camera is present only in more expensive versions. I will not lay out all the th of this camera, I will confine myself to a description of its main functionality:





Based on the available capabilities, I picked up an FTP server on MicroServer using regular Windows tools and set up the camera accordingly, organized streaming recording to the server. As a result, I got a huge bunch of 3MB files with a few seconds of video. From a practical point of view, I received a video archive that was not suitable for viewing and analysis, and the video stream was poorly compressed (but what should be requested from MJPEG). Later, I made a decision to transfer this camera to the entrance and record settings for the event, i.e. writes only when there is movement in the frame. If suddenly someone wants to unscrew it, then I will know what it looked like. The second significant drawback of this camera was of course the image quality, not that the small resolution of 640x480 , and most importantly a small viewing angle of 45 ° , which is extremely small for covering the area of ​​the room from the corner, through the camera we will see only a third of the area. And to all the sensitivity of the sensor is bad, it can be seen only in good light, there is no night shooting mode, oh, and the sound is terrible.

Third stage

The third stage of my Wishlist was the choice of a new IP camera with the ability to record streaming video to a remote server, a good viewing angle and night mode. Here I was already responsible for the choice, but what was my surprise that there is not a single camera within $ 200 that would meet my criteria, but in fact this is the minimum that turns a regular web-camera into a video surveillance tool.

After a week of studying specialized forums, my choice was on the HIKVISION DS-2CD2432F-IW camera, which cost was 7,590 rubles.

image


Here is her review:



A little about her:

Matrix Type: CMOS
Focal length: 4mm
Camera resolution: 3 MP
Wi-Fi: 802.11n
Network protocols: TCP / IP, HTTP, DHCP, DNS, DDNS, RTP, RTSP, PPPoE, SMTP, NTP, SNMP, HTTPS, FTP, 802.1x, Qos (SIP, SRTP, IPv6 option)
Memory card support: Micro SD up to 32 GB.
Shooting characteristics
Resolution: 2048 x 1536
Video compression formats: H.264 / MJPEG
IR illumination: yes
Night distance: 10 m
Viewing angle: 75.8 °
Triggered alarm: PIR sensor / Motion detector / Video loss / IP address conflict Network disconnection / Video replacement / Storage control
A few more points that I would like to note:

Instructions for the camera .

Who is it?

A few words about the brand: Hikvision Digital Technology - a leading supplier of digital video surveillance systems with its own office and production in Hangzhou (China). Here, even their video presentation, they instilled confidence in me:



As you can see, the brand is Chinese, but cameras with similar technical characteristics of European production cost far beyond $ 500. Naturally, I had some concerns when choosing this camera, but as it turned out later, it was in vain. I just want to make a reservation that the camera comes without a power supply, and we will need a 12V 1A power supply for the load.

Who wants to get acquainted with the devices from this manufacturer, I just want to recommend the Russian representative of this company with an adequate forum of those. support

Customization

After connecting the camera to the home network, I immediately updated the firmware to V5.1.2 build 140116 and proceeded to its configuration.


Having made a number of basic settings, or rather several dozen, the camera began to give up the stream in the way I need it. Next, my task was to force the camera to record on a remote server. Which is used as the same server, installed on board Windows Home Server 2011, which essentially plays the role of a NAS. And then began dancing with a tambourine. Next, I will describe my customization experience that I had to feel in my own skin, because I could not find any information on the network.

And of course the most interesting is the comparison of images from both cameras, as they say, without comments here:


Next, I had to force this camera to write a video stream to the archive. As it turned out, the camera can record video stream using several protocols: go to Settings - Advanced Configuration - Storage - NAS .

To begin, I tried to configure the NAS using the NFS protocol. Everything is simple, under Windows rises in 5 minutes. After specifying the path to the NFS storage in the settings, the camera turns on the siren and does not shut up (yes, there is a built-in siren in the camera), then I press the format button on the Storage Management tab, then the camera stops, the long formatting process begins, on the server containers are created. After the formatting is completed, the status is set to “Norm”, but literally after a couple of seconds it is reset and the camera starts to turn on the siren again. After trying 5 times, all the time I got the same thing.
Then I tried to connect via the SMB protocol, it's still easier here, the usual shared folder on the server with configured access rights.



We also format it on the “Storage Management” tab, and lo and behold - everything works!

But there were a couple of unsolved issues:

1. HOW TO DISABLE THE SIREN? (It always works if the camera loses connection with the server).
2. HOW TO ADJUST THE RESTORATION OF THE COMMUNICATION AT THE INTERRUPTION OF THE CONNECTION WITH THE NAS? (If the router or server is rebooted, the camera loses its connection and does not restore it until the camera is rebooted and all this is accompanied by a gad siren).
The first question I managed to solve, for this we go Settings - Advanced Configuration - Events - Events . Next, select the event type, in our case, this is the “HDD Error” and remove the Audio message checkbox.



The second question was dropped by itself, now everything is recovering itself, China in one word! Although now everything is connected to the power supply unit, respectively, when an external power supply hits, the UPS powers both the cameras and the server with the router. If they turn off the light, SMS will come to my mobile and I can connect to the server via RDP and put everything out correctly. When restoring power, I also receive SMS, you can turn on the server via WakeOnLan, and all from a mobile phone.

Another pleasant bonus turned out to be the iVMS-4500 lite mobile application .


What can:

Fourth stage

Making it all work together. This is what I ended up with:



Two cameras, internal and external. Outdoor D-Link writes on the motion sensor in the frame on the staircase, internal records the situation in the apartment on an ongoing basis. Both store records on the server. The server distributes DLNA to any devices, plus we have access from a mobile phone via the Internet to both cameras, D-Link only in real time, and Hikvision in both real and archived recordings. In the future, it remains only to think of why I need all this. I will not give access to broadcasts for ethical reasons.

Total budget

HP MicroServer G7 server with hard disk: 12 790 rub.
IP Camera D-LINK DCS-931L 2 080 rub.
HIKVISION DS-2CD2432F-IW camera 7,590 rubles.
The power supply for the camera HIKVISION was, you can buy ~ 500 rubles.
ZyXEL Keenetic Giga router was - now costs 3,200 rubles.
The APC 500 uninterruptible power supply unit was, now costs 3,500 rubles.
DLNA server Serviio Pro 900 rub. (Pro version for web access to the entire server library)
Windows Home Server 2011 - unfortunately not for sale, and can only be a pre-installed hardware manufacturer, so free.
Total: 30 560 rubles.

PS When studying this issue, you should not forget about the bandwidth of the Wi-Fi channel, according to my calculations, no more than 3 HD cameras will work normally. At the same time, when I record 2 cameras (HD and SD), I calmly watch HD movies on DLNA without brakes and skipping streaming recordings to the server.

Source: https://habr.com/ru/post/223853/


All Articles