Giter Club home page Giter Club logo

Comments (4)

valerio-2020 avatar valerio-2020 commented on May 31, 2024

Happening with StopTransaction as well. The following are the console logs -

[OcppOperation] Sent requirement (success): [2,"531531539","StopTransaction",{"meterStop":2,"timestamp":"2022-02-24T13:54:20.000Z","transactionId":58}]
[OcppOperation] Sent requirement (success): [2,"531531539","StopTransaction",{"meterStop":2,"timestamp":"2022-02-24T13:54:20.000Z","transactionId":-1}]
[OcppClientSocket] get pong
[OcppOperation] Sent requirement (success): [2,"531531539","StopTransaction",{"meterStop":2,"timestamp":"2022-02-24T13:54:20.000Z","transactionId":-1}]
[OcppClientSocket] get pong
[OcppOperation] Sent requirement (success): [2,"531531539","StopTransaction",{"meterStop":2,"timestamp":"2022-02-24T13:54:20.000Z","transactionId":-1}]
[OcppClientSocket] get pong
[OcppOperation] Sent requirement (success): [2,"531531539","StopTransaction",{"meterStop":2,"timestamp":"2022-02-24T13:54:20.000Z","transactionId":-1}]

from microocpp.

valerio-2020 avatar valerio-2020 commented on May 31, 2024

One thing that I understand here is, whenever a request is being sent (in my case heartbeat) and a proper .conf() response is not coming back. The code retries until timeout. But if another request like Start/Stop transaction is made within that time period, it fails.

Look at the following console logs -

[OcppOperation] Sent requirement (success): [2,"531531540","Heartbeat",{}]
[OcppClientSocket] get pong
Trig HIGH **I am triggering the authorize function here**
EV_CHARGE_PIN set to high
[OcppOperation] Sent requirement (success): [2,"531531540","Heartbeat",{}]
[OcppClientSocket] get pong
[OcppOperation] Sent requirement (success): [2,"531531540","Heartbeat",{}]
[OcppEngine] Discarding operation due to timeout: [OcppOperation] I am a Authorize
[OcppOperation] Sent requirement (success): [2,"531531540","Heartbeat",{}]
[OcppClientSocket] get pong

@matth-x How to deal with this?

from microocpp.

matth-x avatar matth-x commented on May 31, 2024

Hi @niravbhandari2000 @valerio-2020

Thank you for the feedback! I admit that the console output is not 100% clear here. The message

[OcppOperation] Sent requirement (success): [...]

means that the OCPP library assumes that the message was sent successfully. But it actually doesn't know and just waits for the response from the destination with a timeout and retry mechanism. That explains why one operation appears multiple times on the log.

The log in #50 (comment) looks completely normal. The log in #50 (comment) actually shows a bug, because the library tries to resend with a different OCPP message (the transactionId differs). Thank you for the report! I will investigate it and come back to you. #50 (comment) shows that different operations can have different timeouts. A Heartbeat message waits longer when the EVSE is offline, however the Authorize message has a quick timeout, because the EV driver shouldn't be waiting for more than 30 seconds after presenting the NFC card in case the EVSE is offline. So the Authorize operation will just be discarded in the meantime. You can see how to control timeouts in ArduinoOcpp.cpp. If you need a custom timeout, just copy the contents of authorize(...) into your implementation and set the parameters according to your needs.

from microocpp.

matth-x avatar matth-x commented on May 31, 2024

Checked it and the bug in #50 (comment) is already addressed in the develop branch

from microocpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.