muhammedalmaz / ma-ocpp-simulator Goto Github PK
View Code? Open in Web Editor NEWOCPP 1.6 Charging Point Simulator
License: MIT License
OCPP 1.6 Charging Point Simulator
License: MIT License
Considering the charge point can have any type of ID, I would recommend to change the field to string, without any validations
Thanks for making this public! I've noticed that the start transaction with an ID Tag on connector 2 is starting the session on connector 1.
[2,"d9541e0d-92c9-4c92-88a6-bb8e9220b129","StatusNotification",{"connectorId":2,"errorCode":"NoError","status":"Preparing"}]
[3,"d9541e0d-92c9-4c92-88a6-bb8e9220b129",{"status":"Accepted"}]
[2,"0afa62c7-7145-4ba8-9fe2-0808fafa50a0","Authorize",{"idTag":"1001001"}]
[3,"0afa62c7-7145-4ba8-9fe2-0808fafa50a0",{"idTagInfo":{"status":"Accepted"}}]
[2,"27732646-4dd3-4fca-9f73-22bcf537ce77","StartTransaction",{"idTag":"1001001","meterStart":0,"connectorId":2,"timestamp":"2024-05-10T04:46:00.386Z"}]
[3,"27732646-4dd3-4fca-9f73-22bcf537ce77",{"transactionId":14,"idTagInfo":{"status":"Accepted"}}]
[2,"c51ea7a4-f07c-4987-a09e-4ce7687b971a","StatusNotification",{"connectorId":1,"errorCode":"NoError","status":"Charging"}]
[3,"c51ea7a4-f07c-4987-a09e-4ce7687b971a",{"status":"Accepted"}]
When StartTransaction runs, my backend server throws the following error:
ERROR:ocpp:Error while handling request '<Call - unique_id=7a987bfa-9774-4d2b-928e-9a72afd748d2, action=MeterValues, payload={'connectorId': 1, 'transactionId': 1, 'meterValue': [{'timestamp': '2024-04-25T17:41:04.844Z', 'sampledValue': [{'unit': 'Wh', 'value': 1736.9196833333333, 'location': 'Outlet', 'measurand': 'Energy.Active.Import.Register'}, {'unit': 'W', 'value': '180000', 'location': 'Outlet', 'measurand': 'Power.Active.Import'}, {'unit': 'W', 'value': '180000', 'location': 'Outlet', 'measurand': 'Power.Offered'}, {'unit': 'Percent', 'value': '17.7212', 'location': 'EV', 'measurand': 'SoC'}]}]}>'
Failed validating 'type' in schema['properties']['meterValue']['items']['properties']['sampledValue']['items']['properties']['value']:
{'type': 'string'}
On instance['meterValue'][0]['sampledValue'][0]['value']:
1736.9196833333333
It does not stop the Transaction, it's just on backend. I converted the 'value' type to string with toString() and it worked just fine
Dear Muhammed,
By the looks of it, you changed the rep name from ma-charge-point-simulator to ma-ocpp-simulator. The instructions have not been updated and the suggested git and docker commands don't work. Took me a while to figure out.
Thanks for your contribution.
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.