{"id":26395826,"url":"https://github.com/ocpp-balanz/ocppsim","last_synced_at":"2025-09-03T05:41:02.865Z","repository":{"id":275804937,"uuid":"927249971","full_name":"ocpp-balanz/ocppsim","owner":"ocpp-balanz","description":"OCPP Charge Point Simulator","archived":false,"fork":false,"pushed_at":"2025-03-09T06:02:06.000Z","size":79,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-17T11:19:30.872Z","etag":null,"topics":["ev","evcharging","ocpp","ocpp16j","simulator"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ocpp-balanz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-04T16:47:48.000Z","updated_at":"2025-03-09T06:02:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"17451c73-7fb1-4b83-a2aa-005918b62950","html_url":"https://github.com/ocpp-balanz/ocppsim","commit_stats":null,"previous_names":["ocpp-balanz/ocppsim"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ocpp-balanz/ocppsim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocpp-balanz%2Focppsim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocpp-balanz%2Focppsim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocpp-balanz%2Focppsim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocpp-balanz%2Focppsim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ocpp-balanz","download_url":"https://codeload.github.com/ocpp-balanz/ocppsim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocpp-balanz%2Focppsim/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266416859,"owners_count":23925296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ev","evcharging","ocpp","ocpp16j","simulator"],"created_at":"2025-03-17T11:19:32.457Z","updated_at":"2025-07-22T03:03:43.543Z","avatar_url":"https://github.com/ocpp-balanz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ocpp-simulator\n\nOCPP v1.6 Charge Point (CP) Simulator used to test OCPP Central Systems (CS).\n\n## Build\n\nClone the repository:\n\n```text\ngit clone https://github.com/ocpp-balanz/ocppsim.git\ncd ocppsim\n```\n\nInstall dependencies:\n\n```text\nmake install\n```\n\n## Start\n\nRun `python ocppsim.py -h` to retrieve the following help message:\n\n```text\nusage: ocppsim.py [-h] [--version] [--config CONFIG] [--port PORT] [--id ID]\n\nOCCPSIM - OCCP v1.6 Charge Point Simulator with Websocket Control Interface\n\noptions:\n  -h, --help       show this help message and exit\n  --version        show program's version number and exit\n  --config CONFIG  Configuration file (INI format). Default ocpp.ini\n  --port PORT      Command Interface Port. Default in config file.\n  --id ID          Charger Id. Default in config file.\n```\n\nThe configuration file is intended to configure a _type_ of charger, with the actual charger id supplied at startup. Review the file in detail to understand how to configure occpsim.\n\nStart simulating a charger.\n\n    python ocppsim.py --id TACW6243111G2672 --port 1234\n\nNext, connect to the port using e.g. [websocat](https://github.com/vi/websocat) to interact with the simulator through the simplistic command interface.\n\n    websocat ws://localhost:1234\n\nAlternatively, use the included test driver `ocppsim_test.py` in interactive mode as follows:\n\n    python ocppsim_test.py --url ws://localhost:321\n\n`occpsim_test.py` may also be imported as a module and used in test scripts, possibly connecting to multiple simulators.\n\n## Supported commands\n\nThe command interface is very simply. Enter a command and retrieve a one line response. The simulator will then execute the appropriate logic.\n\nCommands           | Description\n------------------ | ----------------------------------------------------------------\n`wait [sec]`       | Wait some seconds. Default 5 sec\n`status`           | Get the internal status (does not send/receive anything)\n`jsonstatus`       | Receive JSON object with charger attributes. Useful for automation.\n`full`             | Emulate that EV is full/does not want to charge more\n`fullafter [wh]`   | Emulate that EV is full after having received at least [wh]\n`delay`            | Set delayed charing. EV will not start charging\n`nodelay`          | Charging no longer delayed\n`delay_notrans`    | Set delayed charging mode to NOT start a transaction until time is up\n`delay_trans`      | Restore to normal mode, i.e. DO start transaction if offer and delay\n`plugin`           | Cable is plugged into EV\n`unplug`           | Unplug cable/disconnect EV\n`tag [id_tag]`     | RFID tag is scanned. Default tag in config file\n`clock [offset]`   | Adjust timestamps send by offset seconds, e.g. clock -3600\n`suspend`          | EV suspends charging (for some reason)\n`resume`           | EV restarts charging (for some reason)\n`max [Amps]`       | Set maximum charging usage in Amps. Reset without argument.\n`reset`            | Reset the simulator (clear all state)\n`exit`             | Exit the command session\n`shutdown`         | Shutdown the simulator (process will stop)\n\n## Automating Tests\n\nThe simulator can be used to automate tests. For example, you could write a script that sends commands and checks the responses. See a `pytest` based example in the `test_ocppsim_example.py` file.\n\n## Supported CP to CS messages\n\n- BootNotification\n- StatusNotification\n- MeterValues\n- Authorize\n- StartTransaction\n- StopTransaction\n- TriggerMessage\n\n## Supported CS to Charger (CP) messages\n\n- SetChargingProfile\n- ClearChargingProfile\n- Reset\n- ChangeConfiguration (only actively uses AuthorizationKey during http authentication if set)\n- RemoteStartTransaction\n- RemoteStopTransaction\n- GetConfiguration\n- ChangeConfiguration\n\n## Limitations\n\n- Charging profile evaluation assuming timing \"forever\"\n- Currently only chargers with a single connector/outlet is supported.\n- Some messages not supported\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focpp-balanz%2Focppsim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Focpp-balanz%2Focppsim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focpp-balanz%2Focppsim/lists"}