OCPPmulti

A OCPP charge point / charging station module, (supporting 1.6, 2.0.1, 2.1)

Handwritten Documentation

A OCPP charge point / charging station module, (supporting 1.6, 2.0.1, 2.1)

Requires: grid_support

Interface: grid_support

This optional requirement (0-128) connects the module to per-EVSE DER devices (inverter / grid-support hardware abstraction) implementing the grid_support interface, exposing the OCPP 2.1 DER / grid-code functional block (block R). DER is an OCPP 2.x-only feature: when the active protocol is OCPP 1.6, any wired grid_support connection is inert. One connection represents one EVSE and is routed by its framework mapping: the connection whose mapping names an EVSE serves that EVSE. A connection without a mapping is a configuration error and is excluded from routing.

The module maintains a per-EVSE snapshot of the DER directives currently applied by the CSMS and pushes it to that EVSE’s connection through the set_active_directives command. When libocpp applies, schedules, clears, supersedes, or expires a DER control, the snapshot is rebuilt and re-sent for every registered EVSE on its own connection.

At startup the module pre-provisions an ACDERCtrlr or DCDERCtrlr device-model component (chosen by the EVSE’s energy-transfer modes) for every DER-capable EVSE, so no static device-model JSON is required for the DER controllers. Any EVSE without a wired grid_support connection has its DER controller forced to Available="false" (preserving a CSMS-written "false" and its source), so the CSMS does not see DER as available after the wiring is removed.

The device declares its inverter capability through the capability variable. The module stores the capability, writes its config variables (ModesSupported and the DC nameplate values) through the device model, and republishes the current active directives filtered to the declared control types. If the device model rejects a capability re-report, the module rolls back to the last accepted capability; an EVSE whose very first capability is rejected is unregistered.

The CSMS may write the Enabled variable (ReadWrite). Writing Enabled="false" makes the module push an empty directive replacement set to that EVSE, so the device clears the EV’s curves; writing Enabled="true" republishes the filtered active set for that EVSE. A CSMS-written Enabled persists across reboots and is restored at boot.

The device reports grid event faults through the alarm variable, forwarded to the CSMS as a NotifyDERAlarm.req. Alarms raised before the backend has accepted a capability for any EVSE are buffered and delivered once the first capability is accepted; if no capability is ever accepted, the buffered alarms are dropped. Capability and alarm updates received before the charge point is initialized are queued and replayed once the charge point is ready.

In addition to enabling the DER device-model component, the module asserts DER availability to the matching EvseManager via its set_der_available command, so that EvseManager can advertise the corresponding ISO 15118-20 DER energy transfer modes. If the device model rejects the capability, DER availability is withdrawn instead.

The configuration parameter GridSupportHeartbeatS sets the interval (in seconds) at which the current active directive set is re-sent for every registered EVSE. A value of 0 disables the heartbeat; the set is then sent only when it changes.

Auto-Generated Reference

ChargePointConfigPath: string <optional>
default: “ocpp-config.json”
OCPP 1.6 Path to the ocpp configuration file. Libocpp defines a JSON schema for this file. Please refer to the documentation of libocpp for more information about the configuration options.
CompositeScheduleIntervalS: integer <optional>
default: 30
OCPP 1.6 (called PublishChargingScheduleIntervalS) OCPP 2.0.1 Interval in seconds in which composite schedules are received from libocpp are be published over MQTT and signalled to connected modules. If the value is set to 0, composite schedules are only published when changed by CSMS
CoreDatabasePath: string <optional>
default: “/tmp/ocpp201”
OCPP 2.0.1 Path to the persistent SQLite database directory. Please refer to the libocpp documentation for more information about the database and its structure.
CustomMrecErrorMapPath: string <optional>
default: “”
Optional path to a JSON file mapping EVerest error types to OCPP techCodes. Entries overwrite the built-in defaults. Leave empty to use only the defaults.
DatabasePath: string <optional>
default: “/tmp/ocpp_1_6_charge_point”
OCPP 1.6 Path to the persistent SQLite database directory. Please refer to the libocpp documentation for more information about the database and its structure.
DelayOcppStart: integer <optional>
default: 0
OCPP 1.6 OCPP 2.0.1 Small delay in time (milliseconds) to start the ocpp chargepoint to allow time for the rest of everest to update the connector status. This is only used to prevent issues from passing by availlable before preparing on a restart.
DeviceModelConfigPath: string <optional>
default: “component_config”
OCPP 2.0.1 Path to the device model component config directory. Libocpp defines a certain schema for these files. Please refer to the documentation of libocpp for more information about the configuration options.
DeviceModelDatabasePath: string <optional>
default: “device_model_storage.db”
OCPP 1.6 (called DatabasePath) OCPP 2.0.1 Path to the SQLite database for the device model
DeviceModelDatabaseMigrationPath: string <optional>
default: “device_model_migrations”
OCPP 2.0.1 Path to the migration files for both device models
EnableLegacyConfigMigration: boolean <optional>
default: False
OCPP 1.6 If true, a one-time migration of the legacy OCPP 1.6 JSON config (ChargePointConfigPath) into the device model database is performed on the first startup, while the database does not yet exist. Once the database is initialized the migration is skipped and the legacy JSON is not read. If false (default), the device model is initialized only from the component configs (DeviceModelConfigPath).
DeviceModelConfigMappings: string <optional>
default: “”
OCPP 1.6 Optional path to a YAML file with custom OCPP1.6 to device model component-config mappings. Relative paths are resolved against this module’s share path. Applied both when migrating the legacy OCPP 1.6 JSON config into the device model and when serving the device-model-backed configuration at runtime. If empty, only built-in mappings are used.
EnableExternalWebsocketControl: boolean <optional>
default: False
If true websocket can be disconnected and connected externally. This parameter is for debug and testing purposes.
EverestDeviceModelDatabasePath: string <optional>
default: “everest_device_model_storage.db”
OCPP 2.0.1 Path to the SQLite databse for the EVerest device model. This database stores components and variables like EVSE and Connector that are closely related to EVerest and therefore not owned and managed by libocpp.
GridSupportHeartbeatS: integer <optional>
default: 60
Interval (seconds) at which the current active DER directive set is republished per EVSE. 0 disables the heartbeat.
MessageLogPath: string <optional>
default: “/tmp/everest_ocpp_logs”
OCPP 1.6 OCPP 2.0.1 Path to directory where logs of all OCPP messages are written to
MessageQueueResumeDelay: integer <optional>
default: 0
OCPP 1.6 OCPP 2.0.1 Time (seconds) to delay resuming the message queue after reconnecting. This parameter was introduced because some OCTT test cases require that the first message after a reconnect is sent by the CSMS.
Mode: string <optional>
default: “Only2”
OCPP 1.6 OCPP 2.0.1 The operational mode of the module
enum:
- Prefer1.6
- Prefer2
- Only1.6
- Only2
Ocpp16NetworkConfigSlot: integer <optional>
default: 1
OCPP 1.6 NetworkConfiguration slot number that OCPP 1.6 connection details (CentralSystemURI, SecurityProfile, AuthorizationKey, HostName, ChargePointId) are migrated to during the one-time device model migration. Any existing attribute values in the target slot are overwritten. Set to 0 to skip migration of network connection details entirely.
RequestCompositeScheduleDurationS: integer <optional>
default: 600
OCPP 1.6 (called PublishChargingScheduleDurationS) OCPP 2.0.1 Time (seconds) for which composite schedules are requested. Schedules are requested from now until now + RequestCompositeScheduleDurationS
RequestCompositeScheduleUnit: string <optional>
default: “A”
OCPP 1.6 OCPP 2.0.1 Unit in which composite schedules are requested and shared within EVerest. It is recommended to use Amps for AC and Watts for DC charging stations. Allowed values:
- ‘A’ for Amps
. ‘W’ for Watts
ResetStopDelay: integer <optional>
default: 0
OCPP 1.6 OCPP 2.0.1 Time (seconds) to delay the stopping of the charge point so that the CSMS has enough time to respond to the charge point’s last messages before resetting.
UserConfigPath: string <optional>
default: “user_config.json”
OCPP 1.6 Path to the file of the OCPP user config. The user config is used as an overlay for the original config defined by the ChargePointConfigPath. Any changes to configuration keys turned out internally or by the CSMS will be written to the user config file.
auth_validator: auth_token_validator
Validates the provided token using CSMS, AuthorizationList or AuthorizationCache
auth_provider: auth_token_provider
Provides authorization requests by CSMS
data_transfer: ocpp_data_transfer
OCPP data transfer towards the CSMS
ocpp_generic: ocpp
Generic OCPP interface.
session_cost: session_cost
Send session cost
auth: auth 1
charger_information: charger_information 0..1
data_transfer: ocpp_data_transfer 0..1
display_message: display_message 0..1
evse_energy_sink: external_energy_limits 0..129
evse_manager: evse_manager 1..128
extensions_15118: iso15118_extensions 0..128
grid_support: grid_support 0..128
reservation: reservation 0..1
security: evse_security 1
system: system 1

Metadata

Piet Gömpel
Kai-Uwe Hermann
James Chapman