ashokgowtham / maeve-csms

MaEVe is an experimental EV charge station management system (CSMS). Fork to try some refactoring

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Manager Gateway

MaEVe

MaEVe is an EV charge station management system (CSMS). It began life as a simple proof of concept for implementing ISO-15118-2 Plug and Charge (PnC) functionality and remains a work in progress. It is hoped that over time it will become more complete, but already provides a useful basis for experimentation.

The system currently integrates with Hubject for PnC functionality.

Table of Contents

Documentation

MaEVe is implemented in Go 1.20. Learn more about MaEVe and its existing components through this High-level design document.

Pre-requisites

MaEVe runs in a set of Docker containers. This means you need to have docker, docker-compose and a docker daemon (e.g. docker desktop, colima or rancher) installed and running.

Getting started

To get the system up and running:

  1. Run the ./scripts/generate-tls-cert.sh script which will create a server certificate for the CSMS
  2. Run the ./scripts/get-ca-cert.sh script with a token retrieved from the Hubject test environment to retrieve the V2G root certificate and CPO Sub CA certificates - remember to put your token argument within quotes
  3. Run the ./scripts/run.sh script with the same token to run all the required components - again, don't forget the quotes around the token

Charge stations can connect to the CSMS using:

  • ws://localhost/ws/<cs-id>
  • wss://localhost/ws/<cs-id>

Charge stations can use either OCPP 1.6j or OCPP 2.0.1.

For TLS, the charge station should use a certificate provisioned using the Hubject CPO EST service.

A charge station must first be registered with the CSMS before it can be used. This can be done using the manager API. e.g. for unsecured transport with basic auth use:

$ cd manager
$ ENC_PASSWORD=$(go run main.go auth encode-password <password> | cur -d' ' -f2)
$ curl http://localhost:9410/api/v0/cs/<cs-id> -H 'content-type: application/json' -d '{"securityProfile":0,"base64SHA256Password":"'$ENC_PASSWORD'"}'

Tokens must also be registered with the CSMS before they can be used. This can also be done using the manager API. e.g.:

$ curl http://localhost:9410/api/v0/token -H 'content-type: application/json' -d '{
  "countryCode": "GB",
  "partyId": "TWK",
  "type": "RFID",
  "uid": "DEADBEEF",
  "contractId": "GBTWK012345678V",
  "issuer": "Thoughtworks",
  "valid": true,
  "cacheMode": "ALWAYS"
}'

Configuration

All configuration in the system is currently through command-line flags. The available flags for each component can be viewed using the -h flag. The configuration is mostly limited to connection details for the various components and their dependencies. As mentioned in Getting started the allowed charge stations and tokens are currently hard-coded in the server start up commands.

Contributing

Learn more about how to contribute on this project through Contributing

License

MaEVe is Apache licensed.

About

MaEVe is an experimental EV charge station management system (CSMS). Fork to try some refactoring

License:Apache License 2.0


Languages

Language:Go 98.4%Language:Shell 0.9%Language:Dockerfile 0.4%Language:HTML 0.2%