Modbus/TCP
modbus_tcp/config
Modbus/TCP server configuration
# $HOST e.g. warp-AbCd
Read
curl http://$HOST/modbus_tcp/config
{ "enable": true, "port": 502, "table": 0 }
Write
curl http://$HOST/modbus_tcp/config -d '{ "enable": true, "port": 502, "table": 0 }'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp/AbCd
Read
mosquitto_sub -v -C 1 -h $BROKER -t $PREFIX/modbus_tcp/config
{ "enable": true, "port": 502, "table": 0 }
Write
With MQTT on $PREFIX/modbus_tcp/config_update
mosquitto_pub -h $BROKER -t $PREFIX/modbus_tcp/config_update -m '{ "enable": true, "port": 502, "table": 0 }'
| Name | Description |
|---|---|
enablebool | Indicates whether the Modbus/TCP server is active. For control functionality in addition to state readout, |
portint | Port on which the Modbus/TCP server listens for incoming connections. Typically 502. |
tableint | Register table used by the Modbus/TCP server.
|
send_illegal_data_addressbool | Indicates whether the Modbus/TCP server sends IllegalDataAddress errors when unknown registers are read
|
modbus_tcp/config
Modbus/TCP server configuration
# $HOST e.g. warp2-AbCd
Read
curl http://$HOST/modbus_tcp/config
{ "enable": true, "port": 502, "table": 0 }
Write
curl http://$HOST/modbus_tcp/config -d '{ "enable": true, "port": 502, "table": 0 }'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp2/AbCd
Read
mosquitto_sub -v -C 1 -h $BROKER -t $PREFIX/modbus_tcp/config
{ "enable": true, "port": 502, "table": 0 }
Write
With MQTT on $PREFIX/modbus_tcp/config_update
mosquitto_pub -h $BROKER -t $PREFIX/modbus_tcp/config_update -m '{ "enable": true, "port": 502, "table": 0 }'
| Name | Description |
|---|---|
enablebool | Indicates whether the Modbus/TCP server is active. For control functionality in addition to state readout, |
portint | Port on which the Modbus/TCP server listens for incoming connections. Typically 502. |
tableint | Register table used by the Modbus/TCP server.
|
send_illegal_data_addressbool | Indicates whether the Modbus/TCP server sends IllegalDataAddress errors when unknown registers are read
|
modbus_tcp/config
Modbus/TCP server configuration
# $HOST e.g. warp3-AbCd
Read
curl http://$HOST/modbus_tcp/config
{ "enable": true, "port": 502, "table": 0 }
Write
curl http://$HOST/modbus_tcp/config -d '{ "enable": true, "port": 502, "table": 0 }'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp3/AbCd
Read
mosquitto_sub -v -C 1 -h $BROKER -t $PREFIX/modbus_tcp/config
{ "enable": true, "port": 502, "table": 0 }
Write
With MQTT on $PREFIX/modbus_tcp/config_update
mosquitto_pub -h $BROKER -t $PREFIX/modbus_tcp/config_update -m '{ "enable": true, "port": 502, "table": 0 }'
| Name | Description |
|---|---|
enablebool | Indicates whether the Modbus/TCP server is active. For control functionality in addition to state readout, |
portint | Port on which the Modbus/TCP server listens for incoming connections. Typically 502. |
tableint | Register table used by the Modbus/TCP server.
|
send_illegal_data_addressbool | Indicates whether the Modbus/TCP server sends IllegalDataAddress errors when unknown registers are read
|
Not supported on this hardware!
Not supported on this hardware!
modbus_tcp/config
Modbus/TCP server configuration
# $HOST e.g. warp-AbCd
Read
curl http://$HOST/modbus_tcp/config
{ "enable": true, "port": 502, "table": 0 }
Write
curl http://$HOST/modbus_tcp/config -d '{ "enable": true, "port": 502, "table": 0 }'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp/AbCd
Read
mosquitto_sub -v -C 1 -h $BROKER -t $PREFIX/modbus_tcp/config
{ "enable": true, "port": 502, "table": 0 }
Write
With MQTT on $PREFIX/modbus_tcp/config_update
mosquitto_pub -h $BROKER -t $PREFIX/modbus_tcp/config_update -m '{ "enable": true, "port": 502, "table": 0 }'
| Name | Description |
|---|---|
enablebool | Indicates whether the Modbus/TCP server is active. For control functionality in addition to state readout, |
portint | Port on which the Modbus/TCP server listens for incoming connections. Typically 502. |
tableint | Register table used by the Modbus/TCP server.
|
send_illegal_data_addressbool | Indicates whether the Modbus/TCP server sends IllegalDataAddress errors when unknown registers are read
|