The element allows to get data from MODBUS RTU device and to write data to MODBUS RTU device.

Requests for management:

addvirtual - add a virtual sensor. Extra options are:

Options for reading Modbus data only (analog virtual sensor):

Options for Modbus protocol (reading only):

Options for Modbus protocol (writing only):


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

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

When creating a new sensor (id is not specified), some parameters are mandatory. For reading: name, virtual_typevmax, vmin, mb_addr, mb_reg, mb_func, mb_type, mb_order, mb_period. For writing: name, virtual_typemb_addr, mb_reg, mb_func, mb_wrval. 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.


delvirtual - remove the virtual sensor. Extra options:


getelement - read the element. Extra options are:

Information about the element looks like:

<element id="213003" index="4" module="2009" clas="analog" type="modbus rtu" name="Virtual modbus" 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" expr="2.3*x" um="C" hyst_type="value" hyst_low_alarm="1" hyst_low_warning="1" hyst_normal="0" hyst_high_warning="1" hyst_high_alarm="1" hyst_value="0.340" mb_addr="31" mb_reg="00F2" mb_func="4" mb_type="5" mb_order="1" mb_period="30" >
<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>



Modbus RTU configuration

Requests for management:

setmodbus - communication settings of Modbus RTU. Extra options are:

getmodbus - read the communication configuration of Modbus.

Information about the communication looks like:

<modbus name="Espada USB-RS485" enable="1" baud="9600" parity="none" stopbit="2" />

If no hardware support:

<error type="not supported" />

Modbus RTU communication test

Requests for management:

testvirtual - communication test of Modbus RTU. Extra options are:

Information about the reading test looks like:

<modbusrtu mb_raw_req="1F 04 00 00 00 02" mb_raw_ans="1F 04 04 43 63 55 19" mb_value="227.332413" />

If an error occurs, example:

<modbusrtu mb_raw_req="20 04 00 00 00 02" mb_raw_ans="answer error" mb_value="value error"/>

If no error occurs, the writing test looks like:

<error type="no error" />

If Modbus is disabled or not supported:

<error type="disable" />