Bridging the NetBox Gap with QR Code Automation
I recently worked on a small automation project to bridge this gap between our digital inventory and physical hardware. The idea was simple: generate QR labels for every device, PDU, rack, and patch panel. Instead of typing, an engineer just scans the code and lands directly on the correct NetBox object.
The real challenge wasn't the scanning part—it was making the automation reliable. If you're going to do this, you can't just run a one-off script. You need a repeatable generator. I set up a dedicated directory structure to handle templates and scripts, ensuring that the process was idempotent. If the data changes in NetBox, you just re-run the script.
One thing I learned the hard way: stale labels are actually more dangerous than having no labels at all. If a QR code points to a deleted or renamed object, people lose trust in the system. My script doesn't just spit out images; it generates a detailed report. It tells me exactly how many labels were generated, how many were skipped because of missing fields, and—most importantly—which ones need a manual review. It turns "automation" into "operational visibility."
I also ran into some funny little hurdles, like web server configurations. I built a small static portal to browse and print these labels, but initially, the browser kept trying to download the index page instead of rendering it! It's those small UX details—making sure the files are served correctly and permissions are "boring" (meaning predictable and secure)—that make the difference between a cool script and a tool people actually use.
Has anyone else experimented with connecting their DCIM to the physical world like this? I'd love to hear if you use NFC or stick to QR codes!