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.
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.
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!
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
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