The Xentara Modbus Driver v1.1
User Manual
Loading...
Searching...
No Matches
JSON Format for TCP Devices

A JSON object describing an Modbus TCP device has the following syntax:

{
"@IOComponent.Modbus.TCPDevice": {
"id": "Device 1",
"uuid": "58ed1445-1dc6-4c2f-84f2-8a0901183a4a",
"address": "device-1.local",
"serverID": 1,
"children": [
...
]
}
}

Object Members
idA string value containing the ID of the device. The ID is used to construct the device’s primary key.
uuidA string value containing the unique UUID of the device.
addressA string value containing the network address of the device. This can be a host name or an IP address, with or without a port number. If the address does not contain a port number, then the standard Modbus port (502) will be used. See below for a complete list of the supported formats.
serverIDAn optional integer value containing the Modbus server ID (formerly slave ID) of the device. TCP devices generally do not use the server ID, and it is rarely necessary to specify a server ID. Some devices may require a server ID to be specified, however.
children

A JSON array containing the channels and polls of the device.

Please remember that each element block requires two layers of {} due to the syntax restrictions of the JSON format.

The address member supports the following address formats:

Type Format Example
Host name "host name"
"device-1.local"
Host name with port number "host name:port number"
"device-1.local:5502"
IPv4 address "address string"
"192.168.1.2"
IPv4 address with port number "address string:port number"
"192.168.1.2:5502"
IPv6 address "address string"
"fe80::1ff:fe23:4567:890a"
IPv6 address with port number "[address string]:port number"
"[fe80::1ff:fe23:4567:890a]:5502"