{"id":16106497,"url":"https://github.com/danb35/raspi-ups-stats","last_synced_at":"2025-03-18T08:32:07.344Z","repository":{"id":92705978,"uuid":"393816390","full_name":"danb35/raspi-ups-stats","owner":"danb35","description":null,"archived":false,"fork":false,"pushed_at":"2022-04-30T16:45:31.000Z","size":8,"stargazers_count":16,"open_issues_count":3,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T08:28:49.180Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/danb35.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-07T23:58:14.000Z","updated_at":"2024-01-18T09:39:22.000Z","dependencies_parsed_at":"2023-03-09T01:00:23.881Z","dependency_job_id":null,"html_url":"https://github.com/danb35/raspi-ups-stats","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danb35%2Fraspi-ups-stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danb35%2Fraspi-ups-stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danb35%2Fraspi-ups-stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danb35%2Fraspi-ups-stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danb35","download_url":"https://codeload.github.com/danb35/raspi-ups-stats/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243910749,"owners_count":20367545,"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","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":[],"created_at":"2024-10-09T19:13:41.087Z","updated_at":"2025-03-18T08:32:07.337Z","avatar_url":"https://github.com/danb35.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# raspi-ups-stats\n\nScript to show system and UPS statistics on a Raspberry Pi with [UPS Plus](https://wiki.52pi.com/index.php/UPS_Plus_SKU:_EP-0136?spm=a2g0o.detail.1000023.17.4bfb6b35vkFvoW) board and [128x64 OLED display](https://www.amazon.com/dp/B08LYL7QFQ?psc=1\u0026ref=ppx_pop_dt_b_product_details).\n\n## Installation\n\n### Prerequisites\n\nIf you're using Raspbian/Raspberry Pi OS, you'll need to enable I2C using `raspi-config`.  You'll then need to install several dependencies with `sudo apt install git i2c-tools python3-pip python3-smbus2 python3-setuptools python3-pil python3-rpi.gpio libraspberrypi-bin`.\n\nYou'll also need to install the Adafruit INA219 library: `sudo pip3 install pi-ina219`.\n\nNext, you'll need to download Adafruit's Python library for the OLED display.  `git clone https://github.com/adafruit/Adafruit_Python_SSD1306.git`.  Then `cd Adafruit_Python_SSD1306.git`, `sudo python3 setup.py install`.\n\nFinally, you'll need to download the font files from https://www.dafont.com/pixel-operator.font.  The font file `PixelOperator.ttf` will need to be placed in the same directory as the executable script.\n\n### Download and install\n\nChange to a convenient directory and run `git clone https://github.com/danb35/raspi-ups-stats`.\n\n## Auto start on boot\nCreate `/opt/stats/`, and copy `PixelOperator.ttf` and `stats.py` there.\n\nThen put the systemd unit file in the correct place: `sudo cp stats.service /etc/systemd/system/`.\n\nThen tell systemd to re-scan the unit files with `sudo systemctl daemon-reload`, and start this unit using `sudo systemctl enable --now stats`.\n\n## Acknowledgements\n\nOriginal source: https://www.the-diy-life.com/mini-raspberry-pi-server-with-built-in-ups/\nBased on: https://github.com/adafruit/Adafruit_Python_SSD1306/blob/master/examples/stats.py\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanb35%2Fraspi-ups-stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanb35%2Fraspi-ups-stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanb35%2Fraspi-ups-stats/lists"}