The code I mentioned in my last post started working a few days after posting. I guess the API was down?
I have moved over to your new example and it’s working ok using the bash script.
I can only test the electric at the moment as the Gas meter didn’t get switched over correctly.
Now I just need to decide on how to display the information and record it correctly.
Will also look if there is an API for the outgoingOctopus once I get that setup.
Edit:
I have just performed
curl -u "api_key" "https://api.octopus.energy/v1/products/"
I got back 13 products the one of interest is
{"code":"OUTGOING-FIX-12M-19-05-13","direction":"EXPORT","full_name":"Outgoing Octopus 12M Fixed May 2019","display_name":"Outgoing Octopus 12M Fixed","description":"Outgoing Octopus flat rate pays you for all exported energy at a flat rate.","is_variable":false,"is_green":true,"is_tracker":false,"is_prepay":false,"is_business":false,"is_restricted":false,"term":12,"available_from":"2019-05-16T00:00:00+01:00","available_to":null,"links":[{"href":"https://api.octopus.energy/v1/products/OUTGOING-FIX-12M-19-05-13/","method":"GET","rel":"self"}],"brand":"OCTOPUS_ENERGY"},
So it looks like the API knows about the exporting outgoingOctopus
There is no mention of exporting in the API docs
I just tried
curl -u "api_key" "https://api.octopus.energy/v1/electricity-meter-points/MPAN/meters/Serial/export/"
But was greeted with {"detail": "Not found."}
so I will send Octopus an email to see if they can shed any light.