fix(ocpp2): implement StopTxOnInvalidId and MaxEnergyOnInvalidId per E05 (#1745)
* fix(ocpp2): implement StopTxOnInvalidId and MaxEnergyOnInvalidId per E05
Implement the full deauthorization decision tree per OCPP 2.0.1 spec:
- StopTxOnInvalidId=false: transaction continues, no termination
- StopTxOnInvalidId=true + MaxEnergyOnInvalidId>0: defer termination
until energy limit reached (checked in periodic meter values callback)
- StopTxOnInvalidId=true + MaxEnergyOnInvalidId=0: immediate suspension
and termination
Also includes:
- Deduplicate transactionSetInterval/transactionTxUpdatedSetInterval
into single transactionMeterValuesSetInterval field
- Add transactionDeauthorized/transactionDeauthorizedEnergyWh to
ConnectorStatus for deauth state tracking (cleared in resetConnectorStatus)
- Extract readVariableValue/readVariableAsBoolean/readVariableAsInteger
helpers using convertToInt and convertToBoolean utilities
- Fix buildEvsesStatus test that was missing evse-to-connector wiring
* refactor(ocpp2): address PR review comments
- Add logger.warn in readVariableAsInteger catch for diagnostic
- Replace unsafe 'as string' cast with .toString() in periodic callback
- Add tests for StopTxOnInvalidId=false and deauth state tracking
* chore: update webui.png
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
* test: add resetConnectorStatus unit tests to Helpers.test.ts
Verify all 18 transaction fields are properly cleaned, TX_PROFILE
charging profiles matching the transaction are removed, and
non-transaction fields are preserved.