Skip to content

ellinglien/Thermy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Thermy

Python library and CLI for X5-10CD thermal printers via Bluetooth Low Energy.

What This Is

A command-line tool and Python library for X5/cat thermal printers. Works out of the box - no code required for basic printing.

Key features:

  • CLI tool - Just type thermy --local photo.jpg instead of writing Python scripts
  • Google Docs printing - Print public Google Docs directly from URL
  • Protocol fixes applied - Uses community-discovered intensity commands for better print quality
  • Handles large images - Automatically chunks images to avoid firmware limits

Built because existing libraries required writing code for simple tasks, and had print quality issues we wanted to fix.

Installation

git clone https://github.com/ellinglien/thermy.git
cd thermy
pip install -e .

Usage

CLI

thermy --local photo.jpg         # Print an image
thermy --gdoc YOUR_DOC_ID        # Print a Google Doc (must be public)
thermy --battery                 # Check battery level
thermy --help                    # See all options

Python

import asyncio
from thermy import X5Printer

async def main():
    async with X5Printer() as printer:
        await printer.print_image("photo.jpg")

asyncio.run(main())

Protocol Fixes

Applies fixes from rbaron/catprinter#36:

  • Uses DEEPEN intensity instead of FADED
  • Omits energy commands that reduce darkness
  • Chunks large images (firmware ~950 row limit)
  • Polls for completion instead of delays

Finding Your Printer

python scan.py  # Find BLE address

Update DEFAULT_ADDRESS in thermy/printer.py with your device address.

Related Projects

License

MIT - See LICENSE file

Author

Elling Lien (@ellinglien)

Development

This project was developed with assistance from Claude (Anthropic).

About

Python library for X5 thermal printers via BLE. Applies community protocol fixes for better print quality.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages