Open louisg1337 opened 3 months ago
setChargingProfile
UpdateI finally managed to figure out what was wrong with my implementation of setChargingProfile
in MaEVe. As I mentioned before, identifiers in structs need to be capitalized if we want the data within them to be exported, i.e. work in other packages. This caused an issue for us because libocpp
wanted the lowercase versions of the EvsdeId
and ChargingProfile
.
I firstly spent a good amount of time trying to trace the code in libocpp
and maeve-csms
to try and see if I made a mistake along the way. I then tried adding in different hot fixes to convert the values in our SetChargingProfileRequestJson
struct to lowercase before being sent out, but that didn't work. I then finally realized what was different between my struct and all the other ones already defined in MaEVe. The difference is that in their structs they had a tag that could allow you to specify what name you wanted the identifier to have in a json object. This meant that we could specify ChargingProfile/EvseId
to show up as chargingProfile/evseId
in json, all while retaining the capitalization. The final changed can be found here.
With this new change in place, I went ahead and tried to test out my new implementation with some of the patchwork taken away. As stated in this comment, I only removed the patch made to messages/SetChargingProfile.cpp
, which had the formatting change. Once the docker containers were up and running I sent over the setChargingProfile
API request and it worked. This is the response I received:
Just posted the PR to MaEVe to integrate our setChargingProfile
API. I'll start looking into the rest of the MaEVe patch files and try to figure out how to put it in some type of config.
For the rest of the MaEVe patch files, I just submitted another PR. I tried creating some type of config option with a script that you could run if using MaEVe with EVerest, and I left room for the community to provide their own feedback/thoughts for hopefully a better solution.
Converted both to draft; please clean up before taking it off draft
Thank you for the feedback @shankari, just addressed all the comments in both PRs and set them back to ready for review. Let me know what else, if anything, needs to be done to them.
During CharIN, multiple on the spot patches had to be made to get the demos working, found in this PR. The goal is to now slowly fix everything so that these patches are no longer needed.
Discussions started about debugging our MaEVe implementation of
setChargingProfile
so that it can work without a patch, found here. This thread is now the continuation of all of the above.