{
    "rtype": 0, // 0 = modbus, 1 = http/json
    "mtype": 1, // 0 = other, 1 = meter, 2 = inverter, 4 = battery
    
    "name": "ABB B23 112-100 MB",   // as displayed in the config dialog
    "manufacturer": "ABB",
    "dev_type": "abb_b23_b24_mb",   // will be prefixed by "meter_"

    // modbus parameters
    "rtu": {
        "silence_period": 75,    // msec
        "silence_same_slave": false,
        "retries": 4,
        "rcv_timeout": 120       // msec
    },
    "modbus_read": 3,            // function code to read registers
    "modbus_read_max_registers": 96, 
    "modbus_write": 16,          // function code to write register(s)
    "modbus_write_max_registers": 64,

    // values used to build the model string: type_designation,version,firmware_version,serial
    "type_designation": {
        "address": 0x8960,  // modbus address as number
        "type": "string",   // zero terminated
        "length": 6         // string length in registers
    },
    "version": {
        "address": 0x8908,
        "type": "string",
        "length": 8
    },
    "firmware_version": {
        "address": 0x8910,
        "type": "int16",
        "length": 2        // for version strings: len = 2 means VV.VV, len = 4 means V.V.V.V
    },
    "serial": {
        "address": 0x8900,
        "type": "int32",   // available types: int16, int32, int64, float, string
        "order": "hl",     // most significant word(s) first, use "lh" for least significant word(s) first
        "reserved": [0x7fffffff, 0xffffffff]    // raw values -> results in value 0
    },
    
    // instantaneous values
    "voltage_l1": {
        "address": 0x5b00,
        "type": "int32",
        "order": "hl",
        "reserved": [0x7fffffff, 0xffffffff],
        "resolution": 0.1   // result in V, the read value will be multiplied with 'resolution' to yield the final result
    },
    "voltage_l2": {
        "address": 0x5b02,
        "type": "int32",
        "order": "hl",
        "reserved": [0x7fffffff, 0xffffffff],
        "resolution": 0.1   // result in V
    },
    "voltage_l3": {
        "address": 0x5b04,
        "type": "int32",
        "order": "hl",
        "reserved": [0x7fffffff, 0xffffffff],
        "resolution": 0.1   // result in V
    },
    "current_l1": {
        "address": 0x5b0c,
        "type": "int32",
        "order": "hl",
        "reserved": [0x7fffffff, 0xffffffff],
        "resolution": 10.0   // result mA
    },
    "current_l2": {
        "address": 0x5b0e,
        "type": "int32",
        "order": "hl",
        "reserved": [0x7fffffff, 0xffffffff],
        "resolution": 10.0   // result in mA
    },
    "current_l3": {
        "address": 0x5b10,
        "type": "int32",
        "order": "hl",
        "reserved": [0x7fffffff, 0xffffffff],
        "resolution": 10.0   // result in mA
    },
    "power_w": {
        "address": 0x5b14,
        "type": "int32",
        "order": "hl",
        "reserved": [0x7fffffff, 0xffffffff],
        "resolution": 0.01  // result in W
    },
    "power_var": {
        "address": 0x5b1c,
        "type": "int32",
        "order": "hl",
        "reserved": [0x7fffffff, 0xffffffff],
        "resolution": 0.01   // result in VAR
    },
    "power_va": {
        "address": 0x5b24,
        "type": "int32",
        "order": "hl",
        "reserved": [0x7fffffff, 0xffffffff],
        "resolution": 0.01   // result in VA
    },

    // accumulated values
    "import_wh": {
        "address": 0x5000,
        "type": "int64",
        "order": "hl",
        "reserved": [0x7fffffffffffffff, 0xffffffffffffffff],
        "resolution": 10   // 10 Wh, result in Wh
    },
    "export_wh": {
        "address": 0x5004,
        "type": "int64",
        "order": "hl",
        "reserved": [0x7fffffffffffffff, 0xffffffffffffffff],
        "resolution": 10   // 10 Wh,  result Wh
    },
 
    // inputs, modbus only
    "inputs": [
        {
           "address": 0x6308,
           "count": 1     // number of input bits in this register
        },
        {
            "address": 0x6309,
            "count": 1
        }
     ]
 }
 