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

Feature/evsemanager ocpp errorhandling #764

Merged
merged 25 commits into from
Jul 31, 2024

Conversation

corneliusclaussen
Copy link
Contributor

@corneliusclaussen corneliusclaussen commented Jul 5, 2024

Describe your changes

Refactored Error Handling in EvseManager
The following SessionEventEnums have been removed from the evse_manager interface:

  • Error
  • ErrorCleared
  • AllErrorsCleared
  • PermanentFault
  • PermanentFaultCleared

The EvseManager now uses the error handling provided by the everest-framework to raise/report errors. A PermanentFault error raised by the EvseManager indicates that charging is not possible.


Refactored Error Handling in OCPP and OCPP201 modules

The OCPP modules where listening to the removed SessionEvents and were therefore refactored to be able to retrieve the errors raised by the new mechanism from the everest-framework.

Make use of everest-framework error handling feature in OCPP and OCPP201 modules:

  • added enable_global_errors to OCPP and OCPP201 module to be able to subscribe to all errors reported in EVerest
  • added error_mapping.hpp to OCPP module to be able to convert to MREC errors
  • removed SessionEvent handling for ::Error and ::PermanentFault because this is replaced by subscribing to errors using the new tools of everest-framework

Issue ticket number and link

Companion PR in libocpp: EVerest/libocpp#673

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • I read the contribution documentation and made sure that my changes meet its requirements

@corneliusclaussen corneliusclaussen added the post-release Tag that this PR should not go into the current merge window for the upcoming release label Jul 5, 2024
@Pietfried Pietfried force-pushed the feature/evsemanager-ocpp-errorhandling branch from bbb3bf6 to 5ef39ba Compare July 5, 2024 08:37
@Pietfried Pietfried force-pushed the feature/evsemanager-ocpp-errorhandling branch from 824bfe1 to 5ca8be5 Compare July 14, 2024 17:49
@corneliusclaussen corneliusclaussen removed the post-release Tag that this PR should not go into the current merge window for the upcoming release label Jul 19, 2024
@Pietfried Pietfried force-pushed the feature/evsemanager-ocpp-errorhandling branch 2 times, most recently from f85090f to 97b7a3e Compare July 23, 2024 10:42
const auto evse_id = error.origin.mapping.has_value() ? error.origin.mapping.value().evse : 0;

if (this->started) {
// TODO: Report correct evse_id once Error type includes it
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

const auto evse_id = error.origin.mapping.has_value() ? error.origin.mapping.value().evse : 0;
const auto error_info = get_error_info(error);
if (this->started) {
// TODO: Report correct evse_id once Error type includes it
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

modules/OCPP/OCPP.cpp Outdated Show resolved Hide resolved
dependencies.yaml Outdated Show resolved Hide resolved
@Pietfried Pietfried force-pushed the feature/evsemanager-ocpp-errorhandling branch from 456f7d1 to 931ccbd Compare July 26, 2024 11:12
@Pietfried Pietfried marked this pull request as ready for review July 26, 2024 11:58
corneliusclaussen and others added 14 commits July 29, 2024 10:18
Signed-off-by: Cornelius Claussen <cc@pionix.de>
Signed-off-by: Cornelius Claussen <cc@pionix.de>
Signed-off-by: pietfried <pietgoempel@gmail.com>
Signed-off-by: Cornelius Claussen <cc@pionix.de>
Signed-off-by: pietfried <pietgoempel@gmail.com>
Signed-off-by: pietfried <pietgoempel@gmail.com>
Signed-off-by: Cornelius Claussen <cc@pionix.de>
…201 modules:

* added enable_global_errors to OCPP and OCPP201 module to be able to subscribe to all errors reported in EVerest
* added error_mapping.hpp to OCPP module to be able to convert to MREC errors
* removed SessionEvent handling for ::Error and ::PermanentFault because this is replaced by subscribing to errors using the new tools of everest-framework

Signed-off-by: pietfried <pietgoempel@gmail.com>
Signed-off-by: pietfried <pietgoempel@gmail.com>
Signed-off-by: pietfried <pietgoempel@gmail.com>
Signed-off-by: pietfried <pietgoempel@gmail.com>
Signed-off-by: Cornelius Claussen <cc@pionix.de>
Signed-off-by: pietfried <pietgoempel@gmail.com>
…error

Signed-off-by: pietfried <pietgoempel@gmail.com>
Pietfried and others added 8 commits July 29, 2024 10:18
Signed-off-by: pietfried <pietgoempel@gmail.com>
…or. Added retrieval of evse id from error and use this for reporting.

Signed-off-by: pietfried <pietgoempel@gmail.com>
Signed-off-by: pietfried <pietgoempel@gmail.com>
Signed-off-by: Piet Gömpel <37657534+Pietfried@users.noreply.github.com>
Signed-off-by: Piet Gömpel <37657534+Pietfried@users.noreply.github.com>
Signed-off-by: pietfried <pietgoempel@gmail.com>
…th module

Signed-off-by: pietfried <pietgoempel@gmail.com>
Signed-off-by: pietfried <pietgoempel@gmail.com>
@Pietfried Pietfried force-pushed the feature/evsemanager-ocpp-errorhandling branch from 40bfcd1 to 6b80948 Compare July 29, 2024 08:19
config_module:
connector_id: 1
yeti_driver_2:
module: JsYetiSimulator
evse: 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should be evse: 2 ?

cmake_condition: "EVEREST_DEPENDENCY_ENABLED_LIBEVSE_SECURITY"

# OCPP
libocpp:
git: https://github.com/EVerest/libocpp.git
git_tag: 01f064f45f6d0ff44605db07373e4b9ea02b63b8
git_tag: feature/refactor-ocpp16-error-state-machine
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: update before merge

Signed-off-by: pietfried <pietgoempel@gmail.com>
dependencies.yaml Outdated Show resolved Hide resolved
Signed-off-by: Piet Gömpel <37657534+Pietfried@users.noreply.github.com>
@Pietfried Pietfried merged commit 2452ed7 into main Jul 31, 2024
7 of 8 checks passed
@Pietfried Pietfried deleted the feature/evsemanager-ocpp-errorhandling branch July 31, 2024 11:37
@hikinggrass hikinggrass mentioned this pull request Aug 1, 2024
3 tasks
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

Successfully merging this pull request may close these issues.

3 participants