Skip to content

feat: /label route — self-printed QR label page #3

Description

@dubpixel

Problem

The buttnode hostname (dpx-buttnode-XXXX.local) is derived from the MAC address at first boot, so labels can't be pre-printed before flashing. Users have no easy way to find the unit's address without checking their router.

Solution

Add a /label route to dpx-buttnode-ui.py that renders a clean, printable page:

  • QR code pointing to http://dpx-buttnode-XXXX.local:8080
  • The .local URL in large text below the QR
  • A print button that triggers window.print() and hides browser chrome

Workflow: boot unit → open IP in browser → go to /label → print → stick on box.

Notes

  • No new Python dependencies — QR code rendered client-side with an inlined pure-JS library (e.g. qrcode.js)
  • Avahi/mDNS already running, hostname already set — this is purely a UI addition
  • Related future work: /discover page that scans the subnet and lists all buttnodes

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