Print lamp ID labels on the Brother QL-820NWB

label_printer.py renders a DK-11221 23x23 mm label (QR code linking
to the lamp's buildfor.life page plus the ID) and sends it over the
network backend (brother-ql-next). The station prints two after each
successful measurement, one for the box and one for the lamp; printer
failures never lose a run, and any lamp can be reprinted with
uv run label_printer.py <ID>. Printer address via HPCS_LABEL_PRINTER
or --printer.
This commit is contained in:
2026-07-09 18:15:01 +07:00
parent 7ef2960254
commit 719ddcf04a
4 changed files with 141 additions and 1 deletions
+5 -1
View File
@@ -110,7 +110,11 @@ from the packaging (flux, CCT, power, CRI, lifetime, equivalent W -> stored
under "rated" in metrics.json for claimed-vs-measured comparison), insert the
lamp, and the tool measures per the published procedure (230 V / 50 Hz, 60 s
settle, 5 readings averaged), writes lamps/<ID>/ into the comparison-data
checkout, commits, and pushes. The website picks the lamp up automatically:
checkout, commits, and pushes, then prints two ID labels (QR code linking to
the lamp's page plus the ID, DK-11221 23x23 mm) on a Brother QL-820NWB network
printer: one for the box, one for the lamp. Set HPCS_LABEL_PRINTER (e.g.
tcp://192.168.1.50) or pass --printer; reprint anytime with
`uv run label_printer.py <ID>`. The website picks the lamp up automatically:
its device list is data-driven from the comparison-data bundles and the push
triggers the auto-bump deploy. An .md page in the web repo is only ever needed
for photos, where-to-buy links, or notes.