Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Элемент позволяет вычислять точку росы по данным произвольных датчиков температуры и влажности.

Запросы для управления:

addvirtual - добавить виртуальный датчик. Дополнительные параметры:

  • k - идентификатор сессии пользователя;
  • id - идентификатор элемента, в случае если идентификатор отсутствует создается новый элемент, иначе модифицируется существующий;

  • name - имя элемента, длина не более 63 символов;
  • at0 - коэффициент калибровки в формуле at0*x+at75;
  • at75 - коэффициент калибровки в формуле at0*x+at75;
  • low_alarm - тревога по занижению;
  • low_warning - предупреждение по занижению;
  • high_warning - предупреждение по превышению;

  • high_alarm - тревога по превышению;
  • virtual_type - тип виртуального датчика, пока поддерживается только один тип - аналоговый датчик точки росы "dewpoint";
  • virtual_id1 - идентификатор датчика температуры, значения которого будут использоваться при вычислении;
  • virtual_id2 - идентификатор датчика влажности, значения которого будут использоваться при вычислении.

 
При успешном создании нового элемента ответ имеет вид: 

...

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

При создании нового датчика (id не указывается), обязательными являются параметры - virtual_type, virtual_id1, virtual_id2. Остальные параметры запроса являются необязательными, и при отсутствии будут установлены в значения по умолчанию.

При редактировании элемента допускается изменение отдельных полей. Редактирование элемента также возможно командой updateelement.

delvirtual - удалить виртуальный датчик. Дополнительные параметры:

  • k - идентификатор сессии пользователя;
  • id - идентификатор элемента.

getelement - чтение элемента. Дополнительные параметры:

  • k - идентификатор сессии пользователя;
  • id - идентификатор элемента.

Информация об элементе имеет вид:

...

Article contents:

Table of Contents


The element allows to calculate the dew point from the data of arbitrary temperature and humidity sensors.

Requests for management:

addvirtual - add a virtual sensor. Extra options are:

  • k

...

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

...

  • ; if the identifier

...

  • is absent, a new element

...

  • is created; otherwise the existing one is modified;
  • name - the name of the element, the length is not more than 63 characters;
  • at0 - the calibration coefficient in the formula at0*x+at75;
  • at75 - the calibration factor in the formula at0*x+at75;
  • low_alarm -

...

  • threshold level for notification;
  • low_warning -

...

  • threshold level for

...

  • notification;
  • high_warning -

...

  • threshold level for notification;
  • high_alarm -

...

  • threshold level for

...

  • notification;
  • virtual_type - type of virtual sensor

...

  • ; at the moment only one type is supported - analog dewpoint sensor "dewpoint";
  • virtual_id1 - the identifier of the temperature sensor, the values ​​of which will be used in the calculation;
  • virtual_id2 - the identifier of the humidity sensor, the values ​​of which will be used in the calculation.


If the new element is successfully created, the

...

response is:

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

When creating a new sensor (id is not specified),

...

some parameters are mandatory - virtual_type, virtual_id1, virtual_id2. The rest of the query parameters are optional, and if not set, they will be set to the default values.

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:

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


getelement - read the element. Extra options are:

  • k - the user session ID;
  • id - the ID of the item.

Information about the element looks like:

<element id="201003" index="4" module="2009" clas="analog" type="dewpoint" name="Virtual dewpoint" state="normal" hwport="99" value="12.1" vmax="110.0" vmin="-55.0" low_alarm="-31.4" low_warning="-27.9" high_warning="35.0" high_alarm="69.7" at0="1.000" at75="0.000" um="°C"virtual_id1="201009" virtual_id2="202002">
<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>