Skip to content

Solves a timing problem when the vehicle is plugged in and the RFID tag has not yet been recognized.#3229

Open
dawys wants to merge 4 commits intoopenWB:masterfrom
dawys:master
Open

Solves a timing problem when the vehicle is plugged in and the RFID tag has not yet been recognized.#3229
dawys wants to merge 4 commits intoopenWB:masterfrom
dawys:master

Conversation

@dawys
Copy link
Copy Markdown

@dawys dawys commented Mar 22, 2026

More information is available here:

https://forum.openwb.de/viewtopic.php?t=11971

dawys added 2 commits March 22, 2026 10:12
the transaction remains traceable even after the websocket performs a reconnect
… set

check if the chargebox ID is set in the backend and if the rfid tag or the vehicle ID has been detected
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the OCPP flow to avoid starting/sending OCPP data too early (e.g., when a vehicle is plugged in but the RFID/vehicle ID is not yet available), and ensures MeterValues are associated with the active OCPP transaction.

Changes:

  • Pass transaction_id into OCPP MeterValues calls (transfer_values) so meter data is tied to the correct transaction.
  • Gate StartTransaction so it is only triggered once a chargebox ID and an RFID/vehicle ID are present (to address the timing issue described in the PR title).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
packages/control/optional.py Updates OCPP meter value transfer call to include ocpp_transaction_id.
packages/control/ocpp.py Extends transfer_values to include and forward transaction_id into call.MeterValues.
packages/control/chargepoint/chargepoint.py Changes when start_transaction() is invoked, requiring chargebox ID and RFID/vehicle ID.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dawys
Copy link
Copy Markdown
Author

dawys commented Mar 23, 2026

copilot suggestions gepushed

@benderl benderl requested a review from LKuemmel April 1, 2026 06:12
@benderl benderl added the bug Something isn't working label Apr 1, 2026
Copy link
Copy Markdown
Contributor

@LKuemmel LKuemmel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bitte noch die Flake8 Meldung beseitigen, der Rest passt so.

@dawys
Copy link
Copy Markdown
Author

dawys commented Apr 3, 2026

Danke, erledigt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants