{
    "rtype": 0,   // 0 = modbus, 1 = http/json
    "mtype": 8,   // 0 = other, 1 = meter, 2 = inverter, 4 = battery, 8 = evse

    "name": "cFos Power Brain EVSE",   // as displayed in the config dialog
    "manufacturer": "cFos",
    "dev_type": "cfos_pb_evse",   // will be prefixed by "meter_" or "evse_"

    // modbus parameters
    "rtu": {
        "silence_period": 50,    // msec
        "silence_same_slave": false,
        "retries": 4,
        "rcv_timeout": 120       // msec
    },
    "modbus_read": 3,            // 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": "Power Brain"
    },
    "version": {
       "fixed": "1.0"
    },
    "firmware_version": {
       "fixed": "1.0"
    },
    "serial": {
       "address": 8008,
       "type": "string",
       "length": 8
    },
    "use_failsafe": {
       "once": true,
       "fixed": "1"
    },
    "is_heatpump": {
       "once": true,
       "fixed": "0"
    },
    
    // instantaneous values
    "voltage_l1": {
        "address": 8045,
        "type": "uint16"
    },
    "voltage_l2": {
        "address": 8046,
        "type": "uint16"
    },
    "voltage_l3": {
        "address": 8047,
        "type": "uint16"
    },
    "current_l1": {
        "address": 8064,
        "type": "int32",
        "resolution": "100.0"
    },
    "current_l2": {
        "address": 8066,
        "type": "int32",
        "resolution": "100.0"
    },
    "current_l3": {
        "address": 8068,
        "type": "int32",
        "resolution": "100.0"
    },
    "power_w": {
       "address": 8062,
       "type": "int32"
    },
    "cp_state_raw": {
       "address": 8092,
       "type": "int16"
    }, 
    "cp_state": {
       "expr": "cp_state_raw > 4 ? 4 : cp_state_raw"
    },
    "rfid": {
       "address": 8096,
       "type": "string",
       "length": 15    
    },
    "rfid_cnt": {
       "address": 8111,
       "type": "int16"
    },

    // accumulated values
    "import_wh": {
        "address": 8058,
        "type": "int64"
    },

   // inputs
   "inputs": [
      { "address": 8113, "count": 2 }
   ],
   
   "outputs": [
    { "address": "http://localhost/cnf?cmd=modbus_set&addr=${address}&func=6&id=${id}&reg=8085&val=${failsafe_current/100}&type=w"
    },
    { "address": "http://localhost/cnf?cmd=modbus_set&addr=${address}&func=6&id=${id}&reg=8083&val=${failsafe_duration}&type=d"
    },
    { "address": "http://localhost/cnf?cmd=modbus_set&addr=${address}&func=6&id=${id}&reg=8093&val=${charging_current/100}&type=w"
    },
    { "address": "http://localhost/cnf?cmd=modbus_set&addr=${address}&func=6&id=${id}&reg=8094&val=${charging_enabled}&type=w"
    },
    ] 
     
 }
 