{"id":24437403,"url":"https://github.com/uintdev/ssd1306-display-sysinfo","last_synced_at":"2025-03-13T23:09:28.159Z","repository":{"id":226655993,"uuid":"769290694","full_name":"uintdev/SSD1306-Display-SysInfo","owner":"uintdev","description":"System information for the SSD1306 OLED Display on Raspberry Pi","archived":false,"fork":false,"pushed_at":"2024-05-07T22:11:43.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-20T18:16:09.798Z","etag":null,"topics":[],"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/uintdev.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":"2024-03-08T18:32:57.000Z","updated_at":"2024-05-07T22:11:47.000Z","dependencies_parsed_at":"2024-05-07T23:24:25.519Z","dependency_job_id":"ebd6cb0e-eb09-49b0-b116-437a6b881fc3","html_url":"https://github.com/uintdev/SSD1306-Display-SysInfo","commit_stats":null,"previous_names":["uintdev/ssd1306-display-sysinfo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uintdev%2FSSD1306-Display-SysInfo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uintdev%2FSSD1306-Display-SysInfo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uintdev%2FSSD1306-Display-SysInfo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uintdev%2FSSD1306-Display-SysInfo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uintdev","download_url":"https://codeload.github.com/uintdev/SSD1306-Display-SysInfo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243495498,"owners_count":20299922,"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":"2025-01-20T18:16:17.492Z","updated_at":"2025-03-13T23:09:28.102Z","avatar_url":"https://github.com/uintdev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SSD1306 Display SysInfo\n\nSystem information for the SSD1306 OLED Display on Raspberry Pi\n\nThis project was designed around the Adafruit PiOLED 128x32 OLED display.\n\u003cbr\u003e\nAs it involves a SSD1306 chipset, this can be adapted for such displays and of other resolutions.\n\nThis project is based on the Python script and instructions from [here](https://learn.adafruit.com/adafruit-pioled-128x32-mini-oled-for-raspberry-pi/usage).\n\n## What does this do?\n\nMainly, this displays the following system information:\n\n-   Time\n-   IP address (IPv4)\n-   CPU load\n-   Memory usage\n-   Disk usage\n\n### Bonus feature\n\nWhen a `msg.txt` file is created in the same directory as the Python script, the file contents will be outputted and centered (x \u0026 y) on the display. The file then gets removed and there will be a delay before it updates the display again (to either display the next message from said file or to go back to the system information view).\n\nThis was developed to make use of `TPLink-LightBulb-HTTP`'s last status logging, but it can be used for various other purposes.\n\n## Configuration\n\nThis was tested with a Raspberry Pi Zero W. If it is a different device, then further modifications may have to be done to the scripts or system.\n\n### Getting i2c ready\n\nThe i2c interface first needs to be enabled. You can do this through the `raspi-config` TUI. Alternatively, you can run a command to achieve this.\n\n```bash\nsudo raspi-config nonint do_i2c 0\n```\n\nOnce set to enabled, the device has to be rebooted. But in this case, we will shutdown instead.\n\n```bash\nsudo shutdown now\n```\n\nConnect the display to the respective GPIO and then power the device back on again.\n\nTo verify that the display is being picked up on, run the following:\n\n```bash\nsudo apt install i2c-tools\nsudo i2cdetect -y 1\n```\n\nIf all goes well, you should see a mention of `3c` (`0x3c` address).\n\n### Gathering the Python packages\n\nThe Python script has several requirements.\n\nFirst, we first make sure we have PIP (package manager) installed.\n\n```bash\nsudo apt-get install python3-pip\n```\n\nWe then need PIL for drawing images for the display.\n\n```bash\nsudo apt-get install python3-pil\n```\n\nWe are going to assume that we are in the home directory of the current user. Adjust the steps as needed.\n\nWe will need to change directory into where the Python script is.\n\n```bash\ncd ~/SSD1306-Display-SysInfo\n```\n\nA Python virtual environment will need to be created.\n\n```bash\npython -m venv env --system-site-packages\n```\n\nGet into the context of that virtual environment.\n\n```bash\nsource env/bin/activate\n```\n\nThere is a package that is required in order to drive the display.\n\n```bash\npip3 install adafruit-circuitpython-ssd1306\n```\n\n### Additional configuration\n\nIf your display is not 128x32, then adjust the width and height values under the `disp` variable.\n\n### Running the script\n\nTo run, simply run:\n\n```bash\npython main.py\n```\n\nIf you get an Import error, make sure you are using the virtual environment.\n\nIf you wish to run the Python script such as in the context of a service or to just run it more directly, you can use the virtual environment in a single command.\n\n```bash\n/home/{USER}/SSD1306-Display-SysInfo/env/bin/python3 /home/{USER}/SSD1306-Display-SysInfo/main.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuintdev%2Fssd1306-display-sysinfo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuintdev%2Fssd1306-display-sysinfo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuintdev%2Fssd1306-display-sysinfo/lists"}