{
  "$schema": "https://raw.githubusercontent.com/nobrega8/mbmap-library/main/schema/mbmap-2.schema.json",
  "mbmap": 2,
  "vendor": "Carlo Gavazzi",
  "model": "EM271",
  "models": ["EM271"],
  "vendor_website": "gavazziautomation.com",
  "description": "Dual three-phase energy meter with split-core current sensors (TCD/TCDMM), RS485 Modbus RTU",
  "revision": 2,
  "revised": "2026-10-17",
  "source": "Carlo Gavazzi, \"EM271 Communication Protocol\", version 1 revision 2",
  "sources": [{"title": "EM271 Communication Protocol", "version": "Version 1 Revision 2", "url": "https://www.gavazziautomation.com/fileadmin/images/PIM/OTHERSTUFF/COMPRO/EM271_CP.pdf"}],
  "notes": [
    "FC03 or FC04 read (the same values), FC06 writes one register; at most 18 registers per read.",
    "32-bit values are low word first (bytes high first in each word).",
    "Which variables exist depends on the measuring system (0x1002) and on SUM (0x1007); see table 2.3-1 of the protocol.",
    "Firmware from r.d0 unless a register says otherwise."
  ],
  "protocol": "rtu",
  "unit_id": 1,
  "baudrate": 9600,
  "parity": "N",
  "byte_order": "big",
  "word_order": "little",
  "address_base": 0,
  "max_read_registers": 18,
  "sentinels": {
    "int32": {"0x7FFFFFFF": "Overflow (EEE)", "0x7FFEFFFF": "Current sensor missing", "0x7FFDFFFF": "Not in this measuring system"}
  },
  "x_status": "official",
  "registers": [
    {"name": "Voltage L1-N", "group": "Voltage", "area": "input", "address": "0x0000", "type": "int32", "scale": 0.1, "unit": "V", "access": "R", "description": "Also the L-N voltage in single-phase systems"},
    {"name": "Voltage L2-N", "group": "Voltage", "area": "input", "address": "0x0002", "type": "int32", "scale": 0.1, "unit": "V", "access": "R"},
    {"name": "Voltage L3-N", "group": "Voltage", "area": "input", "address": "0x0004", "type": "int32", "scale": 0.1, "unit": "V", "access": "R"},
    {"name": "Voltage L1-L2", "group": "Voltage", "area": "input", "address": "0x0006", "type": "int32", "scale": 0.1, "unit": "V", "access": "R"},
    {"name": "Voltage L2-L3", "group": "Voltage", "area": "input", "address": "0x0008", "type": "int32", "scale": 0.1, "unit": "V", "access": "R"},
    {"name": "Voltage L3-L1", "group": "Voltage", "area": "input", "address": "0x000A", "type": "int32", "scale": 0.1, "unit": "V", "access": "R"},
    {"name": "Current L1 sum", "group": "Sum / virtual meter", "area": "input", "address": "0x000C", "type": "int32", "scale": 0.001, "unit": "A", "access": "R", "description": "Only with SUM on"},
    {"name": "Current L2 sum", "group": "Sum / virtual meter", "area": "input", "address": "0x000E", "type": "int32", "scale": 0.001, "unit": "A", "access": "R"},
    {"name": "Current L3 sum", "group": "Sum / virtual meter", "area": "input", "address": "0x0010", "type": "int32", "scale": 0.001, "unit": "A", "access": "R"},
    {"name": "Active power sum", "group": "Sum / virtual meter", "area": "input", "address": "0x0012", "type": "int32", "scale": 0.1, "unit": "W", "access": "R", "description": "Only with SUM on"},
    {"name": "Apparent power sum", "group": "Sum / virtual meter", "area": "input", "address": "0x0014", "type": "int32", "scale": 0.1, "unit": "VA", "access": "R"},
    {"name": "Reactive power sum", "group": "Sum / virtual meter", "area": "input", "address": "0x0016", "type": "int32", "scale": 0.1, "unit": "var", "access": "R"},
    {"name": "Active energy import sum", "group": "Sum / virtual meter", "area": "input", "address": "0x0018", "type": "int32", "scale": 0.1, "unit": "kWh", "access": "R"},
    {"name": "Reactive energy import sum", "group": "Sum / virtual meter", "area": "input", "address": "0x001A", "type": "int32", "scale": 0.1, "unit": "kvarh", "access": "R"},
    {"name": "Active power demand sum", "group": "Sum / virtual meter", "area": "input", "address": "0x001C", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Apparent power demand sum", "group": "Sum / virtual meter", "area": "input", "address": "0x001E", "type": "int32", "scale": 0.1, "unit": "VA", "access": "R"},
    {"name": "Active power demand max sum", "group": "Sum / virtual meter", "area": "input", "address": "0x0020", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Apparent power demand max sum", "group": "Sum / virtual meter", "area": "input", "address": "0x0022", "type": "int32", "scale": 0.1, "unit": "VA", "access": "R"},
    {"name": "Power factor sum", "group": "Sum / virtual meter", "area": "input", "address": "0x0024", "type": "int32", "scale": 0.001, "access": "R", "description": "From firmware r.d2; sign per the power quadrant"},
    {"name": "Current L1 TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x010C", "type": "int32", "scale": 0.001, "unit": "A", "access": "R"},
    {"name": "Current L2 TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x010E", "type": "int32", "scale": 0.001, "unit": "A", "access": "R"},
    {"name": "Current L3 TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x0110", "type": "int32", "scale": 0.001, "unit": "A", "access": "R"},
    {"name": "Active power L1 TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x0112", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Active power L2 TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x0114", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Active power L3 TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x0116", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Active power TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x0118", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Apparent power TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x011A", "type": "int32", "scale": 0.1, "unit": "VA", "access": "R"},
    {"name": "Reactive power TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x011C", "type": "int32", "scale": 0.1, "unit": "var", "access": "R"},
    {"name": "Active energy import TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x011E", "type": "int32", "scale": 0.1, "unit": "kWh", "access": "R"},
    {"name": "Reactive energy import TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x0120", "type": "int32", "scale": 0.1, "unit": "kvarh", "access": "R"},
    {"name": "Active power demand TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x0122", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Apparent power demand TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x0124", "type": "int32", "scale": 0.1, "unit": "VA", "access": "R"},
    {"name": "Active power demand max TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x0126", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Apparent power demand max TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x0128", "type": "int32", "scale": 0.1, "unit": "VA", "access": "R"},
    {"name": "Active energy import L1 TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x012A", "type": "int32", "scale": 0.1, "unit": "kWh", "access": "R"},
    {"name": "Active energy import L2 TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x012C", "type": "int32", "scale": 0.1, "unit": "kWh", "access": "R"},
    {"name": "Active energy import L3 TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x012E", "type": "int32", "scale": 0.1, "unit": "kWh", "access": "R"},
    {"name": "Active power demand L1 TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x0130", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Active power demand L2 TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x0132", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Active power demand L3 TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x0134", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Active power demand max L1 TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x0136", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Active power demand max L2 TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x0138", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Active power demand max L3 TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x013A", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Reactive power L1 TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x013C", "type": "int32", "scale": 0.1, "unit": "var", "access": "R", "description": "From firmware r.d2"},
    {"name": "Reactive power L2 TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x013E", "type": "int32", "scale": 0.1, "unit": "var", "access": "R"},
    {"name": "Reactive power L3 TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x0140", "type": "int32", "scale": 0.1, "unit": "var", "access": "R"},
    {"name": "Power factor L1 TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x0142", "type": "int32", "scale": 0.001, "access": "R", "description": "From firmware r.d2"},
    {"name": "Power factor L2 TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x0144", "type": "int32", "scale": 0.001, "access": "R"},
    {"name": "Power factor L3 TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x0146", "type": "int32", "scale": 0.001, "access": "R"},
    {"name": "Power factor TCDA1", "group": "Sensor TCDA1", "area": "input", "address": "0x0148", "type": "int32", "scale": 0.001, "access": "R"},
    {"name": "Current L1 TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x020C", "type": "int32", "scale": 0.001, "unit": "A", "access": "R"},
    {"name": "Current L2 TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x020E", "type": "int32", "scale": 0.001, "unit": "A", "access": "R"},
    {"name": "Current L3 TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x0210", "type": "int32", "scale": 0.001, "unit": "A", "access": "R"},
    {"name": "Active power L1 TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x0212", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Active power L2 TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x0214", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Active power L3 TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x0216", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Active power TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x0218", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Apparent power TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x021A", "type": "int32", "scale": 0.1, "unit": "VA", "access": "R"},
    {"name": "Reactive power TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x021C", "type": "int32", "scale": 0.1, "unit": "var", "access": "R"},
    {"name": "Active energy import TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x021E", "type": "int32", "scale": 0.1, "unit": "kWh", "access": "R"},
    {"name": "Reactive energy import TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x0220", "type": "int32", "scale": 0.1, "unit": "kvarh", "access": "R"},
    {"name": "Active power demand TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x0222", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Apparent power demand TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x0224", "type": "int32", "scale": 0.1, "unit": "VA", "access": "R"},
    {"name": "Active power demand max TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x0226", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Apparent power demand max TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x0228", "type": "int32", "scale": 0.1, "unit": "VA", "access": "R"},
    {"name": "Active energy import L1 TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x022A", "type": "int32", "scale": 0.1, "unit": "kWh", "access": "R"},
    {"name": "Active energy import L2 TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x022C", "type": "int32", "scale": 0.1, "unit": "kWh", "access": "R"},
    {"name": "Active energy import L3 TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x022E", "type": "int32", "scale": 0.1, "unit": "kWh", "access": "R"},
    {"name": "Active power demand L1 TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x0230", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Active power demand L2 TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x0232", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Active power demand L3 TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x0234", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Active power demand max L1 TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x0236", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Active power demand max L2 TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x0238", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Active power demand max L3 TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x023A", "type": "int32", "scale": 0.1, "unit": "W", "access": "R"},
    {"name": "Reactive power L1 TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x023C", "type": "int32", "scale": 0.1, "unit": "var", "access": "R", "description": "From firmware r.d2"},
    {"name": "Reactive power L2 TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x023E", "type": "int32", "scale": 0.1, "unit": "var", "access": "R"},
    {"name": "Reactive power L3 TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x0240", "type": "int32", "scale": 0.1, "unit": "var", "access": "R"},
    {"name": "Power factor L1 TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x0242", "type": "int32", "scale": 0.001, "access": "R", "description": "From firmware r.d2"},
    {"name": "Power factor L2 TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x0244", "type": "int32", "scale": 0.001, "access": "R"},
    {"name": "Power factor L3 TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x0246", "type": "int32", "scale": 0.001, "access": "R"},
    {"name": "Power factor TCDA2", "group": "Sensor TCDA2", "area": "input", "address": "0x0248", "type": "int32", "scale": 0.001, "access": "R"},
    {"name": "Carlo Gavazzi identification code", "group": "Identity", "area": "input", "address": "0x000B", "type": "uint16", "access": "R", "enum": {"274": "EM271 MV5 (2 pulse outputs)", "275": "EM271 MV5 (open collector)", "276": "EM271 MV6 (2 pulse outputs)", "277": "EM271 MV6 (open collector)"}, "role": "model", "description": "Read alone, one word at a time (the address is inside Voltage L3-L1)"},
    {"name": "Version code", "group": "Identity", "area": "input", "address": "0x0302", "type": "uint16", "access": "R", "description": "0 = A, 1 = B …"},
    {"name": "Revision code", "group": "Identity", "area": "input", "address": "0x0303", "type": "uint16", "access": "R", "role": "firmware"},
    {"name": "Keypad locked", "group": "Status", "area": "input", "address": "0x0304", "type": "uint16", "access": "R", "enum": {"0": "Unlocked", "1": "Locked"}},
    {"name": "Password", "group": "Settings", "area": "holding", "address": "0x1000", "type": "uint16", "access": "RW", "write_min": 0, "write_max": 999},
    {"name": "Measuring system", "group": "Settings", "area": "holding", "address": "0x1002", "type": "uint16", "access": "RW", "enum": {"0": "3P 1.3P", "1": "3P 2.3P", "2": "3P 3.1P", "3": "3P 6.1P", "4": "1P 3.1P", "5": "1P 6.1P"}},
    {"name": "Current sensor TCDA1 primary", "group": "Settings", "area": "holding", "address": "0x1003", "type": "uint16", "unit": "A", "access": "R", "description": "0 = TCDMM detected (primary set at 0x1023)"},
    {"name": "Current sensor TCDA2 primary", "group": "Settings", "area": "holding", "address": "0x1004", "type": "uint16", "unit": "A", "access": "R"},
    {"name": "VT ratio", "group": "Settings", "area": "holding", "address": "0x1005", "type": "uint16", "scale": 0.1, "access": "RW", "write_min": 1, "write_max": 999, "description": "Maximum depends on the model (MV5/MV6) and the TCDs, from 9.0 to 999.0"},
    {"name": "SUM mode", "group": "Settings", "area": "holding", "address": "0x1007", "type": "uint16", "access": "RW", "enum": {"0": "Disabled", "1": "Enabled"}},
    {"name": "Demand integration time", "group": "Settings", "area": "holding", "address": "0x1010", "type": "uint16", "unit": "min", "access": "RW", "write_min": 1, "write_max": 60},
    {"name": "Pulse on time", "group": "Settings", "area": "holding", "address": "0x1012", "type": "uint16", "access": "RW", "enum": {"0": "40 ms", "1": "100 ms"}},
    {"name": "kWh per pulse, output 1", "group": "Settings", "area": "holding", "address": "0x1020", "type": "uint16", "scale": 0.01, "unit": "kWh", "access": "RW", "write_min": 0.01, "write_max": 9.99},
    {"name": "kWh per pulse, output 2", "group": "Settings", "area": "holding", "address": "0x1022", "type": "uint16", "scale": 0.01, "unit": "kWh", "access": "RW", "write_min": 0.01, "write_max": 9.99},
    {"name": "TCDA1 TCDMM primary current", "group": "Settings", "area": "holding", "address": "0x1023", "type": "uint16", "unit": "A", "access": "RW", "write_min": 10, "write_max": 10000, "description": "Only with a TCDMM sensor; default 60 A"},
    {"name": "TCDA2 TCDMM primary current", "group": "Settings", "area": "holding", "address": "0x1024", "type": "uint16", "unit": "A", "access": "RW", "write_min": 10, "write_max": 10000},
    {"name": "Easy connection", "group": "Settings", "area": "holding", "address": "0x1103", "type": "uint16", "access": "RW", "enum": {"0": "Enabled", "1": "Disabled"}},
    {"name": "RS485 address", "group": "Settings", "area": "holding", "address": "0x2000", "type": "uint16", "access": "RW", "write_min": 1, "write_max": 247},
    {"name": "RS485 baud rate", "group": "Settings", "area": "holding", "address": "0x2001", "type": "uint16", "access": "RW", "enum": {"0": "9600", "1": "19200", "2": "38400"}},
    {"name": "RS485 parity", "group": "Settings", "area": "holding", "address": "0x2002", "type": "uint16", "access": "RW", "enum": {"0": "None", "1": "Even"}, "description": "1 stop bit, fixed"},
    {"name": "Reset partial meters and demand peaks", "group": "Commands", "area": "holding", "address": "0x4000", "type": "uint16", "access": "W", "enum": {"1": "Execute"}},
    {"name": "Reset total energy meters", "group": "Commands", "area": "holding", "address": "0x4001", "type": "uint16", "access": "W", "enum": {"1": "Execute"}},
    {"name": "Serial number letters 1-2", "group": "Identity", "area": "holding", "address": "0x5000", "type": "uint16", "access": "R", "description": "ASCII: high byte first letter, low byte second"},
    {"name": "Serial number letters 3-4", "group": "Identity", "area": "holding", "address": "0x5001", "type": "uint16", "access": "R"},
    {"name": "Serial number letters 5-6", "group": "Identity", "area": "holding", "address": "0x5002", "type": "uint16", "access": "R"},
    {"name": "Serial number letters 7-8", "group": "Identity", "area": "holding", "address": "0x5003", "type": "uint16", "access": "R"},
    {"name": "Serial number letters 9-10", "group": "Identity", "area": "holding", "address": "0x5004", "type": "uint16", "access": "R"},
    {"name": "Serial number letters 11-12", "group": "Identity", "area": "holding", "address": "0x5005", "type": "uint16", "access": "R"},
    {"name": "Serial number letter 13", "group": "Identity", "area": "holding", "address": "0x5006", "type": "uint16", "access": "R"},
    {"name": "Production year", "group": "Identity", "area": "holding", "address": "0x5007", "type": "uint16", "access": "R"},
    {"name": "Secondary address", "group": "Identity", "area": "holding", "address": "0x5100", "type": "uint32", "access": "R", "description": "From firmware r.d1"}
  ]
}
