{"id":21700300,"url":"https://github.com/swetoast/disk_endpoint","last_synced_at":"2026-04-18T15:39:35.931Z","repository":{"id":230350519,"uuid":"779150147","full_name":"swetoast/disk_endpoint","owner":"swetoast","description":"Disk Endpoint is a Flask application that provides an endpoint to get disk information. It uses the nvme list and smartctl commands to gather information about NVMe drives and other drives in the system. The information includes the name, model, serial number, and health status of each disk.","archived":false,"fork":false,"pushed_at":"2024-03-31T08:12:33.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-13T03:42:42.278Z","etag":null,"topics":["automation","harddrive","homeassistant","nvme"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swetoast.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-29T06:37:22.000Z","updated_at":"2024-03-29T07:57:41.000Z","dependencies_parsed_at":"2024-03-31T08:20:41.296Z","dependency_job_id":null,"html_url":"https://github.com/swetoast/disk_endpoint","commit_stats":null,"previous_names":["swetoast/disk_endpoint"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/swetoast/disk_endpoint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swetoast%2Fdisk_endpoint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swetoast%2Fdisk_endpoint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swetoast%2Fdisk_endpoint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swetoast%2Fdisk_endpoint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swetoast","download_url":"https://codeload.github.com/swetoast/disk_endpoint/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swetoast%2Fdisk_endpoint/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31974951,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"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":["automation","harddrive","homeassistant","nvme"],"created_at":"2024-11-25T20:13:54.803Z","updated_at":"2026-04-18T15:39:35.881Z","avatar_url":"https://github.com/swetoast.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Disk Endpoint\n\nDisk Endpoint is a Flask application that provides an endpoint to get disk information. It uses the nvme list and smartctl commands to gather information about NVMe drives and other drives in the system. The information includes the name, model, serial number, and health status of each disk.\n## Installation\n\nClone the repository:\n\n     git clone https://github.com/yourusername/disk-endpoint.git\n\n## Configuration\n\nThe application reads its configuration from a file named `disk_endpoint.conf` in the same directory. Here’s an example of what the configuration file might look like:\n```\n[DEFAULT]\nHOST = 127.0.0.1\nPORT = 5000\nUSE_HTTPS = False\nCERTIFICATE_PATH = /path/to/certificate.crt\nKEY_PATH = /path/to/key.key\nTOKEN = your_predefined_token\n```\nReplace `/path/to/certificate.crt` and `/path/to/key.key` with the actual paths to your SSL certificate and key files if you are using HTTPS and enable the boolean to `True`. Also, `replace your_predefined_token` with the actual token you want to use for authentication.\n## Systemd Service\n\nYou can also run the application as a systemd service. Here’s an example of a systemd service file:\n```systemd\n[Unit]\nDescription=Disk Endpoint Flask Application\nAfter=network.target\n\n[Service]\nUser=root\nWorkingDirectory=/path/to/your/directory/\nExecStart=python3 /path/to/your/directory/disk_endpoint.py\nRestart=always\n\n[Install]\nWantedBy=multi-user.target\n```\n\nTo use this service file:\n\nSave it as `disk-endpoint.service` in the `/etc/systemd/system` directory.\n\nEnable the service to start on boot with the command `sudo systemctl enable disk-endpoint.service`\n\nStart the service with the command `sudo systemctl start disk-endpoint`.\n\nYou can check the status of the service with the command `sudo systemctl status disk-endpoint`.\n## Using with Home Assistant\n\nYou can use Disk Endpoint with Home Assistant by setting up a RESTful sensor. Here’s an example of how you might set it up:\n\n```yaml\nsensor:\n  - platform: rest\n    resource: http://ip:port/disk_info?token=your_predefined_token\n    name: Disk Info\n    value_template: '{{ value_json.name }}'\n    json_attributes:\n      - model\n      - serial\n      - health_status\n```\nIn this example, `http://ip:port/disk_info?token=your_predefined_token` with the actual URL of your Flask app’s endpoint and your actual token. The value_template is used to extract the value that will be displayed for the sensor in Home Assistant, and json_attributes is used to extract additional attributes from the JSON response.\n## License\n\nThis project is licensed under the terms of The Unlicense.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswetoast%2Fdisk_endpoint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswetoast%2Fdisk_endpoint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswetoast%2Fdisk_endpoint/lists"}