ModbusInMqtt Protocol#

Communication protocol between GbbOptimizer and GbbConnect2 — transferring Modbus commands over MQTT.

GbbOptimizer → GbbConnect2#

PUB {PlantId}/ModbusInMqtt/toDevice

Modbus commands sent to GbbConnect2

FieldTypeRequiredDescription
OrderIdstringnoText copied to the response
Linesarrayyes
LineNointyesLine number
TagstringnoArbitrary text copied to the response
TimestampintnoUnix UTC time (seconds)
ModbusstringyesModbus command to be sent to the inverter
LogLevelstringnoChange log level: OnlyErrors, Min, Max
SendLastLogintno1 = attach logs to response (incrementally)

Example:

1
2
3
4
5
6
7
{
  "Lines": [
    {"LineNo": 0, "Timestamp": 1746136816, "Modbus": "010300D6000225F3"},
    {"LineNo": 1, "Timestamp": 1746136816, "Modbus": "0103020800024471"}
  ],
  "OrderId": "f0PGI3obQIZTs8w="
}

GbbConnect2 → GbbOptimizer#

FieldTypeRequiredDescription
OrderIdstringnoCopied from the request
Errorstringyes"OK" or error description (not related to a specific line)
Linesarrayyes
LineNointyesLine number
TagstringnoCopied from the request
TimestampintnoUnix UTC time
ModbusstringyesModbus response from the inverter (empty after the first error)
ErrorstringnoEmpty = OK. Filled = error during communication with inverter
GbbVersionstringnoGbbConnect version
GbbEnvironmentstringnoEnvironment: Windows, Console, Library
LastLogstringnoLogs since last send (if SendLastLog=1)