Code Monkey home page Code Monkey logo

ocpp-2.0-cp-simulator's Introduction

OCPP 2.0 Charge Point Simulator

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-cp-simulator's People

Contributors

fmstuff avatar javaisjavascript avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ocpp-2.0-cp-simulator's Issues

Schema validation => invalid messages

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
				}]
			}
		}

startTransaction() TransactionEvent Request Invalid Type

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.

  1. transactionData.remoteStartId should be INTEGER
"transactionData": {
		"id": lastTranId,
		"remoteStartId": 0 //integer
}
  1. sampledValue.value should be DECIMAL
"meterValue": [{
		"timestamp": formatDate(new Date()),
		"sampledValue": [{
			"value": 0 //decimal
		}]
}]

Thanks.

Small Improvements

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.