EDIT:
Hooray!
Today I put up my B21 Pro for sale!
What did I replace it with? A different set of problems, but this one is all solvable problems:
To continue making my labels automations work, I created two new integrations:
GitHub - Rudd-O/hass-simple-image-raster: Generate pictures on the fly to print or update ePaper displays. Simple image rasterizer based on PIL / Pillow (derived from Niimbot Label Printer Home Assistant Integration). · GitHub draws labels (thanks @eigger for the code).
GitHub - Rudd-O/homeassistant-ipp-printing: Service to add printing capabilities to Home Assistant · GitHub for actually printing the rasterized labels.
And I rewired my scripts to use them instead of niimbot.print. Render then print. Frankly I think that is more elegant than having everything in a single service.
Is it more expensive? Yeah, more than twice as much. Nothing says “I am made of money” more than when you verbally order the home to print you a label on a DYMO label maker. OK maybe it would be more dramatic if it was a ZEBRA printer.
Is it more reliable? Yes, it is; it works every time, doesn’t power off, doesn’t give me GATT attribute bullshit or battery issues. Literally Ethernet and 12 volts. Ah, and the labels print in under 2 seconds.
Frankly the NIIMBOT printer seemed like a good idea and cheap too, but such printers are simply not intended for anything beyond drawing a cute label every once in a blue moon using an app. Anything more pro is out of the question. I’m tapping out.
OLD CONTENT FOLLOWS
Script -based procedure to fix printer when it stops working. Change used entities and devices to match yours. Note the Bluetooth proxy that the script restarts here is the closest to the printer. This script is simplified — my own version disconnects power to the printer, but you’ll have to do that by hand.
Before launching the script, read the description and follow the instructions!
sequence:
- parallel:
- sequence:
- action: button.press
metadata: {}
target:
entity_id: button.bluetooth_proxy_restart
data: {}
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- wait_template: "{{ has_value(\"sensor.bluetooth_proxy_uptime\") }}"
continue_on_timeout: true
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- action: homeassistant.reload_config_entry
metadata: {}
data:
entry_id: 01K4XM3C2ZFTHSTQSFZ4Q8J0XS
continue_on_error: true
- action: niimbot.print
metadata: {}
target:
device_id: b6e592d56d694847d02172dad9991622
data:
payload:
- type: text
value: ""
x: 5
"y": 5
size: 40
width: 400
height: 240
density: 5
continue_on_error: true
alias: Try to fix the Niimbot printer
description: >-
Disconnect the printer charger, wait ten seconds, reconnect the printer. Turn the printer off, wait three seconds, then turn the printer on. Only then
run this script.
If this works, then the printer will print an empty label. You can open the
printer and rewind the roll to reuse it.