Skip to main content
Solved

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


Show first post

MikeWilliams
Carbon Cutter**

Are you a Gas only customer?

I already fixed an issue for Electricity Only customers last with the aid of @Firedog 

 

/Mike


Mike: Electricity only. Economy 7 also, but that probably isn’t relevant. Thanks. 


MikeWilliams
Carbon Cutter**
HexhamUser wrote:

I had already created the folder, but the permissions weren’t set to the full control (although the logs folder and the .db file had been created).

So, I cleared out the contents of the OvoData folder, changed the permissions to allow Full Control and Modify, and reran your app. But got exactly the same exception. Again the Logs folder and the .db file have been created.

Anything else I can check for you?

Can you post all the log file lines from the last beginning “Uri:” until the exception?
Be careful to mask out your account number with *****

/Mike


Log file lines from last Uri are as follows:

2024-11-06 17:20:52 - Uri: https://smartpaymapi.ovoenergy.com/usage/api/monthly/nnnnnnn?date=2020
2024-11-06 17:20:52 - System.NullReferenceException: Object reference not set to an instance of an object.
   at OvoData.Helpers.SqliteHelper.UpsertMonthly(String fuelType, List`1 items) in C:\Dev\Mike\GitHub\My-Ovo-Data\Helpers\SqliteHelper.cs:line 114
   at OvoData.MainWindow.OnClick_Read(Object sender, RoutedEventArgs e) in C:\Dev\Mike\GitHub\My-Ovo-Data\MainWindow.xaml.cs:line 189
 

Let me know if you need more.

 


Posted the requested information but apparently it needs to be revewed by the moderators. In case that takes time, the exception line was:

2024-11-06 17:20:52 - System.NullReferenceException: Object reference not set to an instance of an object.
   at OvoData.Helpers.SqliteHelper.UpsertMonthly(String fuelType, List`1 items) in C:\Dev\Mike\GitHub\My-Ovo-Data\Helpers\SqliteHelper.cs:line 114
   at OvoData.MainWindow.OnClick_Read(Object sender, RoutedEventArgs e) in C:\Dev\Mike\GitHub\My-Ovo-Data\MainWindow.xaml.cs:line 189

That was preceded in the log by the Uri line which was https: slash slash smartpaymapi.ovoenergy.com slash usage slash api slash monthly slash accountNo?date=2020

No other lines in the log between those two entries. Let me know if you need more.


MikeWilliams
Carbon Cutter**

That is interesting in that the URL ends 2020.

Is that year significant?

Can you PM me the whole log file please?


The year isn’t significant to me, as far as I can see. The whole log file (4554 lines, 342k) is being sent to you in a PM, but it seems to be taking a while … having clicked “send” the button is just being highlighted continually with three white dots. This is the first time I’ve used PM so I may have done something wrong?

Edit: Just checked my online account. The last bill I can see online is for May-Jun 2020. I have been an OVO customer since 2013. Interestingly, I can see Usage data going back to 2013, but not the bills!


MikeWilliams
Carbon Cutter**

With the kind assistance of @HexhamUser I have been able to solve the issue with his data for 2020.

My code could not cope with him having “free” 😁 electricity prior to May.

The data segments were missing, causing my code to error.

This is now fixed and I intend to release this later this week.

/Mike Williams


MikeWilliams
Carbon Cutter**

I have just released V1.0.3 of my app to GitHub, this fixes the issue found by @HexhamUser when you have electricity with missing cost data.

Just download the zip file from https://github.com/MikeWilliams-UK/My-Ovo-Data/releases and unzip it’s contents to any folder, then run OvoData.exe

If you like my work, please consider donating at https://www.buymeacoffee.com/mikewilliamsuk

/Mike Williams


Those who just want to dump half-hourly usage for archival purposes (JSON, CSV) might find this script helpful: https://github.com/nickcmaynard/ovo-energy-usage-scripts


MikeWilliams
Carbon Cutter**
nickcmaynard wrote:

Those who just want to dump half-hourly usage for archival purposes (JSON, CSV) might find this script helpful: https://github.com/nickcmaynard/ovo-energy-usage-scripts

@nickcmaynard you have exposed your OVO custumer ID to the whole world in your script.


MikeWilliams
Carbon Cutter**

Hi All,

I have been informed by ​@HexhamUser that my program is not retreiving any data.

I have investigated this using postman and I can see that the API is working but retriving empty data sets for anything in 2025.

This tallys exactly with the OVO website, so I think we will just have to wait for them to fix the API.

Daily
Monthly

 


MikeWilliams
Carbon Cutter**

Just tried to chat with someone at OVO, but the chat bot failed to connect me with a real person.

Maybe it will all stat to work again tomorrow when their system has at least two days daya from 2025 (fingers crossed)


Blastoise186
Plan Zero Hero
Forum|alt.badge.img+1

Please see https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository for instructions on how to remove sensitive data from a GitHub repository. I would strongly recommend doing so in this case.


MikeWilliams wrote:

@nickcmaynard you have exposed your OVO custumer ID to the whole world in your script.

Ho hum, thanks folks - should be fixed now!


MikeWilliams
Carbon Cutter**

Hi All, ​@HexhamUser 

Just checked on the OVO web site and the page for viewing “Your enery use” is now working (for me).

My app is also working again (for me), please remember to chose “This month & Last month” to ensure that December’s data is retrieved.

/Mike


Emmanuelle_OVO
Community Manager

Great news ​@MikeWilliams thanks for the update! 🙂


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings