OCPP 1.6 Central System and Charge Point Emulator
The goal of this hackathon was to setup a test where 1M Charge Points connect to the high availability Central System using the emulator provided in this repository.
Hackathon requirements:
- use of Docker,
- SSL offloading,
- maximum latency of 250ms (on average).
-
Download Node.js.
-
Go to root folder of repo (where
package.json
file is present) and run:npm ci
Open shell in root folder and run:
npm run server
Open shell in root folder and run:
npm run client
Attached Dockerfile
is used to generate the container image of
this project. The latest image is hosted on DockerHub:
glusk/hackathon-2021
.
First, build and tag:
docker build -t glusk/hackathon-2021 .
Then, push to DockerHub:
docker push glusk/hackathon-2021:latest
Refer to: ./deployment_template/
- Server accepts client connections and upgrades them to websocket connections.
- It responds to various OCPP messages.
- Occasionally, it sends a PING to determine which clients are still alive.
- When a client connects to the server via a websocket, it sends a boot notification.
- After a response is received, it reads the heartbeat interval from it.
- It sends heartbeat message according to the interval.
- CS_PROTOCOL defaults to ws. possible values are: ws, wss (for SSL)
- CS_HOST defaults to localhost. host to connect to
- CS_PORT defaults to 8080. port to connect to
- CONCURRENCY_LEVEL defaults to 1. Number of clients to create
- LOG_PAYLOAD verbose logging of data exchange between client and server
- LOG_LIFECYCLE = log lifecycle events (connect, reconnect, ping/pong)
- WEB_SRV_HOST interface to bind to (could be only one)
- WEB_SRV_PORT port on bind interface
- HEARTBEAT_INT_MS the interval at which we check client connectivity
- LOG_PAYLOAD verbose logging of data exchange between client and server
- LOG_LIFECYCLE = log lifecycle events (connect, reconnect, ping/pong)