Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCPP 1.6 operation when status is Pending #478

Open
james-ctc opened this issue Feb 19, 2024 · 8 comments
Open

OCPP 1.6 operation when status is Pending #478

james-ctc opened this issue Feb 19, 2024 · 8 comments
Labels
bug Something isn't working OCPP1.6

Comments

@james-ctc
Copy link
Contributor

OCPP Version

OCPP1.6

Describe the bug

When the CS starts it sends a boot notification request. The CSMS may respond with a status of Pending.
OCPP 1.6 states:
If the Central System returns the Pending status, the communication channel SHOULD NOT be closed by either the Charge Point or the Central System. The Central System MAY send request messages to retrieve information from the Charge Point or change its configuration. The Charge Point SHOULD respond to these messages. The Charge Point SHALL NOT send request messages to the Central System unless it has been instructed by the Central System to do so with a TriggerMessage.req request.

The CS is resending boot notification requests which it shouldn't (no trigger message request received)

2024-02-19T08:43:19.219Z: SYS> Session logging started. 


2024-02-19T08:43:22.464Z: SYS> Connecting 


2024-02-19T08:43:26.575Z: SYS> Connected 


2024-02-19T08:43:26.578Z: ChargePoint>CentralSystem BootNotification 
[
  2,
  "d13ab69b-1e55-4b88-9805-40a19f3101dd",
  "BootNotification",
  {
    "chargeBoxSerialNumber": "serial1",
    "chargePointModel": "model",
    "chargePointSerialNumber": serial2",
    "chargePointVendor": "Pionix",
    "firmwareVersion": "1.0.0"
  }
]

2024-02-19T08:43:26.808Z: CentralSystem>ChargePoint  BootNotificationResponse
[
  3,
  "d13ab69b-1e55-4b88-9805-40a19f3101dd",
  {
    "currentTime": "2024-02-19T08:43:26Z",
    "interval": 240,
    "status": "Pending"
  }
]
…
2024-02-19T08:51:27.048Z: ChargePoint>CentralSystem BootNotification 
[
  2,
  "8e163bc5-6ccd-44ce-94f4-731795daf685",
  "BootNotification",
  {
    "chargeBoxSerialNumber": "serial1",
    "chargePointModel": "model",
    "chargePointSerialNumber": serial2",
    "chargePointVendor": "Pionix",
    "firmwareVersion": "1.0.0"
  }
]

2024-02-19T08:51:27.262Z: CentralSystem>ChargePoint  BootNotificationResponse
[
  3,
  "8e163bc5-6ccd-44ce-94f4-731795daf685",
  {
    "currentTime": "2024-02-19T08:51:27Z",
    "interval": 240,
    "status": "Pending"
  }
]

To Reproduce

configure CSMS to set "status": "Pending" in the boot notification conf and wait about 8 minutes.

Anything else?

No response

@james-ctc james-ctc added bug Something isn't working OCPP1.6 labels Feb 19, 2024
@Pietfried
Copy link
Contributor

This doesn't look like a bug. 6.4. BootNotification.conf of OCPP1.6 defines the following for the interval field for the BootNotification.conf:

Required. When RegistrationStatus is Accepted, this contains the heartbeat
interval in seconds. If the Central System returns something other than
Accepted, the value of the interval field indicates the minimum wait time before
sending a next BootNotification request.

The CS shall send another BootNotification.req after the specified interval

@james-ctc
Copy link
Contributor Author

It depends on whether section 4.2. Boot Notification text (quoted above) overrides section 6.4's description in a table.

@bWF0dGhpYXMK
Copy link
Contributor

"While in pending state, the following Central System initiated messages are not allowed:
RemoteStartTransaction.req and RemoteStopTransaction.req"

Some review of the latest code, is how to react on RemoteStart.req and RemoteStop.req in pending state? In the PR #421 there is no answer, and an error is issues on the outer protocol.

Or is an answer to the RemoteStart/Stop.req legitime?

@lategoodbye
Copy link

lategoodbye commented Feb 23, 2024

@bWF0dGhpYXMK I was able to reproduce this with Steve. From my point of view the following behavior of EVerest is wrong:

[INFO ] 2024-02-23 18:04:57,552 de.rwth.idsg.steve.ocpp.ws.WebSocketLogger - [chargeBoxId=lesbos_left, sessionId=89272020-ff29-8e50-c093-1b2634295ec9] Received: [2,"de920360-be57-4d2e-929e-587fe3b3369e","BootNotification",{"chargeBoxSerialNumber":"123","chargePointModel":"Charge Control C","chargePointVendor":"chargebyte","firmwareVersion":"0.5.0"}]
[INFO ] 2024-02-23 18:04:57,554 de.rwth.idsg.steve.service.CentralSystemService16_Service - The boot of the chargebox 'lesbos_left' with registration status 'Optional[PENDING]' is acknowledged.
[INFO ] 2024-02-23 18:04:57,563 de.rwth.idsg.steve.ocpp.ws.WebSocketLogger - [chargeBoxId=lesbos_left, sessionId=89272020-ff29-8e50-c093-1b2634295ec9] Sending: [3,"de920360-be57-4d2e-929e-587fe3b3369e",{"status":"Pending","currentTime":"2024-02-23T18:04:57.554Z","interval":1800}]
[INFO ] 2024-02-23 18:05:29,492 de.rwth.idsg.steve.ocpp.ws.WebSocketLogger - [chargeBoxId=lesbos_left, sessionId=89272020-ff29-8e50-c093-1b2634295ec9] Sending: [2,"34729aeb-b655-4462-8cea-b5c3a4c9e3f4","GetConfiguration",{"key":[]}]
[INFO ] 2024-02-23 18:05:29,561 de.rwth.idsg.steve.ocpp.ws.WebSocketLogger - [chargeBoxId=lesbos_left, sessionId=89272020-ff29-8e50-c093-1b2634295ec9] Received: [3,"34729aeb-b655-4462-8cea-b5c3a4c9e3f4",{"configurationKey":[{"key":"AuthorizeConnectorZeroOnConnectorOne","readonly":true,"value":"true"},{"key":"CentralSystemURI","readonly":true,"value":"ws://192.168.1.5:8081/steve/websocket/CentralSystemService/lesbos_left"},{"key":"ChargeBoxSerialNumber","readonly":true,"value":"123"},{"key":"ChargePointId","readonly":true,"value":"lesbos_left"},{"key":"ChargePointModel","readonly":true,"value":"Charge Control C"},{"key":"ChargePointVendor","readonly":true,"value":"chargebyte"},{"key":"FirmwareVersion","readonly":true,"value":"0.5.0"},{"key":"LogMessages","readonly":true,"value":"true"},{"key":"LogMessagesFormat","readonly":true,"value":"log,html,session_logging,security"},{"key":"MaxCompositeScheduleDuration","readonly":true,"value":"31536000"},{"key":"OcspRequestInterval","readonly":false,"value":"604800"},{"key":"RetryBackoffRandomRange","readonly":false,"value":"10"},{"key":"RetryBackoffRepeatTimes","readonly":false,"value":"3"},{"key":"RetryBackoffWaitMinimum","readonly":false,"value":"3"},{"key":"SupportedChargingProfilePurposeTypes","readonly":true,"value":"ChargePointMaxProfile,TxDefaultProfile,TxProfile"},{"key":"SupportedCiphers12","readonly":true,"value":"ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-GCM-SHA384"},{"key":"SupportedCiphers13","readonly":true,"value":"TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256"},{"key":"UseSslDefaultVerifyPaths","readonly":true,"value":"true"},{"key":"VerifyCsmsCommonName","readonly":true,"value":"true"},{"key":"WaitForStopTransactionsOnResetTimeout","readonly":false,"value":"60"},{"key":"WebsocketPingPayload","readonly":true,"value":"hello there"},{"key":"WebsocketPongTimeout","readonly":true,"value":"5"},{"key":"AllowOfflineTxForUnknownId","readonly":false,"value":"false"},{"key":"AuthorizationCacheEnabled","readonly":false,"value":"false"},{"key":"AuthorizeRemoteTxRequests","readonly":false,"value":"false"},{"key":"ClockAlignedDataInterval","readonly":false,"value":"900"},{"key":"ConnectionTimeOut","readonly":false,"value":"30"},{"key":"ConnectorPhaseRotation","readonly":false,"value":"0.RST,1.RST"},{"key":"GetConfigurationMaxKeys","readonly":true,"value":"100"},{"key":"HeartbeatInterval","readonly":false,"value":"1800"},{"key":"LocalAuthorizeOffline","readonly":false,"value":"false"},{"key":"LocalPreAuthorize","readonly":false,"value":"false"},{"key":"MeterValueSampleInterval","readonly":false,"value":"0"},{"key":"MeterValuesAlignedData","readonly":false,"value":"Energy.Active.Import.Register"},{"key":"MeterValuesSampledData","readonly":false,"value":"Energy.Active.Import.Register"},{"key":"NumberOfConnectors","readonly":true,"value":"1"},{"key":"ResetRetries","readonly":false,"value":"1"},{"key":"StopTransactionOnEVSideDisconnect","readonly":false,"value":"true"},{"key":"StopTransactionOnInvalidId","readonly":false,"value":"true"},{"key":"StopTxnAlignedData","readonly":false,"value":"Energy.Active.Import.Register"},{"key":"StopTxnSampledData","readonly":false,"value":"Energy.Active.Import.Register"},{"key":"SupportedFeatureProfiles","readonly":true,"value":"Core,FirmwareManagement,RemoteTrigger,Reservation,LocalAuthListManagement,SmartCharging"},{"key":"TransactionMessageAttempts","readonly":false,"value":"1"},{"key":"TransactionMessageRetryInterval","readonly":false,"value":"10"},{"key":"UnlockConnectorOnEVSideDisconnect","readonly":false,"value":"true"},{"key":"LocalAuthListEnabled","readonly":false,"value":"true"},{"key":"LocalAuthListMaxLength","readonly":true,"value":"10000"},{"key":"SendLocalListMaxLength","readonly":true,"value":"10000"},{"key":"ChargeProfileMaxStackLevel","readonly":true,"value":"10"},{"key":"ChargingScheduleAllowedChargingRateUnit","readonly":true,"value":"Current"},{"key":"ChargingScheduleMaxPeriods","readonly":true,"value":"10"},{"key":"MaxChargingProfilesInstalled","readonly":true,"value":"10"},{"key":"DisableSecurityEventNotifications","readonly":false,"value":"false"},{"key":"SecurityProfile","readonly":false,"value":"0"},{"key":"ContractValidationOffline","readonly":false,"value":"true"},{"key":"ISO15118PnCEnabled","readonly":false,"value":"true"}]}]
..
[INFO ] 2024-02-23 18:06:28,890 de.rwth.idsg.steve.ocpp.ws.WebSocketLogger - [chargeBoxId=lesbos_left, sessionId=89272020-ff29-8e50-c093-1b2634295ec9] Sending: [2,"fd547ba3-5edf-4dcd-addb-7156606fd2e6","RemoteStartTransaction",{"connectorId":1,"idTag":"4e303e60"}]
[INFO ] 2024-02-23 18:06:28,911 de.rwth.idsg.steve.ocpp.ws.WebSocketLogger - [chargeBoxId=lesbos_left, sessionId=89272020-ff29-8e50-c093-1b2634295ec9] Received: [3,"fd547ba3-5edf-4dcd-addb-7156606fd2e6",{"status":"Accepted"}]

The charging station should send "status": "Rejected" or a CALLERROR. Our propietary charging stack send a "Rejected" in this case.

@lategoodbye
Copy link

Recently the behavior regarding RemoteStart/Stop has been fixed in pull request #520

@bWF0dGhpYXMK
Copy link
Contributor

Hi, a review of the latest code, there is a PR #520 managing that case with an answer on Rejected. From the ocpp1.6, for me it is not clear what means not allowed, initially I thought on "no" answer, which is two edged. Because an on the RPC framework point of view you require at least an answer such as Call Error.

It remains the clarification on ReserverNow.req, Reset.req, ... what behavior here is the most likely in the sense of the describtion.

From this " The Central System MAY send request messages to retrieve information from the
Charge Point or change its configuration. The Charge Point SHOULD respond to these messages.". It sound like behave as in Remote(Start/Stop).req...meaning a reject on the the message layer.

@lategoodbye
Copy link

lategoodbye commented Apr 12, 2024

It remains the clarification on ReserverNow.req, Reset.req, ... what behavior here is the most likely in the sense of the describtion.

From this " The Central System MAY send request messages to retrieve information from the Charge Point or change its configuration. The Charge Point SHOULD respond to these messages.". It sound like behave as in Remote(Start/Stop).req...meaning a reject on the the message layer.

No, all CSMS initiated messages except RemoteStart/Stop during Pending state should be handled as in Accepted. The Pending state is intended to preconfigure the charging station before allowing to charge. Some charging stations apply config changes AFTER a reboot, so the CSMS must be able to reset the Charge point BEFORE finally accept it. So rejecting a reset request is a bad thing.

Edit: From my point of view this bug can be closed because i don't see an issue anymore.

@bWF0dGhpYXMK
Copy link
Contributor

Thank you for clarification, in terms of that, agreed the related PR is closed. Interesting hint concerning the Steve to be able to set the pending state, also as an answer. I was not aware of that...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working OCPP1.6
Projects
None yet
Development

No branches or pull requests

4 participants