A logic software module of NetPing devices is designed for a simple automation and can perform such tasks as maintaining a micro climate, managing automatic switching on/ switching off the backup equipment and many more. The logic works on the basis of the rules that are programmed by a user through a web interface.
Task: When closing a door in a server room more than 20-40 times during 30 minutes, there is a need to lock an electric door lock and send an SMS notification to a group of system administrators.
Let us examine a way to solve this task using a NetPing 4/PWR-220 v4/SMS device with an updated module "Logic" that has been implemented in firmware versions later than DKSF 54.3.2.
To implement a described solution, there is a need to have the next equipment:
- A NetPing 4/PWR-220 v4/SMS power distribution unit – 1 pc.;
- A NetPing IO v2 monitoring unit and an external relay for managing an electric lock – 1 pc.;
- Door sensor (reed) – 1 pc.;
- An electric lock – 1 pc.;
- A local network – 1 pc.
Operation Algorithm of the Solution
- A NetPing 4/PWR-220 v4/SMS device receives data about opening a door from a door sensor connected to it;
- As soon as a number of door closing exceeds 20 times during 30 minutes, NetPing 4/PWR-220 v4/SMS sends an SMS notification and an SNMP SET command via a local network to a NetPing IO v2 device;
- A NetPing IO v2 device accepts a command and locks an electric lock
Configuring a NetPing 4/PWR-220 v4/SMS Power Distribution Unit
Let us consider that a NetPing 4/PWR-220 v4/SMS power distribution unit is configured for the operation in your local network with connected sensors.
Let us describe a logic of actions when closing a door in a server room more than 20 times during 30 minutes.
Let's go to the page «Logic»:
Check a checkbox «Enable logic» and enter the first rule:
If a door to a server room has been open and then closed, then a door counter increases by 1. Check a checkbox of a rule 1 and specify a condition, like in the example below:
The second rule:
We have to control more than 20 closing of a door in a server room during 30 minutes. During 30 minutes means that we have to evenly subtract 20 from the counter 1 for the last 30 minutes. Therefore, if a door has not been closed during 90 seconds (1800 seconds./ 20 times), we have to decrease a door counter by 1.
The third rule restarts the timer/counter 2 and is necessary for a correct work of the second rule.
Check checkboxes and specify a condition like in the example below:
The fourth and the fifth rules:
Of a door counter in a server reaches the value 20, then NetPing 4/PWR-220 v4/SMS sends a command to lock a door through the module SNMP Setter1 to a NetPing IO v2 device and sends an SMS notification to system administrators. Check the next check boxes and specify a condition:
Parameters of an SNMP Setter1 are configured at the same page «Logic» below the section «Rules»:
Address – is an IP address, where an SNMP SET command will be sent. In this example, an IP address of a NetPing IO v2 device is specified;
UDP Port – is a port that listens to an SNMP agent on a remote NetPing IO v2 device;
OID (.1.3.6...) – is an identifier of a variable that will be specified on a remote device. In this example, an identifier «.22.214.171.124.4.1.25728.8900.1.1.3.1» is specified. It is designed for controlling an IO1 line in the «output» mode of a NetPing IO v2 monitoring unit to which an electric lock is connected. When a status of an IO1 line is changed from 0 to 1, an electric lock is switched on and locks the door. There is a need to indicate a full OID in a numeric notation, starting from «.1.3…». A list of variables is contained in a MIB file from a device in a specific format or in a documentation of a device. It is possible to use the freeware iReasoning MIB Browser or similar software to browse a MIB file conveniently, in a form of a tree, and check functions of variables;
Community – SNMP Community for read that is configured on a remote device at the page «SETUP».;
The value «On» (type Integer32) – When a NetPing 4/PWR-220 v4/SMS sends the value "On", to a NetPing IO v2 device, an IO1 line, to which an electric lock is connected, will be switched to a status "on", and a door in a server room will be locked.
Save the changes by clicking the button «Apply Changes».
Now specify a text of an SMS notification for system administrators:
Go to the page «Notification»:
Click the inscription «Click here to add new record» in the last row of the section «Customizable notifications»:
Fill in a form of a notification according to the example below, and click the button «Apply changes».
As a result of these configurations, a door to a server room will be locked and system administrators will receive an SMS notification about this if a door to a server room will be closed 20 - 40 times during 30 minutes.