NetPing devices have built-in IO lines (input-output lines). They can be used both in the «input» mode, and the «output» mode or a «logic output» for controlling external devices. Examples of using IO lines in the mode «output»/«logic output» are as follows:
- remote rebooting of servers, which is an imitation of pushing a «Reset» button;
- remote controlling of an alarm, lighting, a ventilator;
- controlling electric lock, and electric gate at a remote site;
- controlling the elements of a «smart home»: watering plants, opening / closing blinds, water pump, boiler, electric heaters, etc.;
- remote controlling of an energy device (diesel generator, gasoline generator)
In this example, a configuration of generating a short-term pulse on an IO1 line when a specified temperature threshold on a sensor, connected to a NetPing device, is exceeded, will be examined.
To implement the example, there is a need to use:
- a NetPing device with built-in IO lines (UniPing server solution v4/SMS, UniPing server solution v3, UniPing v3, NetPing 8/PWR-220 v4/SMS, NetPing 2/PWR-220 v4/SMS, NetPing 2/PWR-220 v3/ETH);
- 1-wire temperature sensor, (THS), 2m or temperature sensor, (T811), 2m
Configuring a NetPing Device
The first step of configuring a system is to connect contacts from IO1 and IO2 lines of a NetPing device. It is necessary for correct operation of logic rules described below. With the use of these rules, a short-term pulse will be generated on an IO1 line when certain events take place.
Afterwards, there is a need to connect a temperature sensor to a NetPing device. The information about connecting and configuring a temperature sensor can be browsed in a technical documentation on the page of a device description on the official website.
On the page «DISCRETE INPUT-OUTPUT» of a device web interface configure IO1 and IO2 lines according to the specified settings shown on the screenshot:
Filter out short noise pulses – is a field for installing time, during which an IO line, configured as «input», must stay stable to register this status. Therefore, this parameter allows filtering out short noise pulses or bouncing of mechanical contacts. On the screenshot, a parameter «Filter out short noise pulses» is set as 10000 ms. It is a delay, which will be used in the example for setting the duration of a pulse on an IO line.
On the page «LOGIC» of a device web interface configure logic rules, which will generate a pulse to an IO1 line of a NetPing device within 10 seconds when a specified temperature threshold on a temperature sensor is exceeded:
The first rule of the module «LOGIC» switches a logic level of an IO1 line to the status «logic 1» when a temperature threshold specified in the module «Thermo(Hygro)stat» on the first channel (TSTAT 1) is exceeded.
The second rule of the module «LOGIC» switches a logic level of an IO1 line to the status «logic 0», but with a fixed delay (10 seconds), specified in the settings of an IO2 line on the page «DISCRETE INPUT-OUTPUT» of a device web interface.
After saving logic rules by the button «Apply changes» it is left to configure the module «Thermo(Hygro)stat» on the page «LOGIC» of a web interface by selecting a necessary temperature sensor and indicating a threshold, exceeding which the first rule of the module «LOGIC» will trigger:
As a result of indicated settings, a NetPing device will generate a short-term pulse on an IO1 line within 10 seconds when a specified temperature threshold is exceeded: