/config/modbus/client/map/{name}/reg/{idx}

A Modbus register definition.

Get /config/modbus/client/map/{name}/reg/{idx}

SecurityApiKey
Request
path Parameters
name
required
string

The name of a user Modbus map (editable).

Example: my_modbus_map
idx
required
string

The index of a Modbus map register.

query Parameters
max-depth
integer >= 1

Limit output depth of the response. See Max-Depth.

Example: max-depth=2
filter
string

Response filter string. See Filter-Spec.

Example: filter={foo,bar}
Responses
200

Normal response.

401

Unauthorized response.

get/config/modbus/client/map/{name}/reg/{idx}
Request samples
Response samples
application/json
{
  • "result": {
    },
  • "error": "Error message (present if an error occurred)."
}

Replace /config/modbus/client/map/{name}/reg/{idx}

SecurityApiKey
Request
path Parameters
name
required
string

The name of a user Modbus map (editable).

Example: my_modbus_map
idx
required
string

The index of a Modbus map register.

Request Body schema: application/json
name
string (configModbusClientMapNameRegItemName)

The name of the register. The user can choose this name freely so long as each register within a map has a unique name.

addr
integer (configModbusClientMapNameRegItemAddr) [ 0 .. 65535 ]

The Modbus address of the register.

type
string (configModbusClientMapNameRegItemType)

The type of the register value. This may be one of the following:

  • bit: One-bit value (a coil, in Modbus terminology).
  • s16: Signed 16-bit integer.
  • u16: Unsigned 16-bit integer.
  • s32: Signed 32-bit integer.
  • u32: Unsigned 32-bit integer.
  • s32l: Signed 32-bit integer, word-swapped.
  • u32l: Unsigned 32-bit integer, word-swapped.
  • s64: Signed 64-bit integer.
  • u64: Unsigned 64-bit integer.
  • float16: IEEE-754 half-precision float.
  • float16l: IEEE-754 half-precision floating point, little-endian (byte-swapped).
  • float: IEEE-754 single-precision float.
  • floatl: IEEE-754 single-precision float, word-swapped.
  • double: IEEE-754 double-precision float.
Enum: "bit" "s16" "u16" "s32" "u32" "s32l" "u32l" "s64" "u64" "float16" "float16l" "float" "floatl" "double"
kind
string (configModbusClientMapNameRegItemKind)

The kind of the register. Possible values are:

  • analog: The value is continuous (the average of two values is meaningful).

  • enum: The value is discrete (the average of two values is not meaningful). An example for this would be a numeric error code.

  • bitset: Each bit in the value is a discrete on/off value. An example for this would be a set of error flags.

Enum: "analog" "enum" "bitset"
unit
string (configModbusClientMapNameRegItemUnit)

For register of the analog kind, this defines the physical unit of the register value. This must be one of the following:

  • #3: Unit-less number with 3 decimal digits of precision.
  • %: Percentage.
  • A: Electric current in amperes.
  • Ah: Electric charge in ampere-hours.
  • As: Electric charge in ampere-seconds.
  • C: Temperature in degree celsius.
  • Degrees: Angle in degrees.
  • Hz: Frequency in hertz.
  • Ohm: Resistance in ohm.
  • Pa: Pressure in pascals.
  • Pct: Percentage.
  • RH: Relative humidity.
  • Tmd: Time in days.
  • Tmh: Time in hours.
  • Tms: Time in seconds.
  • VA: Apparent power in volt-amperes.
  • VAh: Apparent energy in volt-ampere-hours.
  • V: Electric potential in volts.
  • W/m2: Irradiance in watts-per-square-meter.
  • W/m^2: Irradiance in watts-per-square-meter.
  • W: Power in watts.
  • Wh: Energy in watt-hours.
  • degC: Temperature in degree celsius.
  • deg: Angle in degrees.
  • g: Mass in grams.
  • hPa: Pressure in hecto-pascals.
  • h: Time in hours.
  • kAh: Electric charge in kilo-ampere-hours.
  • kO: Resistance in kilo-ohms.
  • kPa: Pressure in kilo-pascals.
  • kVAh: Apparent energy in kilo-volt-ampere-hours.
  • kW: Power in kilo-watts.
  • kWh: Energy in kilo-watt-hours.
  • kg: Mass in kilo-grams.
  • kvarh: Reactive energy in kilo-volt-ampere-hours.
  • m/s: Speed in meters-per-second.
  • m3/s: Volume flow in cubic-meters-per-second.
  • m3: Volume in cubic-meters.
  • mA: Electric current in milli-amperes.
  • mAh: Electric charge in milli-ampere-hours.
  • mSecs: Time in milli-seconds.
  • mV: Electric potential in milli-volts.
  • mV: Electric potential in milli-volts.
  • m^3/s: Volume flow in cubic-meters-per-second.
  • m^3: Volume in cubic-meters.
  • meters: Distance in meters.
  • mm: Distance in milli-meters.
  • mps: Speed in meters-per-second.
  • ms: Time in milli-seconds.
  • ohms: Resistance in ohm.
  • ppm: Parts-per-million.
  • s: Time in seconds.
  • secs: Time in seconds.
  • var: Reactive power in volt-ampere.
  • varh: Reactive energy in volt-ampere-hours.
  • °C: Temperature in degree celsius.
offset
number (configModbusClientMapNameRegItemOffset)

An offset value that is used to convert the Modbus register value to a value in the specified physical unit. Specifically, when the Modbus value of the register is reg, then corresponding physical value phys is calculated as:

phys = (reg + offset) * scale

where offset is the value defined here and scale is the value defined for member scale.

scale
number (configModbusClientMapNameRegItemScale)

A scale value that is used to convert the Modbus register value to a value in the specified physical unit. Specifically, when the Modbus value of the register is reg, then corresponding physical value phys is calculated as:

phys = (reg + offset) * scale

where scale is the value defined here and offset is the value defined for member offset.

access
string (configModbusClientMapNameRegItemAccess)

The access-mode of the register. It must be one of:

  • ro: read-only
  • rw: read-write
Enum: "ro" "rw"
Responses
200

Normal response.

401

Unauthorized response.

put/config/modbus/client/map/{name}/reg/{idx}
Request samples
application/json
{ }
Response samples
application/json
{
  • "status": "OK",
  • "error": "Error message (present if an error occurred)."
}

Update /config/modbus/client/map/{name}/reg/{idx}

SecurityApiKey
Request
path Parameters
name
required
string

The name of a user Modbus map (editable).

Example: my_modbus_map
idx
required
string

The index of a Modbus map register.

Request Body schema: application/json
name
string (configModbusClientMapNameRegItemName)

The name of the register. The user can choose this name freely so long as each register within a map has a unique name.

addr
integer (configModbusClientMapNameRegItemAddr) [ 0 .. 65535 ]

The Modbus address of the register.

type
string (configModbusClientMapNameRegItemType)

The type of the register value. This may be one of the following:

  • bit: One-bit value (a coil, in Modbus terminology).
  • s16: Signed 16-bit integer.
  • u16: Unsigned 16-bit integer.
  • s32: Signed 32-bit integer.
  • u32: Unsigned 32-bit integer.
  • s32l: Signed 32-bit integer, word-swapped.
  • u32l: Unsigned 32-bit integer, word-swapped.
  • s64: Signed 64-bit integer.
  • u64: Unsigned 64-bit integer.
  • float16: IEEE-754 half-precision float.
  • float16l: IEEE-754 half-precision floating point, little-endian (byte-swapped).
  • float: IEEE-754 single-precision float.
  • floatl: IEEE-754 single-precision float, word-swapped.
  • double: IEEE-754 double-precision float.
Enum: "bit" "s16" "u16" "s32" "u32" "s32l" "u32l" "s64" "u64" "float16" "float16l" "float" "floatl" "double"
kind
string (configModbusClientMapNameRegItemKind)

The kind of the register. Possible values are:

  • analog: The value is continuous (the average of two values is meaningful).

  • enum: The value is discrete (the average of two values is not meaningful). An example for this would be a numeric error code.

  • bitset: Each bit in the value is a discrete on/off value. An example for this would be a set of error flags.

Enum: "analog" "enum" "bitset"
unit
string (configModbusClientMapNameRegItemUnit)

For register of the analog kind, this defines the physical unit of the register value. This must be one of the following:

  • #3: Unit-less number with 3 decimal digits of precision.
  • %: Percentage.
  • A: Electric current in amperes.
  • Ah: Electric charge in ampere-hours.
  • As: Electric charge in ampere-seconds.
  • C: Temperature in degree celsius.
  • Degrees: Angle in degrees.
  • Hz: Frequency in hertz.
  • Ohm: Resistance in ohm.
  • Pa: Pressure in pascals.
  • Pct: Percentage.
  • RH: Relative humidity.
  • Tmd: Time in days.
  • Tmh: Time in hours.
  • Tms: Time in seconds.
  • VA: Apparent power in volt-amperes.
  • VAh: Apparent energy in volt-ampere-hours.
  • V: Electric potential in volts.
  • W/m2: Irradiance in watts-per-square-meter.
  • W/m^2: Irradiance in watts-per-square-meter.
  • W: Power in watts.
  • Wh: Energy in watt-hours.
  • degC: Temperature in degree celsius.
  • deg: Angle in degrees.
  • g: Mass in grams.
  • hPa: Pressure in hecto-pascals.
  • h: Time in hours.
  • kAh: Electric charge in kilo-ampere-hours.
  • kO: Resistance in kilo-ohms.
  • kPa: Pressure in kilo-pascals.
  • kVAh: Apparent energy in kilo-volt-ampere-hours.
  • kW: Power in kilo-watts.
  • kWh: Energy in kilo-watt-hours.
  • kg: Mass in kilo-grams.
  • kvarh: Reactive energy in kilo-volt-ampere-hours.
  • m/s: Speed in meters-per-second.
  • m3/s: Volume flow in cubic-meters-per-second.
  • m3: Volume in cubic-meters.
  • mA: Electric current in milli-amperes.
  • mAh: Electric charge in milli-ampere-hours.
  • mSecs: Time in milli-seconds.
  • mV: Electric potential in milli-volts.
  • mV: Electric potential in milli-volts.
  • m^3/s: Volume flow in cubic-meters-per-second.
  • m^3: Volume in cubic-meters.
  • meters: Distance in meters.
  • mm: Distance in milli-meters.
  • mps: Speed in meters-per-second.
  • ms: Time in milli-seconds.
  • ohms: Resistance in ohm.
  • ppm: Parts-per-million.
  • s: Time in seconds.
  • secs: Time in seconds.
  • var: Reactive power in volt-ampere.
  • varh: Reactive energy in volt-ampere-hours.
  • °C: Temperature in degree celsius.
offset
number (configModbusClientMapNameRegItemOffset)

An offset value that is used to convert the Modbus register value to a value in the specified physical unit. Specifically, when the Modbus value of the register is reg, then corresponding physical value phys is calculated as:

phys = (reg + offset) * scale

where offset is the value defined here and scale is the value defined for member scale.

scale
number (configModbusClientMapNameRegItemScale)

A scale value that is used to convert the Modbus register value to a value in the specified physical unit. Specifically, when the Modbus value of the register is reg, then corresponding physical value phys is calculated as:

phys = (reg + offset) * scale

where scale is the value defined here and offset is the value defined for member offset.

access
string (configModbusClientMapNameRegItemAccess)

The access-mode of the register. It must be one of:

  • ro: read-only
  • rw: read-write
Enum: "ro" "rw"
Responses
200

Normal response.

401

Unauthorized response.

post/config/modbus/client/map/{name}/reg/{idx}
Request samples
application/json
{ }
Response samples
application/json
{
  • "status": "OK",
  • "error": "Error message (present if an error occurred)."
}

Delete /config/modbus/client/map/{name}/reg/{idx}

Delete this register definition.

SecurityApiKey
Request
path Parameters
name
required
string

The name of a user Modbus map (editable).

Example: my_modbus_map
idx
required
string

The index of a Modbus map register.

Responses
200

Normal response.

401

Unauthorized response.

delete/config/modbus/client/map/{name}/reg/{idx}
Request samples
Response samples
application/json
{
  • "status": "OK",
  • "error": "Error message (present if an error occurred)."
}