A modern, touch-friendly web-based control panel for EPSON printers with Go backend integration for CUPS printing and SANE scanning. Optimized for small mobile devices and kiosk mode operation.
- π¨οΈ Print - Upload and print documents via CUPS
- π Scan - Scan documents using SANE integration
- π Copy - Quick copy functionality
- π Print Queue - Real-time job monitoring with SSE (Server-Sent Events)
- π¨ EPSON-themed UI - Professional dark theme with EPSON brand colors
- π± Mobile-first design - Touch-friendly interface optimized for small screens (Galaxy A3 2015 and similar)
- π΄ Smart Demo Mode - Automatic fallback with background reconnection
- π Auto-reconnect - Seamlessly returns to live mode when API becomes available
printer-panel/
βββ index.html # EPSON-themed touch panel UI
βββ style.css # Responsive design, optimized for small screens
βββ app.js # Frontend logic, API integration, Demo mode
βββ Makefile # Build commands
βββ README.md # This file
βββ api/
βββ go.mod # Go module definition
βββ print_service.go # Go backend for CUPS/SANE
βββ printer-service # Compiled binary
The Go backend (api/print_service.go) provides the following REST API:
| Method | Endpoint | Description |
|---|---|---|
GET |
/printers |
Get printer status |
GET |
/jobs |
Get all jobs (completed + active with correct state) |
POST |
/jobs/cancel?id=<job-id> |
Cancel a print job |
GET |
/jobs/stream |
SSE stream for real-time job updates |
POST |
/print |
Print a file |
POST |
/scan |
Scan a document |
POST |
/copy |
Copy a document |
cd api
go build -o printer-service print_service.go
./printer-serviceOr using Make:
make build
make runThe backend will start on port 8081 by default.
Using Python:
python -m http.server 8080Using Node.js:
npx serve -p 8080Open in browser: http://localhost:8080
The panel includes intelligent connectivity handling:
- Automatic Demo Mode - When the API is unreachable, the panel automatically switches to Demo Mode with simulated data
- Background Reconnection - While in Demo Mode, the panel attempts to reconnect to the API every 10 seconds
- Automatic Live Mode Recovery - When the API becomes available again, the panel seamlessly switches back to Live Mode
This ensures the UI remains functional and responsive even during network issues or backend restarts.
The Print Queue displays only active jobs (pending, processing, held). Completed jobs are automatically filtered out to keep the queue clean and focused on actionable items.
Job states are correctly determined:
queued- Job is waiting to be processedprocessing- Job is currently printingheld- Job is on holdcompleted- Job finished (filtered from active queue view)canceled- Job was cancelederror- Job encountered an error
The UI is optimized for small mobile devices including:
- Galaxy A3 2015 (540x960, 245 PPI)
- iPhone SE (320px width)
- Android small (360px width)
- And other compact screens
Features include:
- Touch-friendly button sizes (minimum 44x44px)
- Optimized font sizes and spacing
- Safe area support for notched devices
- Disabled pinch-zoom and double-tap zoom for kiosk use
Edit app.js to configure the API endpoint:
const API_BASE = 'http://localhost:8081';| Shortcut | Action |
|---|---|
Ctrl+D |
Toggle Demo Mode |
Ctrl+J |
Add Demo Job (Demo Mode only) |
- Go 1.19+
- CUPS (for printing)
- SANE (for scanning)
- Modern web browser with JavaScript enabled
- No build tools required (uses Tailwind CDN)
sudo apt update
sudo apt install cups sane-utils libsane
sudo usermod -a -G lpadmin $USER
sudo systemctl enable cups
sudo systemctl start cupssudo apt install printer-driver-escprAdd to /etc/xdg/lxsession/LXDE-pi/autostart:
@xset s off
@xset -dpms
@xset s noblank
@chromium --kiosk --app=http://localhost:8080- Check backend is running:
curl http://localhost:8081/printers - Verify CUPS is running:
systemctl status cups - Check network connectivity
- Wait for background reconnection (every 10 seconds)
- Check CUPS queue:
lpstat -o - Verify printer name in backend configuration
- Check SSE connection in browser developer tools
- Verify SANE is installed:
scanimage -L - Check scanner permissions
- Ensure user is in
scannergroup
MIT License - Free for personal and commercial use.
- UI Design: EPSON-inspired dark theme
- Icons: Tailwind CSS Heroicons
- Font: Inter (Google Fonts)
- Backend: Go with CUPS/SANE integration
