The element allows to calculate the value from the data of arbitrary sensors.

Requests for management:

addvirtual - add a virtual sensor. Extra options are:


If the new element is successfully created, the response is:

<error type="no error" id="215005" />

When creating a new sensor (id is not specified), some parameters are mandatory - virtual_type, name, var. The rest of the query parameters are optional, and if not set, they will be set to the default values.

Identifiers in the list (var), in number of 26, must be separated by commas. If the variable is not used, then the corresponding identifier must be -1. For example: 201001,203001,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,213001,-1,-1. Corresponding variables is A, B and X.

When editing an element, you can change individual fields. Editing an element is also possible with the updateelement command.


delvirtual - remove the virtual sensor. Extra options:


getelement - read the element. Extra options are:

Information about the element looks like:

<element id="215001" index="8" module="2009" clas="analog" type="math" name="Math 01" state="high alarm" um="parrots" hwport="1" utype="current" value="38" vmax="500.0" vmin="-10.0" low_alarm="13.0" low_warning="36.0" high_warning="174.0" high_alarm="197.0" expr="A+b+100+x" hyst_type="time" hyst_low_alarm="1" hyst_low_warning="1" hyst_normal="0" hyst_high_warning="1" hyst_high_alarm="1" hyst_value="0.300" period="20" var="201001,203001,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,213001,-1,-1," >
<time t="1506342326" last="1506342226" period="1">
<d v="12.116" t="1506342325"></d>
<d v="12.116" t="1506342324"></d>
<d v="12.116" t="1506342323"></d>
...
</time>
<time t="1506342326" last="1506336326" period="60">
<d v="12.116" t="1506342266"></d>
<d v="12.209" t="1506342206"></d>
<d v="12.209" t="1506342146"></d>
...
</time>
<time t="1506339739" last="1506336139" period="3600">
<d v="11.950" t="1506336139"></d>
</time>
<time t="1506336126" last="1506336126" period="86400"> </time>
</element>