Print your ideas, todos, or whatever other text you like to a receipt printer!
Unfortunately I can't give anyone acces to my printer right now, because I need to figure out some networking-security stuff beforehand. So watch this cool demo video to see the website working! cool frontend demo video here
Print via a:
- (pretty fall-themed) website -> supports customized footer and header
- slackbot to print slack messages
- a computer/raspberry pi to run the webserver
- ESC/POS-compatible printer (connected to the previously mentioned computer)
- python
- uv (recommended for easy setup and running)
- cups
- bun
(for all instances the repo has to be cloned first)
- Setup a MQTT Server (you can use the docker compose for that)
- Setup your POS-Printer
If you have a USB-Printer make a udev rule for it.
For that find out your product id and vendor id using for example
lsusbThen create a udev rule in/etc/udev/rules.d/99-pos-todo.ruleswith this content:
SUBSYSTEM=="usb", ATTRS{idVendor}=="<YOURVENDORID>", ATTRS{idProduct}=="<YOURPRODUCTID>", MODE="0664", GROUP="dialout"
make sure to replace <YOURVENDORID> and <YOURPRODUCTID> (do not use a 0x prefix. just the hex number) with your actual ids.
after that do sudo service udev restart or sudo udevadm control --reload to restart udev
cd frontend
bun i- Add
VITE_MQTT_SERVER="mqtt://YOURMQTTHOST"tofrontend/.env
- Modify the manifest.json to have the correct name, etc.
- add your slack tockens and auth to
slack/.envlike so:
SLACK_CLIENT_ID=YOURSLACKCLIENTID
SLACK_CLIENT_SECRET=YOURSLACKCLIENTSECRET
SLACK_SIGNING_SECRET=YOURSLACKSIGNINGSECRET
SLACK_APP_TOKEN=YOURSLACKAPPTOKEN
SLACK_BOT_TOKEN=YOURSLACKBOTTOKEN
MQTT_HOST="mqtt://YOURHOST:YOURPORT"
cd slack
bun icd backend
uv run srccd frontendFor testing:
bun run dev
Otherwise:
bun run build
bun run startbun run startThis file uses a .env in backend/ file for configuration
| Field | Type | Description | Required |
|---|---|---|---|
PRINTER__PROFILE |
string | Printer profile | No |
PRINTER__CONNECTION |
"USB" | "NETWORK" |
Type of connection to the printer | Yes |
PRINTER__USB__VENDOR_ID |
hex-string (no 0x prefix) |
Vendor ID of the USB printer | Required if PRINTER__CONNECTION=USB |
PRINTER__USB__PRODUCT_ID |
hex-string (no 0x prefix) |
Product ID of the USB printer | Required if PRINTER__CONNECTION=USB |
PRINTER__NETWORK__IP |
string | IP address of the network printer | Required if PRINTER__CONNECTION=NETWORK |
- Go to the website
- type
/pos-todo <xour text> - or use the
Print to pos-todoshortcut on an already sent slack mesage
This project is only possible thanks to python-escpos! Go leave them a star.
This project is licensed under the MIT License (see LICENSE or https://opensource.org/licenses/MIT)