{
 "manufacturer": "SMA",
 "manufacturer_slug": "sma",
 "model": "Sunny WebBox Modbus gateway (plant and gateway unit IDs 1-2)",
 "model_slug": "sunny-webbox",
 "short_model": "Sunny WebBox",
 "aliases": [
  "Sunny WebBox",
  "WebBox",
  "SWEBBOX",
  "Sunny WebBox with Bluetooth"
 ],
 "equipment_type": "Solar inverter gateway (PV plant data logger)",
 "applies_to": "Sunny WebBox firmware 1.52 or later with Modbus enabled, SMA Modbus profile as documented in WEBBOX_MODBUS-TB-US-EN-19 v1.9 (legacy product).",
 "summary": "Legacy SMA plant data logger that exposes its connected SMA inverters and sensors over Modbus TCP. Unit ID 1 is the gateway with the table that maps each detected device to a Modbus unit ID; unit ID 2 holds plant-wide values such as total and daily yield, plant AC power and plant time. Per-device data sit under unit IDs 3-247 (see the separate common-device map).",
 "transport": [
  "TCP"
 ],
 "defaults": {
  "unit_id": 2,
  "baud": null,
  "parity": null,
  "data_bits": null,
  "stop_bits": null,
  "tcp_port": 502
 },
 "addressing": {
  "convention": "0-based",
  "note": "The assignment tables give 'ADR (DEC)', the decimal Modbus register address, which is sent unchanged in the request (the manual's gateway example reads device 1 at 42109). 30xxx entries are read-only values, 40xxx entries are writable parameters; the WebBox accepts FC03 and FC04 for reads."
 },
 "default_word_order": "ABCD",
 "firmware": "WebBox firmware 1.52 or higher",
 "source": {
  "title": "SUNNY WEBBOX Modbus Interface - Technical Description",
  "doc_number": "WEBBOX_MODBUS-TB-US-EN-19, version 1.9",
  "revision_date": null,
  "url": "https://files.sma.de/downloads/WEBBOX-MODBUS-TB-US-en-19.pdf",
  "pages": "pp. 14-19 (unit IDs, data types, formats), pp. 22-27 (gateway and plant tables), pp. 74-75 (port, timing)"
 },
 "notes": [
  "Word order: the manual's data-type figures put bits 31..16 in the first register and bits 15..0 in the second (64-bit: bits 63..48 first), and data are sent big-endian, so 32/64-bit values are high word first (ABCD).",
  "Format to scale: FIX0 = x1, FIX1 = x0.1, FIX2 = x0.01, FIX3 = x0.001, TEMP = one decimal (x0.1), DT = UTC seconds since 1970-01-01, Duration = seconds.",
  "NaN (no value): U16 0xFFFF, S16 0x8000, U32 0xFFFFFFFF, S32 0x80000000, U64 0xFFFFFFFFFFFFFFFF.",
  "Multi-register values must be read in one request. SMA recommends at least 10 s between data requests and no more than 30 registers per transfer.",
  "Unit ID 1 answers 30001/30003/30007/30057 and the assignment table; unit ID 2 answers the same four plus the plant values. Both are listed once here.",
  "Only assignment slots 1 and 2 are listed. Slot n starts at 42109 + 4 x (n-1) (Device-ID, 2-register serial number, Unit ID); the table runs to slot 245 at 43085-43088.",
  "To change a device's unit ID, write the slot's Device-ID, serial number and Unit ID registers as one block with FC16; only the Unit ID register is writable. Never assign the same unit ID twice.",
  "Time-zone code list (section 7.6) is not reproduced."
 ],
 "registers": [
  {
   "table": "input_register",
   "address": 30001,
   "documented": "30001",
   "name": "Version number of the SMA Modbus profile",
   "description": "Same value under unit ID 1 and 2.",
   "data_type": "UINT32",
   "length": 2,
   "word_order": "ABCD",
   "scale": 1,
   "units": "",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "input_register",
   "address": 30003,
   "documented": "30003",
   "name": "Device ID of the WebBox",
   "description": "Same under unit ID 1 and 2.",
   "data_type": "UINT32",
   "length": 2,
   "word_order": "ABCD",
   "scale": 1,
   "units": "",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "input_register",
   "address": 30007,
   "documented": "30007",
   "name": "Modbus data change counter",
   "description": "Increments whenever profile data changed.",
   "data_type": "UINT32",
   "length": 2,
   "word_order": "ABCD",
   "scale": 1,
   "units": "",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "input_register",
   "address": 30057,
   "documented": "30057",
   "name": "Serial number of the WebBox",
   "description": "Same under unit ID 1 and 2.",
   "data_type": "UINT32",
   "length": 2,
   "word_order": "ABCD",
   "scale": 1,
   "units": "",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "input_register",
   "address": 30193,
   "documented": "30193",
   "name": "Plant time (UTC) [SerTm]",
   "description": "Unit ID 2. Seconds since 1970-01-01 UTC.",
   "data_type": "UINT32",
   "length": 2,
   "word_order": "ABCD",
   "scale": 1,
   "units": "s",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "input_register",
   "address": 30195,
   "documented": "30195",
   "name": "Time zone (UTC)",
   "description": "Unit ID 2. Time-zone code from the manual's section 7.6.",
   "data_type": "UINT32",
   "length": 2,
   "word_order": "ABCD",
   "scale": 1,
   "units": "",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "input_register",
   "address": 30513,
   "documented": "30513",
   "name": "Plant total yield [E-Total]",
   "description": "Unit ID 2. Sum of all devices.",
   "data_type": "UINT64",
   "length": 4,
   "word_order": "ABCD",
   "scale": 1,
   "units": "Wh",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "input_register",
   "address": 30517,
   "documented": "30517",
   "name": "Plant day yield [E-heute]",
   "description": "Unit ID 2.",
   "data_type": "UINT64",
   "length": 4,
   "word_order": "ABCD",
   "scale": 1,
   "units": "Wh",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "input_register",
   "address": 30529,
   "documented": "30529",
   "name": "Plant total yield (Wh) [E-Total]",
   "description": "Unit ID 2, 32-bit copy in Wh.",
   "data_type": "UINT32",
   "length": 2,
   "word_order": "ABCD",
   "scale": 1,
   "units": "Wh",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "input_register",
   "address": 30531,
   "documented": "30531",
   "name": "Plant total yield (kWh) [E-Total]",
   "description": "Unit ID 2.",
   "data_type": "UINT32",
   "length": 2,
   "word_order": "ABCD",
   "scale": 1,
   "units": "kWh",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "input_register",
   "address": 30533,
   "documented": "30533",
   "name": "Plant total yield (MWh) [E-Total]",
   "description": "Unit ID 2.",
   "data_type": "UINT32",
   "length": 2,
   "word_order": "ABCD",
   "scale": 1,
   "units": "MWh",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "input_register",
   "address": 30535,
   "documented": "30535",
   "name": "Plant day yield (Wh) [E-heute]",
   "description": "Unit ID 2.",
   "data_type": "UINT32",
   "length": 2,
   "word_order": "ABCD",
   "scale": 1,
   "units": "Wh",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "input_register",
   "address": 30537,
   "documented": "30537",
   "name": "Plant day yield (kWh) [E-heute]",
   "description": "Unit ID 2.",
   "data_type": "UINT32",
   "length": 2,
   "word_order": "ABCD",
   "scale": 1,
   "units": "kWh",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "input_register",
   "address": 30539,
   "documented": "30539",
   "name": "Plant day yield (MWh) [E-heute]",
   "description": "Unit ID 2.",
   "data_type": "UINT32",
   "length": 2,
   "word_order": "ABCD",
   "scale": 1,
   "units": "MWh",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "input_register",
   "address": 30775,
   "documented": "30775",
   "name": "Plant AC active power, all phases [Pac]",
   "description": "Unit ID 2. Sum over the plant.",
   "data_type": "INT32",
   "length": 2,
   "word_order": "ABCD",
   "scale": 1,
   "units": "W",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 40001,
   "documented": "40001",
   "name": "Set plant time (UTC) [SerTm]",
   "description": "Unit ID 2. Passed on to the devices.",
   "data_type": "UINT32",
   "length": 2,
   "word_order": "ABCD",
   "scale": 1,
   "units": "s",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 40003,
   "documented": "40003",
   "name": "Display time zone [TmZn]",
   "description": "Unit ID 2. Time-zone code from section 7.6.",
   "data_type": "UINT32",
   "length": 2,
   "word_order": "ABCD",
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 42109,
   "documented": "42109",
   "name": "Device 1: Device-ID",
   "description": "Unit ID 1. SMA device type code of assignment slot 1.",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 42110,
   "documented": "42110",
   "name": "Device 1: Serial number",
   "description": "Unit ID 1.",
   "data_type": "UINT32",
   "length": 2,
   "word_order": "ABCD",
   "scale": 1,
   "units": "",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 42112,
   "documented": "42112",
   "name": "Device 1: Unit ID",
   "description": "Unit ID 1. Modbus unit ID given to slot 1 (3..247; 255 = unassigned).",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 42113,
   "documented": "42113",
   "name": "Device 2: Device-ID",
   "description": "Unit ID 1. Slots repeat every 4 registers.",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 42114,
   "documented": "42114",
   "name": "Device 2: Serial number",
   "description": "Unit ID 1.",
   "data_type": "UINT32",
   "length": 2,
   "word_order": "ABCD",
   "scale": 1,
   "units": "",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 42116,
   "documented": "42116",
   "name": "Device 2: Unit ID",
   "description": "Unit ID 1.",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  }
 ],
 "integration": {
  "summary": "Enable Modbus in the WebBox web UI, run plant detection, then read plant totals from unit ID 2 and look up each device's unit ID in the unit-1 assignment table before polling devices on unit IDs 3-247.",
  "minimum_registers": [
   {
    "table": "input_register",
    "address": 30775,
    "why": "Plant AC power"
   },
   {
    "table": "input_register",
    "address": 30513,
    "why": "Plant total energy"
   },
   {
    "table": "input_register",
    "address": 30517,
    "why": "Plant day energy"
   },
   {
    "table": "input_register",
    "address": 30193,
    "why": "Plant time"
   },
   {
    "table": "holding_register",
    "address": 42112,
    "why": "Unit ID of device slot 1"
   },
   {
    "table": "input_register",
    "address": 30007,
    "why": "Profile change counter"
   }
  ],
  "enable": "Log in to the WebBox as installer, Settings > Network, set 'Use Modbus' to Yes (default off), optionally change the port, Save. Activating Modbus assigns unit IDs to the devices already detected.",
  "watchdog": null,
  "quirks": [
   "Devices detected later get unit ID 255 and cannot be reached until you assign them a unit ID 3-247 (gateway table or Data > Devices > Modbus page).",
   "Reading a block that contains undefined registers returns NaN for those; a block with no defined register gives an exception."
  ],
  "setup": [
   "Modbus TCP only, factory port 502.",
   "Unit ID 1 = gateway, 2 = plant, 3-247 = devices.",
   "Keep requests at least 10 s apart and 30 registers or less per transfer."
  ],
  "gotchas": [
   "SMA recommends about 25 devices per WebBox (max 50).",
   "Values from Sunny Central inverter families reach the WebBox Modbus interface with a typical delay of 8-10 s."
  ]
 },
 "page": "https://easymodbus.com/modbus-register-maps/sma/sunny-webbox",
 "address_note": "address = 0-based Modbus wire (PDU) address; documented = as printed in the source.",
 "note": "Re-typed from the manufacturer's public documentation (see source) and verified against it. Registers vary by firmware and options; verify against the live device before writing."
}
