EvseManager

EVSE Manager. Grid side power meter: Will be used for energy management. Will also be used for billing if no car side power meter connected. Car side powermeter: Will be used for billing if present.

Handwritten Documentation

The module EvseManager is a central module that manages one EVSE (i.e. one connector to charge a car). It may control multiple physical connectors if they are not usable at the same time and share one connector id, but one EvseManager always shows as one connector in OCPP for example. So in general each connector should have a dedicated EvseManager module loaded.

The EvseManager contains the high level charging logic (Basic charging and HLC/SLAC interaction), collects all relevant data for the charging session (e.g. energy delivered during this charging session) and provides control over the charging port/session. For HLC it uses two helper protocol modules that it controls (SLAC and ISO15118).

Protocol modules such as OCPP or other APIs use EvseManagers to control the charging session and get all relevant data.

The following charge modes are supported:

  • AC charging: Basic Charging according to IEC61851/SAE J1772 and HLC according to ISO15118-2

  • DC charging: ISO15118-2 and DIN SPEC 70121

Additional features:

  • Autocharge support (PnC coming soon)

  • Seamlessly integrates into EVerest Energy Management

  • The lowest level IEC61851 state machine can be run on a dedicated microcontroller for improved electrical safety

  • Support for seperate AC and DC side metering in DC application

Typical connections

TODO: AC and DC module graphs and description

AC Configuration

Captive cable mode

For AC sockets with a connector lock in fleet or private installations, the cable can be kept permanently locked in the socket as theft protection. Set keep_cable_locked to true to enable this captive cable mode. It requires a board_support driver that publishes ac_pp_ampacity on every change, also outside of charging sessions, so that plug presence is known even in CP state A.

With the option enabled:

  • The connector locks whenever a plug is present, in every CP state including state A with no EV attached.

  • The lock is latched: losing plug presence without a preceding force unlock (for example the Proximity Pilot contact opening while the cable is pulled against the lock pin) does not release it.

  • The only way to release the cable is the force_unlock command (for example an OCPP UnlockConnector) or disabling the option again. After a force unlock the connector stays unlocked until the cable is removed; the next plug insertion locks it again.

  • It takes precedence over lock_connector_in_state_b and unlock_when_deauthorized.

  • The normal locking rules still apply on top. For example, after a force unlock with the cable left in the socket, the connector is locked again for the next charging session as usual, before the relays close.

Captive cable mode only applies to AC charging with a socket and a connected connector lock. With charge_mode other than AC, without a connector lock, or when the board_support driver reports a fixed attached cable (IEC62196Type2Cable), the option is ignored with a warning and setting it at runtime is rejected. The connector type is only known once the board_support capabilities arrive, so the mode activates then; a runtime change made before that is accepted and, if the driver reports a fixed cable, ignored with a warning.

keep_cable_locked can be changed at runtime through the configuration service and is applied immediately without a restart.

keep_cable_locked_lock_delay_ms (default 500) sets the delay in milliseconds between detecting a plug and engaging the lock. It gives the plug time to seat fully before the lock pin extends, so a lock triggered on the first Proximity Pilot contact cannot jam a half-inserted plug. If the plug is pulled back out within the delay, no lock is engaged. Set it to 0 to lock immediately. The timer checks every 500 ms, so the effective delay is rounded up to the next multiple of 500 ms.

DC Configuration

In DC applications, the EvseManager still has an AC side that behaves similar to a normal AC charger. The board_support module therefore still has to report AC capabilities which refer to the AC input of the AC/DC power supply. If an AC side RCD is used it also belongs to the board_support driver. An AC side power meter can be connected and it will be used for Energy management.

In addition, on the DC side the following hardware modules can be connected:

  • A DC powermeter: This will be used for billing purposes if present. If not connected, billing will fall back to the AC side power meter.

  • Isolation monitoring: This will be used to monitor isolation during CableCheck, PreCharge and CurrentDemand steps.

  • DC power supply: This is the AC/DC converter that actually charges the car.

Software over-voltage supervision is always active during DC charging. The configuration option internal_over_voltage_duration_ms defines for how long the measured DC voltage must exceed the negotiated limit before EvseManager raises MREC5OverVoltage. Set it to 0 to trigger immediately once the threshold is crossed.

Published variables

session_events

EvseManager publishes the session_events variable whenever an event happens. It does not publish its internal state but merely events that happen that can be used to drive an state machine within another module.

Example: Write a simple module that lights up an LED if the evse is reserved. This module requires an EvseManager and subscribes to the session_events variable. Internally it has only two states: Reserved (LED on), NotReserved (LED off).

The state machine transitions are driven by the two events from EvseManager: ReservationStart and ReservationEnd.

All other events are ignored in this module as they are not needed.

powermeter

EvseManager republishes the power meter struct that if it has a powermeter connected. This struct should be used for OCPP and display purposes. It comes from the power meter that can be used for billing (DC side on DC, AC side on AC). If no powermeter is connected EvseManager will never publish this variable.

In DC charge mode, the car side power meter may publish its capabilities (minimum measurable currents, e.g. due to calibration law accuracy limits). These minimum currents are merged into the DC limits advertised to the EV over ISO 15118 (ChargeParameterDiscovery and mid-session limit updates), but they never affect internal power supply control such as cable check, precharge or setpoint clamping.

Charging State Machine

        stateDiagram-v2
    direction TB

    [*] --> Idle

    %% Enable / Disable
    Idle --> Disabled : disable
    Disabled --> Idle : enable

    %% Happy path
    Idle --> WaitingForAuthentication : EV plugged in
    WaitingForAuthentication --> PrepareCharging : Authorized
    PrepareCharging --> Charging : Contactor close allowed
    Charging --> StoppingCharging : Stop condition
    StoppingCharging --> Finished : Transaction end
    Finished --> Idle : EV unplugged

    %% Early exit / Errors
    WaitingForAuthentication --> Finished : Fatal error, stop requested, or EV unplugged
    PrepareCharging --> StoppingCharging : Fatal error, deauth, or EV unplugged

    %% Pauses
    Charging --> ChargingPausedEV : EV moves to state B
    ChargingPausedEV --> PrepareCharging : Power requested (BCB/Car)
    ChargingPausedEV --> ChargingPausedEVSE : No power (AC BASIC)
    ChargingPausedEV --> StoppingCharging : Deauth or unplugged

    ChargingPausedEVSE --> PrepareCharging : Power available / Errors cleared
    ChargingPausedEVSE --> StoppingCharging : Deauth or unplugged

    %% Post-Stop logic
    StoppingCharging --> ChargingPausedEV : EV-initiated pause
    

State Transitions

Basic Flow

  • Idle -> WaitingForAuthentication: EV plugged in.

  • WaitingForAuthentication -> PrepareCharging: Authorized by EIM or PnC.

  • WaitingForAuthentication -> Finished: Fatal error, stop requested (e.g. via request_stop_transaction or disable), or EV unplugged.

  • PrepareCharging -> Charging: Contactor close allowed.

  • Charging -> StoppingCharging: Triggered by any Stop Condition (see below).

  • StoppingCharging -> Finished: No transaction, EV unplugged, or not authorized.

  • Finished -> Idle: EV unplugged.

Pause & Resume

  • ChargingPausedEV -> PrepareCharging: BCB toggle or CarRequestedPower.

  • ChargingPausedEV -> ChargingPausedEVSE: No power available (AC BASIC only).

  • ChargingPausedEVSE -> PrepareCharging: Power available, no EVSE pause and errors cleared.

  • StoppingCharging -> ChargingPausedEV: EV-initiated pause after stop sequence.

ISO 15118-20 EVSE pause

An EVSE pause of an ISO 15118-20 session follows the control mode the EV selected:

  • Dynamic control mode: the SECC may only ask for a pause at 0 kW ([V2G20-2115]). StoppingCharging ramps the DC setpoint down at 100 A/s while the charge loop continues, requests the pause once the measured output current is below 1 A and keeps the setpoint at 0 A until the EV has paused. A ramp that does not reach 0 A within 35 s ends in the hard stop.

  • Scheduled control mode: a pause may only be notified while the applied entry of the EV’s power profile is 0 kW ([V2G20-1198]). The pause is requested from Charging, the HLC stack holds the notification back and publishes pause_notified once it has gone out; charging continues until then. A resume in between withdraws the request.

Once notified the EV has NotificationMaxDelay, fixed at 60 s ([V2G20-1850]), to pause; StoppingCharging waits 65 s before the hard stop.

Stop Conditions

The transition Charging -> StoppingCharging occurs if:
  • Fatal error

  • Deauthorization

  • EVSE pause requested (ISO 15118-20 scheduled control mode: once notified to the EV)

  • EV unplugged

  • IEC contactor opened

  • No power available (Immediate for AC BASIC; timeout for HLC).

Note

Transient helper states (T_step_EF, T_step_X1, and SwitchPhases) are omitted for readability. Transitions passing through these are shown as direct arrows.

Session Events

These are the SessionEvent values published by the EvseManager with respect to the state machine states and transitions.

State / Transition

Event

Trigger

Disabled

Disabled

On entry

Idle

Enabled

When EVSE is enabled via enable_disable()

WaitingForAuthentication

SessionStarted

On entry (new session)

WaitingForAuthentication

AuthRequired

On entry

WaitingForAuthentication

Authorized

When authorize() is called externally

WaitingForAuthentication

TransactionStarted

After auth is accepted, just before leaving state

PrepareCharging

PrepareCharging

On entry

Charging

ChargingStarted

On entry

ChargingPausedEV

ChargingPausedEV

On entry

ChargingPausedEVSE

ChargingPausedEVSE

When the set of pause reasons changes

StoppingCharging

StoppingCharging

On entry

Finished

ChargingFinished

On entry (if transaction was active)

Finished

TransactionFinished

On entry (if transaction was active)

Finished -> Idle

SessionFinished

When EV unplugs and stop_session() is called

Authentication

The Auth modules validates tokens and assignes tokens to EvseManagers, see Auth documentation. It will call Authorize(id_tag, pnc) on EvseManager to indicated that the EvseManager may start the charging session. Auth module may revoke authorization (withdraw_authorization command) if the charging session has not begun yet (typically due to timeout), but not once charging has started.

Autocharge / PnC

Autocharge is fully supported, PnC support is coming soon and will use the same logic. The car itself is a token provider that can provide an auth token to be validated by the Auth system (see Auth documentation for more details). EvseManager provides a token_provider interface for that purpose.

If external identification (EIM) is used in HLC (no PnC) then Autocharge is enabled by connecting the token_provider interface to Auth module. When the car sends its EVCCID in the HLC protocol it is converted to Autocharge format and published as Auth token. It is based on the following specification:

https://github.com/openfastchargingalliance/openfastchargingalliance/blob/master/autocharge-final.pdf

To enable PnC the config option payment_enable_contract must be set to true. If the car selects Contract instead of EIM PnC will be used instead of Autocharge.

Some EVs use PnC for the authorization only and never enter the HLC charging loop: they close the TCP connection or send a SessionStop afterwards and expect basic charging. EvseManager keeps the 5 % duty cycle (or X1 after an X1 start) and the session until the data link ends, which the ISO 15118 stack bounds with V2G_SECC_Sequence_Timeout. The end of the link then switches to the nominal duty cycle with the authorization kept: through X1 and E/F for a lost link (D-LINK_ERROR, [V2G3-M07-04], [V2G3-M07-05]), through E/F for a SessionStop(Terminate). In X1 without a data link, e.g. once the matching retries are exhausted, a PnC authorization switches to the nominal duty cycle directly.

Reservation

Reservation handling logic is implemented in the Auth module. If the Auth module wants to reserve a specific EvseManager (or cancel the reservation) it needs to call the reserve/cancel_reservation commands. EvseManager does not check reservation id against the token id when it should start charging, this must be handled in Auth module. EvseManager only needs to know whether it is reserved or not to emit an ReservatonStart/ReservationEnd event to notify other modules such as OCPP and API or e.g. switch on a specific LED signal on the charging port.

Energy Management

EvseManager seamlessly intergrates into the EVerest Energy Management. For further details refer to the documentation of the EnergyManager module.

EvseManager has a grid facing Energy interface which the energy tree uses to provide energy for the charging sessions. New energy needs to be provided on regular intervals (with a timeout).

If the supplied energy limits time out, EvseManager will stop charging. This prevents e.g. overload conditions when the network connection drops between the energy tree and EvseManager.

EvseManager will send out its wishes at regular intervals: It sends a requested energy schedule into the energy tree that is merged from hardware capabilities (as reported by board_support module), EvseManager module configuration settings (max_current, three_phases) and external limts (via set_external_limits command) e.g. set by OCPP module.

Note that the set_external_limits should not be used by multiple modules, as the last one always wins. If you have multiple sources of exernal limits that you want to combine, add extra EnergyNode modules in the chain and feed in limits via those.

The combined schedule sent to the energy tree is the minimum of all energy limits.

After traversing the energy tree the EnergyManager will use this information to assign limits (and a schedule) for this EvseManager and will call enforce_limits on the energy interface. These values will then be used to configure PWM/DC power supplies to actually charge the car and must not be confused with the original wishes that were sent to the energy tree.

The EvseManager will never assign energy to itself, it always requests energy from the energy manager and only charges if the energy manager responds with an assignment.

Limits in the energy object can be specified in ampere (per phase) and/or watt. Currently watt limits are unsupported, but it should behave according to that logic:

If both are specified also both limits will be applied, whichever is lower. With DC charging, ampere limits apply to the AC side and watt limits apply to both AC and DC side.

Energy Management: 1ph/3ph switching

EVerest has support for switching between 1ph and 3ph configurations during AC charging (e.g. for solar charging when sometimes charging with less then 4.2kW (6A*230V*3ph) if desired).

Be warned: Some vehicles (such as first generation of Renault Zoe) may be permanently damaged when switching from 1ph to 3ph during charging. Use at your own risk!

To use this feature several things need to be enabled:

  • In EvseManager, adjust two config options to your needs: switch_3ph1ph_delay_s, switch_3ph1ph_cp_state

  • In the BSP driver, set supports_changing_phases_during_charging to true in the reported capabilities. If your bsp hardware detects e.g. the Zoe, you can set that flag to false and publish updated capabilities any time.

  • BSP driver capabilities: Also make sure that minimum phases are set to one and maximum phases to 3

  • BSP driver: make sure the ac_switch_three_phases_while_charging command is correctly implemented

  • EnergyManager: Adjust switch_3ph1ph_while_charging_mode, switch_3ph1ph_max_nr_of_switches_per_session, switch_3ph1ph_switch_limit_stickyness, switch_3ph1ph_power_hysteresis_W, switch_3ph1ph_time_hysteresis_s config options to your needs

If all of this is properly set up, the EnergyManager will drive the 1ph/3ph switching. In order to do so, it needs an (external) limit to be set. There are two options: The external limit can be in Watt (not in Ampere), even though we are AC charging. This is the preferred option as it gives the freedom to the EnergyManager to decide when to switch. The limit can come from OCPP schedule or e.g. via an additional EnergyNode.

The second option is to set a limit in Ampere and set a limitation on the number of phases (e.g. min_phase=1, max_phase=1). This will enforce switching and can be used to decide the switching time externally. EnergyManager does not have the freedom to make the choice in this case.

Take care especially with the power(watt) and time based hysteresis settings. They should be adjusted to the actual use case to avoid relays wearing due too a lot of switching cycles. Consider also to limit the maximum number of switching cycles per charging session.

DER (grid support) advertising

EvseManager exposes a set_der_available command that records, per EVSE, whether DER directive support (a grid_support provider) is wired for that EVSE. This is a boot-time fact asserted by whichever module provides the grid_support connection (the OCPP module is one such provider, asserting it from the presence of a grid_support connection); the EV’s runtime DER capability is never sent here.

Whether DER is available and which ISO 15118-20 AC DER annex the EVSE speaks are separate axes. The annex is a static per-EVSE choice made with the iso15118_der_flavor config option: NONE (the default, no AC DER advertised), IEC (Annex L, AC_DER_IEC) or SAE (Annex M, AC_DER_SAE). The two annexes are mutually exclusive per EVSE, so AC DER is opt-in even where DER availability is asserted.

When DER is available, the EVSE is export-capable (its hardware capabilities report a non-zero export current and at least one export phase) and a flavor is configured, EvseManager folds that one AC DER energy transfer mode into the set it advertises, never both. This is in addition to AC_BPT (advertised whenever supported_iso_ac_bpt is set and the EVSE is export-capable). ISO 15118-20 has no combined AC_BPT_DER service category, so “AC_BPT_DER supported” is conveyed by advertising both AC_BPT and the configured AC DER mode as separate energy transfer modes; the EV selects one per session.

The flavor is matched exactly. An unrecognized value advertises no AC DER and logs a warning naming it, a branch normally unreachable because the manifest enum is validated at config load.

Configuring SAE is necessary but not sufficient. The Evse15118D20 module withholds the SAE DER limits until AC parameters carrying a positive nominal frequency and a positive nominal voltage arrive, and the library then strips AC_DER_SAE from the advertised services. Neither value has a fallback. It is self-correcting, since the limits are derived again on every change to the energy services, the AC limits or the AC parameters, so an operator configuring SAE may briefly see no DER service advertised.

The command returns NoHlc when no HLC is enabled for the EVSE (and does nothing), and Accepted otherwise.

Nominal grid frequency

ac_nominal_frequency (default 50) is passed to the HLC stack on every AC parameters update. Informational for plain AC and AC_BPT. For AC DER it is advertised at ChargeParameterDiscovery as the mandatory GridNominalFrequency the EV adopts as the frequency of the grid it is connecting to, so it must match the installation.

It is not a denormalization base. The frequency-trip curves and the enter-service band are in absolute Hz and are not scaled by it, unlike the voltage curves, which are a percentage of the nominal voltage. Changing it from 50 to 60 moves no frequency threshold; the default grid code carries 50 Hz-family constants, so a 60 Hz operator supplying a real setup config must supply 60 Hz curve values with it.

It is also load-bearing: the SAE DER limits are only derived once a positive nominal frequency and a positive nominal voltage have arrived, as described above.

CP state in packet captures

debug_emit_cp_state_hpav_frames is a debugging aid, off by default. When set to true, the EvseManager sends a HomePlug AV STP_CPSTATE.IND vendor MME (ethertype 0x88E1, ST/IoTecha OUI 00:80:E1) on debug_cp_state_hpav_device each time the CP state reported by the board support module or the PWM duty cycle commanded to it changes. Wireshark decodes the frame natively as CP State Change: B, 5%. The dsV2Gshark plugin additionally derives the X1/X2 sub-state and the AC current limit from it and plots the CP state in its I/O graph. Capturing on the PLC modem interface therefore shows CP transitions interleaved with the SLAC and ISO 15118 traffic.

The frame carries the CP state, the duty cycle in percent (100 while no PWM is generated, i.e. in X1 and in states E and F), 1000 Hz while PWM is active and a nominal CP voltage for the state (12, 9, 6 and 3 V for A to D, 0 V for E and F). It is sent unicast from the interface’s own MAC address to the local modem address 00:b0:52:00:00:01, the destination used by the dSPACE reference captures shipped with dsV2Gshark.

Sending raw Ethernet frames requires the CAP_NET_RAW capability. Without it the module logs a warning at startup and charges normally, but no frames are sent. Grant it in the configuration:

evse_manager:
  module: EvseManager
  capabilities:
    - CAP_NET_RAW
  config_module:
    debug_emit_cp_state_hpav_frames: true
    debug_cp_state_hpav_device: eth1

Do not enable this option in production.

Error Handling

The control flow of this module can be influenced by the error implementation of its requirements. This section documents the side effects that can be caused by errors raised by a requirement.

This module subscribes to all errors of the following requirements:

  • evse_manager

  • evse_board_support

  • connector_lock

  • ac_rcd

  • isolation_monitor

  • power_supply_DC

  • powermeter (if the config option fail_on_powermeter_errors is set true)

A raised error can cause the EvseManager to stop the charging session and become inoperative. Charging is not possible until the error is cleared. If no charging session is currently running, it will prevent sessions from being started. If a charging session is currently running and an error is raised this will interrupt the charging session.

Almost all errors that are reported from the requirements of this module cause the EvseManager to become Inoperative until the error is cleared. The following sections provide an overview of the errors that do not cause the EvseManager to become Inoperative.

evse_manager

  • evse_manager/Inoperative

  • evse_manager/MREC11CableCheckFault

evse_board_support

  • evse_board_support/MREC3HighTemperature

  • evse_board_support/MREC18CableOverTempDerate

  • evse_board_support/VendorWarning

connector_lock

  • connector_lock/VendorWarning

ac_rcd

  • ac_rcd/VendorWarning

isolation_monitor

  • isolation_monitor/VendorWarning

power_supply_DC

  • power_supply_DC/VendorWarning

powermeter

Powermeter errors cause the EvseManager to become Inoperative, if fail_on_powermeter_errors is configured to true. If it is configured to false, errors from the powermeter will not cause the EvseManager to become Inoperative.

  • powermeter/CommunicationFault

  • powermeter/VendorError

Note that powermeter/VendorWarning is explicitly ignored by the EvseManager’s inoperative logic (similar to other VendorWarning errors) and will not block charging even if fail_on_powermeter_errors is set to true. It should be used to signal non-fatal conditions such as high temperature warnings from the powermeter.

When a charging session is stopped because of an error, the EvseManager differentiates between Emergency Shutdowns and Error Shutdowns. The severity of the error influences the type of the shudown. Emergency shutdowns are caused by errors with Severity::High and error shutdowns are caused by errors with Severity::Medium or Severity::Low.

In case of an Emergency Shutdown the EvseManager will immediately:

  • Signal PWM state F if HLC is not active

  • Turn off the PWM

  • Turn off the DC power supply in case of DC

  • Signal to open the contactor

In case of an Error Shutdown the EvseManager will:

  • Signal PWM state F if HLC is not active

  • Keep the PWM on if HLC is active

  • Turn off the DC power supply in case of DC

  • Signal to open the contactor

  • Report the error via HLC to the EV (if HLC active)

Auto-Generated Reference

Module Configuration

connector_id: integer <required>
ID of this EVSE within the charging station, according to the 3-tier model of OCPP (charging station > EVSE > connector). The parameter is named connector_id for backwards compatibility reasons only; it does not identify a connector.
connector_type: string <optional>
default: “Unknown”
The connector type of this evse manager (/evse_manager#/ConnectorTypeEnum)
evse_id: string <optional>
default: “DE*PNX*E1234567*1”
EVSE ID that uniquely identifies this EVSE, e.g. DE*PNX*E1234567*1. It has a special format that includes the country code, the operator id and a power outlet id (eMI3 format, normatively specified in ISO 15118-2 Annex H) and is sent as the EVSEID field in ISO 15118 messages.
evse_id_din: string <optional>
default: “49A80737A45678”
EVSE ID used for DIN 70121 sessions (format according to DIN SPEC 91286, hexBinary-encoded), e.g. 49A80737A45678
payment_enable_eim: boolean <optional>
default: True
Set to true to enable EIM (e.g. RFID card or mobile app) authorization
payment_enable_contract: boolean <optional>
default: True
Set to true to enable contract (aka plug and charge) authorization
ac_nominal_voltage: number <optional>
default: 230
Nominal AC voltage between phase and neutral in Volt
ac_nominal_frequency: number <optional>
default: 50
Nominal AC grid frequency in Hz, normally 50 or 60. Advertised for ISO 15118-20 AC DER as the GridNominalFrequency the EV adopts, so it must match the installation. It does not scale the grid code frequency-trip curves, which are in absolute Hz.
ac_max_reactive_power: number <optional>
default: 0
Maximum EVSE reactive power in var; passed to the HLC stack as the AC_DER_IEC de-normalization base. 0 means the EVSE has no reactive-power capability.
ev_receipt_required: boolean <optional>
default: False
Unsupported: request receipt from EV with HLC
session_logging: boolean <optional>
default: False
Enable/Disable session log file output
session_logging_path: string <optional>
default: “/tmp”
Output directory for session log files
session_logging_xml: boolean <optional>
default: True
Log full XML messages for HLC
has_ventilation: boolean <optional>
default: True
Allow ventilated charging or not
charge_mode: string <optional>
default: “AC”
Select charging mode
enum:
- AC
- DC
supported_iso_ac_bpt: boolean <optional>
default: False
Set to true if ISO15118-20 AC BPT is supported and should be offered to the EV
iso15118_der_flavor: string <optional>
default: “NONE”
Which ISO 15118-20 Amendment 1 AC DER annex to advertise: IEC is Annex L, SAE is Annex M, NONE advertises neither. The two annexes are mutually exclusive per EVSE, so at most one AC DER energy transfer mode is ever advertised. Takes effect only when DER availability has been asserted for this EVSE and the EVSE is export-capable; SAE additionally needs the AC parameters. grid_support DER directives reach the IEC control functions only, so a SAE EVSE runs the inert default grid code.
enum:
- NONE
- IEC
- SAE
ac_hlc_enabled: boolean <optional>
default: False
Enable or disable HLC (aka ISO15118) for AC mode
ac_hlc_use_5percent: boolean <optional>
default: True
If set to true, start with 5% PWM if HLC is enabled on AC. If set to false, start with X1. Note that almost no EV will perform SLAC/HLC on X1. Recommendation is to set this to true.
ac_enforce_hlc: boolean <optional>
default: False
Combine with 5percent option to really enforce HLC even with EIM. ISO15118-3 forbids the usage of 5% if Auth happens before plugin, but most EVs will not perform HLC with nominal PWM. For the home use case (always authorized or auth before plugin) it may still be desirable to use HLC e.g. for better energy management. In this case you can use this option, but be aware that EVs that do not support HLC may take a long time to start (or never start) charging. This mode is not ISO15118-2/-3 compliant. Do not use for public charging stations.
ac_limit_slac_init_retries: boolean <optional>
default: True
Limit the SLAC matching retries as required by ISO15118-3. With 5% PWM ([V2G3-M06-07], Figure 9): if no SLAC request arrives within TT_EVSE_SLAC_init, the EVSE signals E/F for T_step_EF and returns to 5% PWM at most C_sequ_retry (2) times per plug-in. At the next timeout it signals E/F once more and keeps 5% off for the rest of the session: X1 while waiting for authorization (an EIM can still start basic charging), nominal PWM once authorized, also with ac_enforce_hlc. A running HLC session is not affected. Each retry is one error routine request from the SLAC module; with its reset_instead_of_fail option one request spans two TT_EVSE_SLAC_init. With nominal PWM or X1 ([V2G3-A09-13]), a failed matching is not retried and the PWM stays as it is. If false, every failed matching is retried with E/F until the EV is unplugged, also with nominal PWM.
ac_with_soc: boolean <optional>
default: False
Special mode that switches between AC and DC charging to get SoC percentage with AC charging
reinit_duration_ms: integer <optional>
default: 3000
Duration in milliseconds of the reinit state before going back to normal operation
reinit_method: string <optional>
default: “CPStateF”
Configures the control pilot behaviour during reinitialization of the connection to the EV. Reinitialization may be used to recover from an unsuccessful PLC link setup, wake up the EV, or switch between HLC and basic AC charging in AC with SoC mode.
CPStateE: set CP to state E (0 V) to simulate an unplug. This requires BSP support for CP state E.
CPStateF: set CP to state F (-12 V) to signal a temporary unavailability.
CPStateX1: keep CP powered with 100% duty cycle to signal that no energy is available.
enum:
- CPStateE
- CPStateF
- CPStateX1
internal_over_voltage_duration_ms: integer <optional>
default: 400
Time in milliseconds the internal software over voltage monitor waits before raising MREC5 once the measured voltage exceeds the negotiated limit.
dbg_hlc_auth_after_tstep: boolean <optional>
default: False
Special mode: send HLC auth ok only after t_step_XX is finished (true) or directly when available (false)
dc_isolation_voltage_V: integer <optional>
default: 0
Override DC voltage used to test isolation in CableCheck. Default is 0, which means the voltage will be determined according to IEC 61851-23 (2023) CC.4.1.2
cable_check_wait_number_of_imd_measurements: integer <optional>
default: 1
Amount of isolation measurement samples to collect before the value can be trusted. This does not average, it will evaluate the last measurement. Some IMDs (e.g. from Bender) need to measure for 10s to really get a trustable result. In this case, at 1 Hz sample rate, specify 10 samples here. If the self test includes the isolation resistance checking you may also set this to 0.
cable_check_enable_imd_self_test: boolean <optional>
default: True
Enable self testing of IMD in cable check with the voltage calculated from ev_max_voltage and with relays closed. This is required e.g. for Bender IMDs which also perform an isolation measurement during the self test. A self test is required for IEC 61851-23 (2023) compliance.
cable_check_enable_imd_self_test_relays_open: boolean <optional>
default: False
Enable self testing of IMD at the beginning of cable check where the relays may still be open. The voltage is set by the cable_check_relays_open_voltage_V config option and may differ from the voltage that is later used to perform the isolation resistance sample. cable_check_wait_number_of_imd_measurements needs to be >=1 in this case as no isolation resistance checking can be performed at this stage. If both this option and cable_check_enable_imd_self_test are enabled, the selftest is started with relays open, but the result is captured later on, as it would be with the regular selftest sequence. In this case the powersupply will remain active and transition to the regular cable check voltage. A self test is required for IEC 61851-23 (2023) compliance.
cable_check_relays_open_voltage_V: integer <optional>
default: 48
Voltage to set for the self test using cable_check_enable_imd_self_test_relays_open option.
cable_check_relays_closed_timeout_s: integer <optional>
default: 5
Timeout in seconds to wait for the relays to close at the beginning of cablecheck. Normally they should be closed right away, but when cable_check_enable_imd_self_test_relays_open option, the relays may close may be delayed by the self test.
cable_check_wait_below_60V_before_finish: boolean <optional>
default: True
Switch off power supply and wait until output voltage drops below 60V before cable check is finished. Note: There are different versions of IEC 61851-23:2023 in the wild with the same version number but slightly different content. The IEC was correcting mistakes _after_ releasing the document initially without tagging a new version number. Some early versions require to wait for the output voltage to drop below 60V in CC.4.1.2 (last sentence). Later versions do not have that requirement. The later versions are correct and should be used according to IEC. Both settings (true and false) are compliant with the correct version of IEC 61851-23:2023. Set to true when:
- the power supply has no active discharge, and lowering the voltage with no load takes a very long time. In this case
this option usually helps to ramp the voltage down quickly by switching it off. It will be switched on again in precharge.
Also, some EVs switch their internal relay on at a too high voltage when the voltage is ramped down directly from cablecheck voltage to precharge voltage,
so true is the recommended default.
Set to false when:
- the power supply has active discharge and can ramp down quickly without a switch off (by just setting a lower target voltage).
This may save a few seconds as it avoids unnecessary voltage down and up ramping.
hack_skoda_enyaq: boolean <optional>
default: False
Skoda Enyaq requests DC charging voltages below its battery level or even below 0 initially. Set to true to enable dirty workaround.
hack_present_current_offset: integer <optional>
default: 0
Adds an offset [A] to the present current reported to the car on HLC. Set to 0 unless you really know what you are doing.
hack_pause_imd_during_precharge: boolean <optional>
default: False
Disable IMD at the end of CableCheck and re-enable when current is flowing in CurrentDemand. Some DCDC power supplies do not start current flow when insulation measurement is active. Set to true to enable dirty workaround for some IMD hardware.
hack_allow_bpt_with_iso2: boolean <optional>
default: False
Hack. Allow bidirectional power transfer with DIN spec and ISO-2. Currents communicated on HLC will always be positive but power supply may actually discharge the car.
hack_simplified_mode_limit_10A: boolean <optional>
default: False
Limit PWM to 10A if EV uses simplified charging mode. Set to false to be compliant with IEC61851-1:2019 section A.2.3. It is the responsibility of the EV to limit to 10A according to the norm. Enable this option to deviate from the norm and limit from the EVSE side.
autocharge_use_slac_instead_of_hlc: boolean <optional>
default: False
Use slac ev mac address for autocharge instead of EVCCID from HLC
enable_autocharge: boolean <optional>
default: False
Enables Autocharge (i.e. Mac address for authorization). Disabled by default as PnC should be used instead.
logfile_suffix: string <optional>
default: “session_uuid”
Use the string given for the log folder name. Special string session_uuid will be replaced with session uuid.
soft_over_current_tolerance_percent: number <optional>
default: 10.0
Allow for N percent over current in soft over current checking during AC charging.
soft_over_current_measurement_noise_A: number <optional>
default: 0.5
Set current measurement noise. Added to limit as an offset to avoid false triggers.
hack_fix_hlc_integer_current_requests: boolean <optional>
default: False
Some cars request only integer ampere values during DC charging. For low power DC charging that means that they charge a few hundred watts slower then needed. If enabled, this will charge at full power if the difference between EV requested current (integer) and HLC current limit is less then 1.0
disable_authentication: boolean <optional>
default: False
Do not wait for authorization from Auth module, offer a free service. Start charging immediately after plug in. Do not use with Auth manager or OCPP, this option is only to allow charging with a standalone EvseManager that is not connected to an Auth manager. Use DummyTokenProvider/Validator when testing with Auth module and/or OCPP.
sae_j2847_2_bpt_enabled: boolean <optional>
default: False
Enable SAE J2847 2 V2G or V2H mode
sae_j2847_2_bpt_mode: string <optional>
default: “V2G”
SAE J2847 2 BPT mode
enum:
- V2H
- V2G
request_zero_power_in_idle: boolean <optional>
default: False
“true: In Idle mode (no car connected) and while charging is paused by the EVSE for a user pause or an error, request 0A from” “energy management. In installations with many charging stations this should be set to allow the power to be distributed to the” “chargers that are connected to a car. A pause because of missing energy keeps requesting energy so that charging can resume.” “false: Request the normal current even if no car is connected. This speeds up the start of charging on AC BASIC charging as” “EvseManager does not need to wait for energy from the energy manager after plug in.”
external_ready_to_start_charging: boolean <optional>
default: False
Enable the external ready to start charging signal that delays charging ready until it has been received
uk_smartcharging_random_delay_enable: boolean <optional>
default: False
“true: enable random_delays on start up, false: disable random delays on startup.” “They can also be enabled/disabled during runtime on the random_delay implementation.”
uk_smartcharging_random_delay_max_duration: integer <optional>
default: 600
“Start up value for the maximum duration of a random delay.” “Can be modified during runtime on the random_delay implementation.”
uk_smartcharging_random_delay_at_any_change: boolean <optional>
default: True
“True: use random delays on any current change during charging. False: Only use if current is reduced to zero or increased from zero.”
initial_meter_value_timeout_ms: integer <optional>
default: 5000
This timeout in ms defines for how long the EvseManager waits for an initial meter value from a powermeter before it becomes ready to start charging. If configured to 0, the EvseManager will not wait for an initial meter value before it becomes ready to start charging.
switch_3ph1ph_delay_s: integer <optional>
default: 10
Wait for n seconds when switching between 3ph/1ph mode.
switch_3ph1ph_cp_state: string <optional>
default: “X1”
CP state to use for switching. WARNING: Some EVs may be permanently destroyed when switching from 1ph to 3ph. It is the responsibiltiy of the evse_board_support implementation to ensure the EV is capable of performing the switch. If it is not, the capabilities must set the supports_changing_phases_during_charging to false. Phase switching is only possible in basic charging mode.
enum:
- X1
- E
- F
soft_over_current_timeout_ms: integer <optional>
default: 7000
Allow for over current to be present for N ms in soft over current checking during AC charging.
soft_over_current_stale_data_warning_ms: integer <optional>
default: 5000
Diagnostics only: warn if the current measurements used for soft over current checking during AC charging have not been updated for more than N ms, which may indicate a frozen power meter or a broken communication link. The measurements are still used as-is. Increase this value for power meters with slow update intervals. Set to 0 to disable the warning.
lock_connector_in_state_b: boolean <optional>
default: True
Indicates if the connector lock should be locked in state B. If set to false, connector will remain unlocked in CP state B and this violates IEC61851-1:2019 D.6.5 Table D.9 line 4 and should not be used in public environments! This feature is deprecated.
unlock_when_deauthorized: boolean <optional>
default: False
Indicates if the connector lock should be locked in state B/C regardless of if a user authorized. If set to true, connector will remain unlocked in CP state B/C if the relays are open and no user is authorized. This violates IEC61851-1:2019 D.6.5 Table D.9 line 4 and should not be used in public environments!
keep_cable_locked: boolean <optional>
default: False
Captive cable mode for AC sockets with a connector lock (fleet/private use): keep the cable locked in the socket whenever a plug is present, in every CP state - including state A with no EV attached. The only way to unlock is the force_unlock command (e.g. triggered by OCPP UnlockConnector); the connector then stays unlocked until the cable is removed, and the next plug insertion locks it again. An engaged lock is latched: losing plug presence without a preceding force_unlock (e.g. the PP contact opening while the plug is pulled against the lock pin) does not release it. Takes precedence over lock_connector_in_state_b and unlock_when_deauthorized. Can be changed at runtime via the configuration service (applied immediately, no restart required). Requires a BSP that publishes ac_pp_ampacity on every change, also outside of charging sessions, and once at startup with the current value (only needed when this option is used). Only applies to AC sockets with a connector lock: ignored with charge_mode other than AC, without a connector lock or when the BSP reports a fixed attached cable, and setting it at runtime is then rejected (a fixed cable is only known once the BSP capabilities arrived; the mode activates then). The normal locking rules still apply on top of it.
mutability:ReadWrite
keep_cable_locked_lock_delay_ms: integer <optional>
default: 500
Captive cable mode only: delay in milliseconds between detecting a plug (ac_pp_ampacity becomes non-zero) and engaging the connector lock. Gives the plug time to seat fully before the lock pin extends, so a lock triggered on the first Proximity Pilot contact cannot jam a half-inserted plug. If the plug is pulled back out again within the delay, no lock is engaged. Set to 0 to lock immediately. The effective delay is rounded up to the next multiple of 500 ms (timer resolution).
state_F_after_fault_ms: integer <optional>
default: 300
Set state F after any fault that stops charging for the specified time in ms while in Charging mode (CX->F(300ms)->C1/B1). When a fault occurs in state B2, no state F is added (B2->B1 on fault). Some (especially older hybrid vehicles) may go into a permanent fault mode once they detect state F, in this case EVerest cannot recover the charging session if the fault is cleared. In this case you can set this parameter to 0, which will avoid to use state F in case of a fault and only disables PWM (C2->C1) while switching off power. This will violate IEC 61851-1:2017 however. The default is 300ms as the minimum suggested by IEC 61851-1:2017 Table A.5 (description) to be compliant. This setting is only active in BASIC charging mode.
fail_on_powermeter_errors: boolean <optional>
default: True
Set the EVSE Manager to an inoperative state if the powermeter requirement is configured and has reported errors
raise_mrec9: boolean <optional>
default: False
Allows to configure if an MREC9 authorization timeout error shall be raised by this module in case an authorization timeout occurs. It is recommended to disable it if OCPP1.6 is used.
sleep_before_enabling_pwm_hlc_mode_ms: integer <optional>
default: 500
Sleep before the PWM signal is updated in HLC mode. Teslas are really fast with sending the first slac packet after enabling PWM, so the sleep allows SLAC to be ready for it. Some EV testers have issues with a value >= 1000ms, although ISO15118 or IEC61851 does not specify a timeout.
central_contract_validation_allowed: boolean <optional>
default: False
Used for ISO15118 plug and charge: If false, contract shall not be present in PaymentOptionList. If true, contract may be present in PaymentOptionList if TLS is used.
contract_certificate_installation_enabled: boolean <optional>
default: True
Used for ISO15118 plug and charge: Indicates if the charger supports contract CertificateInstall and CertificateUpdate
inoperative_error_use_vendor_id: boolean <optional>
default: False
When raising evse_manager/Inoperative use the vendor ID from the original cause
voltage_plausibility_max_spread_threshold_V: number <optional>
default: 50.0
Maximum allowed spread (max-min) in volts between voltage measurements from different sources (power supply, powermeter, isolation monitor, over voltage monitor) before a voltage plausibility fault is triggered. During DC charging, if the spread exceeds this threshold for the configured duration, a fault is raised.
voltage_plausibility_fault_duration_ms: integer <optional>
default: 30000
Duration in milliseconds for which the spread must exceed the threshold before a voltage plausibility fault is raised. A duration of 0 ms means that a fault will be raised immediately when the threshold is exceeded.
session_id_type: string <optional>
default: “UUID”
Type to use for generation of session ids. UUID: 36 characters UUIDs UUID_BASE64: 22 characters base64 encoded uuids SHORT_BASE64: 16 characters base64 encoded ids
enum:
- UUID
- UUID_BASE64
- SHORT_BASE64
zero_power_ignore_pause: boolean <optional>
default: True
If no energy is available the charger can signal a pause to the car before cable check. With this option the charger ignores that and continues as if energy were available. This is not standard compliant! As of today most EVs do not handle the pause signal correctly causing the session to be terminated and not allowing to start charging again when energy is available. The default of this value is true, allowing the session to proceed until the charge loop. Terminating the session in the charge loop when no energy is available is handled more gracefully by most EVs and allows to start charging again when energy is available without the need of unplugging and plugging again.
zero_power_allow_ev_to_ignore_pause: boolean <optional>
default: False
If no energy is available the charger can signal a pause to the car before cable check. With this option, the charger ignores that the ev goes to the energy phase instead of pausing the session. This is not standard compliant!
bpt_channel: string <optional>
default: “None”
Type of installed/uninstalled power transfer channel
enum:
- None
- Unified
- Separated
bpt_generator_mode: string <optional>
default: “None”
Power converter behavior
enum:
- None
- GridFollowing
- GridForming
bpt_grid_code_island_method: string <optional>
default: “None”
Active/inactive islanding detection method. Only for AC.
enum:
- None
- Active
- Passive
hlc_charge_loop_without_energy_timeout_s: integer <optional>
default: 5
Timeout (s) to allow HLC charge loop to continue without available energy; when exceeded, the HLC session is stopped and PWM is disabled until energy returns. If set too long, some EVs stop the session on their own. Then it cannot be resumed when energy is available again.
dc_ramp_ampere_per_second: integer <optional>
default: 25
Maximum ampere per second limit for up/down ramping of current in charging loop.
enable_nodered_interface: boolean <optional>
default: False
Enable the external MQTT interface to the Node-RED debug UI (topics below everest_external/nodered/<connector_id>/). This publishes powermeter and state updates and subscribes to UI commands (enable/disable/pause/resume/phase switch). Only needed when the Node-RED simulation/debug UI is used.
phase_rotation_grid_side: string <optional>
default: “RST”
Corrects for a physical L1/L2/L3 wiring rotation at the grid side powermeter by remapping its per-phase voltage/current/power/energy/VAR values before they are used in energy_flow_request.energy_usage_root. RST means no rotation, i.e. reported L1/L2/L3 already matches grid L1/L2/L3. STR means reported L1 is grid L2, reported L2 is grid L3, reported L3 is grid L1. TRS means reported L1 is grid L3, reported L2 is grid L1, reported L3 is grid L2.
enum:
- RST
- STR
- TRS
debug_emit_cp_state_hpav_frames: boolean <optional>
default: False
Debugging aid. Emit a HomePlug AV STP_CPSTATE.IND frame (ethertype 0x88E1, ST/IoTecha vendor MME) on debug_cp_state_hpav_device whenever the measured CP state or the commanded PWM duty cycle changes. Wireshark and the dsV2Gshark plugin decode these frames, so a packet capture of the PLC interface shows the CP state next to SLAC and ISO 15118 traffic. Sending raw Ethernet frames needs the CAP_NET_RAW capability for this module. Do not enable in production.
debug_cp_state_hpav_device: string <optional>
default: “”
Network interface the CP state frames are sent on when debug_emit_cp_state_hpav_frames is true, typically the PLC modem interface also used by the SLAC module.

Provides

This is the main evsemanager interface
energy_grid: energy
This is the tree leaf interface to build the energy supply tree
token_provider: auth_token_provider
Provides authtokens for autocharge or plug and charge
random_delay: uk_random_delay
Provides control over UK smart charging regulation random delay feature
dc_external_derate: dc_external_derate
Provides DC external derating capabilities

Requirements

ac_rcd: ac_rcd 0..1
connector_lock: connector_lock 0..1
powermeter_grid_side: powermeter 0..1
powermeter_car_side: powermeter 0..1
slac: slac 0..1
over_voltage_monitor: over_voltage_monitor 0..1
powersupply_DC: power_supply_DC 0..1
store: kvs 0..1

Metadata

Authors

Cornelius Claussen
Anton Woellert

License