ConfigModel

Type: object

The configuration model for the Modbus plugin

Type: array

List of Modbus devices Each device is identified by its transport protocol and may have multiple datapoints. Two devices are considered equal if the properties values of their transport protocols are equal.

Example of an invalid configuration: json { "devices": [ { // Unique "transport": { "type": "tcp", "host": "127.0.0.1", "port": 502 }, "datapoints": [] }, { // Unique "transport": { "type": "tcp", "host": "127.0.0.1", "port": 600 }, "datapoints": [] }, { // Unique "transport": { "type": "serial", "baud_rate": "1", "serial_interface": "some_interface", "slave_id": 1 }, "datapoints": [] }, { // Duplicate, the entire serial interface is the same. "transport": { "type": "serial", "baud_rate": "1", "serial_interface": "some_interface", "slave_id": 1 }, "datapoints": [...] } ] }

All items must be unique

No Additional Items

Each item of this array must be:

Type: object

Configuration for a Modbus device

No Additional Properties

Type: array Default: []

The mapping between a datapoint and a Modbus memory block Currently a single datapoint that writes to a Modbus device can only be mapped to a single Modbus memory block. Specifying a datapoint to write to multiple modbus memory blocks is considered an invalid configuration.

No Additional Items

Each item of this array must be:

Type: object

The mapping between a datapoint and a Modbus memory block as described in the specification

Holding Register

Type: object

The mapping between a datapoint and a Modbus holding register

Type: object

The access mode of the holding register

Type: enum (of string)

Read-only access, a datapoint/modbus memory block with this access mode will be read from the modbus device and requires that the same datapoint exists as a publisher in the modbus device

Must be one of:

  • "READ"
Type: enum (of string)

Read-write access, a datapoint/modbus memory block with this access mode will be written to the modbus device and requires that the same datapoint exists as a subscriber in the modbus device

Must be one of:

  • "WRITE"

Type: integerFormat: uint16

The address of the holding register in the Modbus device

Value must be greater or equal to 0.0

Type: enum (of string) Default: "UInt16"

The data type of the holding register

Must be one of:

  • "Int16"
  • "UInt16"
  • "Int32BE"
  • "Int32LE"
  • "UInt32BE"
  • "UInt32LE"
  • "Float32BE"
  • "Float32LE"

Type: integer or nullFormat: uint64

The polling frequency This only takes effect if the access mode is READ. It overrides the pollfrequencyms of the device for this particular datapoint.

Type: enum (of string)

Must be one of:

  • "holding_register"

Input Register

Type: object

The mapping between a datapoint and a Modbus input register

Type: integerFormat: uint16

The address of the input register in the Modbus device

Value must be greater or equal to 0.0

Type: enum (of string) Default: "UInt16"

The data type of the input register

Must be one of:

  • "Int16"
  • "UInt16"
  • "Int32BE"
  • "Int32LE"
  • "UInt32BE"
  • "UInt32LE"
  • "Float32BE"
  • "Float32LE"

Type: integer or nullFormat: uint64

The polling frequency It overrides the pollfrequencyms of the device for this particular datapoint.

Type: enum (of string)

Must be one of:

  • "input_register"

Discrete Input

Type: object

The mapping between a datapoint and a Modbus discrete input

Type: integerFormat: uint16

The address of the discrete input in the Modbus device

Value must be greater or equal to 0.0

Type: integer or nullFormat: uint64

The polling frequency It overrides the pollfrequencyms of the device for this particular datapoint.

Type: enum (of string)

Must be one of:

  • "discrete_input"

Coil

Type: object

The mapping between a datapoint and a Modbus coil

Type: string

The name of the datapoint

Type: integerFormat: uint16

The address of the coil in the Modbus device

Value must be greater or equal to 0.0

Type: integer or nullFormat: uint64

The polling frequency This only takes effect if the access mode is READ. It overrides the pollfrequencyms of the device for this particular datapoint.

Type: enum (of string)

Must be one of:

  • "coil"

Type: integerFormat: uint64

The frequency at which the plugin should pull data from the Modbus devices

Value must be greater or equal to 0.0

Type: object

The transport protocol used by the Modbus device

TCP

Type: object

Type: integerFormat: uint16

Value must be greater or equal to 0.0

Type: enum (of string)

Must be one of:

  • "tcp"

serial

Type: object

Type: integerFormat: uint32

Baud rate (e.g., 9600)

Value must be greater or equal to 0.0

Type: string

Serial interface (e.g., "/dev/ttyUSB0")

Type: integerFormat: uint8

Slave ID from the modbus specification (e.g., 1)

Value must be greater or equal to 0.0

Type: enum (of string)

Must be one of:

  • "serial"