https://github.com/elifTech/cpd-ocpp
Open Charge Point Protocol
https://github.com/elifTech/cpd-ocpp
charge-station charging electric-vehicles ocpp
Last synced: 9 months ago
JSON representation
Open Charge Point Protocol
- Host: GitHub
- URL: https://github.com/elifTech/cpd-ocpp
- Owner: elifTech
- License: mit
- Created: 2018-01-24T19:52:37.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-06T21:47:08.000Z (over 3 years ago)
- Last Synced: 2025-08-22T21:26:25.037Z (9 months ago)
- Topics: charge-station, charging, electric-vehicles, ocpp
- Language: JavaScript
- Homepage: https://www.eliftech.com/blog/48-a-diy-charging-point-for-an-electric-car-perspective-protocol-and-prototype
- Size: 222 KB
- Stars: 67
- Watchers: 9
- Forks: 49
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ev-charging - elifTech/cpd-ocpp
README
# Open Charge Point Protocol 1.6
[](https://travis-ci.org/elifTech/cpd-ocpp)
This repository contain abstraction layer for easy work with OCPP and validate input and output requests.
Currently implemented only version 1.6 JSON. Whereas OCPP2.0 will support only JSON have no plans to implement SOAP.
## Article
https://www.eliftech.com/blog/48-a-diy-charging-point-for-an-electric-car-perspective-protocol-and-prototype
## Installation
```
npm install --save ocpp-eliftech
```
## Overview
Open Charge Point Protocol (OCPP, ) is a communication protocol between multiple charging stations ("charge points") and a single management software ("central system").
## Usage
Server
```js
import { OCPPServer, OCPPCommands } from 'ocpp-eliftech';
const server = new OCPPServer();
server.listen(9220);
server.onRequest = async function(command) {
// Handle different commands
if (command instanceof OCPPCommands.BootNotification) {
return {
status: 'Accepted',
currentTime: new Date().toISOString(),
interval: 60
};
}
}
```
Client
```js
import { OCPPClient, OCPPCommands } from 'ocpp-eliftech';
const client = new OCPPClient({
serverUrl: 'http://localhost:9220/webServices/ocpp/CP1111'
});
await client.connect();
const boot = new OCPPCommands.BootNotification({
chargePointVendor: 'BrandX',
chargeBoxSerialNumber: 'AQ1234VB5678',
chargePointSerialNumber: '123',
chargePointModel: '12'
});
let answer = await client.send(boot);
console.info(answer);
```
### P.S.
If you need professional support with your IOT projects contact us http://www.eliftech.com/.