{
  "format": "voltrus-device-template/1",
  "template_id": "abb-m1m-20-30",
  "manufacturer": "ABB",
  "model": "M1M 20 / M1M 30",
  "protocol": "modbus",
  "description": "Panel-mounted multifunction power meters from ABB's M1M range. The Modbus manual covers energy counters, real-time electrical values, harmonic distortion, digital I/O, device information and communication settings. The M1M 20 and M1M 30 come in RS-485 and Ethernet versions. Register map: https://voltrus.id/registers/abb/m1m-20-30/",
  "version": "1.0.0",
  "verified": false,
  "verified_notes": "Generated by voltrus.id from 9AKK108467A2704, version 1.3 (https://library.e.abb.com/public/16d94f2228184c6b9fe1ea51292bcb65/M1M%2096%20Modbus%20Manual%20V1.3C_EN.pdf), read 2026-10-24. Not checked against a real device; confirm a known value before relying on it.",
  "quirks": [
    "Offsets are 0-based wire addresses. The manual prints 0-based addresses, the same as here.",
    "Word order from the manual: High word first (AB CD).",
    "The manual states Modbus is big-endian and its multi-register examples carry the most significant word first, for example total energy 0x0F4243 read from four registers 00 00 00 00 00 0F 42 43 (p. 7, p. 11). A register value of 0xFFFF means the quantity cannot be measured in the current wiring mode (p. 7).",
    "Defaults from the manual: Modbus TCP uses port 502 by default (p. 6). Modbus RTU address range is 1 to 247, baud rates 9600 to 115200 and parity none, even or odd (p. 27). Function codes 03 and 10 hex are supported (p. 7).",
    "22 unsigned 32-bit registers are read as int32: exact up to a raw value of 2,147,483,647.",
    "Not included, because templates have no 64-bit integer or string type: ActiveEnergyImport, ActiveEnergyExport, ReactiveEnergyImport, ReactiveEnergyExport, SerialNumber, FirmwareVersion, ProductTag, TypeDesignation, ProductName."
  ],
  "license": "CC-BY-4.0",
  "port": 502,
  "unit_id": 1,
  "interval_ms": 1000,
  "endianness": "big",
  "registers": [
    {
      "name": "VoltageSystem",
      "offset": 23296,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "V",
      "description": "Three-phase system voltage (manual address 23296)"
    },
    {
      "name": "Voltage_L1N",
      "offset": 23298,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "V",
      "description": "Phase voltage L1 (manual address 23298)"
    },
    {
      "name": "Voltage_L2N",
      "offset": 23300,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "V",
      "description": "Phase voltage L2 (manual address 23300)"
    },
    {
      "name": "Voltage_L3N",
      "offset": 23302,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "V",
      "description": "Phase voltage L3 (manual address 23302)"
    },
    {
      "name": "Voltage_L1L2",
      "offset": 23304,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "V",
      "description": "Line voltage L1-L2 (manual address 23304)"
    },
    {
      "name": "Voltage_L3L2",
      "offset": 23306,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "V",
      "description": "Line voltage L3-L2 (manual address 23306)"
    },
    {
      "name": "Voltage_L1L3",
      "offset": 23308,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "V",
      "description": "Line voltage L1-L3 (manual address 23308)"
    },
    {
      "name": "CurrentSystem",
      "offset": 23310,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 0.01,
      "unit": "A",
      "description": "Three-phase system current (manual address 23310)"
    },
    {
      "name": "Current_L1",
      "offset": 23312,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 0.01,
      "unit": "A",
      "description": "Current L1 (manual address 23312)"
    },
    {
      "name": "Current_L2",
      "offset": 23314,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 0.01,
      "unit": "A",
      "description": "Current L2 (manual address 23314)"
    },
    {
      "name": "Current_L3",
      "offset": 23316,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 0.01,
      "unit": "A",
      "description": "Current L3 (manual address 23316)"
    },
    {
      "name": "Current_N",
      "offset": 23318,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 0.01,
      "unit": "A",
      "description": "Neutral current (manual address 23318)"
    },
    {
      "name": "ActivePower_Total",
      "offset": 23322,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 0.01,
      "unit": "W",
      "description": "Active power total (manual address 23322)"
    },
    {
      "name": "ActivePower_L1",
      "offset": 23324,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 0.01,
      "unit": "W",
      "description": "Active power L1 (manual address 23324)"
    },
    {
      "name": "ActivePower_L2",
      "offset": 23326,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 0.01,
      "unit": "W",
      "description": "Active power L2 (manual address 23326)"
    },
    {
      "name": "ActivePower_L3",
      "offset": 23328,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 0.01,
      "unit": "W",
      "description": "Active power L3 (manual address 23328)"
    },
    {
      "name": "ReactivePower_Total",
      "offset": 23330,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 0.01,
      "unit": "var",
      "description": "Reactive power total (manual address 23330)"
    },
    {
      "name": "ReactivePower_L1",
      "offset": 23332,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 0.01,
      "unit": "var",
      "description": "Reactive power L1 (manual address 23332)"
    },
    {
      "name": "ReactivePower_L2",
      "offset": 23334,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 0.01,
      "unit": "var",
      "description": "Reactive power L2 (manual address 23334)"
    },
    {
      "name": "ReactivePower_L3",
      "offset": 23336,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 0.01,
      "unit": "var",
      "description": "Reactive power L3 (manual address 23336)"
    },
    {
      "name": "ApparentPower_Total",
      "offset": 23338,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 0.01,
      "unit": "VA",
      "description": "Apparent power total (manual address 23338)"
    },
    {
      "name": "ApparentPower_L1",
      "offset": 23340,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 0.01,
      "unit": "VA",
      "description": "Apparent power L1 (manual address 23340)"
    },
    {
      "name": "ApparentPower_L2",
      "offset": 23342,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 0.01,
      "unit": "VA",
      "description": "Apparent power L2 (manual address 23342)"
    },
    {
      "name": "ApparentPower_L3",
      "offset": 23344,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 0.01,
      "unit": "VA",
      "description": "Apparent power L3 (manual address 23344)"
    },
    {
      "name": "Frequency",
      "offset": 23346,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 0.01,
      "unit": "Hz",
      "description": "Line frequency (manual address 23346)"
    },
    {
      "name": "PowerAngle_Total",
      "offset": 23347,
      "register_type": "int16",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "°",
      "description": "Power angle total (manual address 23347)"
    },
    {
      "name": "PowerAngle_L1",
      "offset": 23348,
      "register_type": "int16",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "°",
      "description": "Power angle L1 (manual address 23348)"
    },
    {
      "name": "PowerAngle_L2",
      "offset": 23349,
      "register_type": "int16",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "°",
      "description": "Power angle L2 (manual address 23349)"
    },
    {
      "name": "PowerAngle_L3",
      "offset": 23350,
      "register_type": "int16",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "°",
      "description": "Power angle L3 (manual address 23350)"
    },
    {
      "name": "VoltageAngle_L1",
      "offset": 23351,
      "register_type": "int16",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "°",
      "description": "Voltage angle L1 (manual address 23351)"
    },
    {
      "name": "VoltageAngle_L2",
      "offset": 23352,
      "register_type": "int16",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "°",
      "description": "Voltage angle L2 (manual address 23352)"
    },
    {
      "name": "VoltageAngle_L3",
      "offset": 23353,
      "register_type": "int16",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "°",
      "description": "Voltage angle L3 (manual address 23353)"
    },
    {
      "name": "CurrentAngle_L1",
      "offset": 23357,
      "register_type": "int16",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "°",
      "description": "Current angle L1 (manual address 23357)"
    },
    {
      "name": "CurrentAngle_L2",
      "offset": 23358,
      "register_type": "int16",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "°",
      "description": "Current angle L2 (manual address 23358)"
    },
    {
      "name": "CurrentAngle_L3",
      "offset": 23359,
      "register_type": "int16",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "°",
      "description": "Current angle L3 (manual address 23359)"
    },
    {
      "name": "PowerFactor_Total",
      "offset": 23360,
      "register_type": "int16",
      "register_area": "holding",
      "scale": 0.001,
      "description": "Power factor total (manual address 23360)"
    },
    {
      "name": "PowerFactor_L1",
      "offset": 23361,
      "register_type": "int16",
      "register_area": "holding",
      "scale": 0.001,
      "description": "Power factor L1 (manual address 23361)"
    },
    {
      "name": "PowerFactor_L2",
      "offset": 23362,
      "register_type": "int16",
      "register_area": "holding",
      "scale": 0.001,
      "description": "Power factor L2 (manual address 23362)"
    },
    {
      "name": "PowerFactor_L3",
      "offset": 23363,
      "register_type": "int16",
      "register_area": "holding",
      "scale": 0.001,
      "description": "Power factor L3 (manual address 23363)"
    },
    {
      "name": "Cosphi_Total",
      "offset": 23368,
      "register_type": "int16",
      "register_area": "holding",
      "scale": 0.001,
      "description": "Displacement factor total (manual address 23368)"
    },
    {
      "name": "Cosphi_L1",
      "offset": 23369,
      "register_type": "int16",
      "register_area": "holding",
      "scale": 0.001,
      "description": "Displacement factor L1 (manual address 23369)"
    },
    {
      "name": "Cosphi_L2",
      "offset": 23370,
      "register_type": "int16",
      "register_area": "holding",
      "scale": 0.001,
      "description": "Displacement factor L2 (manual address 23370)"
    },
    {
      "name": "Cosphi_L3",
      "offset": 23371,
      "register_type": "int16",
      "register_area": "holding",
      "scale": 0.001,
      "description": "Displacement factor L3 (manual address 23371)"
    },
    {
      "name": "THD_Voltage_L1",
      "offset": 23808,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "%",
      "description": "Voltage THD L1 (manual address 23808)"
    },
    {
      "name": "THD_Voltage_L2",
      "offset": 23936,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "%",
      "description": "Voltage THD L2 (manual address 23936)"
    },
    {
      "name": "THD_Voltage_L3",
      "offset": 24064,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "%",
      "description": "Voltage THD L3 (manual address 24064)"
    },
    {
      "name": "THD_Current_L1",
      "offset": 24576,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "%",
      "description": "Current THD L1 (manual address 24576)"
    },
    {
      "name": "THD_Current_L2",
      "offset": 24704,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "%",
      "description": "Current THD L2 (manual address 24704)"
    },
    {
      "name": "THD_Current_L3",
      "offset": 24832,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "%",
      "description": "Current THD L3 (manual address 24832)"
    },
    {
      "name": "DigitalOutput1",
      "offset": 25344,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 1,
      "description": "Digital output 1 status (manual address 25344)",
      "writable": true
    },
    {
      "name": "DigitalOutput2",
      "offset": 25345,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 1,
      "description": "Digital output 2 status (manual address 25345)",
      "writable": true
    },
    {
      "name": "DigitalInputs12",
      "offset": 25352,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 1,
      "description": "Digital inputs 1 and 2 status (manual address 25352)"
    },
    {
      "name": "ProductTypeId",
      "offset": 35088,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 1,
      "description": "Product type number ID (manual address 35088)"
    },
    {
      "name": "TimerUpCounter",
      "offset": 36087,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "h",
      "description": "Timer up counter (manual address 36087)"
    },
    {
      "name": "CTPrimary",
      "offset": 35840,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 1,
      "description": "Current transformer primary (manual address 35840)",
      "writable": true
    },
    {
      "name": "CTSecondary",
      "offset": 35842,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 1,
      "description": "Current transformer secondary (manual address 35842)",
      "writable": true
    },
    {
      "name": "VTPrimary",
      "offset": 35844,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 1,
      "description": "Voltage transformer primary (manual address 35844)",
      "writable": true
    },
    {
      "name": "VTSecondary",
      "offset": 35846,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 1,
      "description": "Voltage transformer secondary (manual address 35846)",
      "writable": true
    },
    {
      "name": "Wires",
      "offset": 36069,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 1,
      "description": "Wiring type (manual address 36069)",
      "writable": true
    },
    {
      "name": "RTU_Address",
      "offset": 36075,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 1,
      "description": "Modbus RTU address (manual address 36075)",
      "writable": true
    },
    {
      "name": "RTU_Baudrate",
      "offset": 36076,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 1,
      "unit": "baud",
      "description": "Modbus RTU baud rate (manual address 36076)",
      "writable": true
    },
    {
      "name": "RTU_Parity",
      "offset": 36078,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 1,
      "description": "Modbus RTU parity (manual address 36078)",
      "writable": true
    },
    {
      "name": "TCP_DHCP",
      "offset": 36079,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 1,
      "description": "Ethernet DHCP enable (manual address 36079)",
      "writable": true
    },
    {
      "name": "TCP_IP",
      "offset": 36080,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 1,
      "description": "Ethernet IP address (manual address 36080)",
      "writable": true
    },
    {
      "name": "TCP_Mask",
      "offset": 36082,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 1,
      "description": "Ethernet subnet mask (manual address 36082)",
      "writable": true
    },
    {
      "name": "TCP_Gateway",
      "offset": 36084,
      "register_type": "int32",
      "register_area": "holding",
      "scale": 1,
      "description": "Ethernet gateway (manual address 36084)",
      "writable": true
    }
  ]
}
