A really simple cp simulator, that works with OCPP 2.0
To start working change the endpoint URL with the Charge Point in the end Make sure the Charge Point is registered
OCPP 2.0 Charge Point Simulator
License: Apache License 2.0
I think I found two bugs where the sent messages are invalid against the schema. Here are the corrected functions:
function NotifyChargingLimit(charge_limit = 10, limit_source = "SO") {
sessionStorage.setItem('LastAction', "NotifyChargingLimit");
var LSN = JSON.stringify([2, id, "NotifyChargingLimit", {
"evseId": 1,
"chargingLimit": {
"chargingLimitSource": limit_source,
"isGridCritical": "False",
},
"chargingSchedule": [charging_schedule(charge_limit)]
}]);
_websocket.send(LSN);
}
function charging_schedule(charge_limit){
return {
"id": 0,
"chargingRateUnit": "A",
"chargingSchedulePeriod": [{
"startPeriod": 0,
"limit": charge_limit
}]
}
}
Hi,
I found two errors in the startTransaction(), both of them are invalid type errors.
Refer to OCPP 2.0: Part 2- Specification, page 323 1.62 TransactionEvent section.
"transactionData": {
"id": lastTranId,
"remoteStartId": 0 //integer
}
"meterValue": [{
"timestamp": formatDate(new Date()),
"sampledValue": [{
"value": 0 //decimal
}]
}]
Thanks.
I have a few small improvements, but don't have access to create a branch.
I added the incoming response type name to the log entry so it now says things like "BootNotification Response received successfully!".
I fixed the spelling of "recieved" in that message.
In BootNotification() I'm resetting c = 0; so that in the event of a retry/recovery wsConnect() will know that we're in the BootNotification state.
cp.html.txt
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.