Article content:

Types of sensors

Sensors with a discrete output can be of the following types:

Reading Parameters

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


Examples of responses to a query of the "discrete" class element:

<element id="101001" module="2008" clas="discrete" type="dry" name="Dry-1" state="normal" hwport="1" value="0" utype=" " reverse="0"></element>
<element id="105001" module="2014" clas="discrete" type="vibration" name="vt470-0217-vibration" state="normal" hwport="2" value="0" reset="60" high="50" vmin="0" vmax="100"></element>
<element id="109005" module="2015" clas="discrete" type="overload" name="Outlet-5-OVERLOAD" state="normal" value="0" reverse="0" um="none" descr="Current overload"></element>

Where:

If one of the attributes 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 the element, a temporary log of the sensor values ​​is also output, in the form:

<time t="1455541503" last="0">
    <d v="0" t="1455541003"> </d>
    <d v="1" t="1455541484"> </d>
    <d v="0" t="1455541485"> </d>
    <d v="0" t="1455541503"> </d>
</time>

Sensor readings (field 'v') are indicated with a time stamp (field 't').


Modification of parameters

It is executed by the updateelement command:

With additional parameters available for modification: