Code Monkey home page Code Monkey logo

ev-simulator's People

Contributors

ccatsapdotcom avatar dependabot[bot] avatar jakob8 avatar jerome-benoit avatar lucasbrazi06 avatar rmangin-fr 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ev-simulator's Issues

Docker run failed !

I tried lots of times to run this docker file but failed. Is there any problem with docker files here? some error is throwing like could not clone git recursive into a directory.

Basic Authentication

Hi, I want to ask if it supports this ev-simulator using Basic Authentication Profile ?
as stated in the document OCPP 1.6 security whitepaper edition 2.

MeterValuesRequest does not follow OCPP 1.6 Schema

Hi,

Running some test using the simulator and it seems the output of the MeterValuesRequest message does not follow the ocpp 1.6 schema, which specifies that meterValue should be an array.

Schema:

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "urn:OCPP:1.6:2019:12:MeterValuesRequest",
    "title": "MeterValuesRequest",
    "type": "object",
    "properties": {
        "connectorId": {
            "type": "integer"
        },
        "transactionId": {
            "type": "integer"
        },
        "meterValue": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "timestamp": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "sampledValue": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "value": {
                                    "type": "string"
                                },
                                "context": {
                                    "type": "string",
                                    "additionalProperties": false,
                                    "enum": [
                                        "Interruption.Begin",
                                        "Interruption.End",
                                        "Sample.Clock",
                                        "Sample.Periodic",
                                        "Transaction.Begin",
                                        "Transaction.End",
                                        "Trigger",
                                        "Other"
                                    ]
                                },
                                "format": {
                                    "type": "string",
                                    "additionalProperties": false,
                                    "enum": [
                                        "Raw",
                                        "SignedData"
                                    ]
                                },
                                "measurand": {
                                    "type": "string",
                                    "additionalProperties": false,
                                    "enum": [
                                        "Energy.Active.Export.Register",
                                        "Energy.Active.Import.Register",
                                        "Energy.Reactive.Export.Register",
                                        "Energy.Reactive.Import.Register",
                                        "Energy.Active.Export.Interval",
                                        "Energy.Active.Import.Interval",
                                        "Energy.Reactive.Export.Interval",
                                        "Energy.Reactive.Import.Interval",
                                        "Power.Active.Export",
                                        "Power.Active.Import",
                                        "Power.Offered",
                                        "Power.Reactive.Export",
                                        "Power.Reactive.Import",
                                        "Power.Factor",
                                        "Current.Import",
                                        "Current.Export",
                                        "Current.Offered",
                                        "Voltage",
                                        "Frequency",
                                        "Temperature",
                                        "SoC",
                                        "RPM"
                                    ]
                                },
                                "phase": {
                                    "type": "string",
                                    "additionalProperties": false,
                                    "enum": [
                                        "L1",
                                        "L2",
                                        "L3",
                                        "N",
                                        "L1-N",
                                        "L2-N",
                                        "L3-N",
                                        "L1-L2",
                                        "L2-L3",
                                        "L3-L1"
                                    ]
                                },
                                "location": {
                                    "type": "string",
                                    "additionalProperties": false,
                                    "enum": [
                                        "Cable",
                                        "EV",
                                        "Inlet",
                                        "Outlet",
                                        "Body"
                                    ]
                                },
                                "unit": {
                                    "type": "string",
                                    "additionalProperties": false,
                                    "enum": [
                                        "Wh",
                                        "kWh",
                                        "varh",
                                        "kvarh",
                                        "W",
                                        "kW",
                                        "VA",
                                        "kVA",
                                        "var",
                                        "kvar",
                                        "A",
                                        "V",
                                        "K",
                                        "Celcius",
                                        "Celsius",
                                        "Fahrenheit",
                                        "Percent"
                                    ]
                                }
                            },
                            "additionalProperties": false,
                            "required": [
                                "value"
                            ]
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "timestamp",
                    "sampledValue"
                ]       
            }
        }
    },
    "additionalProperties": false,
    "required": [
        "connectorId",
        "meterValue"
    ]
}

Received output:

{'connectorId': 1, 
    'transactionId': 5555, 
    'meterValue': 
        {'timestamp': '2021-08-15T17:17:41.305Z', 
        'sampledValue': 
            [{'unit': 'V', 'measurand': 'Voltage', 'value': '239.14'}, 
             {'unit': 'V', 'measurand': 'Voltage', 'value': '239.14', 'phase': 'L1-N'}, 
             {'unit': 'V', 'measurand': 'Voltage', 'value': '239.14', 'phase': 'L2-N'}, 
             {'unit': 'V', 'measurand': 'Voltage', 'value': '239.14', 'phase': 'L3-N'}, 
             {'unit': 'W', 'measurand': 'Power.Active.Import', 'value': '17232.22'}, 
             {'unit': 'W', 'measurand': 'Power.Active.Import', 'value': '3799.31', 'phase': 'L1-N'}, 
             {'unit': 'W', 'measurand': 'Power.Active.Import', 'value': '7107.15', 'phase': 'L2-N'}, 
             {'unit': 'W', 'measurand': 'Power.Active.Import', 'value': '6325.76', 'phase': 'L3-N'}, 
             {'unit': 'A', 'measurand': 'Current.Import', 'value': '12.47'}, 
             {'unit': 'A', 'measurand': 'Current.Import', 'value': '8.8', 'phase': 'L1'}, 
             {'unit': 'A', 'measurand': 'Current.Import', 'value': '25.19', 'phase': 'L2'}, 
             {'unit': 'A', 'measurand': 'Current.Import', 'value': '3.42', 'phase': 'L3'}, 
             {'unit': 'Wh', 'value': '163'}
            ]
        }
}

Expected output:

{'connectorId': 1, 
    'transactionId': 5555, 
    'meterValue': 
        [{'timestamp': '2021-08-15T17:17:41.305Z', 
        'sampledValue': 
            [{'unit': 'V', 'measurand': 'Voltage', 'value': '239.14'}, 
             {'unit': 'V', 'measurand': 'Voltage', 'value': '239.14', 'phase': 'L1-N'}, 
             {'unit': 'V', 'measurand': 'Voltage', 'value': '239.14', 'phase': 'L2-N'}, 
             {'unit': 'V', 'measurand': 'Voltage', 'value': '239.14', 'phase': 'L3-N'}, 
             {'unit': 'W', 'measurand': 'Power.Active.Import', 'value': '17232.22'}, 
             {'unit': 'W', 'measurand': 'Power.Active.Import', 'value': '3799.31', 'phase': 'L1-N'}, 
             {'unit': 'W', 'measurand': 'Power.Active.Import', 'value': '7107.15', 'phase': 'L2-N'}, 
             {'unit': 'W', 'measurand': 'Power.Active.Import', 'value': '6325.76', 'phase': 'L3-N'}, 
             {'unit': 'A', 'measurand': 'Current.Import', 'value': '12.47'}, 
             {'unit': 'A', 'measurand': 'Current.Import', 'value': '8.8', 'phase': 'L1'}, 
             {'unit': 'A', 'measurand': 'Current.Import', 'value': '25.19', 'phase': 'L2'}, 
             {'unit': 'A', 'measurand': 'Current.Import', 'value': '3.42', 'phase': 'L3'}, 
             {'unit': 'Wh', 'value': '163'}
            ]
        }]
}

engine (227) : error unexpected token ?

i cant figure out why

camshaft camshaft(
lobe_profile: "N/A",
intake_lobe_profile: intake_lobe, - line 223
exhaust_lobe_profile: exhaust_lobe, - line 224
intake_lobe_center: 105 * units.deg, - line 225
exhaust_lobe_center: 100 * units.deg, - line 226
) - line 227

Duplicate process

image

could you explain the reason of this code. Why should we try 2 times.

here I only see 2 elements with the same name with different case.

src/charging-station/ChargingStation.ts

Getting unexpected token ? error while trying to run the simulator

While trying to run the simulator I get the following error. The config.json and authorization-tags.json file looks intact to me. From the logs below are you able to see what may be going wrong here?

src/start.ts, src/charging-station/ChargingStationWorker.ts โ†’ dist...
created dist in 15.6s

[email protected] start /root/ev-simulator
cross-env NODE_ENV=production node -r source-map-support/register dist/start.js

/root/ev-simulator/dist/charging-station/Bootstrap.js:1
"use strict";var e=require("../types/Worker.js"),t=require("../utils/Configuration.js"),r=require("../performance/storage/StorageFactory.js"),o=require("../utils/Utils.js"),a=require("../worker/WorkerFactory.js"),n=require("chalk"),i=require("worker_threads"),s=require("path"),l=require("../package.json.js");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=g(n),m=g(s);class u{constructor(){this.version=l.version,this.started=!1,this.workerScript=m.default.join(m.default.resolve(__dirname,"../"),"charging-station","ChargingStationWorker.js"),this.initWorkerImplementation(),u.storage=r.StorageFactory.getStorage(t.getPerformanceStorage().type,t.getPerformanceStorage().URI,this.logPrefix()),t.setConfigurationChangeCallback((async()=>u.getInstance().restart()))}static getInstance(){return u.instance||(u.instance=new u),u.instance}async start(){if(i.isMainThread&&!this.started)try{if(u.numberOfChargingStations=0,await u.storage.o

SyntaxError: Unexpected token ?
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/root/ev-simulator/dist/start.js:1:20)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: cross-env NODE_ENV=production node -r source-map-support/register dist/start.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-09-25T13_49_27_017Z-debug.log

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.