{
  "spec_version": 1,
  "slug": "lovato-dmg610",
  "manufacturer": "Lovato Electric",
  "model": "DMG610 (DMG series power analyzer)",
  "category": "Power analyzer",
  "supplier_url": "https://catalogue.lovatoelectric.com/gl_en/DMG610/snp",
  "default_configuration": {
    "protocol": "modbus_tcp",
    "port": 502,
    "unit_id": 1,
    "addressing": "one_based",
    "byte_order": "BigEndian",
    "word_order": "HighFirst",
    "native_interface": "rs485",
    "serial": {
      "parity": "None",
      "baud_rate": 9600,
      "data_bits": 8,
      "stop_bits": 1
    }
  },
  "coils": [],
  "discrete_inputs": [],
  "input_registers": [
    {
      "address": 2,
      "count": 2,
      "name": "L1 phase voltage",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 4,
      "count": 2,
      "name": "L2 phase voltage",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 6,
      "count": 2,
      "name": "L3 phase voltage",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 8,
      "count": 2,
      "name": "L1 current",
      "data_type": "UInt32",
      "units": "A",
      "scale_factor": 0.0001,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 10,
      "count": 2,
      "name": "L2 current",
      "data_type": "UInt32",
      "units": "A",
      "scale_factor": 0.0001,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 12,
      "count": 2,
      "name": "L3 current",
      "data_type": "UInt32",
      "units": "A",
      "scale_factor": 0.0001,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 14,
      "count": 2,
      "name": "L1-L2 voltage",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 16,
      "count": 2,
      "name": "L2-L3 voltage",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 18,
      "count": 2,
      "name": "L3-L1 voltage",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 20,
      "count": 2,
      "name": "L1 active power",
      "data_type": "Int32",
      "units": "W",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R",
      "description": "Signed/unsigned 32-bit integer scaled by 100. The instrument switches every power measurement to a 1/10 W resolution when the maximum theoretical power per phase exceeds 5 MW; register 2F70h reports which resolution is active."
    },
    {
      "address": 22,
      "count": 2,
      "name": "L2 active power",
      "data_type": "Int32",
      "units": "W",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R",
      "description": "Signed/unsigned 32-bit integer scaled by 100. The instrument switches every power measurement to a 1/10 W resolution when the maximum theoretical power per phase exceeds 5 MW; register 2F70h reports which resolution is active."
    },
    {
      "address": 24,
      "count": 2,
      "name": "L3 active power",
      "data_type": "Int32",
      "units": "W",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R",
      "description": "Signed/unsigned 32-bit integer scaled by 100. The instrument switches every power measurement to a 1/10 W resolution when the maximum theoretical power per phase exceeds 5 MW; register 2F70h reports which resolution is active."
    },
    {
      "address": 26,
      "count": 2,
      "name": "L1 reactive power",
      "data_type": "Int32",
      "units": "var",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R",
      "description": "Signed/unsigned 32-bit integer scaled by 100. The instrument switches every power measurement to a 1/10 W resolution when the maximum theoretical power per phase exceeds 5 MW; register 2F70h reports which resolution is active."
    },
    {
      "address": 28,
      "count": 2,
      "name": "L2 reactive power",
      "data_type": "Int32",
      "units": "var",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R",
      "description": "Signed/unsigned 32-bit integer scaled by 100. The instrument switches every power measurement to a 1/10 W resolution when the maximum theoretical power per phase exceeds 5 MW; register 2F70h reports which resolution is active."
    },
    {
      "address": 30,
      "count": 2,
      "name": "L3 reactive power",
      "data_type": "Int32",
      "units": "var",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R",
      "description": "Signed/unsigned 32-bit integer scaled by 100. The instrument switches every power measurement to a 1/10 W resolution when the maximum theoretical power per phase exceeds 5 MW; register 2F70h reports which resolution is active."
    },
    {
      "address": 32,
      "count": 2,
      "name": "L1 apparent power",
      "data_type": "UInt32",
      "units": "VA",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R",
      "description": "Signed/unsigned 32-bit integer scaled by 100. The instrument switches every power measurement to a 1/10 W resolution when the maximum theoretical power per phase exceeds 5 MW; register 2F70h reports which resolution is active."
    },
    {
      "address": 34,
      "count": 2,
      "name": "L2 apparent power",
      "data_type": "UInt32",
      "units": "VA",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R",
      "description": "Signed/unsigned 32-bit integer scaled by 100. The instrument switches every power measurement to a 1/10 W resolution when the maximum theoretical power per phase exceeds 5 MW; register 2F70h reports which resolution is active."
    },
    {
      "address": 36,
      "count": 2,
      "name": "L3 apparent power",
      "data_type": "UInt32",
      "units": "VA",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R",
      "description": "Signed/unsigned 32-bit integer scaled by 100. The instrument switches every power measurement to a 1/10 W resolution when the maximum theoretical power per phase exceeds 5 MW; register 2F70h reports which resolution is active."
    },
    {
      "address": 38,
      "count": 2,
      "name": "L1 power factor",
      "data_type": "Int32",
      "units": "",
      "scale_factor": 0.0001,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40,
      "count": 2,
      "name": "L2 power factor",
      "data_type": "Int32",
      "units": "",
      "scale_factor": 0.0001,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 42,
      "count": 2,
      "name": "L3 power factor",
      "data_type": "Int32",
      "units": "",
      "scale_factor": 0.0001,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 50,
      "count": 2,
      "name": "Frequency",
      "data_type": "UInt32",
      "units": "Hz",
      "scale_factor": 0.001,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 84,
      "count": 2,
      "name": "L1 voltage THD",
      "data_type": "UInt32",
      "units": "%",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 86,
      "count": 2,
      "name": "L2 voltage THD",
      "data_type": "UInt32",
      "units": "%",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 88,
      "count": 2,
      "name": "L3 voltage THD",
      "data_type": "UInt32",
      "units": "%",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    }
  ],
  "holding_registers": [],
  "combined_registers": [],
  "notes": "RS-485 device: reach it through a Modbus RTU-to-TCP gateway using the factory serial settings above. Source: Lovato Electric \"DMG series - Modbus communication protocol\", document I317 I GB 02_22 (07/02/2022), table 2 \"Measures supplied by serial communication protocol\" (functions 03 and 04), plus parameters P07.n.01...P07.n.05 of the DMG600/DMG610 instruction manual I411 DGB 04_15 for the factory serial settings. The protocol document numbers the registers one-based; the vendor itself says the address in the query has to be decreased by one, which is what the one_based mode does. Note that Lovato's own sample/community driver for this meter (volkszaehler mbmd, driver DMG610) reads L1 voltage at wire address 0x0001, i.e. register 0x0002 of the table - a secondary-source cross-check of the addressing. Scaling follows the \"UNIT\" column: V/100, A/10000, W|var|VA/100, power factor/10000, Hz/1000, %/100. Power measurements are returned with a 1/100 resolution unless the maximum theoretical power per phase exceeds 5 MW, in which case the instrument switches all power rows to 1/10; register 2F70h (read with function 03) answers 0000h for the standard resolution. Factory serial settings: node address 01, 9600 bps, 8 bit no parity, 1 stop bit, Modbus RTU (P07.n.01...P07.n.05). The energy counters are not listed: for the DMG6xx...9xx family they are 64-bit \"Unsigned long-long\" values (table 2, 1B20h, 1B24h, 1B28h, 1B2Ch, 1B30h and the 1E20h per-phase block) and this library has no 64-bit register format, so they cannot be read without truncation. Rows whose model column in table 2 does not mark the DMG6xx (neutral-earth voltage 006Ah, neutral current 006Ch and 0048h, the *equivalent* voltage/current/power block 0034h-0040h, cos phi 002Ch-0030h, current THD 005Ah-005Eh and the L-L voltage THD rows 0060h-0064h) are left out rather than assumed."
}
