Create a file test.py:
from niimbot import NiimbotPrinter
printer = NiimbotPrinter("YOUR_PRINTER_MAC")
printer.connect()
printer.print_text("GitHub Works!", font_size=30)
printer.disconnect()
Run it: python test.py
If your label prints, congratulations—you’ve freed your printer!
qr = qrcode.make("https://github.com") qr.save("qrcode.png") niimbot github
service: niimbot_label_printer.print_text
data:
text: "Coffee: 9:30 AM"
copies: 1
target:
device_id: xyz
Repo: dhndlt/niimpy (most starred)
Niimpy is a pure Python library that reverse-engineers the Bluetooth communication protocol of NIIMBOT printers. It supports the D11, D110, B21, and several generic thermal label printers.
Key features:
Example usage:
from niimpy import NiimpyPrinter
printer = NiimpyPrinter("printers_mac_address") printer.connect() printer.print_text("Hello from GitHub!", font_size=24) printer.disconnect()
Best for: Python developers, automation scripts, and integrating with home automation (Home Assistant, Node-RED).
For developers and power users, there are excellent CLI tools and Python libraries on GitHub. These allow you to: