{"id":16600589,"url":"https://github.com/savjee/3dmon","last_synced_at":"2025-09-04T16:50:28.451Z","repository":{"id":48981729,"uuid":"255550257","full_name":"Savjee/3dmon","owner":"Savjee","description":"Simple 3D print progress monitor (for Home Assistant)","archived":false,"fork":false,"pushed_at":"2021-07-02T09:50:03.000Z","size":367,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-29T07:42:48.381Z","etag":null,"topics":["3d-printing","home-assistant","serialport","tinycorelinux"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Savjee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-14T08:16:53.000Z","updated_at":"2023-05-27T20:11:52.000Z","dependencies_parsed_at":"2022-08-24T15:50:15.708Z","dependency_job_id":null,"html_url":"https://github.com/Savjee/3dmon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Savjee/3dmon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Savjee%2F3dmon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Savjee%2F3dmon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Savjee%2F3dmon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Savjee%2F3dmon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Savjee","download_url":"https://codeload.github.com/Savjee/3dmon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Savjee%2F3dmon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273641568,"owners_count":25142246,"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-09-04T02:00:08.968Z","response_time":61,"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":["3d-printing","home-assistant","serialport","tinycorelinux"],"created_at":"2024-10-12T00:15:00.406Z","updated_at":"2025-09-04T16:50:28.403Z","avatar_url":"https://github.com/Savjee.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 3dmon\n\nA simple Python script that monitors the print status of my Prusa i3 MK3 printer and reports it to Home Assistant.\n\nRuns on a Raspberry Pi Zero W, powered by [TinyCore Linux](http://tinycorelinux.net). It's lightweight, boots in seconds and is sd-card-corruption-proof™️.\n\nWhat it looks like in Home Assistant (paired up with an IP camera):\n![](https://savjee.github.io/3dmon/screenshot.png)\n\nNotification when the printer is done:\n![](https://savjee.github.io/3dmon/screenshot-notification.jpg)\n\n## Motivation. Why?\nI wanted a simple way to monitor my 3D printer through Home Assistant. That way I could set up automations like: notify me when the printer is almost done.\n\nOctoprint would be ideal but it doesn't run well on a Pi Zero. So instead I connected the printer's USB interface to the Pi and monitor its serial output with Python. Progress updates are captured and sent to Home Assistant through the REST API.\n\nWhy TinyCore? It boots up in seconds and runs entirely in RAM. I can power cycle my Pi all day and won't have sd card corruption. Yay!\n\n## Setup\n\n1. Download the latest version of Tiny Core Linux ( available at: http://tinycorelinux.net/downloads.html )\n2. Copy the operating system to the SD card ( instructions at: https://www.raspberrypi.org/documentation/installation/installing-images/)\n3. Insert your SD card and boot your device - you will need a keyboard and screen for this step\n4. Complete basic install for Tiny Core Linux - available online or TinyCoreLinux-Setup.md\n5. Connect to a network\n6. To set the correct time, you need to modify the NTP server, using the following command:\n```\nsudo vi /etc/sysconfig/ntpserver\n```\n6. As Tiny Core Linux runs in RAM, all changes are lost unless the folders/files are added to a list, the following command will ensure the NTP server is kept:\n```\necho /etc/sysconfig/ntpserver \u003e\u003e /opt/.filetool.lst\nfiletool.sh -b\n```\n7. Then reboot your device (sudo reboot) and when your device has rebooted, entering the following command should show you the correct time:\n```\ndate\n```\n\u003e If your time is not updating, run the following command to force an update:\n```\nsudo getTime.sh\n```\n8. Configure the current repository to install packages:\n```\nsudo vi /opt/tcemirror\n```\n\u003e Change the only line in this file to: http://distro.ibiblio.org/tinycorelinux\n\n9. Next you need to install python and the required modules:\n```\ntce-load -wi python3.8\ntce-load -wi py3.8serial\ntce-load -wi usb-serial-5.10.16-piCore\ntce-load -wi firmware-rpi-wifi\ntce-load -wi wifi\n```\n\u003e **Hint** - you can use the following command to search for packages:\n```\ntce-ab\n```\n10. Install additional Python modules\n```\npip3.8 install requests\n\n```\n\u003c!-- FUTURE pip3.8 install paho-mqtt --\u003e\n11. Save your changes\n```\necho /usr/local/lib/python3.8/site-packages/serial \u003e\u003e /opt/.filetool.lst\nfiletool.sh -b\n```\n12. **Optional** - Reboot device and open python to check all the modules are available:\n```\npython3\n\nimport serial\nimport requests\nimport json\n```\n\u003c!-- FUTURE import paho.mqtt.client as mqtt --\u003e\n\n### Setup crontab on Tinycore\nAdd this to `/opt/bootlocal.sh` to start cron:\n\n```\ncrond -L /dev/null 2\u003e\u00261\n```\n\nMake sure that crontabs are persisted. Run: \n\n```\necho var/spool/cron \u003e\u003e /opt/.filetool.lst\n```\n\nBackup \u0026 reboot:\n```\nfiletool.sh -b\nsudo reboot\n```\n\n## License \u0026 contributions\n[Licensed under MIT](LICENSE)\n\nI'm not really good at Python (this is probably my first real project). Feel free to fix/improve my code ;)\n\nOne thing to keep in mind: this project is all about **monitoring** 3D printers. I won't accept pull requests for control logic. Just trying to keeps things simple \u0026 reliable.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsavjee%2F3dmon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsavjee%2F3dmon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsavjee%2F3dmon/lists"}