{
		//
		// ----------------------------------------------------------------------------------------
		// Meter definition for Eastron SDM72D Modbus (Erweitert)
		// ----------------------------------------------------------------------------------------
		//
		// Created:	BCo
		// Datum:		06.11.2022
		//
		// Change log:
		// ----------
		// 06.11.2022     - BCo		- Initial working version.
		// 09.11.2022			- BCo		- Corrected resolution for power values and changed regster for
		//												  import and export from 30053 (34) to 31281 (0500 / 1280) resp.
		//												  added export at 31283 (0502 / 1282)
		// ----------
		//
		// Hint:
		// ----------
		// Should work with all SDM72 meters (V1 as well as V2).
		//
		// Important: Not the address register for the input registers has to be used
		//            to access the values but the 
		//            "Modbus Protocol Start Address Hex" (converted to decimal) as specified
		//            in the documentation for the SDM630 meter.
		//            ("Eastron SDM630Modbus Smart Meter Modbus Protocol Implementation V1.7")

		// ----------
		//
		// ----------------------------------------------------------------------------------------
		//
		
		// Type of API / access:
		// 0 = modbus, 1 = http/json
		"rtype": 0,
    "mtype": 1,   // 0 = other, 1 = meter, 2 = inverter, 4 = battery

		// As displayed in the config dialog
    "name": 				"Eastron SDM72D Modbus (Erweitert)",
    "manufacturer":	"Eastron",
		
    // Will be prefixed by "meter_"
		"dev_type": 		"sdm72d-modb-ext",

    // 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": 							10,	// Function code to write register(s)
    "modbus_write_max_registers":	40,

    // Values used to build the model string
    "type_designation": {
        "address":	0,
        "type":			"string",
        "fixed":		"SDM72D-MODB-EXT"
    },
    "version": {
        "address":	0,
        "type":			"string",
        "fixed":		"1.2"
    },
    "firmware_version": {
        "address":	0,
        "type":			"string",
        "fixed":		"1.5"
    },
    "serial": {
        "address":	0,
        "type":			"string",
        "fixed":		"0"
    },
 
 
    // Instantaneous values
		//
		
		// Voltage per phase
    "voltage_l1": {
        "address": 		0,
        "type": 			"float"
    },
    "voltage_l2": {
        "address": 		2,
        "type": 			"float"
    },
    "voltage_l3": {
        "address": 		4,
        "type": 			"float"
    },
		
		// Current per phase
    "current_l1": {
        "address":		6,
        "type":				"float",
				"resolution":	1000.0
    },
    "current_l2": {
        "address": 		8,
        "type": 			"float",
				"resolution":	1000.0
    },
    "current_l3": {
        "address":		10,
        "type":				"float",
				"resolution":	1000.0
    },
		
		// Power per phase
    "power_w_l1": {
        "address":		12,
        "type":				"float",
				"resolution":	1.0
    },
    "power_w_l2": {
        "address":		14,
        "type":				"float",
				"resolution":	1.0
    },
   "power_w_l3": {
        "address": 		16,
        "type": 			"float",
				"resolution":	1.0
    },
		
		// Apparent power per phase
    "power_va_l1": {
        "address": 		18,
        "type": 			"float",
				"resolution":	1.0
    },
    "power_va_l2": {
        "address":		20,
        "type":				"float",
				"resolution":	1.0
    },
   "power_va_l3": {
        "address":		22,
        "type":				"float",
				"resolution":	1.0
    },
		
		// Reactive power per phase
    "power_var_l1": {
        "address": 		24,
        "type": 			"float",
				"resolution":	1.0
    },
    "power_var_l2": {
        "address":		26,
        "type":				"float",
				"resolution":	1.0
    },
   "power_var_l3": {
        "address": 		28,
        "type": 			"float",
				"resolution":	1.0
    },
		
		// Actual power (Import)
    "power_w_import": {
        "address":		1280,
        "type":				"float",
				"resolution":	1.0
    },
		// Actual power (Export)
    "power_w_export": {
        "address":		1282,
        "type":				"float",
				"resolution":	1.0
    },
    "power_w": {
       "expr": "power_w_import-power_w_export"
    },
		
		
    // Accumulated values for watt hours
		//
		
    "import_wh": {
        "address":		72,
        "type":				"float",
        "resolution":	1000.0   // Result in Wh
    },
    "export_wh": {
        "address":		74,
        "type": 			"float",
        "resolution":	1000.0   // Result in Wh
    },

    // Inputs, modbus only
    "inputs": [
     ]
 }
 