Versions Compared

Key

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

...

  • 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;
  • virtual_type - type of virtual sensor "snmpget discrete";
  • utype - custom type, defines the sensor icon: current, factor, frequency, humidity, power, temperature, vibration, voltage;
  • reverse - inverse flag of sensor output (0 or 1), inverts sensor state;
  • server - name or ip-address of the host, length is not more than 255 characters;
  • port - the port number (161 by default);
  • version - protocol version, possible values: 1, 2c (default 2c);
  • comunity - a community with read access for the device being polled, up to 31 characters in length;
  • oid - numerical OID variable identifier, up to 255 characters in length;
  • period - the polling period, seconds;
  • control - the string with which the read value is compared, if the string is contained in value, the element has the state "normal", if not then the state is "alarm".


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

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

Or for discrete element:

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



When creating a new sensor (id is not specified), some parameters are mandatory - name, virtual_typevmax (for analog only), vmin (for analog only), server, port, version, community, oid, period. The rest of the query parameters are optional, and if not set, they will be set to the default values.

...

Information about the analog element looks like:

<element id="216001" index="12" module="2008" clas="analog" type="snmpget" name="virtual get 01" state="low warning" um="Volts" hwport="1" value="24.54" vmax="457.2" vmin="-24.0" low_alarm="13.0" low_warning="36.0" high_warning="174.0" high_alarm="197.0" expr="x*2" 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" server="192.168.0.25" port="161" version="2c" comunity="read" oid=".1.3.6.1.4.1.39052.1.3.1.9.203001" valuestr="12.27" status="working" >

<time t="1579681575" last="1579681475" period="1">

<d v="24.540" t="1579681574"/>

<d v="24.540" t="1579681573"/>

</time>

<time t="1579681575" last="1579681455" period="60">

<d v="24.540" t="1579681515"/>

<d v="24.540" t="1579681455"/>

</time>

<time t="1579681452" last="1579681452" period="3600">

</time>

<time t="1579681453" last="1579681453" period="86400">

</time>

</element>

Information about the discrete element looks like:

<element id="110001" module="2008" clas="discrete" type="snmpget" name="virtual get 02" state="normal" hwport="2" value="0" reverse="0" period="20" server="192.168.0.25" port="161" version="2c" comunity="read" oid=".1.3.6.1.4.1.39052.1.3.1.7.201001" control="Onboard" valuestr="Onboard Temperature" status="working" >

<time t="1579682300" last="0">

<d v="0" t="0" /><d v="0" t="1579682300" />

</time>

</element>

Additional read only fields is:

...