{"id":13634647,"url":"https://github.com/matth-x/MicroOcpp","last_synced_at":"2025-04-18T23:32:34.385Z","repository":{"id":37458840,"uuid":"256217079","full_name":"matth-x/MicroOcpp","owner":"matth-x","description":"OCPP 1.6 client for microcontrollers","archived":false,"fork":false,"pushed_at":"2024-10-25T20:21:52.000Z","size":3639,"stargazers_count":342,"open_issues_count":73,"forks_count":149,"subscribers_count":20,"default_branch":"main","last_synced_at":"2024-10-29T17:32:12.071Z","etag":null,"topics":["arduino","arduino-ocpp","embedded","esp32","esp32-arduino","esp8266","evse","ocpp","ocpp-controller","platformio"],"latest_commit_sha":null,"homepage":"","language":"C++","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/matth-x.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-16T13:04:28.000Z","updated_at":"2024-10-29T01:57:37.000Z","dependencies_parsed_at":"2023-09-21T18:25:10.835Z","dependency_job_id":"fc9c912c-0c80-4d28-a63d-ae42d4e32606","html_url":"https://github.com/matth-x/MicroOcpp","commit_stats":{"total_commits":710,"total_committers":9,"mean_commits":78.88888888888889,"dds":0.06619718309859157,"last_synced_commit":"45dc003fad83de0cfcd0f4e2f4cc43b6f9b04624"},"previous_names":["matth-x/microocpp","matth-x/arduinoocpp"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matth-x%2FMicroOcpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matth-x%2FMicroOcpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matth-x%2FMicroOcpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matth-x%2FMicroOcpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matth-x","download_url":"https://codeload.github.com/matth-x/MicroOcpp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249565247,"owners_count":21292427,"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","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":["arduino","arduino-ocpp","embedded","esp32","esp32-arduino","esp8266","evse","ocpp","ocpp-controller","platformio"],"created_at":"2024-08-02T00:00:28.507Z","updated_at":"2025-04-18T23:32:33.984Z","avatar_url":"https://github.com/matth-x.png","language":"C++","funding_links":[],"categories":["Tools and Resources"],"sub_categories":["OCPP"],"readme":"# \u003cimg src=\"https://github.com/matth-x/MicroOcpp/assets/63792403/1c49d1ad-7afc-48d3-a54e-9aef2d4886db\" alt=\"Icon\" height=\"24\"\u003e \u0026nbsp; MicroOCPP\n\n[![Build Status]( https://github.com/matth-x/MicroOcpp/workflows/PlatformIO%20CI/badge.svg)](https://github.com/matth-x/MicroOcpp/actions)\n[![Unit tests]( https://github.com/matth-x/MicroOcpp/workflows/Unit%20tests/badge.svg)](https://github.com/matth-x/MicroOcpp/actions)\n[![codecov](https://codecov.io/github/matth-x/ArduinoOcpp/branch/develop/graph/badge.svg?token=UN6LO96HM7)](https://codecov.io/github/matth-x/ArduinoOcpp)\n\nOCPP 1.6 / 2.0.1 client for microcontrollers. Portable C/C++. Compatible with Espressif, Arduino, NXP, STM, Linux and more.\n\n:heavy_check_mark: Works with [15+ commercial Central Systems](https://www.micro-ocpp.com/#h.314525e8447cc93c_81)\n\n:heavy_check_mark: Eligible for public chargers (Eichrecht-compliant)\n\n:heavy_check_mark: Supports all OCPP 1.6 feature profiles and the [basic OCPP 2.0.1 UCs](https://github.com/matth-x/MicroOcpp/tree/feature/prepare-release?tab=readme-ov-file#ocpp-201-and-iso-15118)\n\nReference usage: [OpenEVSE](https://github.com/OpenEVSE/ESP32_WiFi_V4.x/blob/master/src/ocpp.cpp) | Technical introduction: [Docs](https://matth-x.github.io/MicroOcpp/intro-tech) | Website: [www.micro-ocpp.com](https://www.micro-ocpp.com)\n\n## Tester / Demo App\n\n*Main repository: [MicroOcppSimulator](https://github.com/matth-x/MicroOcppSimulator)*\n\nThe Simulator is a demo \u0026 development tool for MicroOCPP which allows to quickly assess the compatibility with different OCPP backends. It simulates a full charging station, adds a GUI and a mocked hardware binding to MicroOCPP and runs in the browser (using WebAssembly): [Try it](https://demo.micro-ocpp.com/)\n\n\u003cdiv align=\"center\"\u003e\u003cimg src=\"https://github.com/matth-x/MicroOcpp/assets/63792403/27f2819b-41fd-41a7-88a8-9e673b8a88b8\" alt=\"Screenshot\" width=\"800em\" href=\"https://demo.micro-ocpp.com/\"\u003e\u003c/div\u003e\n\n#### Usage\n\n**OCPP server setup**: Navigate to \"Control Center\". In the WebSocket options, add the OCPP backend URL, charge box ID and authorization key if existent. Press \"Update WebSocket\" to save. The Simulator should connect to the OCPP server. To check the connection status, it could be helpful to open the developer tools of the browser.\n\nIf you don't have an OCPP server at hand, leave the charge box ID blank and enter the following backend address: `wss://echo.websocket.events/` (this server is sponsored by Lob.com)\n\n**RFID authentication**: Go to \"Control Center\" \u003e \"Connectors\" \u003e \"Transaction\" and update the idTag with the desired value.\n\n## Benchmarks\n\n*Full report: [MicroOCPP benchmarks](https://matth-x.github.io/MicroOcpp/benchmarks/)*\n\nThe following measurements were taken on the ESP32 @ 160MHz and represent the optimistic best case scenario for a charger with two physical connectors (i.e. compiled with `-Os`, disabled debug output and logs).\n\n| Description | Value |\n| :--- | ---: |\n| Flash size (minimal) | 121,170 B |\n| Heap occupation (idle) | 12,308 B |\n| Heap occupation (peak) | 21,916 B |\n| Initailization | 21 ms |\n| `loop()` call (idle) | 0.05 ms |\n| Large message sent | 5 ms |\n\nIn practical setups, the execution time is largely determined by IO delays and the heap occupation is significantly influenced by the configuration with reservation, local authorization and charging profile lists.\n\n## Developers guide\n\nPlatformIO package: [MicroOcpp](https://registry.platformio.org/libraries/matth-x/MicroOcpp)\n\nMicroOCPP is an implementation of the OCPP communication behavior. It automatically initiates the corresponding OCPP operations once the hardware status changes or the RFID input is updated with a new value. Conversely it processes new data from the server, stores it locally and updates the hardware controls when applicable.\n\nPlease take `examples/ESP/main.cpp` as the starting point for the first project. It is a minimal example which shows how to establish an OCPP connection and how to start and stop charging sessions. The API documentation can be found in [`MicroOcpp.h`](https://github.com/matth-x/MicroOcpp/blob/main/src/MicroOcpp.h). Also check out the [Docs](https://matth-x.github.io/MicroOcpp).\n\n### Dependencies\n\nMandatory:\n\n- [bblanchon/ArduinoJSON](https://github.com/bblanchon/ArduinoJson) (version `6.21`)\n\nIf compiled with the Arduino integration:\n\n- [Links2004/arduinoWebSockets](https://github.com/Links2004/arduinoWebSockets) (version `2.4.1`)\n\nIf using the built-in certificate store (to enable, set build flag `MO_ENABLE_MBEDTLS=1`):\n\n- [Mbed-TLS/mbedtls](https://github.com/Mbed-TLS/mbedtls) (version `2.28.1`)\n\nIn case you use PlatformIO, you can copy all dependencies from `platformio.ini` into your own configuration file. Alternatively, you can install the full library with dependencies by adding `matth-x/MicroOcpp@1.2.0` in the PIO library manager.\n\n## OCPP 2.0.1 and ISO 15118\n\nThe following OCPP 2.0.1 use cases are implemented:\n\n| UC | Description | Note |\n| :--- | :--- | :--- |\n| B01 - B04\u003cbr\u003eB11 - B12 | Provisioning | Ported from OCPP 1.6 |\n| B05 - B07 | Variables | |\n| C01 - C06 | Authorization options | |\n| C15 | Offline Authorization | |\n| E01 - E12 | Transactions | |\n| F01 - F03\u003cbr\u003eF05 - F06 | RemoteControl | |\n| G01 - G04 | Availability | |\n| J02 | Tx-related MeterValues | persistency not supported yet |\n| M03 - M05 | Certificate management | Enable Mbed-TLS to use the built-in certificate store |\n| P01 - P02 | Data transfer | |\n| - | Protocol negotiation | The charger can select the OCPP version at runtime |\n\nThe OCPP 2.0.1 features are in an alpha development stage. By default, they are disabled and excluded from the build, so they have no impact on the firmware size. To enable, set the build flag `MO_ENABLE_V201=1` and initialize the library with the ProtocolVersion parameter `2.0.1`  (see [this example](https://github.com/matth-x/MicroOcppSimulator/blob/657e606c3b178d3add242935d413c72624130ff3/src/main.cpp#L43-L47) in the Simulator).\n\nAn integration of the library for OCPP 1.6 will also be functional with the 2.0.1 upgrade. It works with the same API in MicroOcpp.h.\n\nISO 15118 defines some use cases which include a message exchange between the charger and server. This library facilitates the integration of ISO 15118 by handling its OCPP-side communication.\n\n## Contact\n\nIf you have further questions, feel free to reach out!\n\n:envelope: : matthias [A⊤] micro-ocpp [DО⊤] com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatth-x%2FMicroOcpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatth-x%2FMicroOcpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatth-x%2FMicroOcpp/lists"}