|
1 | 1 | # electric-usage-downloader |
2 | | -Import smart meter metrics from NOVEC into VictoriaMetrics |
| 2 | + |
| 3 | +This project reverse engineers the api at the electric co-op Novec, https://novec.smarthub.coop/ to allow |
| 4 | +downloading 15-minute resolution electic usage and cost data for your personal account if you have a smart meter. |
| 5 | + |
| 6 | +Data is imported into InfluxDB or VictoriaMetrics. |
| 7 | + |
| 8 | +## Config |
| 9 | + |
| 10 | +Download [config.example.yaml](config.example.yaml) and fill in your own values. |
| 11 | + |
| 12 | +- `extract_days` is how many days to look back from the current day. Max is 45. |
| 13 | + if specific `--start` and `--end` flags are not specified. |
| 14 | +- `account` is your account number, available on your bill and on the |
| 15 | + Novec smart hub website. |
| 16 | +- `password` is hashed or encrypted in some unknown way, and must be retrieved from your browser: |
| 17 | + - Navigate to https://novec.smarthub.coop/ui/#/login |
| 18 | + - Open the Developer tools to the Network tab |
| 19 | + - Login. |
| 20 | + - Find a call to `https://novec.smarthub.coop/services/oauth/auth/v2` in the Network tab |
| 21 | + - Open the call, and copy the `password` field from the Payload tab. |
| 22 | +- `service_location` is an internal Novec number. and must be retrieved from your browser: |
| 23 | + - Open the Developer tools to the Network tab |
| 24 | + - Navigate to [Usage Explorer](https://novec.smarthub.coop/ui/#/usageExplorer) |
| 25 | + - Find a call to `https://novec.smarthub.coop/services/secured/utility-usage/poll` in the Network tab |
| 26 | + - Open the call, and copy the `serviceLocationNumber` field from the Payload tab. |
| 27 | +- `influxdb.insecure` allows connecting to a server with certificate issues. |
| 28 | +- The other fields should be fairly self-explanatory. |
| 29 | + |
| 30 | +## Running |
| 31 | + |
| 32 | +- To download and insert the last `extract_days`, run like this arguments: `electric-usage-downloader --config config.yaml` |
| 33 | +- To download and insert a specific date range, run with arguments: |
| 34 | + `electric-usage-downloader --config config.yaml --start 2024-01-16 --end 2024-01-17` |
| 35 | + |
| 36 | +## Details |
| 37 | + |
| 38 | +The Novec api currently supports 15-minute resolution of data. This could change in the future; it used to be available |
| 39 | +as downloaded CSV files as well, but now only hourly information is available that way. |
| 40 | + |
| 41 | +Measurement: **electric** |
| 42 | + |
| 43 | +Fields: |
| 44 | +- **cost** (in US cents) |
| 45 | +- **usage** (in watts) |
| 46 | + |
| 47 | +## Dashboard |
| 48 | + |
| 49 | +I have included my [Grafana dashboard panel definition](dashboard/panel.json) in the repo. |
| 50 | + |
| 51 | +Features: |
| 52 | +- Electric usage graphed in watts |
| 53 | +- Trailing 1d and 7d averages |
| 54 | +- Cumulative usage (right x axis) |
| 55 | +- Integrated with data from my Ecobee thermostat, showing when my heat pump or aux oil heat is running. |
| 56 | + - See https://github.com/tedpearson/ecobeemetrics for how I get this data |
| 57 | + |
| 58 | +Here's a screenshot of the dashboard panel in action: |
| 59 | + |
0 commit comments