{
  "spec_version": 1,
  "slug": "mg-energy-smartlink-plc",
  "manufacturer": "MG Energy Systems",
  "model": "SmartLink PLC / SmartLink Plus battery gateway (MG LFP battery bank Modbus TCP interface)",
  "category": "Battery monitor",
  "supplier_url": "https://www.mgenergysystems.eu/",
  "default_configuration": {
    "protocol": "modbus_tcp",
    "port": 502,
    "unit_id": 123,
    "addressing": "zero_based",
    "byte_order": "BigEndian",
    "word_order": "HighFirst"
  },
  "coils": [],
  "discrete_inputs": [],
  "input_registers": [
    {
      "address": 100,
      "count": 2,
      "name": "Product ID",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "SmartLink PLC = 0x520D0001"
    },
    {
      "address": 102,
      "count": 10,
      "name": "Product name",
      "data_type": "Ascii",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "20 characters ending with '\\0'"
    },
    {
      "address": 130,
      "count": 2,
      "name": "Serial number",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Shown in hex format"
    },
    {
      "address": 132,
      "count": 1,
      "name": "Hardware type",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "SmartLink PLC = 21005"
    },
    {
      "address": 133,
      "count": 1,
      "name": "Smartlink PLC application firmware version",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "MAJOR=value >> 10; MINOR=value;"
    },
    {
      "address": 134,
      "count": 1,
      "name": "SmartLink MX application firmware version",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "MAJOR=value >> 10; MINOR=value;"
    },
    {
      "address": 224,
      "count": 1,
      "name": "Battery capacity",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "System capacity of the active systems."
    },
    {
      "address": 235,
      "count": 1,
      "name": "Combined control state",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "See Register 235 details"
    },
    {
      "address": 259,
      "count": 2,
      "name": "Voltage",
      "data_type": "Int32",
      "units": "V",
      "scale_factor": 0.001,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 261,
      "count": 1,
      "name": "Current",
      "data_type": "Int16",
      "units": "A",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 262,
      "count": 1,
      "name": "Temperature",
      "data_type": "Int16",
      "units": "°C",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 266,
      "count": 1,
      "name": "State-Of-Charge (SOC)",
      "data_type": "UInt16",
      "units": "%",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 268,
      "count": 1,
      "name": "Minimum cell temperature",
      "data_type": "Int16",
      "units": "°C",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R",
      "description": "Range: -3276.8 to 3276.7"
    },
    {
      "address": 269,
      "count": 1,
      "name": "Maximum cell temperature",
      "data_type": "Int16",
      "units": "°C",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R",
      "description": "Range: -3276.8 to 3276.7"
    },
    {
      "address": 270,
      "count": 1,
      "name": "Minimum cell voltage",
      "data_type": "UInt16",
      "units": "V",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R",
      "description": "Range: 0 to 655.35"
    },
    {
      "address": 271,
      "count": 1,
      "name": "Maximum cell voltage",
      "data_type": "UInt16",
      "units": "V",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R",
      "description": "Range: 0 to 655.35"
    },
    {
      "address": 305,
      "count": 1,
      "name": "Battery limit charge voltage",
      "data_type": "UInt16",
      "units": "V",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 306,
      "count": 1,
      "name": "Battery limit charge current",
      "data_type": "UInt16",
      "units": "A",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 307,
      "count": 1,
      "name": "Battery limit discharge voltage",
      "data_type": "UInt16",
      "units": "V",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 308,
      "count": 1,
      "name": "Battery limit discharge current",
      "data_type": "UInt16",
      "units": "A",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 400,
      "count": 2,
      "name": "Hist.Cumulative AH",
      "data_type": "Int32",
      "units": "Ah",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R",
      "description": "Not implemented yet."
    },
    {
      "address": 402,
      "count": 2,
      "name": "Hist.Lowest Voltage",
      "data_type": "Int32",
      "units": "V",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R",
      "description": "Not implemented yet."
    },
    {
      "address": 404,
      "count": 2,
      "name": "Hist.Highest Voltage",
      "data_type": "Int32",
      "units": "V",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R",
      "description": "Not implemented yet."
    },
    {
      "address": 406,
      "count": 2,
      "name": "Hist.KWH out",
      "data_type": "UInt32",
      "units": "kWh",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R",
      "description": "Not implemented yet."
    },
    {
      "address": 408,
      "count": 2,
      "name": "Hist.KWH in",
      "data_type": "UInt32",
      "units": "kWh",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R",
      "description": "Not implemented yet."
    },
    {
      "address": 410,
      "count": 1,
      "name": "Hist.Highest temperature",
      "data_type": "Int16",
      "units": "°C",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R",
      "description": "Range: -3276.8 to 3276.7 | Not implemented yet."
    },
    {
      "address": 411,
      "count": 1,
      "name": "Hist.Lowest temperature",
      "data_type": "Int16",
      "units": "°C",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R",
      "description": "Range: -3276.8 to 3276.7 | Not implemented yet."
    },
    {
      "address": 412,
      "count": 1,
      "name": "Hist.Lowest cell Voltage",
      "data_type": "UInt16",
      "units": "V",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R",
      "description": "Range: 0 to 655.35 | Not implemented yet."
    },
    {
      "address": 413,
      "count": 1,
      "name": "Hist.Highest cell Voltage",
      "data_type": "UInt16",
      "units": "V",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R",
      "description": "Range: 0 to 655.35 | Not implemented yet."
    },
    {
      "address": 500,
      "count": 1,
      "name": "Alive counter",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Range: 0 to 65535 | Increases every second. Note that invalid value is part of counter"
    }
  ],
  "holding_registers": [
    {
      "address": 1000,
      "count": 1,
      "name": "Start/stop/reset command",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "Low byte = command (1 = start, 2 = stop, 4 = reset), high byte = NMEA2000 network address, default 96 (0x60): start = 24577, stop = 24578, reset = 25480"
    }
  ],
  "combined_registers": [],
  "notes": "Source: MG Energy Systems knowledge base, \"Modbus TCP\" application note with the \"Modbus TCP/IP register list\", revision V1.9, dated 15/04/2026 (SmartLink PLC version 1.7 or higher), vendor-hosted at https://docs.mgenergysystems.eu/application-notes/modbus-tcp. The page carries two register tables: the SmartLink Plus/PLC table (unit ID 123, the gateway that aggregates MG LFP batteries on the CAN bus) and a second table for the BMS units behind it, which answer on unit IDs 1-9 at the same input-register addresses. This seed is the SmartLink PLC map at unit ID 123, so only the first table is seeded; the connected-BMS values are the same addresses on a different unit ID. The SmartLink table's input registers are read-only and read with function code 04; its only holding register is 1000, the start/stop/reset command, read with 03 and written with 06. The document lists function codes 3, 4 and 6 and prints no port, so the seed uses the Modbus TCP default 502 with the document's default IP 192.168.1.10. The resolution column is the scale factor (0.001, 0.1, 0.01, 1), which is what the seed stores; the document's invalid-value convention (0xFFFF / 0x7FFF / 0x80000000) is recorded in the descriptions where it states one. Not seeded: every row the document types uint8 (one register: counters, module counts, state bytes and the 240-245 combine settings) or uint64 (four registers: the packed status, warning and failure bit words at 200/204/208/230 and the SmartLink PLC state at 150), because this schema has no 8-bit or 64-bit integer type; their bit-level detail is in the document's per-register detail sections. The \"Product name\" row is seeded as ASCII (10 registers, 20 characters) because the document types it char array(20)."
}
