Having spent a small amount of time with this today it actually seems quite easy, if only I could get the syntax right. I installed HTTPIE and it's pre-reqs which took a while, but I can't find out how to actually fire up HTTPIE. So I tried by using their example in a CURL command (in a command window), which must have come with something I've installed over the years.
I just piped the output to a text file and I had some viable data. Except I need to format it better to allow for a straightforward import, but that is, I presume, stage 2.
I couldn't get it to accept any parameters though, like a from and to date. And apparently, according to SWMBO, I had more important things to do, like getting on with the decorating I am in the middle of.
I'm away for the weekend but will find a bit of time for this next week I hope.
This was the CURL command
curl -u "sk_live_[[my metering info]]:" api.octopus.energy/v1/electricity-meter-points/[[my metering info]]/meters/18P5046815/consumption/ > d:d.txt
which gave some output from the past three days but I when tried adding the parameters they mention after a , without a and other combos but it then couldn't find the host. Like this
curl -u "sk_live_[[my metering info]]:" api.octopus.energy/v1/electricity-meter-points/[[my metering info]]/meters/18P5046815/consumption/ period_from=="2018-12-25T00:00" period_to=="2018-12-26T00:00" > d:c.txt
Possibly I am mixing command types or something.
The output came as one long coma separated string which I managed to get into Excel (easily!) but I could do with making it suitable to easily alter to a table after importing it. I could probably have done that with a macro but I'm trying to keep it simple.
|