Skip to main content
Solved

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

  • March 9, 2017
  • 214 replies
  • 35552 views

Show first post

214 replies

MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 10, 2025

@Firedog - I have just checked and the checkbox to include the .net runtime was not checked.

I have recreated the deployment zip file and uploaded it to GitHub

/Mike


Firedog
Super User
Forum|alt.badge.img+7
  • Super User
  • October 10, 2025

​I have just checked and the checkbox to include the .net runtime was not checked.
  

That’s great. That might save a few scratched heads.

I now realize I’d forgotten what the utility was supposed to do, so please excuse my stupidity. I rather thought that once the database was up to date I could select a period - a single month, say, and get a CSV with just that month’s data.

I see that you’ve converted the timestamps to local time. I’m not sure that’s the best idea, even though many users would prefer it. OVO have at last got it more or less right with their own display of half-hourly data after I grumbled for years about how wrong it was. My own preference is for year-round consistency, working always in UTC. That way, I don’t see inconsistencies like only 46 entries for 30 March 2025. I’ll be watching come 26 October ...


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 10, 2025

Thanks for the feedback ​@Firedog I don't remember consciously setting the timestamps to local, I will have a look and see what the API is giving us.


Firedog
Super User
Forum|alt.badge.img+7
  • Super User
  • October 10, 2025

The first few lines of yesterday’s for me:

 

{

"electricity": {

"data": [

{

"consumption": 0.067,

"interval": {

"start": "2025-10-08T23:00:00.000",

"end": "2025-10-08T23:29:59.999"

},

"unit": "kwh"

},

{

"consumption": 0.033,

"interval": {

"start": "2025-10-08T23:30:00.000",

"end": "2025-10-08T23:59:59.999"

},

"unit": "kwh"

},

{

"consumption": 0.011,

"interval": {

"start": "2025-10-09T00:00:00.000",

"end": "2025-10-09T00:29:59.999"

},

"unit": "kwh"

},

{

"consumption": 0.031,

"interval": {

"start": "2025-10-09T00:30:00.000",

"end": "2025-10-09T00:59:59.999"

},

"unit": "kwh"

},

{

"consumption": 0.01,

"interval": {

"start": "2025-10-09T01:00:00.000",

"end": "2025-10-09T01:29:59.999"

},

"unit": "kwh"

},

 

[From https://smartpaymapi.ovoenergy.com/usage/api/half-hourly-local/nnnnnnn?date=2025-10-09]


The times are UTC, so the first node is midnight GMT. 


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 10, 2025

Thanks, looking at that json data I can see that the OVO API is not sending us the timestamps properly formatted as UTC because they should then be "2025-10-09T01:29:59.999Z", note the Z is missing from their data.

I will have a think about how to best cope with that.

/Mike


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 11, 2025

@Firedog I have just run my program and the json I get back from the half hourly endpoint for the same day (2025-10-09) as your example start at 2025-10-09T00:00:00.000 as expected.

{
"electricity": {
"data": [
{
"consumption": 0.3,
"interval": {
"start": "2025-10-09T00:00:00.000",
"end": "2025-10-09T00:29:59.999"
},
"unit": "kwh"
},
{
"consumption": 0.308,
"interval": {
"start": "2025-10-09T00:30:00.000",
"end": "2025-10-09T00:59:59.999"
},
"unit": "kwh"
}
]
},
"gas": {
"data": [
{
"consumption": 0,
"interval": {
"start": "2025-10-09T00:00:00.000",
"end": "2025-10-09T00:29:59.999"
},
"unit": "kwh"
},
{
"consumption": 0,
"interval": {
"start": "2025-10-09T00:30:00.000",
"end": "2025-10-09T00:59:59.999"
},
"unit": "kwh"
}
]
}
}

Not sure where to go from here...


Firedog
Super User
Forum|alt.badge.img+7
  • Super User
  • October 11, 2025

Interesting. Early last year, I made a post about British Summertime’s effect on OVO’s data. It included this:

OVO’s system retrieves the current time zone from the device operating system. If this isn’t set properly (e.g. to UTC + 00:00 with daylight savings time applied automatically), then the usage pages won’t necessarily show the correct local timings.

My Windows is set like this: 
  

 

Is yours the same?

My equivalent page (i.e. the ‘placeholder’ before the day’s data have been retrieved) starts at 23:00, so there’s probably something in your machine set differently. It might be within the coding environment even though Windows is set up rationally (!)
  


PS Which incantation did you utter to get your JSON so nicely formatted and posted? 


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 11, 2025

It might well be that the program needs to add some information to the http client when calling the API


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 11, 2025

@Firedog I used the three dots menu shown at the end of the format menu, there is an option in the drop-down for a code block.

On my phone just now I had to switch to desktop mode to see the three dots

Just found that the three dots menu also shows up if I rotate my phone...


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 11, 2025

@Firedog I will check how my windows timezone is set up.

I am pretty sure that it's the same as yours.

I get the same on both my work laptop (Windows 10) and my my home laptop (Windows 11)

Regarding the JSON that you posted a snippet of, was that from your browser or from the dump folder of my program?

 

/Mike


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 11, 2025

@Firedog 

This is what my daily usage looks like on the website on my phone, as you can see it correctly starts at 00:00 BST

 


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 11, 2025

@Firedog 

Is the difference an electric only quirk???

If I remember correctly you are electric only customer.


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 12, 2025

@Firedog I have sussed the difference.

The OVO website calls

https://smartpaymapi.ovoenergy.com/usage/api/half-hourly-local/nnnnnnn?date=2025-10-09

Which gives the date stamps in UTC

Whereas my app calls

https://smartpaymapi.ovoenergy.com/usage/api/half-hourly/nnnnnnn?date=2025-10-09

Which gives the date stamps in local

Quite clearly the -local version is wrongly named I would have called it -utc


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 13, 2025

For those enquisitive people you can switch my app from local timestamps to UTC by changing AppSettings.json from this

{
"LoginUri": "https://my.ovoenergy.com/api/v2/auth/login",
"TokenUri": "https://my.ovoenergy.com/api/v2/auth/token",
"AccountsUri": "https://api.eu1.prod.kaluza.com/graphql/1",
"MonthlyUri": "https://smartpaymapi.ovoenergy.com/usage/api/monthly/{0}?date={1}",
"DailyUri": "https://smartpaymapi.ovoenergy.com/usage/api/daily/{0}?date={1}",
"HalfHourlyUri": "https://smartpaymapi.ovoenergy.com/usage/api/half-hourly/{0}?date={1}",
"DumpData": "true"
}

to this

{
"LoginUri": "https://my.ovoenergy.com/api/v2/auth/login",
"TokenUri": "https://my.ovoenergy.com/api/v2/auth/token",
"AccountsUri": "https://api.eu1.prod.kaluza.com/graphql/1",
"MonthlyUri": "https://smartpaymapi.ovoenergy.com/usage/api/monthly/{0}?date={1}",
"DailyUri": "https://smartpaymapi.ovoenergy.com/usage/api/daily/{0}?date={1}",
"HalfHourlyUri": "https://smartpaymapi.ovoenergy.com/usage/api/half-hourly-local/{0}?date={1}",
"DumpData": "true"
}

It might be prudent to delete/rename the file {accountNo}.db from the folder C:\ProgramData\OvoData before trying this out.

/MIke


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 13, 2025

Just done an experiment using the endpoint “api/half-hourly” vs “api/half-hourly-local” and I have found that my program is over writing some of the values.

api/half-hourly (which gives local time)

First Period Start Last Period Start Count
2025-03-29 00:00:00 2025-03-29 23:30:00 48
2025-03-30 00:00:00 2025-03-30 22:30:00 46
2025-03-31 00:00:00 2025-03-31 23:30:00 48

As you can see for the last change over date two readings have been over written.
 

api/half-hourly-local (which gives UTC)

First Period Start Last Period Start Count
2025-03-29 00:00:00 2025-03-29 23:30:00 48
2025-03-30 00:00:00 2025-03-30 22:30:00 48
2025-03-31 00:00:00 2025-03-31 23:30:00 48

 

So I would recomend altering the appsettings.json as follows

"HalfHourlyUri": "https://smartpaymapi.ovoenergy.com/usage/api/half-hourly-local/{0}?date={1}",


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 14, 2025

@Firedog It will be interesting to see which API the OVO web site calls after we switch back to GMT


Firedog
Super User
Forum|alt.badge.img+7
  • Super User
  • October 14, 2025

@MikeWilliams Thanks for looking into this. I went cross-eyed on Sunday trying to find out why I first complained about this BST nonsense and decided to do other stuff yesterday in the hope that I could get back to it with a clearer brain this morning. Now I find you’ve beaten me to it!

We have several sources of usage data, and they all have their own way of presenting the figures. This can make it easy for the unwary to get waylaid if data from different sources are mixed up. I did a comparison some time ago to illustrate how the same dataset called up by date can produce really different results:
  

 

Of these, the only really accurate one is n3rgy - the meter time-stamps each half-hour bucket as it becomes full and moves on to the next, so the one that starts filling up at midnight is labelled 00:30. The various utilities then apparently change the time stamps to what they think the end-user wants. 

We’ll find out soon what happens at the end of summertime. I think they’ve got it about as good as can be expected. During GMT, there’s no need for the weird first-hour entry on a placeholder page before the day’s data have been retrieved.  


  • Newcomer
  • October 16, 2025

@MikeWilliams & ​@Firedog thanks for your efforts and work on this.

Just thought I’d double check -  is there any way to get the data for this property’s smart meter from the last 400 days as has been mentioned by some previously? (Or any X number of days, as opposed to just for this account)

Thank you!


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 16, 2025

I am currently working on the code to get the last 400 reading for this account.

Not sure how you would get readings for an account that is not yours.

Please explain further ​@X10 ?


Firedog
Super User
Forum|alt.badge.img+7
  • Super User
  • October 16, 2025

… is there any way to get the data for this property’s smart meter from the last 400 days as has been mentioned by some previously… as opposed to just for this account?
  

The OVOData utility retrieves the data stored by OVO in the user account. It doesn’t know or care which meter originally recorded the data. The last 400 days’-worth will of course be included in the All Time dataset so long as the account is old enough.

You may have read that a SMETS2 smart meter records both a daily snapshot of the register readings at midnight and every half-hour’s usage, storing the former for 30 days and the latter for 400 days. Old records are deleted to make space for new ones. 

Some third-party utilities can access the meter’s usage data store with the customer’s permission. The ones I use - Bright and n3rgy - limit data retrieval to three months’-worth, but they might be persuaded to download the whole lot if you ask them nicely. 
 


Firedog
Super User
Forum|alt.badge.img+7
  • Super User
  • October 16, 2025

I’ve just re-read ​@X10’s question and realize that the earlier part of the 400-day period might have been for someone else’s account - a previous owner or tenant, say. I’ve honestly no idea whether the third parties I mentioned have any trouble accessing meter data when the meter concerned has changed hands, e.g. from one supplier to another or from one custodian (tenant/householder) to another. OVO won’t allow anyone other than the account holder to access the data they hold for a particular meter on  that account.

 


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 16, 2025

Sneak preview of the internal state of my progress to obtaining the last 400 meter readings.

As you can see the kalzula endpoint is returning 450 meter readings 
If I search for "source": "SMART_METER" in the raw json from the endpoint I can see that there are 800 smart meter reads the other 50 electricity records have either "source": "INDUSTRY" or "source": "MANUAL_READ_CUSTOMER" 

Visual Studio Debugging

 


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 16, 2025

As I have been a resident at my address for much longer that 400 days I am unable to coment on the ability to get other peoples meeter readings.

This might be a GDPR issue which OVO / kaluza need to sort out.

/Mike


  • Newcomer
  • October 16, 2025

@Firedog & ​@MikeWilliams - Thanks both. I think in my reading of various threads about accessing meter data (I still have several tabs from different threads about it open) I must have confused myself and thought that the output people were talking about was raw data about the meter, regardless of who had ‘ownership’ of it at the time. I had seen someone asking about 400 days somewhere and thought they had also said they only recently moved to OVO or something similar, so I assumed up to 400 days of data was available from the raw data file even if the customer of the provider was new.

Thanks for clarifying that this is not possible.

(As an aside, the reason I asked was that we’ve moved to a property with a heat pump, no gas, which is entirely new for us. We’ve noticed that our daily usage, according to the data, has increased significantly in the last 3 months, but as far as we can tell, our power usage habits haven’t changed enough to justify this increase.  So I thought it might be useful to see historical data to compare, roughly, if other people in this property had similar increases at times.

I mention the heat pump as I thought initially this was the culprit of the additional energy usage, perhaps we weren’t using it properly or it was faulty, but looking at the half-hourly data, I don’t think this is the cause of the spikes in energy usage).

Sorry for the long post and thanks for your answers!


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 16, 2025

@HexhamUser please refer to this post regaring local vs UTC

Just done an experiment using the endpoint “api/half-hourly” vs “api/half-hourly-local” and I have found that my program is over writing some of the values.

api/half-hourly (which gives local time)

First Period Start Last Period Start Count
2025-03-29 00:00:00 2025-03-29 23:30:00 48
2025-03-30 00:00:00 2025-03-30 22:30:00 46
2025-03-31 00:00:00 2025-03-31 23:30:00 48

As you can see for the last change over date two readings have been over written.
 

api/half-hourly-local (which gives UTC)

First Period Start Last Period Start Count
2025-03-29 00:00:00 2025-03-29 23:30:00 48
2025-03-30 00:00:00 2025-03-30 22:30:00 48
2025-03-31 00:00:00 2025-03-31 23:30:00 48

 

So I would recomend altering the appsettings.json as follows

"HalfHourlyUri": "https://smartpaymapi.ovoenergy.com/usage/api/half-hourly-local/{0}?date={1}",

 


Feedback