Skip to content

RFID node: restructure only, pending hardware and orchestration#39 #4

Description

@bazauto

The RFID work in this repo is restructure only. No contract topics, no retention, no re-assert, no new behaviour.

Why

Two independent reasons, either of which is sufficient:

  1. The hardware does not work yet. The current readers are not sensitive enough to pick up passing rolling stock. Different hardware is on order and needs testing before any of this is worth building.
  2. The design is not settled, and it is not settled here. bazauto/layout-orchestration#39 owns it and is explicit that docs/mqtt-contract.md is amended first, in its own change, before any firmware. There is currently no identity-bearing sensor type and no identity field on any payload, so there is nothing correct for this repo to publish to.

Scope

Move pn7150_mux_reader.py into src/lib/, delete its near-identical twin pn7150_mux_state_machine.py, and stand up src/apps/rfid-node/ with a main.py and config.py.

It keeps publishing to its existing ad-hoc topic, in one clearly-commented block marked as pre-#39 and explicitly not contract traffic.

Two things from #39 worth recording so they are not re-derived

  • A tag read is an event, not a state. It gets its own topic and is explicitly not retained. Retention here would be actively harmful: a replayed observation asserts a vehicle position that may be days stale. This is the opposite of how sensor/*/reading works, and the difference is deliberate.
  • #39's sequencing names esp-layout-controller as the firmware home. Since this repo is now the sensor firmware, that step needs correcting on the issue.

Also worth knowing

_parse_uid_from_intf_activated() and the NCI state machine work and should be preserved as-is through the move. The PN7150 IRQ is not a tag-presence pin — it asserts when any NCI message is queued, and presence is inferred by the state machine's periodic T2T read. That is easy to "simplify" wrongly later.

Depends on #1. Blocked on hardware and on bazauto/layout-orchestration#39. Plan: docs/plans/2026-08-23-node-split.md.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions