Skip to content

Fix RFID an der Duo - #4205

Open
AlexanderHa98 wants to merge 2 commits into
openWB:masterfrom
AlexanderHa98:fix_rfid_duo
Open

AlexanderHa98 wants to merge 2 commits into
openWB:masterfrom
AlexanderHa98:fix_rfid_duo

Conversation

@AlexanderHa98

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

RFID routing can assign a shared scan to an actively charging outlet with an unchanged meter reading and discard a valid scan during unplug cleanup, requiring fixes to connector eligibility.

2 open issues
What changed in this PR

This PR updates shared RFID handling for Duo chargepoints so scans are assigned to a single outlet and only committed tags authorize charging.

Changes:

  • Adds Duo target selection, shared scan cleanup, and validation logic.
  • Uses committed RFID assignments for Duo locking, vehicle selection, and OCPP transactions.
  • Expands regression tests for scan timing, outlet selection, authorization, and cleanup.
File Description
packages/​control/​chargepoint/​rfid.py Implements Duo scan routing, validation, and shared cleanup.
packages/​control/​chargepoint/​rfd_test.py Adds parameterized Duo RFID and control-cycle regression tests.
packages/​control/​chargepoint/​chargepoint.py Integrates committed Duo tags into authorization, vehicle selection, and transactions.

Review effort: Balanced

Comment thread packages/control/chargepoint/rfid.py Outdated
Comment on lines +17 to +19
if cp.data.set.rfid is None and cp.data.get.plug_state and
(cp.data.set.log.imported_at_plugtime == 0 or
cp.data.set.log.imported_at_plugtime == cp.data.get.imported)]
Comment thread packages/control/chargepoint/rfid.py Outdated
Comment on lines +89 to +98
if all(cp.data.set.rfid is not None or cp.data.get.charge_state for cp in (self, cp2_data)):
self._clear_pending_rfid(rfid, cp2_data)
for cp in (self, cp2_data):
cp.set_state_and_log("Beide Ladepunkte sind bereits zugeordnet oder laden."
" Es wird kein weiterer ID-Tag akzeptiert.")
return
allowed_cps = [cp for cp in (self, cp2_data)
if cp.data.set.rfid is None and
(not cp.data.get.plug_state or cp.data.set.log.imported_at_plugtime == 0 or
cp.data.set.log.imported_at_plugtime == cp.data.get.imported)]

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants