AN33: M1 – Closing a remote relay contact upon NMS alarm
Poseidon, in conjunction with the M1 a.k.a. Monitor one software, can be used to close a relay contact if a preset value (temperature, humidity, etc.) is exceeded. This AN describes one of the possible methods.
The M1 (Monitor one) monitoring system by FineConnection is designed for monitoring network and networking infrastructure status. Products in the Poseidon family are fully integrated with Monitor one.
In environment monitoring applications, one may need to close a contact (sound a siren, turn on a warning light, etc.) whenever one of the monitored values exceeds a defined threshold.
Monitor one allows to run an external program or batch file upon alarm. In the following example, this feature is used to run the switch_on.cmd script whenever an alarm occurs. The script checks the alarm state message for a given string ("Contact" in this example), and if it is found, invokes the PosDamIO utility to close the contact remotely via the network.
Download the executable files used in this example:
1) Configuring Monitor one
First, it is necessary to create a "Shooter" in Monitor one that acts as the alarm trigger.
2) Creating a script
Now, let us write a simple script that finds the device causing the alarm and closes the contact when appropriate.
Monitor one can pass several parameters to the script. In this case, we are interested in the IP address of the alarmed Poseidon device as well as in the error message text. The error message contains the name of the Shooter causing the alarm. We will use this name to filter the request.
The script can look like this:
Save the script with a .cmd extension. The PosDamIO.exe file must reside in the same directory as the script; otherwise, the script will not work.
If you used a different Shooter name, replace the "Contact" string in the script with that name. For more information, see AN29: PosDamIO – Controlling outputs from the command line. The script can be modified to filter the alarms according to device name, or to close other contacts upon alarm from other Shooters.
3) Activating the Shooter in Monitor one
The last task is to enable script execution and start the Shooter for the given device.
Test the setup by creating an alarm situation on the configured sensor. After a short while, Poseidon will activate the output. The closing of the contact is indicated by an audible click and a LED lighting up (Poseidon 3268).
The script is called in every alarm situation. However, if the alarm description does not contain "Contact", the PosDamIO utility is not invoked and outputs remain unaffected.
Besides the alarm start condition, Monitor one can react to an alarm end condition, too. This can be useful to reopen the closed contact.
Related products and links