This documentation provides detailed instructions on generating, scanning, viewing, and adding QR codes for devices in our inventory. It includes sections on creating QR codes for both compute hardware and monitor hardware, printing QR codes, and recommended QR code reader applications.
Each QR code generated for the devices contains the following information:
The information is structured in a plain text format to ensure it is displayed as text rather than as a URL or search query when scanned.
Collect Information: Gather the following information for each compute hardware device:
Example:
Original ID: 1Z118B3-6FF1
Device: Dell Wyse 3040
Function: Data Collector - KuCoin / 1inch
RAM: 2 GB
Storage: 16 GB
Level ID: 6-L1
SKU: DW3040-DC-K1-2G16G-20240626
Generate QR Code: Use the following Python script to create a QR code containing the device's information:
import qrcode
def generate_qr_code(data, filename):
qr = qrcode.QRCode(
version=1,
error_correction=qrcode.constants.ERROR_CORRECT_L,
box_size=10,
border=4,
)
qr.add_data(data)
qr.make(fit=True)
img = qr.make_image(fill='black', back_color='white')
img.save(filename)
# Example data for a device
device_data = (
"Original ID: 1Z118B3-6FF1\\\\\\\\n"
"Device: Dell Wyse 3040\\\\\\\\n"
"Function: Data Collector - KuCoin / 1inch\\\\\\\\n"
"RAM: 2 GB\\\\\\\\n"
"Storage: 16 GB\\\\\\\\n"
"Level ID: 6-L1\\\\\\\\n"
"SKU: DW3040-DC-K1-2G16G-20240626"
)
generate_qr_code(device_data, "/mnt/data/1Z118B3-6FF1_plain_text.png")
Collect Information: Gather the following information for each monitor:
Example:
Original ID: MON-1
Brand: ViewSonic
Type: Monitor
Model: VS15451
Size: 21.5"
Resolution: 1920x1080
Generate QR Code: Use the following Python script to create a QR code containing the monitor's information:
import qrcode
def generate_monitor_qr_code(data, filename):
qr = qrcode.QRCode(
version=1,
error_correction=qrcode.constants.ERROR_CORRECT_L,
box_size=10,
border=4,
)
qr.add_data(data)
qr.make(fit=True)
img = qr.make_image(fill='black', back_color='white')
img.save(filename)
# Example data for a monitor
monitor_data = (
"Original ID: MON-1\\\\\\\\n"
"Brand: ViewSonic\\\\\\\\n"
"Type: Monitor\\\\\\\\n"
"Model: VS15451\\\\\\\\n"
"Size: 21.5\\\\"\\\\\\\\n"
"Resolution: 1920x1080"
)
generate_monitor_qr_code(monitor_data, "/mnt/data/MON-1.png")