Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/half-shot/autopowerbill
Calculate the cost of power usage from a power monitor, hooked up to Octopus UK energy prices.
https://github.com/half-shot/autopowerbill
iot mqtt octopus-energy
Last synced: 11 days ago
JSON representation
Calculate the cost of power usage from a power monitor, hooked up to Octopus UK energy prices.
- Host: GitHub
- URL: https://github.com/half-shot/autopowerbill
- Owner: Half-Shot
- License: mit
- Created: 2024-05-03T11:08:31.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-05-17T08:04:38.000Z (6 months ago)
- Last Synced: 2024-05-17T09:26:45.197Z (6 months ago)
- Topics: iot, mqtt, octopus-energy
- Language: Rust
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# autopowerbill
Calculate the cost of power usage from a power monitor, hooked up to Octopus UK Agile energy prices.This tool will measure the amount of kwh used between monitoring periods, and work out with reasonable
accuracy how much power was used between two points and therefore which prices apply. The more often
power is reported, the better the accuracy.New prices are automatically fetched every 3 hours.
### Usage
You need to install Rust. And if you don't have it, you have some important life questions to ask yourself.
You can then run `-h` to get the command line arguments.
```sh
cargo run -- -hMonitors telemetry from a Tasmota Smart Plug and accurate records the costs for each period of use, using Octopus Agile energy prices
Usage: autopowerbill [OPTIONS] --host --topic --product-code --tariff-code --database
Options:
--host MQTT broker host name
-p, --port MQTT broker port
-t, --topic MQTT topic
--product-code Octopus Energy product code
--tariff-code Octopus Energy tariff code
--database Postgres database connection string
-h, --help Print help
-V, --version Print version
```For example, you can (after running `cargo install`) do:
```sh
autopowerbill --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'
```to start recording data. Data is automatically recorded into two CSV files:
- `powerusage.csv` contains the total power usage at a given timestamp.
- `,`
- `costfile.csv` contains the costs incurred since the last recorded time.
- `,,,`