Changelog¶
All notable changes to SME OCPPSim are documented in this file. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]¶
Added¶
- Retry limits:
csms_defaults.reconnect.max_retries(consecutive failed connections) and the charger fieldboot_max_retries(non-Accepted BootNotification answers, Pending included). Both default tonull(unlimited). At the limit the charger stops, the UI shows a Gave up badge (snapshotgave_up,last_errorkindretries_exhausted), and only Connect starts it again. - New handshake error kind
client_cert_required: a TLS connection closed right after the handshake, or an nginx HTTP 400 "SSL certificate" page, while no client certificate is configured. It raises no FailedToAuthenticateAtCsms security event and triggers no certificate fallback. - Charger block
meter:(simulator options):begin_end_messages(1.6 MeterValuesTransaction.Begin/Transaction.End),phase_values(off/L-N/L-L: Voltage and Current.Import per phase withphase),post_tx_delay_s(delay before StopTransaction /Ended) andtx_data_max_samples(cap of the sampled and of the clock-aligned readings kept for one transaction, default 1000, one warning on overflow). - OCPP 2.0.1:
SampledDataCtrlr.TxEndedIntervalis ReadWrite; newAlignedDataCtrlr.TxEndedIntervalandAlignedDataCtrlr.TxEndedMeasurands.Ended.meterValueholds the start and end readings plus the sampled and clock-aligned readings of these intervals. - Command blocking: charger block
impairments.blockmaps CSMS → charger actions toNotImplemented/NotSupported(answered with that CALLERROR) orNoReply(no answer). Applied live without a reconnect, switchable throughGET/PUT /api/chargers/{id}/impairmentsand the Impairments dialog; the frame log marks blocked CALLs and the snapshot hasimpaired.GET /api/chargers/{id}addscsms_actions. - Network impairments in the same
impairmentsblock, all applied live: latency / jitter per direction (latency_ms,jitter_ms,direction, seeded byseedfor reproducible runs; frame order is kept), periodic disconnects (drop_every_s,drop_jitter_s,drop_modeabort/close) and the pause before reconnecting (down_s).POST /api/chargers/{id}/dropdrops the connection now. Simulated drops do not count againstmax_retries/boot_max_retriesand keep transactions; snapshotdrops,last_errorkindsimulated_drop. UI: the Impairments dialog (with Drop now); the badge shows!while any is on. - Frame injection (expert use):
POST /api/chargers/{id}/sendsends an arbitrary CALL (schema check optional,validate: false) and returns the CSMS answer, or writes arawframe verbatim. The station state does not change; injected frames are marked in the frame log.
Changed¶
- OCPP 2.0.1:
Ended.meterValuenow starts with aTransaction.Beginreading (TxEndedInterval 0 = the start and end values). - An nginx HTTP 400 "SSL certificate" page with a client certificate configured is reported as
client_cert_rejected(withstatus400) instead ofbad_request; other HTTP 400 answers over wss:// get a hint that also names a TLS proxy refusing the client certificate.
Fixed¶
- OCPP 1.6: StopTransaction
transactionDataholds the StopTxnSampledData readings taken every MeterValueSampleInterval from the start of the transaction (not only one reading at the end), and the StopTxnAlignedData readings at every ClockAlignedDataInterval boundary. - OCPP 1.6: ChangeConfiguration of
MeterValuesSampledData,MeterValuesAlignedData,StopTxnSampledDataandStopTxnAlignedDatarejects measurands the simulated meter does not report and lists longer than the matching*MaxLengthkey. In YAML / template / Excelconfig_keyssuch measurands are dropped with a warning instead. - Docs: the 1.6 MeterValues row no longer claims clock-aligned MeterValues messages (not sent yet).
- Windows: the asyncio proactor's "Exception in callback ..._call_connection_lost"
ConnectionResetErrortraceback after a peer reset is no longer printed (logged at debug level).
[0.2.1] - 2026-11-28¶
Added¶
- Excel import / export of the charger list (#21): File → Export Excel workbook / Import Excel workbook / Download
blank Excel template (sheets
chargers,config_keys,variables,ev_models; passwords exported as********). An import is all or nothing, reports errors by sheet, row and column, keeps every other block and restarts only changed chargers. New routesGET /api/config/xlsx,GET /api/config/xlsx-template,POST /api/config/import; new dependencysme-sim-common[xlsx](openpyxl). - Charger templates (#21):
template:/params:on a charger take the model defaults (power, voltage, phases, connectors, model ...) from a built-in template (jp-ac-3kw,jp-ac-6kw,jp-ac-6kw-dual,eu-ac-11kw,eu-ac-22kw) or a user template in~/.sme-ocpp-sim/templates/(SME_OCPP_SIM_TEMPLATES); the saved config keeps only a charger's own overrides. The Add charger dialog adds N chargers from a template at once (IDs and passwords count up), new routePOST /api/chargers/bulk/create;GET /api/templates,POST /api/templates/reloadandPOST /api/templates/from-device/{id}(save a charger as user template). A templated charger's dump is compared with the template, not the model default (phases: 1on a 3-phase template is kept on save and Excel round trip), andconfig_keys/session/maintenancekeep only the keys the charger sets. A charger whose (deleted) user template is unknown fails to load with an error naming the charger and the template; the bulk create rejects the password mask********. - Mini CSMS: a simple built-in OCPP 1.6J / 2.0.1 CSMS (WebSocket server, default port 9000) in the same process,
with a new web UI panel (Simulation → Mini CSMS). Subprotocol negotiation, Security Profile 0 / 1 (optional
Basic Auth), configurable BootNotification answer (Accepted / Pending / Rejected + interval) and authorization
statuses, valid minimal answers to every CP → CSMS action, records boot info, statuses, transactions and meter
values per station, a JSON editor that checks any CALL against the schema before sending it, and a YAML plan of
scheduled CALLs (
mini_csms:block; e.g. SetChargingProfile 30 s after boot). New/api/csms/*routes,--mini-csms/--csms-host/--csms-portoptions, demo configconfigs/mini-csms-demo.yamland the Docker image exposes 9000. - Local Authorization List and Authorization Cache for OCPP 1.6J and 2.0.1: SendLocalList (Full / Differential,
version numbers,
VersionMismatch/Failed), GetLocalListVersion and ClearCache. A presented id token is authorized from the list first, then the cache (LocalPreAuthorize / LocalAuthorizeOffline); Authorize, StartTransaction / StopTransaction (1.6) and TransactionEvent (2.0.1) answers update the cache. New 1.6 keys LocalAuthListEnabled, LocalAuthListMaxLength, SendLocalListMaxLength, ReserveConnectorZeroSupported (SupportedFeatureProfiles now lists LocalAuthListManagement and Reservation); new 2.0.1 variables AuthCacheCtrlr., LocalAuthListCtrlr. and ReservationCtrlr.*. - Reservations for OCPP 1.6J and 2.0.1: ReserveNow (Accepted / Faulted / Occupied / Rejected / Unavailable,
replacing by id, connector 0 / no
evseId) and CancelReservation. A reserved connector reportsReserved, refuses other id tokens (operator swipe resultReserved) and passes thereservationIdwith the start; reservations end on expiry, cancel, fault or unavailability (2.0.1 ReservationStatusUpdateExpired/Removed). - Web UI: the charger detail shows the local list version, a connector card its reservation.
- Firmware update and diagnostics / log upload simulation for OCPP 1.6J and 2.0.1 (nothing is downloaded or
uploaded): UpdateFirmware (1.6 Downloading → Downloaded → Installing → reboot → Installed; 2.0.1 adds
DownloadScheduled, SignatureVerified, InstallScheduled, InstallRebooting,
requestId, AcceptedCanceled / Rejected), the install waits for running transactions with the free connectors Unavailable, then reboots and boots again (2.0.1 reasonFirmwareUpdate); GetDiagnostics (1.6) / GetLog (2.0.1, AcceptedCanceled) with a file name and Uploading → Uploaded / failure. TriggerMessage FirmwareStatusNotification / DiagnosticsStatusNotification (1.6, was NotImplemented) and LogStatusNotification (2.0.1) report the current status. New per-chargermaintenancesettings: step durations, retry interval and failure injection (fail_download,fail_install,fail_upload). The Web UI charger detail shows the firmware / log status. - Security profile 3 for OCPP 1.6J and 2.0.1:
wss://with a TLS client certificate (client_cert_file/client_key_fileper charger,csms_defaults.security_profile: 3, no Basic Auth); TLS 1.2 or above; a refused client certificate is reported asclient_cert_rejected. - Certificate management for OCPP 2.0.1 and the 1.6 Security Whitepaper: SignCertificate with a generated CSR
(TriggerMessage
SignChargingStationCertificate/ ExtendedTriggerMessageSignChargePointCertificate), CertificateSigned (the new certificate is used after a reconnect, with a fallback to the old one when the CSMS refuses it), InstallCertificate (installed CSMS roots are trusted for the next TLS connection), DeleteCertificate and GetInstalledCertificateIds; ExtendedTriggerMessage (1.6). - SecurityEventNotification for both versions: StartupOfTheDevice, ResetOrReboot, FirmwareUpdated, invalid
CSMS / charging station certificate, TLS version, failed authentication, discarded renewed certificate and
reconfiguration events; critical events are queued while offline. New 1.6 keys SecurityProfile, CpoName,
CertificateStoreMaxLength, AdditionalRootCertificateCheck and the write-only AuthorizationKey (ChangeConfiguration
changes the Basic Auth password and reconnects with it, Security Whitepaper A01); the 2.0.1 SecurityCtrlr.SecurityProfile reports 3,
CertificateEntries counts the installed certificates, AdditionalRootCertificateCheck is
false. - Web UI: the charger detail shows the security profile and the client certificate subject; the settings dialog has profile 3 and the client certificate / key files.
- Documentation (#22): the READMEs (en / ja / zh) and the documentation home pages list the local
authorization list, reservations, firmware / diagnostics simulation, security profile 3 and certificate
management, the Mini CSMS and Excel / charger templates; retaken screenshots, new
mini-csms.pngandadd-charger.png(scripts/screenshots.pyalso runsconfigs/mini-csms-demo.yaml).
Changed¶
- The 1.6 security support was checked against the OCPP 1.6 Security Whitepaper edition 4: ExtendedTriggerMessage
FirmwareStatusNotification(which means SignedFirmwareStatusNotification) is nowNotImplemented, andconnectorId0 is CALLERRORPropertyConstraintViolation(the whitepaper requiresconnectorId> 0). cryptographyis now a runtime dependency (CSR generation, certificate parsing); it is bundled in the exe and the Docker image.
Fixed¶
- Windows executable: saving the config from the web UI was written to the temporary PyInstaller extraction
directory and lost when the exe exited (#27). Started without
-c, the exe now uses the per-user~/.sme-ocpp-sim/config.yaml(created from the bundled demo config on the first run);-c FILEis used and saved in place. pip, source and Docker runs are unchanged. The config file in use is logged at startup.
Security¶
- Secret values are masked as
********in the frame log (charger simulator and Mini CSMS) and in the Mini CSMS's recorded calls: 1.6 ChangeConfigurationAuthorizationKey, 2.0.1 SetVariablesBasicAuthPasswordand 2.0.1 SetNetworkProfile VPN / APN credentials (#54). The frame sent on the wire is unchanged. - Excel export writes no formula cells: a text such as
=1+1(vendor, id tag, config key value ...) is a text cell with Excel's quote prefix and imports back unchanged (#21).POST /api/config/importrejects a body over 10 MB with 413 and a workbook with more than 5000 charger rows (50000 on the other sheets) with 400.
[0.2.0] - 2026-11-27¶
Added¶
- OCPP 2.0.1 station core (
ocpp_version: "2.0.1", subprotocolocpp2.0.1): BootNotification (Accepted / Pending / Rejected), Heartbeat, StatusNotification per EVSE (connectors: N= N EVSEs with one connector each), Authorize with everyauth_mode, the TransactionEvent flow Started -> Updated -> Ended with station-generated transaction ids, continuousseqNoand offline queueing (offline: true), MeterValues and DataTransfer. Every other 2.0.1 action, including the ISO 15118 messages, is answeredNotImplemented. - OCPP 2.0.1 remote control: RequestStartTransaction (with
remoteStartIdand an optionalTxProfile), RequestStopTransaction, UnlockConnector, Reset (Immediate/OnIdle, withScheduledwhile a transaction runs and BootNotification reasonRemoteReset), ChangeAvailability (station or EVSE level,Scheduledwhile a transaction runs) and TriggerMessage (BootNotification, Heartbeat, StatusNotification, MeterValues, TransactionEvent; the other messages answerNotImplemented). - OCPP 2.0.1 Device Model: GetVariables / SetVariables (attribute types Actual / Target / MinSet / MaxSet,
ReadOnly / WriteOnly / ReadWrite,
UnknownComponent/UnknownVariable/NotSupportedAttributeType,RebootRequired, value checks for dataType, limits and valuesList) and GetBaseReport (ConfigurationInventory, FullInventory, SummaryInventory) answered by NotifyReport parts (seqNo/tbc). A minimal set of standard variables drives the station (HeartbeatInterval, TxUpdatedInterval / Tx*Measurands, AuthorizeRemoteStart, StopTxOnInvalidId, MessageAttempts, ItemsPerMessage, ...); the new chargervariables:YAML list overrides them and adds user-defined variables.GET /api/chargers/{id}/configurationreturns a 2.0.1 charger's variables (ocpp_version,variables). SetVariables changes are not written back to the YAML file. - OCPP 2.0.1 Smart Charging: SetChargingProfile, ClearChargingProfile, GetCompositeSchedule, GetChargingProfiles
(answered by ReportChargingProfiles parts with
tbc), NotifyChargingLimit and ClearedChargingLimit, with the purposes ChargingStationMaxProfile, TxDefaultProfile, TxProfile and ChargingStationExternalConstraints. The 2.0.1 rules are a separate copy of the 1.6 ones; the power model is shared, so the composite schedule and the TransactionEvent power stay equal. ThechargingProfileof RequestStartTransaction is now applied. New SmartChargingCtrlr variables (Enabled, Available, ExternalControlSignalsEnabled, NotifyChargingLimitWithSchedules, ProfileStackLevel, PeriodsPerSchedule, RateUnit). -
POST /api/chargers/{id}/external-limit: an external (energy management) limit per EVSE or for the whole charger. OCPP 2.0.1 applies it as ChargingStationExternalConstraints and notifies the CSMS; OCPP 1.6 answers 400 (not supported). -
Web UI for OCPP 2.0.1: the version can be chosen in the settings dialog (2.1 stays greyed out); a 2.0.1 charger shows its Device Model in a read-only Variables table (from
GET /api/chargers/{id}/configuration; there is no Web API route to change a variable), labels its connectors as EVSEs and has an External limit (EMS) control in the Smart Charging panel (POST /api/chargers/{id}/external-limit). The fault dialog preselectsOtherfor 2.0.1. New UI strings in English, Japanese and Chinese. - Documentation for OCPP 2.0.1 (en / ja / zh): the supported 2.0.1 messages (every other one marked Not
supported), a 2.0.1 quick-start example,
ocpp_version/variablesconfiguration, Smart Charging and HTTP API notes; README features, the OCPP badge and the screenshots now show a 2.0.1 charger, incl. the Variables table. configs/mixed-site.yaml: a sample site with OCPP 1.6J chargers and OCPP 2.0.1 stations.scripts/screenshots.pyruns a mixed 1.6 / 2.0.1 site against both dev CSMS peers and also capturesvariables.png.
Changed¶
- Internal split for OCPP 2.0.1: the charger runtime is a version-neutral shell (connection, boot / heartbeat,
power-model clock) hosting a per-version station; the OCPP 1.6 state machine, transactions, configuration keys
and smart-charging rules moved to
sme_ocpp_sim.protocol.v16. No change on the 1.6 wire. - The fault dialog takes the fault codes of the charger's OCPP version from the new
GET /api/chargers/{id};POST /api/chargers/{id}/faultrejects a code that is not one of them with400.
Fixed¶
- OCPP 2.0.1 spec conformance, RPC (Part 4): the error code is
OccurrenceConstraintViolation(Part 4 Table 8; Part 2 B06 / B08 spell itOccurence); a CALL with a wrong frame structure is answeredRpcFrameworkError, a non-object payload stillFormatViolation; a received MessageId longer than 36 characters is answeredRpcFrameworkError; an outgoing errorDescription is cut to 255 characters. OCPP 1.6 is unchanged. - OCPP 2.0.1 Device Model (Part 2 Referenced Components and Variables): HeartbeatInterval minLimit 1; the
AuthCtrlr controls (Enabled, LocalPreAuthorize, LocalAuthorizeOffline, OfflineTxForUnknownIdEnabled,
DisableRemoteAuthorization) and SmartChargingCtrlr.Enabled are ReadWrite, the AuthCtrlr ones start from
auth_modeand change the authorization at once; NotifyChargingLimitWithSchedules defaults tofalse; Identity maxLimit 48, BasicAuthPassword maxLimit 64, Tx*Measurands maxLimit; the required ChargingStation / EVSE / Connector variables (Available, AvailabilityState, EVSE Power and SupplyPhases) and the missing required OCPPCommCtrlr, SampledDataCtrlr, TxCtrlr, SecurityCtrlr and SmartChargingCtrlr variables are reported; SummaryInventory follows B07.FR.09 (the station's and each EVSE's AvailabilityState). - OCPP 2.0.1 B use cases: SetVariables of SecurityCtrlr.BasicAuthPassword is
Acceptedand the station reconnects with the new password (A01; in memory only); GetBaseReport never answersEmptyResultSet(B07) butAcceptedwith one empty NotifyReport. - OCPP 2.0.1 spec conformance, functional rules (Part 2 B / E / F / G / K, #42): while Pending,
RequestStart/StopTransaction are
Rejected(B02.FR.05) and triggered Heartbeat / StatusNotification / MeterValues / TransactionEvent areAccepted(B02.FR.02); while Rejected every CSMS CALL is answered CALLERRORSecurityError(B03).StopTxOnInvalidIdfalse stops the energy transfer (SuspendedEVSE, E05.FR.02);evseis only in the first TransactionEvent (E01.FR.16). A remote-start token that waits for the cable starts withRemoteStart(F02.FR.21);Central/NoAuthorizationtokens are never authorized (F01.FR.02); a waiting token is dropped afterTxCtrlr.EVConnectionTimeOut(now ReadWrite). Triggered MeterValues use the newAlignedDataCtrlr.Measurands, a triggered TransactionEventTxUpdatedMeasurands(F06.FR.06 / FR.07); TriggerMessage LogStatusNotification / FirmwareStatusNotification send statusIdle(F06.FR.14 / FR.16). The station availability is kept apart from the EVSEs' (G03 / G04). Smart charging: onechargingScheduleonly (K01.FR.34), ChargingStationMaxProfile never Relative (K01.FR.38),startSchedulerequired for Absolute / Recurring and forbidden for Relative (K01.FR.40 / FR.41), TxProfile conflicts ignore the validity period (K01.FR.39), a TxDefaultProfile with the stackLevel of one on evseId 0 / an EVSE isDuplicateProfile(K01.FR.52 / FR.53), Rejected profiles carryDuplicateProfile/UnsupportedPurpose/UnsupportedRateUnit/TxNotFound, GetCompositeSchedule rejects a unit outsideRateUnit(K08.FR.07), and an external limit change during a transaction queuesChargingRateChanged(K11.FR.04 / K13.FR.03).
[0.1.0] - 2026-11-27¶
First release.
Added¶
- OCPP-J RPC layer and WebSocket transport (subprotocol
ocpp1.6): CALL / CALLRESULT / CALLERROR with correct error codes for malformed frames, at most one outstanding outbound CALL per connection, each inbound CALL handled in its own task, call timeouts, reconnect with exponential backoff and jitter, classified handshake errors (HTTP 404 unknown charge point, subprotocol). - OCPP 1.6J message models with lenient parsing and schema-equivalent validation (official OCA schemas are not bundled).
- Charge point runtime: BootNotification (Accepted / Pending / Rejected), Heartbeat, StatusNotification,
Authorize (
auth_mode: local_only / csms_only / local_then_csms / accept_all), Start / StopTransaction, sampled and clock-aligned MeterValues, DataTransfer. CSMS requests: RemoteStart / RemoteStopTransaction, Get / ChangeConfiguration, Reset (Soft / Hard), TriggerMessage, UnlockConnector, ChangeAvailability, DataTransfer. Unimplemented actions answer CALLERRORNotImplemented. - Ordered transaction message queue with retries (
TransactionMessageAttempts/TransactionMessageRetryInterval) and resend after reconnect. - Smart Charging: SetChargingProfile, ClearChargingProfile, GetCompositeSchedule and RemoteStartTransaction profiles. One evaluator computes both the composite schedule and the live power limit. Interpretations of points the specification leaves open are documented.
- EV and power model: battery capacity, SoC, charging curve, phases, minimum current, efficiency, ramps,
single-phase and 3-phase (line-to-line) supplies; Charging / SuspendedEV / SuspendedEVSE;
time_scale. - Security profiles 0, 1 and 2 (
ws://, HTTP Basic,wss://with a configurable CA file). - Multi-charger engine (200+ chargers per process), YAML configuration with validation, live reload that reconnects only changed chargers, and write-back that keeps comments outside the changed blocks.
- Web UI (English / Japanese / Simplified Chinese, light / dark): charger list with bulk connect / disconnect, connector cards and actions, Smart Charging panel, OCPP frame log with JSON Lines export, configuration keys, settings.
- HTTP API and
/wslive updates; passwords are masked in every API response. - Windows single-file executable, multi-arch Docker image on GHCR (linux/amd64, linux/arm64) with offline image archives, and the PyPI package.
- Documentation in English, Japanese and Simplified Chinese.