Skip to main content
Gary
Rank 1
Rank 1
March 9, 2017
Solved

Can we get access to the OVO energy online account API to download our smart meter usage data?

  • March 9, 2017
  • 227 replies
  • 36559 views

Hi Ovo,

I wondered whether the API that powers your live and historical usage page in the account menu is something you could look into opening up a bit so we can freely access our raw data and also perhaps it may stimulate some interesting community projects?

For instance (more sport related), Strava and Fitbit.

Best answer by g-de

Updated on 14/08/25 by Abby_OVO

 

Tim_OVO: “We love seeing the innovative ways our customers are using tech to help monitor and manage their energy usage. It’s inspiring us to think about ways to do energy differently. We know some customers have been using some of the application programming interface (APIs) behind our public facing services. While we’re OK with that, we do need to make you aware of a couple of things.

 

These APIs are designed to be used by OVO teams only, and aren't public facing. There are some downsides to using APIs that aren't for the public, and we wanted to let you know what these are. Behind the scenes, OVO uses APIs to share and update information between systems that power your bills and your online account. This is done in partnership with Kaluza, the tech company that’s part of the OVO family. They’ve built the billing platform designed to put our customers in the driving seat of their energy usage. 

 

These internal APIs are intended for use by Kaluza and its clients, who are energy retailers like OVO, rather than customers. Because of this, there’s no support for them being used anywhere else, which means they may be discontinued with no notice when we update our products and services. 

 

OVO Energy and Kaluza need to be able to monitor these APIs, and may block access if there's any problems in the future.

 

We know some customers may have put time and effort into developing solutions that use these API. So, now that you know the risks, we want to hear from you on how you’re using the APIs and the problems you’re solving with your DIY approach. 

 

Is there anything you’d like to see from OVO to help you monitor and manage your energy better? Leave a comment below to tell us.”

 

can you help me understand if the links above allow users to access raw data as if from an API?

I can certainly give it a go.

 

Firstly, big thanks to Timmo and other contributors for developing the library. All thanks go to them and links to buy them a coffee for their effort can be found on PyPi or GitHub:

https://pypi.org/project/ovoenergy/
https://github.com/timmo001/ovoenergy

 

I assume the way the library was developed this was to reverse engineer the My OVO website. That is, browse the website as normal and and monitor the traffic to see what OVO URLs and APIs it uses. Assuming this is the case, one of these URLs (get account IDs) already seems to be different but the library is still working for the moment. The APIs being used are not officially supported outside of the website, so first, a warning that any changes to the My OVO website may break the library.

 

For anyone using Python, you should be able to include the ovoenergy library and look at https://github.com/timmo001/ovoenergy/blob/master/ovoenergy/cli.py for how to use it.

 

For replicating this in other languages, the process seems to be as follows:

  1. Login by sending a POST request to https://my.ovoenergy.com/api/v2/auth/login with the following JSON in the body:
    {
    "username": "...",
    "password": "...",
    "rememberMe": true
    }

    From the response, save the cookies to use in all future requests.

  2. Next, send a GET request to https://smartpaym.ovoenergy.com/api/customer-and-account-ids . Be sure to save the items in the “accountIds” property (usually only one item).
  3. Finally, make a GET request to https://smartpaym.ovoenergy.com/api/energy-usage/daily/{accountId}?date={yyyy-MM} where {accountId} is the value from the previous request and {yyyy-MM} is the month in the format 2020-08.

You can also get monthly or half-hourly usage using the following URLs similar to step 3:

As mentioned above, if this is wanted for Home Assistant, the integration was added in version 0.114 (https://www.home-assistant.io/integrations/ovo_energy/).


Unfortunately the data only goes up to the end of the previous day as OVO no longer provide real-time data:

 

227 replies

Jequinlan
Rank 10
Rank 10
October 15, 2020

If I add my username and password into the settings json file I get

 

OvoData.exe -f 01/01/2020 -t 04/02/2020 -o .\OvoData.csv
Unable to login - 401 - Unauthorized
   at OvoData.OvoLiveRepository.OvoConnect.GetLoginCookieAsync(String userName, String password)
   at OvoData.OvoOrchestrator.ExportData()
   at OvoData.Program.EntryPoint.Run()

Oh! Erm, please just use commandline then  no idea why that didnt work! (You kept the "" right?)

John Quinlan
SianiAnni
Rank 4
Rank 4
October 15, 2020

@Tim_OVO Given that some of Ovo’s customers have been asking for this and more for many years, I think @Jequinlan deserves a big round of applause for sharing his code. I agree that without the backing of Ovo, it should be used with a degree of caution. It could just stop working one day, when Ovo next change their api? interface, as happened in the Hive community recently. 

SianiAnni
Jequinlan
Rank 10
Rank 10
October 15, 2020

@Tim_OVO Given that some of Ovo’s customers have been asking for this and more for many years, I think @Jequinlan deserves a big round of applause for sharing his code. I agree that without the backing of Ovo, it should be used with a degree of caution. It could just stop working one day, when Ovo next change their api? interface, as happened in the Hive community recently. 

Yes, if the api changes it could stop, but also the apis are soft coded in the config file so if a trivial change the config will just need updating. The risk of any 3rd party integration exists if any 1st party changes an apinin any situation.

 

If ovo want to see the code , then i am happy to discuss.

John Quinlan
Transparent
Rank 20
Rank 20
October 15, 2020

@Jequinlanwrote:

i will see if i can make a docker version for mac or linux users.

Linux would be great :)

Raspberry-Pi or Arduino would be better still because we can then make our own IHDs   :hugging:

Save energy... recycle electrons!
MikeWilliams
Newcomer
Newcomer
October 15, 2020

Btw, I can confirm there is no risk of insecure as you will see from the command line the details are on your machine and provided to directly access ovo, the exe has been made by best practice .net core code and is a standalone on pc only exe.


Is the program open or closed source?

MikeWilliams
Newcomer
Newcomer
October 15, 2020

If I add my username and password into the settings json file I get

 

OvoData.exe -f 01/01/2020 -t 04/02/2020 -o .\OvoData.csv
Unable to login - 401 - Unauthorized
   at OvoData.OvoLiveRepository.OvoConnect.GetLoginCookieAsync(String userName, String password)
   at OvoData.OvoOrchestrator.ExportData()
   at OvoData.Program.EntryPoint.Run()

Oh! Erm, please just use commandline then  no idea why that didnt work! (You kept the "" right?)

Yep, I kept the quotes to make sure it’s still valid json string.

MikeWilliams
Newcomer
Newcomer
October 15, 2020

@Tim_OVO Given that some of Ovo’s customers have been asking for this and more for many years, I think @Jequinlan deserves a big round of applause for sharing his code. I agree that without the backing of Ovo, it should be used with a degree of caution. It could just stop working one day, when Ovo next change their api? interface, as happened in the Hive community recently. 

Yes, if the api changes it could stop, but also the apis are soft coded in the config file so if a trivial change the config will just need updating. The risk of any 3rd party integration exists if any 1st party changes an apinin any situation.

 

If ovo want to see the code , then i am happy to discuss.

Warning: This only protects the user if the API end-point changes, not when the format of data it fetches changes.

MikeWilliams
Newcomer
Newcomer
October 15, 2020

Hi All,

I have just written a PowerShell script to fetch all of my readings from January 2017 to present-day a month at a time.

You can find it on GitHub at

https://github.com/MikeWilliams-UK/Bulk-Fetch-Ovo-Readings

Have fun

MikeWilliams
Newcomer
Newcomer
October 15, 2020

@Tim_OVO @Transparent @TerryE @andsee @SianiAnni

Here is it: The API exe I promised that takes all that HH data and nicely formats it into a consumable Sheet

https://drive.google.com/drive/folders/1A7XRov0579O53T8OsIGe3wXCk09jul0F?usp=sharing

Download all the files, and read the Readme! (oh, and Enjoy) - now I can start work on ther TOU comparison tool!! 

If anyone is willing to send me their export please do!  - It will help me build the tooling.

John (at) QuinlanServices (dot) Com 

 

Examining the downloaded csv file

  1. The following columns are always empty
    MeterPointIdentifier, CostCurrencyUnit
  2. YearColumn is always same as MonthOfYear column
  3. CostAmmount is always zero
  4. IntervalStart and IntervalEnd columns do not require fractions of a second
    2018-12-01T04:30:00.0000000 → 2018-12-01T04:30:00 please.

Not sure if these are your columns, but the output could do with tidying up.

As a programmer I can help with this.

Jequinlan
Rank 10
Rank 10
October 15, 2020

Btw, I can confirm there is no risk of insecure as you will see from the command line the details are on your machine and provided to directly access ovo, the exe has been made by best practice .net core code and is a standalone on pc only exe.


Is the program open or closed source?

At the moment I am discussing if I should open source it or if OVO themselves may be interested to make it or a basis of it integrated as a supported offering.

John Quinlan