Skip to content

PN532 configuration UI panel #243

Description

@Gudsfile

Context

Individual PN532 settings (board_profile, protocol, spi.*) are already editable via the generic Settings page. But there is no dedicated panel to:

  • see the effective merged config (profile defaults + overrides combined)
  • select a profile with visual context (defaults table)
  • trigger a probe from the UI

The /sonos panel is the reference implementation.

Goal

Add a /pn532 page (new ui_pages/pn532.py) analogous to /sonos.

Panel: main page /pn532

  • Current effective config card: profile name, protocol, resolved pins (reset / cs / irq) after merging profile defaults with overrides
  • "Edit" button linking to /pn532/edit
  • "Probe" action: connects to the PN532, shows firmware version and one tag read attempt (must handle hardware-unavailable gracefully)
  • Navigation back to Settings / Library

Panel: edit page /pn532/edit

  • Profile selector (waveshare_hat / hiletgo_v3 / custom) with defaults table shown as context
  • Pin override fields for spi.reset, spi.cs, spi.irq with profile default shown as placeholder
  • Save via POST /api/ui/pn532/edit
  • Reset to profile defaults button

Settings page change

Add a "Configure PN532 🔌" shortcut button on the jukebox.reader.pn532.board_profile row, analogous to the existing "Manage Speakers 🔊" button for jukebox.player.sonos.selected_group.

Routes

  • GET /api/ui/pn532
  • GET /api/ui/pn532/edit
  • POST /api/ui/pn532/edit
  • POST /api/ui/pn532/reset (optional)

Out of scope

  • Individual PN532 settings remain on the Settings page
  • Probe is a bonus; the panel is useful without it

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