tl;dr: Print text, images, QR codes, and pickup codes from Home Assistant — USB or Bluetooth auto-discovery, interactive device page, 7 services, multi-printer support. MIT licensed. Install via HACS.
Why a Thermal Printer in Home Assistant?
I've been building my smart home for years, and one thing kept bugging me: some information is just better on paper.
Shopping lists — tap a button, grab the slip, walk out
Pickup codes — package locker codes printed automatically when a delivery arrives
Morning brief — weather, calendar, to-do list, printed at 8 AM
Alerts — low battery, water leak, door left open — physical paper gets noticed
The Paperang P2/P2S (also sold as 喵喵机 MiaoMiaoJi) is a pocket-sized thermal printer that costs about $25-35 on AliExpress. No ink, no toner — just thermal paper rolls. Perfect for home automation.
So I built a native Home Assistant integration.
What It Does
Zero-Config Discovery
Plug in via USB → HA detects it automatically. Power on via Bluetooth → HA finds it. No MAC addresses, no YAML, no bluetoothctl tinkering. Just confirm the notification and you're done.
Interactive Device Page
All controls live right on the device page — no YAML editing needed:
| Control | Type | What It Does |
|---|---|---|
| Print Mode | dropdown | text / image / QR / pickup code |
| Print Content | text input | what to print |
| Font Size | slider (12–96) | text size |
| Heat Density | slider (0–100%) | print darkness |
| QR Size | slider (100–576px) | QR code dimensions |
| Image Profile | dropdown | portrait / landscape / document / high_contrast / light |
| Vertical | toggle | rotate 90° for vertical printing |
| Feed Lines | slider | paper advance |
6 Real-Time Sensors
| Sensor | Unit |
|---|---|
| Battery | % |
| Status | diagnostic code |
| Voltage | mV |
| Temperature | °C |
| Heat Density | % |
| Connection | connected/disconnected |
Static info (model, firmware, board version, serial number) shows on the device card.
7 Services for Automations
# Print morning weather
service: paperang.print_text
data:
text: |
🌤️ Good morning!
Today: {{ states('weather.home') }}
High: {{ state_attr('weather.home', 'temperature') }}°C
font_size: 20
heat_density: 60
| Service | Use Case |
|---|---|
paperang.print_text |
Weather, calendar, reminders, to-do lists |
paperang.print_image |
Camera snapshots, floor plans, memes |
paperang.print_qr |
WiFi credentials, URLs, home automation shortcuts |
paperang.print_pickup_code |
Package locker codes — big, bold, readable |
paperang.print_test_page |
Connectivity check |
paperang.get_status |
Poll battery/status programmatically |
paperang.feed_paper |
Advance paper between prints |
Multi-Device Support
Got two printers? One by the door for pickup codes, one on your desk for morning briefs. Each has its own coordinator, transport config, and device page — fully isolated.
Real Automation Examples
Print Pickup Code When Package Arrives
automation:
- alias: "Print Pickup Code on Delivery"
trigger:
- platform: state
entity_id: sensor.package_delivery
action:
- service: paperang.print_pickup_code
data:
pickup_code: "{{ states('input_text.pickup_code') }}"
Morning Brief Print
automation:
- alias: "Daily Morning Brief"
trigger:
- platform: time
at: "08:00:00"
action:
- service: paperang.print_text
data:
text: |
📅 {{ now().strftime('%A, %B %d') }}
🌡️ {{ states('sensor.outdoor_temp') }}°C | 💧 {{ states('sensor.humidity') }}%
📋 {{ states('sensor.todoist_tasks') }} tasks due
font_size: 18
Low Battery Alert — On Paper
automation:
- alias: "Printer Low Battery Alert"
trigger:
- platform: numeric_state
entity_id: sensor.paperang_p2_battery
below: 20
action:
- service: paperang.print_text
data:
text: "⚠️ Paperang battery low: {{ states('sensor.paperang_p2_battery') }}%"
font_size: 24
Installation
HACS (Recommended — 1 minute)
Or manually:
- HACS → Integrations → ⋮ → Custom repositories
- URL:
https://github.com/mdj2812/paperang-hacs - Category:
Integration - Install Paperang P2 Printer
- Restart HA
![HACS Installation]
Manual
git clone https://github.com/mdj2812/paperang-hacs.git
cp -r paperang-hacs/custom_components/paperang /config/custom_components/paperang
Requirements
- USB: Paperang P2 plugged into HA host (USB passthrough if VM)
- Bluetooth: Bluetooth adapter on HA host (classic BR/EDR, not BLE — works with HA's built-in Bluetooth integration)
- Paper: 57mm thermal paper rolls (standard, cheap)
Works with both Paperang and 喵喵机 (MiaoMiaoJi) branded P2/P2S devices.
Tech Stack
- Python custom component, pure
asyncio - paperang-p2-lib — core protocol library (also open source)
- Transport: USB (PyUSB) + Bluetooth SPP/RFCOMM (stdlib
socket.AF_BLUETOOTH) - CI: GitHub Actions with Docker HA test containers, 90%+ test coverage
- License: MIT
Links
I've been using this daily for about a month. It's stable, the device page makes one-off prints easy, and the automations are fun to build. If you've got a Paperang gathering dust in a drawer — give it a job.
Stars, issues, and PRs welcome. Happy printing!




