Skip to main content

πŸ› οΈ Configuration

🚩 Flags and environment variables​

Available flags:

FlagShortDescriptionDefault value
-settings/Path to the settings file.
-connector-folder/Path to the connector folder.
-ocpp-config/Path to the OCPP configuration.
-auth/Path to the authorization file.
-debug--dDebug modefalse
-api--aExpose the APIfalse
-api-address/API address"localhost"
-api-port/API port4269

Environment variables are created automatically thanks to Viper and are prefixed with CHARGEPI. Only the main settings are bound to the env variables. Debug mode and API settings flags are also bound to the environment variables.

Example environment variable: CHARGEPI_CHARGEPOINT_CONNECTIONSETTINGS_ID.

πŸ›  Configuration files​

There are three required configuration files:

  1. settings
  2. configuration
  3. evses

The settings files are supported in YAML, JSON or TOML format.

The settings file​

The settings file contains basic information about the charge point and provides connectivity details:

  • Charge Point ID,
  • central system URI and OCPP protocol version,
  • OCPP information (vendor, model, firmware, etc.),
  • logging settings,
  • TLS settings,
  • default max charging time,
  • settings for LCD, RFID/NFC reader and LEDs.

The table represents attributes, their values and descriptions that require more attention and might not be self-explanatory. Some attributes can have multiple possible values, if any are empty, they will be treated as disabled or might not work properly.

chargePoint connectionSettings​

AttributeDescriptionPossible values
idID of the charging point. Must be registered in the Central SystemDefault:"ChargePi"
protocolVersionVersion of the OCPP protocol."1.6", "2.0.1"
serverUriURI of the Central System with the port and endpoint.""
basicAuthUserHTTP username for authentication with the Central SystemAny string value
basicAuthPassHTTP username for authentication with the Central SystemAny string value
tlsTLS certificate paths

chargePoint connectionSettings tls​

AttributeDescriptionPossible values
CACertificatePathRoot/CA certificate path.Any valid path
clientCertificatePathClient certificateAny valid path
clientKeyPathClient private keyAny valid path

chargePoint info​

AttributeDescriptionPossible values
maxChargingTimeMaxiumum amount of time that a transaction can last (in minutes).Default: 180
ocpp.vendorVendor IDDefault: "xBlaz3k"
ocpp.modelModelDefault: "ChargePi"

chargePoint hardware​

chargePoint hardware display​
AttributeDescriptionPossible values
isEnabledEnable or disable displaytrue, false
driverDisplay driver type""
i2cAddressField specific for any display using I2C communication""
i2cBusField specific for any display using I2C communication"1", "0"
languageLanguage selection for messages displayed to LCD."en",sl"
chargePoint hardware tagReader​
AttributeDescriptionPossible values
isEnabledEnable or disable tagReaderDefault:"ChargePi"
readerModelVersion of the OCPP protocol."1.6", "2.0.1"
resetPinURI of the Central System with the port and endpoint.Default: "172.0.1.121:8080/steve/websocket/CentralSystemService"
deviceAddressMax charging time allowed on the Charging point in minutes.Default:180
chargePoint hardware ledIndicator​
AttributeDescriptionPossible values
isEnabledEnable or disable ledIndicatorDefault:"ChargePi"
typeVersion of the OCPP protocol."1.6", "2.0.1"
dataPinURI of the Central System with the port and endpoint.Default: "172.0.1.121:8080/steve/websocket/CentralSystemService"
indicateCardReadMax charging time allowed on the Charging point in minutes.Default:180
invertRFID/NFC reader model used."PN532", ""

Example settings:

{
"chargePoint": {
"info": {
"id": "ChargePi",
"protocolVersion": "1.6",
"serverUri": "example.com",
"basicAuthUser": "",
"basicAuthPass": "",
"maxChargingTime": 5,
"ocpp": {
"vendor": "UL FE",
"model": "ChargePi"
}
},
"logging": {
"type": [
"remote",
"file"
],
"format": "gelf",
"host": "logging.example.com",
"port": 12201
},
"tls": {
"isEnabled": false,
"CACertificatePath": "/usr/share/certs/rootCA.crt",
"clientCertificatePath": "/usr/share/certs/charge-point.crt",
"clientKeyPath": "/usr/share/certs/charge-point.key"
},
"hardware": {
"lcd": {
"isSupported": true,
"driver": "hd44780",
"i2cAddress": "0x27",
"i2cBus": 1,
"language": "en"
},
"tagReader": {
"isSupported": true,
"readerModel": "PN532",
"device": "/dev/ttyS0",
"resetPin": 19
},
"ledIndicator": {
"enabled": true,
"type": "WS281x",
"dataPin": 18,
"indicateCardRead": true,
"invert": false
}
}
}
}

πŸ”Œ The evse file(s) - EVSE configuration​

EVSE settings files can be found in the evse folder. To add and configure the EVSE, simply add a new file with the file structure as in the example. The client will scan the folder at boot, validate the configuration files and add the EVSE with the provided configuration.

Attributes​

AttributeDescriptionPossible values
evseIdID of the EVSE>1
connectorsList of available connectors for the EVSE
evccCharging Controller
statusStatus of the EVSE"Available", "Charging", "Faulted",...
sessionPersistent session data
powerMeterPower Meter configuration for EVSE

evcc​

AttributeDescriptionPossible values
typeType of the EVCC used"Relay", "Phoenix"
relayPinAttribute specific for the Relay.Any GPIO pin
inverseLogicAttribute specific for the Relay.true,false
deviceAddressAttribute specific for smarter EVCCs.Any string value

powerMeter​

AttributeDescriptionPossible values
isEnabledEnable or disable the power metertrue, false
typeType of the power meter"CS5460A"
powerMeterPinAttribute specific for CS5460AAny GPIO pin
spiBusAttribute specific for CS5460A0,1
consumptionAttribute specific for CS5460A
shuntOffsetAttribute specific for CS5460ADefault: 1337
voltageDividerOffsetAttribute specific for CS5460ADefault: 0.01

connectors​

AttributeDescriptionPossible values
connectorIdconnector IDDefault:"ChargePi"
typetype of the connector"Schuko", "Type1","Type2", "CCS", ...
statusStatus of the connector"Available", "Charging", ...

Example EVSE configuration:

{
"evseId": 1,
"connectors": [
{
"connectorId": 1,
"type": "Schuko",
"status": "Available"
}
],
"evcc": {
"type": "Relay",
"relayPin": 26,
"inverseLogic": false
},
"status": "Available",
"session": {
"isActive": false,
"transactionId": "",
"tagId": "",
"started": "",
"consumption": []
},
"powerMeter": {
"enabled": false,
"type": "CS5460A",
"powerMeterPin": 25,
"spiBus": 0,
"consumption": 0.0,
"shuntOffset": 0.055,
"voltageDividerOffset": 1333
}
}