Git Product home page Git Product logo

Comments (5)

goekay avatar goekay commented on July 24, 2024

Without analyzing code, I speculate that perhaps Steve isn't set up to accept meter readings that don't belong to a transaction?

in the meter values message, the optional transaction id parameter is set (<ns2:transactionId>0</ns2:transactionId>), but steve does not know anything about this transaction which should not happen, because the transaction id is generated and assigned by the central system, i.e. steve. the station should not use some arbitrary transaction ids out of nowhere.

steve indeed accepts meter readings that do not belong to a transaction, but in such cases the optional transaction id should not be set.

from steve.

chuck-h avatar chuck-h commented on July 24, 2024

Sevket,
Thanks, your explanation makes sense. I have opened a ticket with Delta about this. I see the OCPP specification reads:
The request PDU SHALL contain for each sample:
[...]
2. The transaction id of the transaction to which these values are related, if applicable. If there is no transaction in progress or if the values are taken from the main meter, then transaction id may be omitted.
[...]

I suppose that one could argue this spec is not completely clear; it says the transaction id may be omitted, rather than it SHALL be omitted. Personally, I believe that the Delta message is noncompliant with OCPP.

Perhaps a SOAP fault text of "invalid transaction ID" would be clearer than the raw SQL error text. Not worth a lot of effort, though.

from steve.

goekay avatar goekay commented on July 24, 2024

Perhaps a SOAP fault text of "invalid transaction ID" would be clearer than the raw SQL error text. Not worth a lot of effort, though.

i agree on both. since the database model already enforces such integrity/constraint checks, we trust it and do not do the same kind of check in application code.

for example, there are several messages which might reference transaction and/or reservation ids. before processing these messages, we could do another database round trip just to check whether this transaction/reservation exists and just to respond with a more appropriate error message. i'd argue that the benefit is not worth the extra processing overhead. or we could process the java exception (for example the one you got from db) to find out what the reason was. but we do not do this for reasons explained here.

from steve.

csamsel avatar csamsel commented on July 24, 2024

Usually i would advise against vendor specific workarounds, but treating an transaction id 0 in the same way as if was ommited seems not too bad.

from steve.

goekay avatar goekay commented on July 24, 2024

@csamsel in wsdl files, transaction id is an xs:int. so... negative values are actually allowed. what if some other vendor decides to use -1 (or some other magic number) to express the same? it does not stop with only one magic number 0.

over time, steve already became more and more tolerant, since we dialed down its strictness. but this is one case i would be against.

from steve.

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.