{
  "$schema": "https://raw.githubusercontent.com/nobrega8/mbmap-library/main/schema/mbmap-2.schema.json",
  "mbmap": 2,
  "vendor": "Weidmüller",
  "model": "Energy Meter BasicLine EM111-RTU-2P-MID",
  "models": ["EM111-RTU-2P-MID", "3099190000"],
  "description": "Single-phase MID energy meter, 45 A direct connection, RS485 Modbus RTU",
  "vendor_website": "weidmueller.com",
  "revision": 1,
  "revised": "2026-10-18",
  "sources": [{"title": "Bedienungsanleitung - Energy Meter - BasicLine (EM111-RTU-2P-MID, EM111-MBUS-2P-MID)", "version": "00", "date": "2025-06", "url": "https://assets.dam.weidmueller.com/assets/api/812dea46-e1c5-4f86-8714-dbf9b91c55aa/original/3149630000_00_06-2025_OPIN_EM_111_MID_de.pdf", "note": "chapter 6, Modbus-Register (document 3149630000)"}],
  "source": "Weidmüller, Bedienungsanleitung Energy Meter BasicLine, 3149630000, 00/06.2025",
  "notes": ["Addresses are the hexadecimal protocol start addresses of the manual (30001 is address 0). Measurements are read with function code 4 and the settings with function codes 3 and 16.", "The manual does not state the byte or word order; floats are read big-endian.", "Most settings are 32-bit floats holding a whole number. Parity and stop bits and baud rate need a restart to take effect.", "The display says the parity default is none, while the parity register says the default is 1 (even). The map follows the display.", "Meter is delivered with ID 1 and 2400 baud; the display allows 1200 to 9600 baud."],
  "protocol": "rtu",
  "unit_id": 1,
  "baudrate": 2400,
  "parity": "N",
  "databits": 8,
  "stopbits": 1,
  "byte_order": "big",
  "word_order": "big",
  "address_base": 0,
  "x_status": "official",
  "registers": [
    {"name": "Voltage", "group": "Measurements", "area": "input", "address": 0, "type": "float32", "unit": "V"},
    {"name": "Current", "group": "Measurements", "area": "input", "address": 6, "type": "float32", "unit": "A"},
    {"name": "Active power", "group": "Measurements", "area": "input", "address": 12, "type": "float32", "unit": "W"},
    {"name": "Apparent power", "group": "Measurements", "area": "input", "address": 18, "type": "float32", "unit": "VA"},
    {"name": "Reactive power", "group": "Measurements", "area": "input", "address": 24, "type": "float32", "unit": "var"},
    {"name": "Power factor", "group": "Measurements", "area": "input", "address": 30, "type": "float32"},
    {"name": "Frequency", "group": "Measurements", "area": "input", "address": 70, "type": "float32", "unit": "Hz"},
    {"name": "Import active energy", "group": "Energy", "area": "input", "address": 72, "type": "float32", "unit": "kWh"},
    {"name": "Export active energy", "group": "Energy", "area": "input", "address": 74, "type": "float32", "unit": "kWh"},
    {"name": "Import reactive energy", "group": "Energy", "area": "input", "address": 76, "type": "float32", "unit": "kvarh"},
    {"name": "Export reactive energy", "group": "Energy", "area": "input", "address": 78, "type": "float32", "unit": "kvarh"},
    {"name": "System power demand", "group": "Demand", "area": "input", "address": 84, "type": "float32", "unit": "W"},
    {"name": "Maximum system power demand", "group": "Demand", "area": "input", "address": 86, "type": "float32", "unit": "W"},
    {"name": "Import system power demand", "group": "Demand", "area": "input", "address": 88, "type": "float32", "unit": "W"},
    {"name": "Maximum import system power demand", "group": "Demand", "area": "input", "address": 90, "type": "float32", "unit": "W"},
    {"name": "Export system power demand", "group": "Demand", "area": "input", "address": 92, "type": "float32", "unit": "W"},
    {"name": "Maximum export system power demand", "group": "Demand", "area": "input", "address": 94, "type": "float32", "unit": "W"},
    {"name": "Current demand", "group": "Demand", "area": "input", "address": 258, "type": "float32", "unit": "A"},
    {"name": "Maximum current demand", "group": "Demand", "area": "input", "address": 264, "type": "float32", "unit": "A"},
    {"name": "Total active energy", "group": "Energy", "area": "input", "address": 342, "type": "float32", "unit": "kWh"},
    {"name": "Total reactive energy", "group": "Energy", "area": "input", "address": 344, "type": "float32", "unit": "kvarh"},
    {"name": "Demand period", "group": "Settings", "area": "holding", "address": 2, "type": "float32", "access": "RW", "unit": "min", "description": "Allowed values 0, 5, 8, 10, 15, 20, 30 and 60 minutes (default 60). At 0 the demand shows the present value and the maximum demand the highest value since the last reset"},
    {"name": "Pulse 1 width", "group": "Settings", "area": "holding", "address": 12, "type": "float32", "access": "RW", "unit": "ms", "description": "Allowed values 60, 100 and 200 ms (default 60)"},
    {"name": "Parity and stop bits", "group": "Settings", "area": "holding", "address": 18, "type": "float32", "access": "RW", "description": "0 = one stop bit, no parity; 1 = one stop bit, even parity; 2 = one stop bit, odd parity; 3 = two stop bits, no parity. Needs a restart to take effect", "write_min": 0, "write_max": 3},
    {"name": "Meter ID", "group": "Settings", "area": "holding", "address": 20, "type": "float32", "access": "RW", "write_min": 1, "write_max": 247, "description": "Modbus address, 1 to 247"},
    {"name": "Baud rate", "group": "Settings", "area": "holding", "address": 28, "type": "float32", "access": "RW", "description": "0 = 2400 baud, 1 = 4800, 2 = 9600, 5 = 1200 (default 2400)"},
    {"name": "Pulse output 1 mode", "group": "Settings", "area": "holding", "address": 86, "type": "float32", "access": "RW", "description": "Energy that pulse output 1 counts: 1 = import active, 2 = total active, 4 = export active (default), 5 = import reactive, 6 = total reactive, 8 = export reactive"},
    {"name": "Reset demand data", "group": "Settings", "area": "holding", "address": 61456, "type": "uint16", "access": "W", "comment": "Write 0 to reset the demand information"},
    {"name": "Scroll time", "group": "Settings", "area": "holding", "address": 63744, "type": "uint16", "access": "RW", "comment": "BCD value, 0 to 30 s; 0 (default) means no screen change"},
    {"name": "Pulse output 1 constant", "group": "Settings", "area": "holding", "address": 63760, "type": "uint16", "access": "RW", "enum": {"0": "0.001 kWh/pulse", "1": "0.01 kWh/pulse", "2": "0.1 kWh/pulse", "3": "1 kWh/pulse"}},
    {"name": "Measurement mode", "group": "Settings", "area": "holding", "address": 63776, "type": "uint16", "access": "RW", "enum": {"1": "Mode 1 (total = import)", "2": "Mode 2 (total = import + export)", "3": "Mode 3 (total = import - export)"}},
    {"name": "Serial number", "group": "Identification", "area": "holding", "address": 64512, "type": "uint32", "role": "serial"},
    {"name": "Meter code", "group": "Identification", "area": "holding", "address": 64514, "type": "uint16", "reference": 32, "description": "Fixed code 0x0020"}
  ]
}
