Add 2D barcode scanning for serial number stickers #50

Closed
opened 2026-05-29 11:55:58 +00:00 by shawn · 0 comments
Owner

What: Serial number stickers on vending machines often have 2D barcodes (QR codes, DataMatrix) in addition to 1D barcodes. The ZXing scanner was restricted to 1D-only formats.

Changes:

  • Added QR_CODE, DATA_MATRIX, PDF_417, AZTEC to _barcodeHints() so all common 2D formats are scanned
  • Updated GET /api/assets/search to also match by connect_id column — so scanning a full Connect ID like VM-05912-0000068454 finds the asset directly
  • SW cache v5→v6, footer v3.2→v3.3

Testing done:

  • Connect ID search VM-05064-0000099387 → returns asset
  • Machine ID search 99387 → still works

Files changed: static/index.html, server.py, static/sw.js

**What:** Serial number stickers on vending machines often have 2D barcodes (QR codes, DataMatrix) in addition to 1D barcodes. The ZXing scanner was restricted to 1D-only formats. **Changes:** - Added QR_CODE, DATA_MATRIX, PDF_417, AZTEC to `_barcodeHints()` so all common 2D formats are scanned - Updated `GET /api/assets/search` to also match by `connect_id` column — so scanning a full Connect ID like `VM-05912-0000068454` finds the asset directly - SW cache v5→v6, footer v3.2→v3.3 **Testing done:** - Connect ID search `VM-05064-0000099387` → returns asset - Machine ID search `99387` → still works **Files changed:** `static/index.html`, `server.py`, `static/sw.js`
shawn closed this issue 2026-05-29 11:56:00 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shawn/canteen-asset-tracker#50