{
    "rtype": 0,  // 0 = modbus, 1 = http/json
    "mtype": 1,  // 0 = other, 1 = meter, 2 = inverter, 4 = battery
    
    "name": "C Gavazzi EM300/ET300",   // as displayed in the config dialog
    "manufacturer": "C. Gavazzi",
    "dev_type": "cgavazzi2_em300",   // will be prefixed by "meter_"

    // modbus parameters
    "rtu": {
        "silence_period": 50,    // msec
        "silence_same_slave": false,
        "retries": 4,
        "rcv_timeout": 120       // msec
    },
    "modbus_read": 4,            // function code to read registers
    "modbus_read_max_registers": 60, 
    "modbus_write": 16,          // function code to write register(s)
    "modbus_write_max_registers": 48,
    
    // values used to build the model string
    "type_designation": {
        "fixed": "EM300/ET300"
    },
    "version": {
        "fixed": "1.0"
    },
    "firmware_version": {
        "fixed": "1.0"
    },
    "serial": {
        "fixed": "0"
    },
    
    // instantaneous values
    "voltage_l1": {
        "address": 0x0,
        "type": "int32",
        "resolution": 0.1,
        "order": "lh" 
    },
    "voltage_l2": {
        "address": 0x2,
        "type": "int32",
        "resolution": 0.1,
        "order": "lh" 
    },
    "voltage_l3": {
        "address": 0x4,
        "type": "int32",
        "resolution": 0.1,
        "order": "lh" 
    },
    "current_l1": {
        "address": 0xc,
        "type": "int32",
        "order": "lh" 
    },
    "current_l2": {
        "address": 0xe,
        "type": "int32",
        "order": "lh" 
    },
    "current_l3": {
        "address": 0x10,
        "type": "int32",
        "order": "lh"
    },
    "power_w_l1": {
        "address": 0x12,
        "type": "int32",
        "order": "lh", 
        "resolution": 0.1   // result in W
    },
    "power_w_l2": {
        "address": 0x14,
        "type": "int32",
        "order": "lh", 
        "resolution": 0.1   // result in W
    },
    "power_w_l3": {
        "address": 0x16,
        "type": "int32",
        "order": "lh", 
        "resolution": 0.1   // result in W
    },
    "power_w": {
       "expr": "power_w_l1+power_w_l2+power_w_l3"
    },

    // accumulated values
    "import_wh": {
        "address": 0x34,
        "type": "int32",
        "order": "lh", 
        "resolution": 100.0  // result in Wh
    },
	    "export_wh": {
        "address": 0x4e,
        "type": "int32",
        "order": "lh", 
        "resolution": 100.0   // result in Wh
    }
 }
 