Control and monitor your Paperang P2 thermal printer through Home Assistant. Print text, images, QR codes, pickup codes โ all from the device page with interactive controls, plus real-time printer telemetry via USB or Bluetooth.
- ๐ USB auto-discovery โ printer detected automatically when plugged in
- ๐ก Bluetooth โ auto-discovered via classic Bluetooth SPP/RFCOMM
- ๐๏ธ Device page controls โ interactive print panel with mode selector, text input, parameter sliders, and print button
- ๐ Vertical printing โ switch toggle for vertical print orientation
- ๐ 6 telemetry sensors โ battery, status, voltage, temperature, heat density, and Connection (diagnostic); static info (model, firmware, board, serial) shown on device card
- ๐จ๏ธ 7 services โ print text, images, QR codes, pickup codes, test page, get status, feed paper
- ๐ฆ Multi-device โ multiple printers with isolated coordinators and transport configs
- Add a custom repository in HACS:
- HACS โ Integrations โ โฎ โ Custom repositories
- Repository URL:
https://github.com/mdj2812/paperang-hacs - Category:
Integration - Install
Paperang P2 Printer
git clone https://github.com/mdj2812/paperang-hacs.git
cp -r paperang-hacs/custom_components/paperang /config/custom_components/paperangRestart Home Assistant after installation.
Plug in your Paperang P2 via USB. Home Assistant will detect it automatically and show a notification โ click to confirm and the integration is ready.
Settings โ Devices & Services โ if your Paperang P2 is powered on and within range, HA will auto-discover it and show a notification. Confirm to add.
Settings โ Devices & Services โ Add Integration โ Search "Paperang P2 Printer" โ choose USB or Bluetooth.
If you prefer configuration via configuration.yaml, add:
paperang:On restart, HA will automatically import this as a config entry.
USB: Paperang P2 printer connected via USB to the HA host. USB device must be passed through to the HA VM (if running in a VM).
Bluetooth: Bluetooth adapter on the HA host. Printer must be powered on and within range. Works with both Paperang and MiaoMiaoJi (ๅตๅตๆบ) branded devices.
๐ฆ Requires
paperang-p2-lib[qr,cjk]>=1.2.0(installed automatically by HA).
The device page provides an interactive print panel:
| Entity | Type | Description |
|---|---|---|
| Print Mode | select | text / image / qr / pickup_code |
| Print Content | text | Enter text, URL, QR data, or pickup code |
| Font Size | number (12โ96) | Text print font size |
| Heat Density | number (0โ100%) | Print darkness |
| QR Size | number (100โ576px) | QR code dimensions |
| Image Profile | select | portrait / landscape / document / high_contrast / light |
| Feed Lines | number (10โ500) | Lines to feed |
| Vertical | switch | Toggle vertical (rotated) printing |
| Button | Action |
|---|---|
| Reads all current settings and prints accordingly | |
| Feed Paper | Advances paper by Feed Lines |
| Test Print | Prints a test page |
| Sensor | Description | Unit |
|---|---|---|
| Battery | Battery level | % |
| Status | Printer status code | โ |
| Voltage | Battery voltage | mV |
| Temperature | Printer head temperature | ยฐC |
| Heat Density | Current heat density setting | % |
| Connection | Connection status (diagnostic) | โ |
โน๏ธ Static info (model, firmware version, board version, serial number) is shown on the device card, not as separate sensors.
Print text content.
| Parameter | Type | Default | Description |
|---|---|---|---|
| text | string | โ | Text to print |
| font_size | number | 24 | Font size in pixels (12โ96) |
| heat_density | number | 75 | Print heat density (0โ100) |
| vertical | bool | false | Print vertically (rotated 90ยฐ) |
Print an image from a local file path or remote URL.
| Parameter | Type | Default | Description |
|---|---|---|---|
| image_url | string | โ | Image URL or local file path |
| profile | select | document | portrait / landscape / document / high_contrast / light |
| heat_density | number | 75 | Print heat density (0โ100) |
| vertical | bool | false | Print vertically (rotated 90ยฐ) |
Print a QR code.
| Parameter | Type | Default | Description |
|---|---|---|---|
| qr_content | string | โ | Content to encode in the QR code |
| qr_size | number | 500 | QR code size in pixels (100โ576) |
| heat_density | number | 75 | Print heat density (0โ100) |
| vertical | bool | false | Print vertically (rotated 90ยฐ) |
Print large pickup codes (e.g., for package lockers).
| Parameter | Type | Default | Description |
|---|---|---|---|
| pickup_code | string | โ | Pickup code, e.g. "19-4308" |
| vertical | bool | false | Print vertically (rotated 90ยฐ) |
Print a built-in test page (no parameters).
Query current battery and status. Results logged at INFO level.
Feed paper by the given number of lines.
| Parameter | Type | Default | Description |
|---|---|---|---|
| lines | number | 100 | Number of lines to feed |
automation:
- alias: "Print Pickup Code"
trigger:
platform: state
entity_id: sensor.package_arrived
action:
- service: paperang.print_pickup_code
data:
pickup_code: "{{ states('input_text.pickup_code') }}"automation:
- alias: "Daily Weather Print"
trigger:
- platform: time
at: "08:00:00"
action:
- service: paperang.print_text
data:
text: >
Today: {{ states('weather.home') }}
Temp: {{ states('sensor.home_temperature') }}ยฐC
font_size: 18
heat_density: 60automation:
- alias: "Low Battery Alert"
trigger:
- platform: numeric_state
entity_id: sensor.paperang_p2_battery
below: 20
action:
- service: paperang.print_text
data:
text: >
โ ๏ธ Printer battery low!
{{ states('sensor.paperang_p2_battery') }}%
font_size: 24automation:
- alias: "Print Test on Reconnect"
trigger:
- platform: state
entity_id: sensor.paperang_p2_status
from: "unavailable"
action:
- service: paperang.print_text
data:
text: "๐ข Paperang P2 online"
font_size: 24
heat_density: 50MIT License โ Copyright (c) 2026 Martin Ma