Skip to content

Commit

Permalink
Initial test module for iso15118-20 support
Browse files Browse the repository at this point in the history
- added config/config-dash-20-sil.yaml for SIL testing
- added Iso15118/D20Evse module
- modified PyEvJosev module for debug output and supported services
- use device config option
- additional umwc iso stop handlers
- Added logging skeleton
- Supporting tls negotiation strategy
- Support for exi log messages
- Logging format changes
- DC_EV_TargetVoltageCurrent is now published
- Added support for configurable keyfile password
- Added v2g_setup_finished & current_demand_started var callback
- Adding try-catch for tdbcontroller
- Added signal start_cable_check
- Added first simple control event
- Added stop and unplug cmds to the auto exec commands. Now the ev stops the charging process after 15 seconds
- Send control_event presentvoltagecurrent
- Iso15118 D20Evse module applied to the refactored iso15118_charger interface
- Adding EVSE_Emergency_Shutdown to ISO2 StatusCode if a emergency shutdown is happening
- Revert - publish dlink terminate back to the old location
- Added the new feedback signals and foward the authorization status to the d20 state machine
- Handle_session_setup() is now in use
- Config change because of bsp refactor
- Config partially reverted
- Handle StopCharging & bump libiso15118 version
- Removing EVSE_Emergency_Shutdown handling & additional umwc iso stop handlers

Signed-off-by: aw <[email protected]>
Signed-off-by: Cornelius Claussen <[email protected]>
Signed-off-by: Sebastian Lukas <[email protected]>
  • Loading branch information
a-w50 authored and SebaLukas committed Jun 4, 2024
1 parent 1f9433d commit 6790568
Show file tree
Hide file tree
Showing 14 changed files with 798 additions and 3 deletions.
1 change: 1 addition & 0 deletions config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ generate_config_run_script(CONFIG sil-ocpp-custom-extension)
generate_config_run_script(CONFIG sil-ocpp-pnc)
generate_config_run_script(CONFIG sil-ocpp201-pnc)
generate_config_run_script(CONFIG example)
generate_config_run_script(CONFIG dash-20-sil)

# install configs
install(
Expand Down
131 changes: 131 additions & 0 deletions config/config-dash-20-sil.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
active_modules:
iso15118_charger:
module: D20Evse
# config_module:
# private_key_password: "failed"
# enable_ssl_logging: true
# tls_negotiation_strategy: ENFORCE_NO_TLS
iso15118_car:
module: PyEvJosev
config_module:
device: auto
supported_DIN70121: true
supported_ISO15118_2: true
supported_ISO15118_20_DC: true
tls_active: true
evse_manager:
module: EvseManager
config_module:
connector_id: 1
country_code: DE
evse_id: DE*PNX*E12345*1
evse_id_din: 49A80737A45678
session_logging: true
session_logging_xml: false
session_logging_path: /tmp/everest-logs
charge_mode: DC
hack_allow_bpt_with_iso2: true
payment_enable_contract: false
connections:
bsp:
- module_id: yeti_driver
implementation_id: board_support
powermeter_car_side:
- module_id: powersupply_dc
implementation_id: powermeter
slac:
- module_id: slac
implementation_id: evse
hlc:
- module_id: iso15118_charger
implementation_id: charger
powersupply_DC:
- module_id: powersupply_dc
implementation_id: main
imd:
- module_id: imd
implementation_id: main
powersupply_dc:
module: JsDCSupplySimulator
yeti_driver:
module: JsYetiSimulator
config_module:
connector_id: 1
slac:
module: JsSlacSimulator
imd:
module: IMDSimulator
ev_manager:
module: JsEvManager
config_module:
connector_id: 1
auto_enable: true
auto_exec: true
auto_exec_commands: sleep 3;iso_wait_slac_matched;iso_start_v2g_session DC;iso_wait_pwr_ready;iso_wait_for_stop 15;iso_wait_v2g_session_stopped;unplug;
dc_target_current: 20
dc_target_voltage: 400
connections:
ev_board_support:
- module_id: yeti_driver
implementation_id: ev_board_support
ev:
- module_id: iso15118_car
implementation_id: ev
slac:
- module_id: slac
implementation_id: ev
auth:
module: Auth
config_module:
connection_timeout: 10
selection_algorithm: PlugEvents
connections:
token_provider:
- module_id: token_provider
implementation_id: main
token_validator:
- module_id: token_validator
implementation_id: main
evse_manager:
- module_id: evse_manager
implementation_id: evse
token_provider:
module: DummyTokenProvider
config_implementation:
main:
token: TOKEN1
connections:
evse:
- module_id: evse_manager
implementation_id: evse
token_validator:
module: DummyTokenValidator
config_implementation:
main:
validation_result: Accepted
validation_reason: Token seems valid
sleep: 0.25
energy_manager:
module: EnergyManager
config_module:
schedule_total_duration: 1
schedule_interval_duration: 60
debug: false
connections:
energy_trunk:
- module_id: grid_connection_point
implementation_id: energy_grid
grid_connection_point:
module: EnergyNode
config_module:
fuse_limit_A: 40.0
phase_count: 3
connections:
price_information: []
energy_consumer:
- module_id: evse_manager
implementation_id: energy_grid
powermeter:
- module_id: yeti_driver
implementation_id: powermeter
x-module-layout: {}
8 changes: 7 additions & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ libfsm:
git_tag: v0.2.0
cmake_condition: "EVEREST_DEPENDENCY_ENABLED_LIBFSM"

# D20Evse module
libiso15118:
git: https://github.com/EVerest/libiso15118.git
git_tag: 61735ab20df675a77136eea69f84ca5bcc0a5a46
# options: ['ISO15118_LINK_CUSTOM_MBEDTLS OFF']

# LEM DCBM 400/600 module
libcurl:
git: https://github.com/curl/curl.git
Expand Down Expand Up @@ -76,7 +82,7 @@ ext-mbedtls:
options:
- ENABLE_PROGRAMS OFF
- ENABLE_TESTING OFF
- MBEDTLS_FATAL_WARNINGS OFF # disables setting warnings as errors FIXME: workaround until upstream-fixes are included
- MBEDTLS_FATAL_WARNINGS OFF # disables setting warnings as errors FIXME: workaround until upstream-fixes are included
# everest-testing
everest-utils:
git: https://github.com/EVerest/everest-utils.git
Expand Down
2 changes: 2 additions & 0 deletions modules/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ ev_add_module(DummyTokenProvider)
ev_add_module(DummyTokenProviderManual)
ev_add_module(PhyVersoBSP)

add_subdirectory(Iso15118)

add_subdirectory(examples)
add_subdirectory(simulation)

Expand Down
2 changes: 2 additions & 0 deletions modules/Iso15118/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ev_add_module(D20Evse)

29 changes: 29 additions & 0 deletions modules/Iso15118/D20Evse/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#
# AUTO GENERATED - MARKED REGIONS WILL BE KEPT
# template version 3
#

# module setup:
# - ${MODULE_NAME}: module name
ev_setup_cpp_module()

# ev@bcc62523-e22b-41d7-ba2f-825b493a3c97:v1
target_sources(${MODULE_NAME}
PRIVATE
charger/session_logger.cpp
)

target_link_libraries(${MODULE_NAME}
PRIVATE
iso15118::iso15118
)
# ev@bcc62523-e22b-41d7-ba2f-825b493a3c97:v1

target_sources(${MODULE_NAME}
PRIVATE
"charger/ISO15118_chargerImpl.cpp"
)

# ev@c55432ab-152c-45a9-9d2e-7281d50c69c3:v1
# insert other things like install cmds etc here
# ev@c55432ab-152c-45a9-9d2e-7281d50c69c3:v1
15 changes: 15 additions & 0 deletions modules/Iso15118/D20Evse/D20Evse.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Pionix GmbH and Contributors to EVerest
#include "D20Evse.hpp"

namespace module {

void D20Evse::init() {
invoke_init(*p_charger);
}

void D20Evse::ready() {
invoke_ready(*p_charger);
}

} // namespace module
67 changes: 67 additions & 0 deletions modules/Iso15118/D20Evse/D20Evse.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Pionix GmbH and Contributors to EVerest
#ifndef D20EVSE_HPP
#define D20EVSE_HPP

//
// AUTO GENERATED - MARKED REGIONS WILL BE KEPT
// template version 2
//

#include "ld-ev.hpp"

// headers for provided interface implementations
#include <generated/interfaces/ISO15118_charger/Implementation.hpp>

// ev@4bf81b14-a215-475c-a1d3-0a484ae48918:v1
// insert your custom include headers here
// ev@4bf81b14-a215-475c-a1d3-0a484ae48918:v1

namespace module {

struct Conf {
std::string device;

Check notice on line 23 in modules/Iso15118/D20Evse/D20Evse.hpp

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

modules/Iso15118/D20Evse/D20Evse.hpp#L23

struct member 'Conf::device' is never used.
std::string certificate_path;

Check notice on line 24 in modules/Iso15118/D20Evse/D20Evse.hpp

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

modules/Iso15118/D20Evse/D20Evse.hpp#L24

struct member 'Conf::certificate_path' is never used.
std::string logging_path;

Check notice on line 25 in modules/Iso15118/D20Evse/D20Evse.hpp

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

modules/Iso15118/D20Evse/D20Evse.hpp#L25

struct member 'Conf::logging_path' is never used.
std::string tls_negotiation_strategy;

Check notice on line 26 in modules/Iso15118/D20Evse/D20Evse.hpp

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

modules/Iso15118/D20Evse/D20Evse.hpp#L26

struct member 'Conf::tls_negotiation_strategy' is never used.
std::string private_key_password;

Check notice on line 27 in modules/Iso15118/D20Evse/D20Evse.hpp

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

modules/Iso15118/D20Evse/D20Evse.hpp#L27

struct member 'Conf::private_key_password' is never used.
bool enable_ssl_logging;

Check notice on line 28 in modules/Iso15118/D20Evse/D20Evse.hpp

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

modules/Iso15118/D20Evse/D20Evse.hpp#L28

struct member 'Conf::enable_ssl_logging' is never used.
};

class D20Evse : public Everest::ModuleBase {
public:
D20Evse() = delete;
D20Evse(const ModuleInfo& info, Everest::MqttProvider& mqtt_provider,
std::unique_ptr<ISO15118_chargerImplBase> p_charger, Conf& config) :
ModuleBase(info), mqtt(mqtt_provider), p_charger(std::move(p_charger)), config(config){};

Everest::MqttProvider& mqtt;
const std::unique_ptr<ISO15118_chargerImplBase> p_charger;
const Conf& config;

// ev@1fce4c5e-0ab8-41bb-90f7-14277703d2ac:v1
// insert your public definitions here
// ev@1fce4c5e-0ab8-41bb-90f7-14277703d2ac:v1

protected:
// ev@4714b2ab-a24f-4b95-ab81-36439e1478de:v1
// insert your protected definitions here
// ev@4714b2ab-a24f-4b95-ab81-36439e1478de:v1

private:
friend class LdEverest;
void init();
void ready();

// ev@211cfdbe-f69a-4cd6-a4ec-f8aaa3d1b6c8:v1
// insert your private definitions here
// ev@211cfdbe-f69a-4cd6-a4ec-f8aaa3d1b6c8:v1
};

// ev@087e516b-124c-48df-94fb-109508c7cda9:v1
// insert other definitions here
// ev@087e516b-124c-48df-94fb-109508c7cda9:v1

} // namespace module

#endif // D20EVSE_HPP
Loading

0 comments on commit 6790568

Please sign in to comment.