Analog sensors

Article contents:

Types of sensors

Sensors with an analog output can be of the following types:

  • temperature - temperature sensor (VT500 Temperature sensor, etc.);
  • humidity - the relative humidity sensor (VT510 Humidity sensor);
  • voltage - voltage sensor (VT520 AC voltage monitor, etc.);
  • fvoltage - voltage sensor converter (VT410 DC voltage monitor);
  • current - current sensor;
  • fcurrent - current loop converter (VT420 Converter, etc.);
  • vibration - vibration sensor;
  • power - power, used in devices with the function of measuring the energy parameters of the load;
  • frequency - frequency, used in devices with the function of measuring the energy parameters of the load;
  • factor - other energy parameters, used in devices with the function of measuring the energy parameters of the load;
  • dewpoint - a virtual dew point sensor;
  • airflow - airflow sensor (VT550 Wind velocity meter);
  • modbus rtu - virtual modbus sensor (RTU);
  • modbus tcp - virtual modbus sensor (TCP), reserved for future use;
  • math - virtual math sensor;
  • snmpget - virtual SNMP GET sensor.


Reading Parameters

Reading is done with the getelement command, with the following parameters:

  • k - user session ID;
  • id - the identifier of the element;
  • period - the time interval of the accumulated data; the following values ​​are possible: "100seconds", "100minutes", "100hours", "100days";
  • mode - the output mode of the data, must be "xml";


Examples of responses to a query for an element of the class "analog":

<element id="201001" index="1" module="2005" clas="analog" type="temperature" name="Onboard Temperature" state="normal" value="37.5" vmax="110.0" vmin="-50.0" low_alarm="0.0" low_warning="5.0" high_warning="45.0" high_alarm="50.0" at0="1.000" at75="0.000" um="°C"></element>
<element id="208001" index="16" module="2014" clas="analog" type="power" name="Outlets bank A-Psum" state="low alarm" value="0.0" vmax="20000.0" vmin="0.0" low_alarm="0.0" low_warning="0.0" high_warning="3000.0" high_alarm="3600.0" um="W" descr="Power"></element>

Where:

  • id - unique identifier of the element;
  • index - for internal use;
  • module - the identifier of the module to which the element belongs;
  • clas - the class of the element;
  • type - describes the type of the element within the class;
  • name - the name of the element;
  • state - the state of the element;
  • hwport - hardware port, determines the location of the connector on the body of the device;
  • value - a numerical value corresponding to the measured value;
  • utype - a user-defined type;
  • vmin - maximum value for the measuring range;
  • vmax - the minimum value for the measuring range;
  • low_alarm - lower alarm threshold;
  • low_warning - lower warning threshold;
  • high_warning - upper warning threshold;
  • high_alarm - upper alarm threshold;
  • at0 - the calibration coefficient in the formula at0*x+at75;
  • at75 - the calibration factor in the formula at0*x+at75;
  • expr - expression for calculating the output value (for conversion sensors);
  • um - unit of measurement of this element;
  • descr - an auxiliary description of the element.

If there one of the attribute is not specified in the response, then the value of this attribute is not determined in the course of work and its installation does not affect the operation of the element.

When reading an element, a temporary log of the measured value is also output, in the form:

<time t="6849" last="6749" period="1">
<d v="9.351" t="6848"/>
<d v="12.109" t="6847"/>
<d v="19.629" t="6846"/>
...
<d v="19.629" t="6749"/>
</time>
<time t="6863" last="804" period="60"> <d v="11.107" t="6803"/> <d v="30.620" t="5743"/> <d v="12.451" t="3683"/> ...
<d v="19.629" t="804"/>
</time>
<time t="3624" last="24" period="3600"> <d v="1.096" t="24"/> </time> <time t="24" last="24" period="86400"> </time>

The sensor readings are divided into groups: 100 seconds per second, 100 minutes per minute, 100 hours and 100 days. Sensor readings (field 'v') are indicated with a time stamp (field 't').

Modification of parameters

It is executed by the updateelement command:

  • k - user session ID;
  • id - the identifier of the element;

With additional parameters available for modification:

  • name - the name of the element;
  • low_alarm - lower alarm threshold;
  • low_warning - lower warning threshold;
  • high_warning - upper warning threshold;
  • high_alarm - upper alarm threshold;
  • at0 - the calibration coefficient in the formula at0*x+at75;
  • at75 - the calibration factor in the formula at0*x+at75;
  • expr - expression for calculating the output value (for conversion sensors);
  • utype - a user-defined type.

Reset log of the measured value

It is executed by the resetelementdata command:

  • k - user session ID;
  • id - the identifier of the element;
  • period - the time interval of the accumulated data to be deleted, the following values ​​are possible: 100seconds, 100minutes, 100hours, 100days,

The period field may not be specified, then the data of all time periods is deleted.

Analog sensor power reset

It is executed by the switchpower command (administrator rights required):

  • k - user session ID.

This resets the power to analog sensors for the desired time (default 15 seconds). Used to reset the state of smoke detectors after they have been triggered. For the duration of the action, the operation of analog sensors is suspended. In the user web interface, this function is performed by the "Analog sensor power reset" element.

Hysteresis parameters

Additional parameters for managing hysteresis are read by the getelement command, set by the at0*x+at75 command, along with the rest of the sensor parameters.

  • hyst_type - the type of algorithm used to calculate the hysteresis:
    • disable - the hysteresis is disabled;
    • value - hysteresis by the value measured by the sensor value;
    • time - hysteresis using time (used by default).
  • hyst_value - the value of the deviation of the sensor value when calculating the hysteresis by value, the value with a floating point (minimum 0, maximum 10,000, default 0.3);
  • hyst_low_alarm - the time in seconds, during which the sensor should keep its value in this range, for transition of the sensor to this state (minimum 0, maximum 1000, default 1);
  • hyst_low_warning - same as previous (default 1);
  • hyst_normal - same as previous (default is 0);
  • hyst_high_warning - same as previous (default 1);
  • hyst_high_alarm - same as previous (default 1).

When you request getelement, all parameters are returned in the response, regardless of the type of algorithm. With updateelement, you can specify all the parameters, or only those that need to be modified.

These parameters are also relevant for sensors of a virtual type, for example dewpoint.