Probably the easiest way for an IT professional to solve the problem of monitoring the environment in a server room would be to use specialized controllers with issuing data via SNMP (for example, NetBotz or NetPing). But for those who are not afraid of difficulties and want to get an inexpensive solution at the industrial level (with the serial production of equipment) - there is an interesting option with the Modbus protocol.

Below I will describe the monitoring system based on Russian-made components - BVD, and we will âmergeâ the data in Zabbix 4.0. NVP "Bolid" is widely known in the circles of fire and security automatics and the decision in question will carry this "imprint". Their devices, to put it mildly, do not differ in the design and thoughtfulness of the cases, but ... the price more than compensates for all these shortcomings. It is worth noting very good documentation and more or less normal free technical support.
Protocols and interfaces
Before turning to the "hardware" very briefly consider the protocols and interfaces used:
Modbus : industrial protocol, built on the principle of "Master" (Master) - "Slave" (Slave). In the Modbus network, there can be only one master who interrogates the slaves and âtellsâ what to do. It can use RS-485 (Modbus RTU) or Ethernet (Modbus TCP) interface as a transmission medium. Theoretically, the maximum number of devices - 247.
Orion : the proprietary protocol of the company NVP âBolidâ, built on the principle of âMasterâ (Master) - âSlaveâ (Slave). Apparently, the modified RS-485 interface is used as the data transmission medium, due to which the maximum line length can reach 3 km (!). The maximum number of devices - 127.
DPLS (two-wire communication line): the proprietary protocol of the company NVP "Bolid", built on the principle of "Master" (Master) - "Slave" (Slave). Copper pair cable is used as data transmission medium (âtwisted pairâ is recommended). The maximum number of devices - 127 + 1. The topology is a bus (or ring) with branches, the maximum length of the line can reach 1.5 km (depends on the type of cable, the cross section of the cables and the number of connected devices).
RS-485 : physical layer interface, uses âtwisted pairâ for data transfer (one â2-wireâ or two pairs â4-wireâ, the second is less common). The stated maximum line length is 1.2 km. Topology - tire.
As you can see, rather long-distance communication lines are used. In all protocols, device addressing is set by "handles" (pre-configuration).
Sensors
The system assumes the connection of âspecialâ (proprietary) address sensors (more strictly speaking, âdetectorsâ, i.e. devices with a built-in sensor), but you can also connect âregularâ untargeted ones using address expanders (from 1 to 8 inputs). The use of addressable detectors offers two advantages: almost all addressable devices are powered via a signal line (i.e., there is no need to connect a separate 12V power line) and there is no need to place an address expander anywhere. Sensors are connected to the
DPLS .
The range of "terminal" equipment is quite wide, but I will give what may be required when solving our problem:
- S2000-W - combined temperature and humidity sensor for indoor use (IP41). It has a certificate of measurement, the error is only 0.5 ° C and the recommended retail price is only 1200 rubles!
- S2000-SMK (and its variations) - âdoor openingâ sensor (magnetic contact detector, reed switch). Recommended retail price - 300 rubles.;
- S2000-DZ - point of flooding sensor (done in conjunction with Rielta, so the body is "unformat"). Recommended retail price - 800 rubles.;
- S2000-AP1, S2000-AP2, S2000-AP8 - address expanders for 1, 2 and 8 connections, can be used as "receivers" of signals of the "dry contact" type (on / off) from other equipment (for example, from a fire extinguishing device) or pump conditioner);
- S2000-SP2 is a relay unit (for 2 outputs) with which you can control devices (for example, an alarm lamp with a light indicator). Recommended retail price - 1200 rubles.
A complete list of equipment, see the
official website of the manufacturer .
Controller
The "line" of controllers, so to speak, consists of three models:
- S2000-KDL - the basic model (the designation stands for âSystem 2000 - Two-Wire Communication Line Controllerâ);
- S2000-KDL-2I - galvanic isolations for RS-485 and DPLS are added;
- S2000-KDL-Modbus - a converter of the Modbus S2000-PP protocol has been added to the S2000-KDL-2I design.
Appearance of controllers It is best to use the S2000-KDL-Modbus, but you can also use the S2000-KDL / C2000-KDL-2I with the S2000-PP protocol converter installed next to it, which has a âpanel mountingâ design.
The controller performs the role of "Master" in the
DPLS line (only one DPLS line can be connected to one controller), and in the Orion RS-485 line it already acts as the "Slave" and cannot take data from it "directly". For data acquisition in the RS-485 Orion lines, the so-called S2000M or S2000-PP console (including in the built version) is used, which already have standardized data transmission interfaces.
In the above controllers can also highlight the following characteristics:
- refer to a configurable type, not a programmable one (i.e., it is only necessary to adjust the parameters, not to develop a program);
- DPLS support up to 127 addressable devices (S2000-VT has two addresses), and many start-up engineers do not recommend using more than 100-110;
- Dual power input DC 12-24V;
- The housing structure is not very convenient (all the connecting wires cannot be hidden in the instrument housing and you have to remove them from the back of the instrument).
For system resiliency, you can use the following measures (which are optional):
- ring loop - break of the loop in one place does not affect the presence of signals from the address sensors;
- the use of branching-isolating blocks (BREEZE) - allows you to make radial branches, as well as isolate the segment of the loop in which the closure of "DPLS +" and "DPLS-" occurred.
IMPORTANT: new firmware is constantly being released on the controllers, which eliminate errors and add functionality, and firmware S2000-KDL and S2000-KDL-2I are incompatible.
Modbus connection
As described earlier, you can use either the S2000-Modbus controller or the S2000-PP converter. Both schemes provide for the issuance of signals via the Modbus RTU 2-wire protocol using RS-485 as a slave device (our master is Zabbix or some SCADA system). To connect to the server, you can use two methods:
- preferred - Modbus RTU / Modbus TCP converter with connection to the same local network where our software server is located;
- Cheap - RS-485 / USB converter with connection directly to the server. I note that there are many complaints about the reliability of USB stick data (you can take almost any, I ordered from China for 100 rubles, I used RS-232 / RS-485 converter and USB / RS-232 adapter and everything continued to work!).
There are two possible schemes for sending events to the Modbus protocol:
- directly from S2000-PP / C2000-KDL-Modbus, when these devices operate in the Orion-Master mode (selected by a jumper on the board) and act as an interrogator of the Orion system;
- using the S2000M console when it collects information from the controllers and only then sends it to Modbus via the S2000-PP / C2000-KDL-Modbus (Orion-Slave mode). This scheme is good because the console can be used as a âlocal terminalâ (see the events on the built-in LCD screen), and also continue to record events in case of a server failure with the monitoring software. Minus: a little more difficult to set up and the remote has a very specific appearance.
Examples of system diagrams Power and installation
The power supply requires a 12V DC power supply, preferably stabilized and mounted on a DIN rail. Its power (usually indicated either in mA or A) can be roughly matched at the rate of 1 controller - 500 mA. I would recommend using a redundant power source (with built-in battery, RIP) only when using the S2000M remote control. And be sure to connect the power supply to the same uninterruptible power supply (UPS) as the monitoring system server.
You can of course mount all this on the wall, but we leave it for the installers of security and fire alarms, and use the 3U DIN-rail for mounting in a 19 "cabinet (for example, TsMO PS-3U or Cabeus with the same part number, the front panel will have to be thrown out In the case of using the S2000-M remote control, you can use a 19 "4U plug (preferably perforated), which will serve as a mounting plate and to which you will already fix the DIN rail for the terminals and the controller. Minus of the decision - the equipment supports the assembly 19 "plane.
Assembling and assembling a system from components should not raise questions, but pay attention to the following:
- Most sensors have a small piece of protruding cable. It is possible to build up a cable by applying either heat-shrink soldering, or a KC-2 two-pair junction box (compact, but the quality is lame) or an RJ11 (RJ45) connection;
- prior to installation, sensors need to register their addresses (as described below) and mark;
- When connecting sensors, you must observe the polarity of "DPLS +" and "DPLS-" (see the documentation - what color has DPLS +, usually color) - if you mix it up, then the sensor will not be detected in the system.
For those who do not want to solder, but likes to crimp the "chips", you can use the option described below (probably, itâs better to use RJ11, so as not to accidentally switch the DPLS line to the server).
It will take:
- cable twisted pair 2-pair, unshielded;
- âBagâ of RJ11 connectors (6P4C or 6P6C);
- RJ11 splitters with nest type inputs (there are a variety of options at very nice prices).
On one pair we start DPLS, on the other, for example, 12V DC. Connecting sensors through splitters.
Stand assembly
For the "practical" part a stand was assembled consisting of:
- protocol converter S2000-PP production NVP "Bolid";
- controller S2000-KDL production NVP "Bolid";
- thermohygrometer (combined temperature and humidity sensor) ĐĄ2000-ĐТ manufactured by NVP âBolidâ;
- magnetocontact detector S2000-SMK manufactured by NVP "Bolid";
- leakage point sensor C2000-DZ production "Rielta";
- address extender S2000-AP1 isp. 02 production NVP "Bolid";
- volumetric detector Foton-10M manufactured by "Rielta" (such a "lying around");
- power supply 12V AT-12 / 1.5 DIN manufactured by AccordTec;
- RS-485 / USB adapter purchased on aliexpress (on the popular CH340G chip, linux defines it as âQinHeng Electronics HL-340 USB-serial adapterâ). It became interesting how the system will work in the cheapest configuration;
- thin client TONK 1811 from the TONK group of companies (bought on avito for 500 rubles) on an Intel Atom N270 processor with integrated GMA950 graphics.

Refinement of the thin client and the appearance of the standThin client was a bit "finished":
- A 2GB DOM module with Windows XP embedded installed was replaced with 2.5 HDD ATA 60GB from an old laptop (I had to buy a cable, SATA-HDD for some reason did not pick up - the SATA port included in the BIOS);
- increased the size of DDR2 SO-DIMM RAM from 1GB to 2GB;
- Linux Mint 19.1 âTessaâ Xfce Edition is installed and remote desktop is configured using TightVNC;
- âModifiedâ cooling system - reduced the radiator to fit the HDD almost âflushâ with the case, removed the top cover and a 120 mm fan connected through a resistor to the top. Immediately lost all the "brakes", it was quite responsible to work.

Setting up the car equipment
All configuration is done in the Windows environment, respectively, before starting work, you need to install the driver on the RS-485 / USB adapter, as well as two âsuperâ programs from BHP, which are supplied free of charge:
Orion-prog and
Uprog . Next, the devices are separately connected to the RS-485 / USB adapter to the AB RS-485 âOrionâ ports (direct layout is used, and not like on COM ports).
IMPORTANT: for all subsequent steps at S2000-PP jumper XP1 on the board should be removed.
Step 1. Insert the RS-485 / USB adapter into the USB connector and look at the device manager which COM port number is assigned to the adapter. Drivers for the adapter must be installed without exclamation marks in the "Device Manager".
Step 2. On behalf of the administrator, launch Orion-prog, select the required COM port and search for and view the firmware version of the device. Go to the manufacturer's official website and check for a more recent firmware and, if necessary (most likely required) - perform an update (at the time of writing this article: for S2000-PP - 1.32, S2000-KDL - 2.22).
Instrument firmware in pictures * In fact, firmware 1.32 was set âcrookedlyâ - the Uprog configuration was not read from the device. Therefore, "rolled back" back to 1.31.
Step 3. Setting the address at the instruments (first with S2000-PP, for example, 2 and then with S2000-KDL - 3). To do this, run the Uprog - all devices have the default address 127, so you need to configure the devices at the beginning one by one. For more detailed videos from the manufacturer, see
YouTube .
Step 4. After setting the address on the S2000-KDL, it is necessary to set the addresses of the sensors in the two-wire communication line (DPLS). They also have the default address 127 (and the circle with the sensor in the Uprog is not highlighted). We read the device configuration (Ctrl + F3) and in series connect the sensors to the DPLS outputs, setting addresses. When pointing to the sensor in the context menu âRequest AU Typeâ, you can specify the type of sensor or âRequest A / D ADCâ - find out if the sensor works (for example, for a magnetic-contact detector ADC when closing: 100, and when opening: 50). In fact, I have the following address configuration: 1 - reed switch S2000-SMK, 2 - temperature C2000-BT, 3 - humidity C2000-BT, 4 - leakage C2000-DZ, 5 - address extender S2000-AP1 isp. 02 (with the Foton-10M volume detector connected to it).
Assigning addresses to sensors in pictures Next, go to the "Inputs" tab and do the following:
- we indicate the types of sensors: for temperature - 10, for measuring humidity - 15, for all others - 6 (technological);
- for technological inputs, we set âRecovery time, sâ - this is the time after which the loop will return to the âNormalâ state after receiving the âViolationâ state. You need to specify a number not less than the polling interval in Zabbix (I took 10 seconds);
- disable âAU display controlâ (0), âOpen circuit and short circuit controlâ and âBackup battery status monitoringâ to simplify setup.
Setup of entrances to S2000-KDL in pictures After all the âmanipulationsâ with the S2000-KDL, we perform the âConfiguration recording in the deviceâ.
Step 5. Configure S2000-PP.
On the tab "Device" settings are shown in the picture (this is the most "running" and on most devices they go by default). Similar settings should be at the COM-port of the RS-485 / USB adapter and any other device connected to the Modbus network. For the S2000-PP device in the Modbus network, I chose address 11 (the address in the Orion system is 2!).

Then go to the tab "Devices" and begin to fill in the "Zone Table":
- I indicated the first column as â3â - this is the address of the S2000-KDL device in the Orion system;
- the alarm number (âalarm loopâ) is the address of the sensors (in fact, the LAN = address, we can skip several addresses if we do not want to take information from them);
- Section No. Modbus - you can group our sensors into groups. In order to simplify - I did not do this and attributed 1 section to all;
- zone type is a very important parameter. Choose it according to the type of sensor.

After setting up the S2000-PP, we perform the âRecord of the configuration in the deviceâ.
Step 6. We connect S2000-PP and S2000-KDL to the network via RS-485 Orion, connect the sensors to the S2000-KDL (can be a bunch of two terminals), and connect the RS-485 / USB adapter to the Modbus C2000-PP output. The XP1 jumper is installed in the closed position (important: after installing the jumper, the device must be reset by resetting the supply voltage). All - the system is "ready for battle."
We check the "operability" in the free console program
Modpoll Modbus Master Simulator (hereinafter - "Modpoll"), for example, at the address of the firmware "S2000-PP" or by returning information from the S2000-KDL to the address "40000" - this is the first sensor:

Firmware devices "for review" can be downloaded
here .
Zabbix configuration
Warning: Zabbix was configured for the first time, like Linux Mint (since there is no Zabbix for Windows) :)After installing Zabbix, you need to install the
autoconf ,
automake ,
libtool ,
pkg-config packages and then the extension module -
libzbxmodbus . About him on
HabrĂŠ there is a separate article (I will constantly refer to it) and it has recently been updated, just to work with Zabbix 4.0. The article also has more detailed information on the Modbus protocol. The module itself and more or less detailed instructions are on
GitHub .
Small differences in installation from that specified on GitHub:
... ./configure --prefix=/etc/zabbix --enable-zabbix-3.2 ... sudo make install
Studying the work of the
libzbxmodbus module,
it became clear that using the S2000M remote control circuit would not work, because in this case, receiving data from the thermohygrometers looks like this: writing the number of the necessary zone to the register 46179 and then taking the data from the register 46328 - very nontrivial (in âlargeâ SCADA systems, this is possible, for example, in MasterSCADA).
Register in the configuration file
etc / zabbix / zabbix_server.conf links to the extension and connect the "hardware" to the "server" with Zabbix. I didnât have to install drivers for the RS-485 / USB adapter, but I didnât understand how to use which USB number I used, itâs good that the connection to
/ dev / ttyUSB0 worked (you can see if the device is detected in the system using the
lsusb command).
As with Windows, we check using the Modpoll utility (I ran linux i386) that the hardware is connected and information is available from them:

Since the article describes the configuration process using the example of Zabbix 2.2 - there is a slightly different interface there, Iâll provide explanations and pictures of the settings.
Step 1. Create a network node and a group into which our nodes will belong (for example, a node - âEnvironmental Monitoringâ and a group - âEngineering Infrastructureâ):
Setup> Network nodes> Create network node> Enter our names> Add

Step 2. Create data items. The article recommends creating templates, but since our system does not contain duplicate elements, I will therefore skip this step. For example, if we had several air conditioners connected via Modbus, then we could use the functionality of the system.
Settings> Nodes> In the line containing the name of our node âEnvironmental Monitoringâ click on âData Elementsâ> in the appeared window click âCreate Data Itemâ.
We start to "hammer" our sensors:

Small nuances:
- The article uses the syntax of the âmodbus_read_registersâ function, and according to the description of GitHub âmodbus_readâ - the second option is shorter and works;
- instead of macros {$ MODBUS_PORT} and {$ MODBUS_SLAVE}, you can specify the port in the form / dev / ttyUSB0 and " 11 ", but this will be inconvenient if you later need to change the USB port or S2000-PP address;
- the documentation states that to request a zone status (column "Modbus zone number") on S2000-PP, you need to contact: "register address 40000 + M, where M = (zone number â1)" - this is the way: "zone number minus 1 ";
- do not do very frequent polling by time: S2000-PP will start to return the error âexception error 15â - the device does not have time to prepare the data (this is expressed in the constant light of the indicator on the device);
- for temperature and humidity, data with registers 3000 -...
- in the âData Elementsâ window there is also the necessary âPre-Processingâ tab. Here you can edit what will be shown "in the end." Temperature and humidity, is obtained from the read values, which must be divided by 256: "User factor" - 0.0039 (i.e., 1/256);
- For discrete reed switches, leakage sensors, etc. you need to use the "Display values", it is connected with the method of providing information.
Setting data conversion in pictures It is a little about in what type the data is provided at interrogation of zones.
Suppose we got the answer in decimal format 9148 (D). Let us translate into hexadecimal format (HEX): we get 23BC - according to the instructions for the S2000-PP device, these are two events with codes 23 (HEX) / 35 (D) and BC (HEX) / 188 (D). Next, we go look at Table 5. "List of events (states of the loop) of the Orion system". In it we find, 35 "Restoration of a technological input" and 188 "Restoration of communication with an entrance". There is no need to translate D-HEX-D, the first event is the integer part of dividing the obtained value by 256, and the remainder is the second event (
9148 =
35 * 256 +
188 ). When polling technological inputs, we will take away only the first event (priority), which âmustâ take states 35 and 36 (âRestoration of the technological inputâ and âViolation of the technological inputâ). We will discard the fractional part (the second event) using the setting of the Data Element âInformation Type: Numeric (positive integer)â.
Step 3. Fill in port macros and device numbers:
Setup> Network Nodes> âEnvironmental Monitoringâ> select âMacrosâ

Step 4. Displaying readings to the control panel:
Start screen> All panels, select "Create panel"> in the appeared window set "Panel name" and the user to whom this panel will be available> Click "Create new widget"> Type "Data view", Update interval "10 seconds", Groups nodes Engineering Infrastructure> Add> Adjust Panel Size and click âSave Changesâ:

Conclusion
The resulting system, through the use of "long-range" protocols, can be an excellent solution, both for monitoring the server and a pair of cross, office zones (in terms of monitoring the provision of a temperate-humidity regime) or even a small data center. Someone may say âfu-fu-fu, the car is still that nasty thing, you need to use XXX (to substitute something from the industrial automation)â is also an option, but in my opinion it will be much redundant and also more expensive . And a small nuance: as you can see, the system on the car is quite simple (although there is some strange logic), but to âfinishâ the decision on the prom. controllers - sometimes he is still a âheadacheâ.
PS This article is an adaptation of two articles on my blog:
Low cost monitoring for server room (part 1 - introductory)Low cost monitoring for server room (part 2 is practical)