@ampeco/ocpp-eliftech
OCPP 1.6: Open Charge Point Protocol
Last updated 5 months ago by m.spasov .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @ampeco/ocpp-eliftech 
SYNC missed versions from official npm registry.

Open Charge Point Protocol 1.6

Build Status

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, http://www.openchargealliance.org/) is a communication protocol between multiple charging stations ("charge points") and a single management software ("central system").

Usage

Server

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

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/.

Current Tags

  • 1.0.3                                ...           latest (5 months ago)

2 Versions

  • 1.0.3                                ...           5 months ago
  • 1.0.1                                ...           5 months ago
Maintainers (1)
Downloads
Today 0
This Week 2
This Month 6
Last Day 0
Last Week 2
Last Month 4
Dependencies (8)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |