This script is intended for once-off extraction of detailed usage data for archival purposes only.
The OVO APIs are probably not designed for this, but without a better alternative, desperate times call for desperate measures.
Use the get-ovo.sh script to grab raw half-hourly usage data in JSON format between two dates.
This will output one JSON file per day between START and END.
To use:
- Copy
config.env.templatetoconfig.env, adjusting the values ofSTART,END,ACCOUNT,USERNAMEandPASSWORDappropriately. - Run
bash get-ovo.sh
Now you have the extracted daily JSON files, you can convert these to a raw CSV covering the total time period:
Electricity CSV:
jq '.electricity.data[] | {start:.interval.start,end:.interval.end,consumption:.consumption} | join(",")' -r *.json > electricity.csvGas CSV:
jq '.gas.data[] | {start:.interval.start,end:.interval.end,consumption:.consumption} | join(",")' -r *.json > gas.csv