Coder Social home page Coder Social logo

ocpp-j-cp-simulator's Introduction

OCPP-J-CP-Simulator

A really simple cp simulator, that works with OCPP 1.6

To start working change the endpoint URL and register the CP

A few mistakes fixed. Added: Core features; Prototype of a UI (far from nice UX/UI); Some simulator UI changes;

Licensing

Licensed under Apache License 2.0

ocpp-j-cp-simulator's People

Contributors

ichbinwilly avatar javaisjavascript avatar kaeluka avatar kubarskii 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  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  avatar  avatar

ocpp-j-cp-simulator's Issues

Data exchange failed-JSON is not accepted

Good afternoon, I encountered such a problem, when using OCPP-2.0-CP-Simulator, it gives such a message, in the server logs it writes the following:
fail: OCPP.Core.Server.ControllerOCPP20[0] @ 2022-07-16T12:59:35.1770301+03:00
TransactionEvent => Exception: Required property 'transactionInfo' not found in JSON. Path '', line 1, position 475.
Newtonsoft.Json.JsonSerializationException: Required property 'transactionInfo' not found in JSON. Path '', line 1, position 475.
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EndProcessProperty(Object newObject, JsonReader reader, JsonObjectContract contract, Int32 initialDepth, JsonProperty property, PropertyPresence presence, Boolean setDefaultValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
at OCPP.Core.Server.ControllerOCPP20.HandleTransactionEvent(OCPPMessage msgIn, OCPPMessage msgOut) in C:\Users\ulrichd\source\repos\GitHub\OCPP.Core\OCPP.Core.Server\ControllerOCPP20.TransactionEvent.cs:line 46
Безымянный

Improvement: send meter values

Hi,

It would be nice to be able to send meter values from the charge point to the backend:

$('#mv').click(function` () {
    onAction();
    sessionStorage.setItem('LastAction', "MeterValues");

    var transactionId = sessionStorage.getItem('TransactionId'); // Does not work this way
    var value = prompt("Please input the new meter value:", "123");

    var MV = JSON.stringify([2, id, "MeterValues", {"connectorId": 1, "transactionId": transactionId, "meterValue": [{"timestamp": formatDate(new Date()), "sampledValue": [{"value": value}]}]}]);

    _websocket.send(MV);
});

Meter values

The MeterValues message works but is very simple, it only contains the connectorId.
How would the object look like with complete data? Could you put an example?

Start/stop heartbeat

In the event of a BootNotification error, or the interval is not returned, then the HeartBeat interval is set to 0 and it begins to generate a huge number of messages. A fuse should be defined.
Sending a HeartBeat does not stop after disconnecting from the server, when reconnecting, another heartbeat interval will start.
The suggestion of solution: index.zip

Imprevement: add support to simulate start / stop charging easily

Let's say a single button click to start charging, which include send StatusNotification, StartTransaction, then MeterValues with the interval. after a while click a single button to stop charging, which will send StopTransaction and StatusNotification.
With this simulation, we should simulate energy usage during charging. such as energy, power, current, voltage, etc.

license

Hi

how can i do to get the license please d

thanks

Can't connect

Hello,
thank you for your example.
I would like to know is the CP is on 5 digitsm, I have Legran station with serial S22-3-000146 but i can't connect with your application.
I change just CP and URL for the station ?
thanks

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.