Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility Request: MicroOcpp with Citrine-OS (OCPP 2.0.1) #385

Open
mohammdkhalilii opened this issue Nov 17, 2024 · 1 comment
Open

Comments

@mohammdkhalilii
Copy link

Dear Matthias Akstaller,

I hope you are doing well. My name is Mohammad, and I am currently working on a project involving OCPP 2.0.1 integration for electric vehicle charging stations. I was thoroughly impressed by MicroOcpp for its lightweight and efficient OCPP client implementation and Citrine-OS for its robust CSMS with an exceptional user interface and well-documented APIs.

I am contacting you to ask about the potential compatibility between MicroOcpp and Citrine-OS. My objective is to integrate the two systems seamlessly for testing and deployment. A successful collaboration between MicroOcpp as the client and Citrine-OS as the CSMS could further highlight the strengths of both projects.

Would it be possible to explore or validate the compatibility between these two systems? If additional input or testing support is needed from my side, I’d be more than happy to contribute. I also believe this could benefit the broader OCPP community by providing a well-documented case study for integration.

Here are the respective project links for reference:

Citrine-OS: GitHub Link
Thank you for your time and consideration. Please let me know if I can provide any further details to assist with this request. I look forward to your thoughts and any potential next steps.

Warm regards,
Mohammad Khalili

@KSR-Yasuda
Copy link

KSR-Yasuda commented Jan 27, 2025

#385

I'm another one trying to work with CitrineOS in OCPP 2.0.1.

I suppose they're still working on OCPP 2.0.1 integration, at least at the point of MicroOcpp v1.2.0.

Besides the build switch MO_ENABLE_V201, calling mocpp_initialize() as below makes it sends
BootNotification (reason = PowerUp) and StatusNotification (connectionStatus = Occupied) to get to standby condition.
This change is introduced in the ReadMe as the sample code of MicroOcppSimulator.

--- a/src/MicroOcpp.cpp
+++ b/src/MicroOcpp.cpp
@@ -176,7 +176,14 @@ void mocpp_initialize(const char *backendUrl, const char *charge
     delete connection;
     connection = new EspWiFi::WSClient(webSocket);
 
+#if     defined(MO_ENABLE_V201) && MO_ENABLE_V201
+    MicroOcpp::ProtocolVersion  version     = MicroOcpp::ProtocolVersion(2, 0, 1);
+    ChargerCredentials          credential  = ChargerCredentials::v201(chargePointModel, chargePointVendor);
+#else   // defined(MO_ENABLE_V201) && MO_ENABLE_V201
+    MicroOcpp::ProtocolVersion  version     = MicroOcpp::ProtocolVersion(1, 6);    // Had been selected as the default argument.
+    ChargerCredentials          credential(chargePointModel, chargePointVendor);   // Have to be switched to OCPP 2.0.1 API.
+#endif  // defined(MO_ENABLE_V201) && MO_ENABLE_V201
+    mocpp_initialize(*connection, credential, makeDefaultFilesystemAdapter(fsOpt), autoRecover, version);
-    mocpp_initialize(*connection, ChargerCredentials(chargePointModel, chargePointVendor), makeDefaultFilesystemAdapter(fsOpt), autoRecover);
 }
 #endif
 

However, I couldn't trigger an EV charging transaction.

In the MicroOcpp demo examples/ESP,
it calls beginTransaction() to start, but does not work; fails since no connector is found.

The connectors had been set in mocpp_initialize() in OCPP 1.6, however, the OCPP 2.0.1 implementation skips it.
OCPP 2.0.1 looks replacing the old Connector objects with new Evse, though, it would be in progress.

Even if there they might've prepared another way to trigger for OCPP 2.0.1,
no hint is provided including the MicroOcppSimulator sample code.

Does anybody have any advice further?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants