Repository navigation
Fix RFID an der Duo - #4205
Open
AlexanderHa98 wants to merge 4 commits into
Open
Fix RFID an der Duo#4205AlexanderHa98 wants to merge 4 commits into
AlexanderHa98 wants to merge 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟡 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
LKuemmel
approved these changes
Nov 4, 2026
LKuemmel
requested changes
Nov 9, 2026
LKuemmel
left a comment
Contributor
There was a problem hiding this comment.
Im Hardware-Test wurde auch der zweite LP freigeschaltet.
AlexanderHa98
force-pushed
the
fix_rfid_duo
branch
from
November 12, 2026 10:47
4816403 to
54dc747
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Critical RFID state-handling defects can commit the wrong card, release a connector on a stale scan, and start a new OCPP transaction after unplugging without a new scan.
4 open issues
2 resolved since last review
Review effort: Balanced
| if self.data.config.ocpp_chargebox_id: | ||
| # Starte nur Transaction wenn bereits ein RFID Tag oder die Fahrzeug ID erkannt wurde | ||
| if (self.data.set.rfid or self.data.get.rfid or self.data.get.vehicle_id): | ||
| if (rfid or self.data.get.vehicle_id): |
Comment on lines
+79
to
+80
| if not newer_scan_waiting: | ||
| self.chargepoint_module.clear_rfid() |
Comment on lines
+132
to
134
| Pub().pub("openWB/set/internal_chargepoint/last_tag_timestamp", | ||
| timecheck.create_timestamp()) | ||
| Pub().pub("openWB/set/internal_chargepoint/last_tag", key_string) |
Comment on lines
+55
to
+56
| if rfid_timestamp is not None and max(t1, t2) > rfid_timestamp: | ||
| return first if t1 < t2 else second |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary by Sourcery
Prevent stale shared-reader RFID scans from unlocking the wrong Duo chargepoint while preserving valid assignments across charging and reconnect cycles.
New Features:
Bug Fixes:
Enhancements:
Tests: