{"id":32846606,"url":"https://github.com/iollaph/pi-image-client","last_synced_at":"2026-05-02T08:34:56.524Z","repository":{"id":322145316,"uuid":"1088349539","full_name":"iOllaph/pi-image-client","owner":"iOllaph","description":"Node.js client that prints Base64 images received via WebSocket to a thermal printer on Raspberry Pi.","archived":false,"fork":false,"pushed_at":"2025-11-02T19:52:19.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-02T21:20:28.869Z","etag":null,"topics":["base64","nodejs","printer","raspberry-pi","websocket"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iOllaph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-02T19:50:17.000Z","updated_at":"2025-11-02T19:53:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/iOllaph/pi-image-client","commit_stats":null,"previous_names":["iollaph/pi-image-client"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/iOllaph/pi-image-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iOllaph%2Fpi-image-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iOllaph%2Fpi-image-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iOllaph%2Fpi-image-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iOllaph%2Fpi-image-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iOllaph","download_url":"https://codeload.github.com/iOllaph/pi-image-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iOllaph%2Fpi-image-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":283320031,"owners_count":26816392,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-08T02:00:06.281Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["base64","nodejs","printer","raspberry-pi","websocket"],"created_at":"2025-11-08T08:00:47.444Z","updated_at":"2025-11-08T08:02:01.647Z","avatar_url":"https://github.com/iOllaph.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Got it! Let’s write a clear **README** for your `pi-image-client` project based on this WebSocket image-to-printer setup. Here's a professional, minimal version that explains setup, usage, and configuration:\n\n---\n\n# Pi Image Client\n\nA lightweight Node.js client that connects to a WebSocket server, receives Base64-encoded images, saves them locally, and prints them to a connected thermal printer (e.g., Brother QL-800) on a Raspberry Pi or Linux device.\n\n---\n\n## Features\n\n* Receives image print jobs via WebSocket.\n* Saves Base64 images temporarily to `/tmp`.\n* Sends images directly to a thermal printer using `lp`.\n* Sends job status back to the server.\n* Automatic cleanup of temporary files.\n\n---\n\n## Requirements\n\n* Node.js 18+\n* Linux-based system (Raspberry Pi recommended)\n* Installed printer (`lp` command available)\n* Printer configured and accessible via `lp -d \u003cprinter_name\u003e`\n\n---\n\n## Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/iOllaph/pi-image-client.git\ncd pi-image-client\n\n# Install dependencies\nnpm install\n```\n\n---\n\n## Configuration\n\nEdit `index.js` to set your WebSocket server and printer:\n\n```js\nconst RELAY_WS_URL = \"wss://your-websocket-server\";\nconst TEMP_DIR = \"/tmp\"; // temporary folder for images\nconst PRINTER_NAME = \"Brother_QL-800\"; // your printer name\n```\n\n---\n\n## Usage\n\nStart the client:\n\n```bash\nnode index.js\n```\n\n* On receiving an image, the client will:\n\n  1. Save it as a temporary PNG file.\n  2. Send it to the printer using `lp`.\n  3. Delete the temporary file.\n  4. Send the job result back to the WebSocket server.\n\nExample server message format:\n\n```json\n{\n  \"imageBase64\": \"iVBORw0KGgoAAAANSUhEUgAA...\"\n}\n```\n\n---\n\n## Notes\n\n* The client automatically reconnects if the WebSocket closes.\n* Ensure the printer name in `PRINTER_NAME` matches your system configuration.\n* Temporary files are stored in `/tmp` and automatically deleted after printing.\n\n---","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiollaph%2Fpi-image-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiollaph%2Fpi-image-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiollaph%2Fpi-image-client/lists"}