ChargePilot OCPP Proxy

Modified on Thu, 12 Jun at 8:44 AM

Introduction 

ChargePilot is a hardware neutral Charging and Load Management System for EV charging infrastructure. It distributes the power between several connectors considering, physical boundaries (fuses, capabilities, etc.), regulative boundaries (phase asymmetry, grid connection, etc.), economical boundaries (peak loading, low tariff regimes, etc.) and E-Mobility needs (departure time, SoC, etc.). Therefore, ChargePilot uses a local controller device called Smart Charging Controller (SCC), which is connected to the charge points via OCPP 1.6J and to the TMH Cloud backend via a proprietary, TLS encrypted connection. The following schematic shows how ChargePilot is connected to the charge points and to a third-party CSMS using OCPP 1.6J.


Figure 1: Schematic of data connection. The SCC will open a WebSocket connection for every connected charge point to connect to the 3rd party system. Within the SCC, a proxy service routes all relevant OCPP messages directly from the charge point to the 3rd party CSMS and backwards. Additionally, all messages will be processed by the SCC and necessary information will be send to the TMH Backend. To secure the connection between the CSMS and the SCC, a TLS encrypted WebSocket connection shall be used.



Connectivity Setup 

The SCC is connected directly to the Charging Stations via a local ethernet connection. All Charging Station have ChargePilot configured as CSMS. ChargePilot default OCPP back-end url: ws://172.22.0.1:9000


ChargePilot uses one internet connection to connect to the TMH Cloud and to the 3rd party CSMS. This connection can be established via Ethernet or via GSM with an additional router. So Charging Stations do not require to be connected to the internet (i.g. need their own SIM card for cellular connectivity).


Messages

The OCPP proxy forwards all allowed messages (see table below) initiated by the 3rd Party CSMS or by the Charging Station without any changes to the Charging Station or respectively to the 3rd Party CSMS. The 3rd Party CSMS will not see any difference within the messages to a direct connection to a charging station. Even vendor specific changes in the OCPP protocol will be forwarded without being touched. ChargePilot does not "normalize" or alter any messages.
This also applies to all signed meter values according to German "Eichrecht". The proxy has no influence on the Eichrechts-confirmity.


Handling of OCPP Messages


The following Profiles of OCPP1.6 are supported by the proxy

Fully SupportedPartly SupportedLocal Auth List Management
CoreFirmware ManagementReservations
Remote Trigger
Smart Charging
Local Auth List Management


Messages Initiated by Charging Station

MessageBehavior Proxy
AuthorizeSend to Third Party for verification
Boot NotificationSend to Third Party for verification
Send to ChargePilot to check against the config
Data TransferForward to Third Party
Diagnostics Status NotificationNot supported
Firmware Status NotificationNot supported
HeartbeatForward to Third Party
Meter ValuesForward to Third Party
Start TransactionForward to Third Party
Stop TransactionForward to Third Party
Status NotificationForward to Third Party
Cancel Reservation ResponseNot supported
Change Availability ResponseForward to initiator
Change Configuration ResponseForward to initiator
Clear Cache ResponseForward to initiator
Data Transfer ResponseForward to initiator
Get Configuration ResponseForward to initiator
Get Diagnostics ResponseForward to initiator
Get Local List Version ResponseForward to initiator
Remote Start Transaction ResponseForward to initiator
Remote Stop Transaction ResponseForward to initiator
Reserve Now ResponseNot supported
Reset ResponseForward to initiator
Send Local List ResponseForward to initiator
Set Charging Profile ResponseNot supported
Trigger Message ResponseForward to initiator
Unlock Connector ResponseForward to initiator
Update Firmware ResponseNot supported



Messages Initiated by Third Party

MessageBehavior Proxy
Authorize ResponseForward response to Chargeing Station
Boot Notification ResponseIf both backends send a 'Accepted', the message will be forwarded to the Charging Station
Data Transfer ResponseForward response to Chargeing Station
Diagnostics Status Notification ResponseNot supported
Firmware Status Notification ResponseNot supported
Heartbeat ResponseDrops Message (handled by ChargePilot)
Meter Values ResponseForward response to Chargeing Station
Start Transaction ResponseForward response to Chargeing Station
Stop Transaction ResponseForward response to Chargeing Station
Status Notification ResponseForward response to Chargeing Station
Cancel ReservationSend 'Rejected' to Third Party
Change AvailabilityForward response to Chargeing Station
Change ConfigurationForward response to Chargeing Station or reject depending on the keys (see below)
Clear CacheForward response to Chargeing Station
Data TransferForward response to Chargeing Station
Get ConfigurationForward response to Chargeing Station
Get DiagnosticsSend 'Rejected' to Third Party
Get Local List VersionForward response to Chargeing Station
Remote Start Transaction Forward response to Chargeing Station
Remote Stop TransactionForward response to Chargeing Station
Reserve NowSend 'Rejected' to Third Party
ResetForward response to Chargeing Station
Send Local ListForward response to Chargeing Station
Set Charging ProfileSend 'Rejected' to Third Party
Trigger MessageForward response to Chargeing Station
Unlock ConnectorForward response to Chargeing Station
Update FirmwareSend 'Rejected' to Third Party


Handling of Configuration


Configuration keys, which are supported by the charging station, can be changed using the ChangeConfiguration Message. The default value for the key MeterValueSampleInterval is 300s. The max limit and default value for the HeartbeatInterval is 300s. Higher values will be limited accordingly.
However, the following keys cannot be changed: MeterValueSampleData


Encryption

The following section shall describe the measures to secure the connection between ChargePilot's local Smart Charging Controller and an OCPP 1.6J based Charging Station Management System (CSMS). The proposal is based on the "Improved security for OCPP 1.6-J, Edition 2" published by OCA.

TLS with Basic Authentication


In principle, the SCC mimics the behavior of the charge point descripted in the "Improved security for OCPP 1.6J, chapter 2.4" of the OCA whitepaper. The charge points authenticate themselves using HTTP Basic Authentication. The CSMS authenticates itself using a TLS server certificate.

Figure 2: TLS with Basic Authentication sequence diagram


The username shall be equal to the Charge Point identity. The CSMS vendor shall provide a password for each charge point in a secure way. TMH will configure the SCC using their administration application. The CSMS can update the password using the AuthorizationKey in the configuration. In case of connection loss, the last known credentials will used. All defined errors described by OCA are implemented as described. In the current version, an Update of the AuthorizationKey cannot be performed.


Offline States

In the following table, the offline behavior in case of a connection loss is documented.

SituationChanges / Reasons
No connection between Charging Station and SCC
  • SCC drops connection with 3rd Party CSMS. No Heartbeats/ Meter Values, etc. will be sent.
  • Messages queued in Charging station will be sent, after Charging Station is back online.
  • Load Management goes to Fallback mode for that Charger
No connection between SCC and 3ra party CSMS
  • SCC drops connection with 3rd Party CSMS. No Heartbeats/ Metervalues, etc. will be sent.
  • SCC holds connection with Charging Station.
  • Start- and Stop-Transaction Messages queued in SCC will be sent, after connection to 3rd party CSMS is established again.
  • Load Management continues regularly.
  • Authorization does work with previously authorized RFIDs.
  • SCC is trying to reestablish connection every 30s.
Charger Restart while connection loss to 3rd party CSMS
  • Charger will be rejected by SCC until it can be verified by 3rd party




 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article