Skip to content

Commit

Permalink
Feature/evsemanager ocpp errorhandling (EVerest#764)
Browse files Browse the repository at this point in the history
* 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
---------

Signed-off-by: Cornelius Claussen <[email protected]>
Signed-off-by: pietfried <[email protected]>
Signed-off-by: Piet Gömpel <[email protected]>
Co-authored-by: pietfried <[email protected]>
Co-authored-by: Piet Gömpel <[email protected]>
  • Loading branch information
3 people authored Jul 31, 2024
1 parent 84e2d10 commit 2452ed7
Show file tree
Hide file tree
Showing 40 changed files with 501 additions and 652 deletions.
8 changes: 8 additions & 0 deletions config/config-sil-dc-sae-v2g.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,12 @@ active_modules:
evse_manager:
- module_id: evse_manager
implementation_id: evse
error_history:
- module_id: error_history
implementation_id: error_history
error_history:
module: ErrorHistory
config_implementation:
error_history:
database_path: /tmp/error_history.db
x-module-layout: {}
8 changes: 8 additions & 0 deletions config/config-sil-dc-sae-v2h.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,12 @@ active_modules:
evse_manager:
- module_id: evse_manager
implementation_id: evse
error_history:
- module_id: error_history
implementation_id: error_history
error_history:
module: ErrorHistory
config_implementation:
error_history:
database_path: /tmp/error_history.db
x-module-layout: {}
8 changes: 8 additions & 0 deletions config/config-sil-dc-tls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,12 @@ active_modules:
evse_manager:
- module_id: evse_manager
implementation_id: evse
error_history:
- module_id: error_history
implementation_id: error_history
error_history:
module: ErrorHistory
config_implementation:
error_history:
database_path: /tmp/error_history.db
x-module-layout: {}
8 changes: 8 additions & 0 deletions config/config-sil-dc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,12 @@ active_modules:
evse_manager:
- module_id: evse_manager
implementation_id: evse
error_history:
- module_id: error_history
implementation_id: error_history
error_history:
module: ErrorHistory
config_implementation:
error_history:
database_path: /tmp/error_history.db
x-module-layout: {}
8 changes: 8 additions & 0 deletions config/config-sil-energy-management.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,12 @@ active_modules:
random_delay:
- module_id: evse_manager_1
implementation_id: random_delay
error_history:
- module_id: error_history
implementation_id: error_history
error_history:
module: ErrorHistory
config_implementation:
error_history:
database_path: /tmp/error_history.db
x-module-layout: {}
12 changes: 12 additions & 0 deletions config/config-sil-ocpp-custom-extension.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ active_modules:
supported_ISO15118_2: true
evse_manager_1:
module: EvseManager
evse: 1
config_module:
connector_id: 1
evse_id: "1"
Expand All @@ -39,6 +40,7 @@ active_modules:
implementation_id: charger
evse_manager_2:
module: EvseManager
evse: 2
config_module:
connector_id: 2
evse_id: "2"
Expand All @@ -63,10 +65,12 @@ active_modules:
implementation_id: charger
yeti_driver_1:
module: JsYetiSimulator
evse: 1
config_module:
connector_id: 1
yeti_driver_2:
module: JsYetiSimulator
evse: 2
config_module:
connector_id: 2
slac:
Expand Down Expand Up @@ -192,6 +196,14 @@ active_modules:
evse_manager:
- module_id: evse_manager_1
implementation_id: evse
error_history:
- module_id: error_history
implementation_id: error_history
error_history:
module: ErrorHistory
config_implementation:
error_history:
database_path: /tmp/error_history.db
system:
module: System

Expand Down
12 changes: 12 additions & 0 deletions config/config-sil-ocpp-pnc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ active_modules:
is_cert_install_needed: true
evse_manager_1:
module: EvseManager
evse: 1
config_module:
connector_id: 1
evse_id: "DE*PNX*00001"
Expand All @@ -42,6 +43,7 @@ active_modules:
implementation_id: charger
evse_manager_2:
module: EvseManager
evse: 2
config_module:
connector_id: 2
evse_id: "2"
Expand All @@ -66,10 +68,12 @@ active_modules:
implementation_id: charger
yeti_driver_1:
module: JsYetiSimulator
evse: 1
config_module:
connector_id: 1
yeti_driver_2:
module: JsYetiSimulator
evse: 2
config_module:
connector_id: 2
slac:
Expand Down Expand Up @@ -186,6 +190,14 @@ active_modules:
evse_manager:
- module_id: evse_manager_1
implementation_id: evse
error_history:
- module_id: error_history
implementation_id: error_history
error_history:
module: ErrorHistory
config_implementation:
error_history:
database_path: /tmp/error_history.db
system:
module: System

Expand Down
12 changes: 12 additions & 0 deletions config/config-sil-ocpp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ active_modules:
device: auto
supported_ISO15118_2: true
evse_manager_1:
evse: 1
module: EvseManager
config_module:
connector_id: 1
Expand All @@ -40,6 +41,7 @@ active_modules:
implementation_id: charger
evse_manager_2:
module: EvseManager
evse: 2
config_module:
connector_id: 2
evse_id: "2"
Expand All @@ -64,10 +66,12 @@ active_modules:
- module_id: iso15118_charger
implementation_id: charger
yeti_driver_1:
evse: 1
module: JsYetiSimulator
config_module:
connector_id: 1
yeti_driver_2:
evse: 2
module: JsYetiSimulator
config_module:
connector_id: 2
Expand Down Expand Up @@ -183,6 +187,14 @@ active_modules:
ocpp:
- module_id: ocpp
implementation_id: ocpp_generic
error_history:
- module_id: error_history
implementation_id: error_history
error_history:
module: ErrorHistory
config_implementation:
error_history:
database_path: /tmp/error_history.db
system:
module: System

Expand Down
12 changes: 12 additions & 0 deletions config/config-sil-ocpp201-pnc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ active_modules:
is_cert_install_needed: true
evse_manager_1:
module: EvseManager
evse: 1
config_module:
connector_id: 1
evse_id: "DE*PNX*00001"
Expand All @@ -42,6 +43,7 @@ active_modules:
implementation_id: charger
evse_manager_2:
module: EvseManager
evse: 2
config_module:
connector_id: 2
evse_id: "2"
Expand All @@ -66,10 +68,12 @@ active_modules:
implementation_id: charger
yeti_driver_1:
module: JsYetiSimulator
evse: 1
config_module:
connector_id: 1
yeti_driver_2:
module: JsYetiSimulator
evse: 2
config_module:
connector_id: 2
slac:
Expand Down Expand Up @@ -180,6 +184,14 @@ active_modules:
evse_manager:
- module_id: evse_manager_1
implementation_id: evse
error_history:
- module_id: error_history
implementation_id: error_history
error_history:
module: ErrorHistory
config_implementation:
error_history:
database_path: /tmp/error_history.db
system:
module: System

Expand Down
12 changes: 12 additions & 0 deletions config/config-sil-ocpp201.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ active_modules:
supported_ISO15118_2: true
evse_manager_1:
module: EvseManager
evse: 1
config_module:
connector_id: 1
evse_id: "1"
Expand All @@ -39,6 +40,7 @@ active_modules:
implementation_id: charger
evse_manager_2:
module: EvseManager
evse: 2
config_module:
connector_id: 2
evse_id: "2"
Expand All @@ -63,10 +65,12 @@ active_modules:
implementation_id: charger
yeti_driver_1:
module: JsYetiSimulator
evse: 1
config_module:
connector_id: 1
yeti_driver_2:
module: JsYetiSimulator
evse: 2
config_module:
connector_id: 2
slac:
Expand Down Expand Up @@ -175,6 +179,14 @@ active_modules:
evse_manager:
- module_id: evse_manager_1
implementation_id: evse
error_history:
- module_id: error_history
implementation_id: error_history
error_history:
module: ErrorHistory
config_implementation:
error_history:
database_path: /tmp/error_history.db
system:
module: System

Expand Down
8 changes: 8 additions & 0 deletions config/config-sil-two-evse-dc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,12 @@ active_modules:
evse_manager:
- module_id: evse_manager_1
implementation_id: evse
error_history:
- module_id: error_history
implementation_id: error_history
error_history:
module: ErrorHistory
config_implementation:
error_history:
database_path: /tmp/error_history.db
x-module-layout: {}
8 changes: 8 additions & 0 deletions config/config-sil-two-evse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,12 @@ active_modules:
evse_manager:
- module_id: evse_manager_1
implementation_id: evse
error_history:
- module_id: error_history
implementation_id: error_history
error_history:
module: ErrorHistory
config_implementation:
error_history:
database_path: /tmp/error_history.db
x-module-layout: {}
8 changes: 8 additions & 0 deletions config/config-sil.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ active_modules:
evse_manager:
- implementation_id: evse
module_id: connector_1
error_history:
- module_id: error_history
implementation_id: error_history
module: API
error_history:
module: ErrorHistory
config_implementation:
error_history:
database_path: /tmp/error_history.db
auth:
config_module:
connection_timeout: 10
Expand Down
8 changes: 4 additions & 4 deletions config/nodered/config-sil-flow.json
Original file line number Diff line number Diff line change
Expand Up @@ -2287,7 +2287,7 @@
"type": "ui_switch",
"z": "cb7609df6138407d",
"name": "",
"label": "PermanentFault",
"label": "Inoperative",
"tooltip": "",
"group": "18b792e585c4a82f",
"order": 1,
Expand All @@ -2298,11 +2298,11 @@
"topic": "everest_external/nodered/#/carsim/error",
"topicType": "str",
"style": "",
"onvalue": "{\"error_type\":\"PermanentFault\",\"raise\":\"true\"}",
"onvalue": "{\"error_type\":\"Inoperative\",\"raise\":\"true\"}",
"onvalueType": "json",
"onicon": "",
"oncolor": "",
"offvalue": "{\"error_type\":\"PermanentFault\",\"raise\":\"false\"}",
"offvalue": "{\"error_type\":\"Inoperative\",\"raise\":\"false\"}",
"offvalueType": "json",
"officon": "",
"offcolor": "",
Expand Down Expand Up @@ -3328,4 +3328,4 @@
]
]
}
]
]
6 changes: 3 additions & 3 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
---
everest-framework:
git: https://github.com/EVerest/everest-framework.git
git_tag: v0.15.2
git_tag: v0.16.0
options: [
"BUILD_TESTING OFF",
"everest-framework_USE_PYTHON_VENV ${PROJECT_NAME}_USE_PYTHON_VENV",
Expand Down Expand Up @@ -54,13 +54,13 @@ libcurl:
# and would otherwise be overwritten by the version used there
libevse-security:
git: https://github.com/EVerest/libevse-security.git
git_tag: b140c17b0a5eaf09b60035605ed8aeb84627eb78
git_tag: 8a300f39b94fb6364759dfbb57e8501facb94b2f
cmake_condition: "EVEREST_DEPENDENCY_ENABLED_LIBEVSE_SECURITY"

# OCPP
libocpp:
git: https://github.com/EVerest/libocpp.git
git_tag: 01f064f45f6d0ff44605db07373e4b9ea02b63b8
git_tag: 1067cf3ddf27be3a43f8abc519b69da11c4ef921
cmake_condition: "EVEREST_DEPENDENCY_ENABLED_LIBOCPP"
# Josev
Josev:
Expand Down
4 changes: 3 additions & 1 deletion errors/evse_manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ errors:
- name: MREC4OverCurrentFailure
description: Over current event
- name: PowermeterTransactionStartFailed
description: Transaction could not be started at the powermeter
description: Transaction could not be started at the powermeter
- name: Inoperative
description: Charging is not possible. Usually caused by another error from one of the requirements.
Loading

0 comments on commit 2452ed7

Please sign in to comment.