Skip to content

Modbus

Available in HW 3.5+

Modbus

Modbus Sensor RTU (RS485)

Since version HW 3.5+ SW 1.36 it is possible to operate up to three independent devices on one Modbus bus. The configuration, as before, consists in selecting the module and specifying its slave ID, with the difference that up to three slots can be supplemented this way.

Following modules are supported:

  • SDM120
  • SDM72D-M
  • RDO-PRO X
  • Epever Tracer
  • Sofarsolar
  • GTIL
  • Danfos EKC 202C
  • SDM630/72D-v2 (since SW 1.57)
  • CHINT-DTSU666 (since SW 1.57)

In addition, it is possible to add support for other Modbus devices using the adding own/custom modules feature.

Info

Note that in hardware version 3.7+, it is possible to connect 2 modules simultaneously (one from Serial Port tab and one from Modbus tab).

In versions 3.5 and 3.6, you can only select one module from the Serial Port or Modbus card.

In version 3.0 the Modbus card is not available, therefore you can select only one module from the Serial Port tab.

Custom devices

You can also configure a custom device. From version SW 1.60a, the configuration panel opens after clicking the Configure custom modules button. Up to 5 different configurations can be saved (since version SW 1.57, previously 3). In previous versions, to open the configuration panel, select one of the options marked (custom) in the Module field and then open the form with the Configure custom module button (this can be done on any slot).

In the form, enter your own name, communication data (bitrate, parity bit, stop bit, delay between register reads (in s)) and define the list of readings, giving each name, unit, divisor, register address, function code, type and endian (from SW 1.57). After completing the configuration, confirm with the Save changes button. Then the configuration can be selected on each of the three slots.

The configuration can be exported to a file by clicking the Export configuration button and loaded by clicking Import configuration (save changes after import). Sample configuration to be imported for SDM72D is available for download here.

More configuration files are available at our forum. However, please be aware that these configurations might have been contributed by other users, and as such, we cannot guarantee their accuracy or proper functioning. While we strive to curate and verify the content, we encourage you to exercise caution when using these configurations. Your feedback and experiences with these configurations are valuable to the community and can help ensure their reliability.

Modbus - custom configuration

Readings mapping

In order to use readings from Modbus modules and additional 1-Wire sensors (e.g. SCD40) in other LK functions (such as HTTP client, MQTT client, OLED, VOLED, GSM Modem) apart from the Modbus or I2C and 1-Wire Sensors tab, you must configure mapping of readings to variables m1 - m30. On both of these pages there is a Configure Mapping button that opens a configuration form (shown in the image below). The reading is assigned to the m variable, and more precisely the reading position (this is important when changing Modbus modules, because the mapping to a specific slot number and reading number remains, so a slot without a selected module can be indicated).

From version SW 1.57, readings from additional 1-Wire sensors can be assigned to variables m1-m30.

Readings mapping

The variables m1 - m30 can be used later in the HTTP client, MQTT client, OLED, VOLED, GSM. The first 10 m1-m10 are available in Events too. The first 4 variables m1 - m4 are also available as an option I (power reading) and U (voltage reading) in Power and Energy tab.

Modbus TCP Server

Form for enabling Modbus TCP Server and table with information about available data.