The need to remote monitoring of the object has always been considerably topical. Today, the market of video surveillance cameras (or closed-circuit cameras, or CCTV cameras) can offer devices for almost all needs that allow using CCTV cameras in any systems, including the systems for repeating and visualizing the information that comes from various sensors in monitoring systems. In this article, we will examine the example of connected CCTV cameras to a device for monitoring server rooms UniPing server solution v4/SMS and their configurations necessary for sending snapshots when sensors for visual evaluation of the environment triggered in a remote room. For example, after connecting a door sensor, we will be able to see a face of an individual, who opened the door. After connecting a smoke sensor, it is possible to evaluate actual smoke in the room. A leakage sensor shows a water level on the floor. There are also many other variants that are limited only by the administrator's imagination and the necessity in the monitoring.
To implement a described solution, you will need:
- a surveillance camera (CCTV camera). The main requirement towards the camera is the presence of Alarm IN inputs. A camera SNR-CI-DB30I is going to be used in the article;
- A monitoring device UniPing server solution v4/SMS (it is also possible to use any other device for monitoring or power controlling, equipped with IO lines, for example, UniPing server solution v3, UniPing v3, NetPing IO v2, NetPing 8/PWR-220 v4/SMS, NetPing 2/PWR-220 v4/SMS, NetPing 2/PWR-220 v3/ETH);
- Any sensor, the triggering of which is the basis for getting a snapshot from a camera. In the example, a door sensor is used.
Configuring UniPing server solution v4/SMS
First, there is a need to perform a basic configuration of a monitoring device. To do this, go to the section "SETUP" (1), and configure a network interface (2) and access parameters (3, login and password for a web interface, community read and write, IP access filter when necessary, these parameters do not impact the work of a device with a camera).
Then, we should connect a sensor that is of interest to us. In our example, it is a door sensor. This is a sensor of a "dry contact" type and connecting process is described in the user guide. In a current example, it is connected to IO4 (IO4 line must be set to the "input" mode):
Also, there is a need to configure an IO1 line for sending a signal to a surveillance camera. It must be set to the mode "output of logic":
Configuring a Surveillance Camera
In this example, a camera SNR-CI-DB30I is used. Its manufacturer is Dahua company. It has an impressive anti-vandal case and the entire set of interfaces.
In this article, we are interested in the Alarm IN interfaces. They are designed for a camera to accept an alarm signal from external sensors or devices. On the photo below, there are interface terminals showing.
Let's elaborate on the pinout terminals:
- Alarm COM (contact of a built-in relay);
- Alarm NO (contact of a built-in relay);
- Alarm IN1 (contact of the first alarm incoming line);
- Alarm IN2 (contact of the second alarm incoming line);
- Alarm GND (GND contact for alarm incoming lines).
First, there is a need to configure network parameters of a camera. To do this, go to the web interface of a camera and switch to the tab "Set" (1). Then, open network configurations "Network" (2), subsection "TCP/IP" and fill in the fields (4) according to a network configuration and our needs. I want to pay attention to the crucial importance of the current addresses of DNS servers because we will later access the SMTP server using its domain name.
Then, we should configure the parameters of the SMTP server, we will use it for emailing a screenshot. To achieve this:
- Go to the subsection "SMTP(E-mail)" and fill in the fields according to the requirements.
- Address and port of the SMTP server. In the example, the Google SMTP server is used.
- Username and password from the account of the SMTP server (usually, it is a username and password from Google mail).
- Authentication - SSL. Email subject is, for example, "Cam ALARM". At the same place, we check the checkbox "Attachment" and specify a destination address.
- Specify the interval for sending emails.
- Save the settings.
If the interval (5) is left default equal to 0, then when there is an alarm signal at camera's Alarm IN, it will send emails without any break, i.e. with a zero interval. The value of the interval between emails should be set according to the requirements for notifications, and requirements of the SMTP server, some of them can limit the number of sent emails.
Then, it is important to check the fact of sending emails by a camera. To do this, there is a button "Email test" on the page for configuring the SNMP server. After clicking this button, an email will be sent:
Then, there is a need to configure the internal logic of a camera, that will send us a screenshot about the external event. To do this:
- Go to the section "Event";
- Then go to the subsection "Alarm";
- "Relay-in" is a choice of an Alarm IN line, there are two of them in this camera. Choosing the line № 2 is due to the convenience of assembling as Alarm GND and Alarm IN 2 are neighboring contacts;
- "Relay-out": a camera is equipped with a relay output for controlling an external actuator. For debugging purposes, it is convenient to enable switching a relay because when a relay switches, it clicks, which means the beginning of the alarm event;
- "Send E-Mail" - check a checkbox so that a camera sends an E-mail notification about the alarm;
- "Snapshot" - in addition to an E-mail notification, a snapshot from the camera will be sent;
- Save the settings.
To check the correctness of our settings, close Alarm IN2, and Alarm GND:
If at the previous step you checked the checkbox "Relay-out", then after closing contacts, you will hear a relay clicking, and after 10 seconds ("Alarm delay" near a checkbox) there is one more click, that shows the end of the alarm event, and the relay gets back to the initial state. Check the button and see:
- A letter about the beginning of the alarm event;
- A letter with a snapshot from the camera;
- A letter about the ending of the alarm event.
After opening the second letter, we see a general information about the event and a snapshot attached:
A logic of the camera is configured. Nuances of the logic operation of your camera can be found described in the official documentation for it.
Plugging the Camera to UniPing server solution v4/SMS
The camera should be plugged to a monitoring device UniPing server solution v4/SMS according to the table:
UniPing server solution v3/SMS Terminals
|IO1 ← 4K7 Ohm → +5V|
For devices with the current, «logic 1» IO line in the «output» mode less than 5mA, it is necessary to plug an additional external resistor of par value 4К7 between IO line and power contact (+5V or +12V or +3V3)!
All actions on plugging wires to IO lines of the camera and UniPing server solution v4/SMS are necessary to be done when it is switched off.
When the camera is successfully plugged to a UniPing server solution v4/SMS, there is a need to configure an internal logic of a monitoring device so that a logic level of an IO line, to which the camera is connected, changes from "1" to "0" when a door sensor triggers, and the logic level "1" is kept when a door is closed. To do this, go to the page "LOGIC" and configure rules in a next way:
- While IO4 = 0, keep IO 1 switched on.
- While IO4 = 1, keep IO 1 switched off.
The operation of the logic can be tested visually by looking at the device:
A door is closed, IO 4 (from a door sensor) logic 0, an alarm signal is not sent to the camera (IO 1, logic 1).
A door is open, an IO 4 (from a door sensor) logic 1, an alarm signal is sent to the camera (IO 1, logic 0).
A message with a snapshot is sent to the email:
At this point, a basic implementation of the solution is done. The same way, any other sensors that are connected to a monitoring device UniPing server solution v4/SMS are configured. Nuances of the implementation can take place only when configuring the internal logic of a device.
As a result of implementing a described solution, a visual information content of notifications about a current status of server rooms or any other objects at which monitoring devices from the NetPing company are used is enhanced. This can be useful, for example, for visual controlling the access to a server room or to racks. Also, for example, when a smoke sensor triggers, an administrator will know if there is smoke indoors without physically going there. Or, if a shock sensor is used, it is possible to learn the status of racks.