{"id":17870308,"url":"https://github.com/half-shot/autopowerbill","last_synced_at":"2026-04-29T18:31:02.050Z","repository":{"id":237909901,"uuid":"795473763","full_name":"Half-Shot/autopowerbill","owner":"Half-Shot","description":"Calculate the cost of power usage from a power monitor, hooked up to Octopus UK energy prices.","archived":false,"fork":false,"pushed_at":"2024-05-17T08:04:38.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-03T12:40:45.384Z","etag":null,"topics":["iot","mqtt","octopus-energy"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/Half-Shot.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-05-03T11:08:31.000Z","updated_at":"2024-05-17T08:04:41.000Z","dependencies_parsed_at":"2024-05-17T09:26:47.109Z","dependency_job_id":"8205199d-aeec-4a50-a97e-82d20ff4b43c","html_url":"https://github.com/Half-Shot/autopowerbill","commit_stats":null,"previous_names":["half-shot/autopowerbill"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Half-Shot/autopowerbill","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Half-Shot%2Fautopowerbill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Half-Shot%2Fautopowerbill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Half-Shot%2Fautopowerbill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Half-Shot%2Fautopowerbill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Half-Shot","download_url":"https://codeload.github.com/Half-Shot/autopowerbill/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Half-Shot%2Fautopowerbill/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32439058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T18:12:22.909Z","status":"ssl_error","status_checked_at":"2026-04-29T18:11:33.322Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["iot","mqtt","octopus-energy"],"created_at":"2024-10-28T10:13:33.002Z","updated_at":"2026-04-29T18:31:02.034Z","avatar_url":"https://github.com/Half-Shot.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# autopowerbill\nCalculate the cost of power usage from a power monitor, hooked up to Octopus UK Agile energy prices.\n\nThis tool will measure the amount of kwh used between monitoring periods, and work out with reasonable\naccuracy how much power was used between two points and therefore which prices apply. The more often\npower is reported, the better the accuracy.\n\nNew prices are automatically fetched every 3 hours.\n\n\n### Usage\n\nYou need to install Rust. And if you don't have it, you have some important life questions to ask yourself.\n\nYou can then run `-h` to get the command line arguments.\n```sh\ncargo run -- -h\n\nMonitors telemetry from a Tasmota Smart Plug and accurate records the costs for each period of use, using Octopus Agile energy prices\n\nUsage: autopowerbill [OPTIONS] --host \u003cHOST\u003e --topic \u003cTOPIC\u003e --product-code \u003cPRODUCT_CODE\u003e --tariff-code \u003cTARIFF_CODE\u003e --database \u003cDATABASE\u003e\n\nOptions:\n      --host \u003cHOST\u003e                  MQTT broker host name\n  -p, --port \u003cPORT\u003e                  MQTT broker port\n  -t, --topic \u003cTOPIC\u003e                MQTT topic\n      --product-code \u003cPRODUCT_CODE\u003e  Octopus Energy product code\n      --tariff-code \u003cTARIFF_CODE\u003e    Octopus Energy tariff code\n      --database \u003cDATABASE\u003e          Postgres database connection string\n  -h, --help                         Print help\n  -V, --version                      Print version\n```\n\nFor example, you can (after running `cargo install`) do:\n\n```sh\nautopowerbill --product-code \"AGILE-24-04-03\" --tariff-code \"E-1R-AGILE-24-04-03-D\" --topic  \"tele/your-device-topic/SENSOR\" --host 'your-broker-address' --database 'postgres://connectionstring'\n```\n\nto start recording data. Data is automatically recorded into two CSV files:\n\n- `powerusage.csv` contains the total power usage at a given timestamp.\n  - `\u003cdate\u003e,\u003ctotal_energy\u003e`\n- `costfile.csv` contains the costs incurred since the last recorded time.\n  - `\u003cdate\u003e,\u003cusage_over_period\u003e,\u003ctotal_usage\u003e,\u003ccost_of_usage_over_period\u003e`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalf-shot%2Fautopowerbill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalf-shot%2Fautopowerbill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalf-shot%2Fautopowerbill/lists"}