]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
fix(ocpp): drive FirmwareStatusNotification trigger from last-sent notification ...
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 8 Jul 2026 16:10:40 +0000 (18:10 +0200)
committerGitHub <noreply@github.com>
Wed, 8 Jul 2026 16:10:40 +0000 (18:10 +0200)
commite406ab2ab278ee72b49bb1e87ec5fe70c321b9bc
treeca04d84f0a6a1b7d168e7223bbd87d932931992b
parent08c58aa3a8e25d783c6453a023a51e2cf5752978
fix(ocpp): drive FirmwareStatusNotification trigger from last-sent notification (L01.FR.26) (#1981)

TriggerMessage(FirmwareStatusNotification) was gated on
`activeFirmwareUpdateRequestId != null && hasFirmwareUpdateInProgress()`,
falling back to Idle otherwise. Since `hasFirmwareUpdateInProgress` returns
false for every terminal status (`DownloadFailed`, `InvalidSignature`,
`InstallationFailed`, `InstallVerificationFailed`, `Installed`), the
station returned Idle after every non-Installed terminal, violating OCPP
2.0.1 L01.FR.26 (SHALL, mirrored by L02.FR.17).

Persist the last-sent `(requestId, status)` on `OCPP20StationState` and
drive the trigger from it. `stationInfo.firmwareStatus` is retained
because `hasFirmwareUpdateInProgress` and its 3 consumers (reset
rejection, isChargingStationIdle, isEvseIdle) depend on its
"in-progress predicate" semantics — deliberate dual-source, not
conflation.

Closes #1979
src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts
src/charging-station/ocpp/2.0/__testable__/index.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-TriggerMessage.test.ts