home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.83k stars 29.53k forks source link

OVO Energy Integration - Incorrect Data Shown #67031

Closed scottgrobinson closed 1 year ago

scottgrobinson commented 2 years ago

The problem

HA OVO integration doesn't appear to be pulling my electricity data correctly. I am only using electricity, no gas. As you can see from the Ovo website, the data does not match what's shown in HA for the same date.

Ovo Website Ovo

HA History HA History

HA Energy HA Energy

What version of Home Assistant Core has the issue?

Home Assistant 2022.2.9

What was the last working version of Home Assistant Core?

Never

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ovo_energy

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

probot-home-assistant[bot] commented 2 years ago

Hey there @timmo001, mind taking a look at this issue as it has been labeled with an integration (ovo_energy) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)


ovo_energy documentation ovo_energy source (message by IssueLinks)

nathbooth commented 2 years ago

I'm seeing the same behaviour, it seems to only be pulling data once a day.

jmdrawneek commented 2 years ago

Ditto this is a great idea but not really useable at the moment.

Does anyone know if it ever worked?

dangrin0 commented 2 years ago

It looks like HA is using the daily data function OVODailyUsage of the ovoenergy python library in the ovo_energy integration. The version of the library currently in use also presents a OVOHalfHourUsage function which makes use of a slightly different OVO API endpoint.

Happy to help with switching to this, though I've not done any dev work on HA before!

marengaz commented 1 year ago

im also interested in making this work, but also a bit of a hass noob. ive done a bit of triage

i cant work out why the hass sensor is reporting the incorrect information. perhaps in the early hours the ovo api reports a lower value, which is taken, then never updated? i have verified that the api returns the same information as i see in the ovo ui.

with regards to migrating the daily usage to halfhourly usage, im not sure if its my account or if its an ovo outage or what, but the api currently returns no data, but neither does the ovo ui

Screenshot 2022-09-04 at 20 55 50
andypburke commented 1 year ago

hey @dangrin0 did you manage to make this code change? Would definitely be interested to see if we can pull this data every half hour rather than every day.

leedsdata commented 1 year ago

I think the challenge here is that depending on the type of smart meter you have. You will have daily readings, but any other granularity is optional depending on the smart meter. This is different i believe from the 'meter readings' section of My Ovo btw. Although right now it's 15:10 on 03/12/2022, but i can't see hourly breakdown for the current day, only the previous day. I do have a meter reading for today though, but i'm assuming that's 'closing off' yesterday's period. I'm assuming they also receive more frequent readings from me, it's just not displaying them

image

The sensor could report both back i guess and let the user configure which one is presented back into the energy dashboard.

Noted also that @timmo001 's ovoenergy repo is now on v1.3.1

charlienewey commented 1 year ago

Hey all. Just adding my voice to the discussion above. I added this integration recently and have noticed the same problems that you all have. I spent a couple days tinkering with this repo (both the integration and the underlying ovoenergy library) to try and figure out how to get better data. There are a few things that I've noticed:

After investigating, I don't think it's actually possible to get half-hourly data (at least, not in a nice clean way). There is a limitation in the OVO Energy API (I mean their backend, not @timmo001's Python library) that only allows you to fetch data for the previous day, so you can't get energy values (even half-hourly ones) in real time. Unfortunately, HomeAssistant's sensor integrations only support real-time data and you can't load historical values into the database. This means that any energy values that you fetch from the API will be out of date - I've noticed this in my HA setup as the current day's usage in HA reports yesterday's actual values from OVO (if that makes sense).

tl;dr: This integration doesn't appear to work as intended because of limitations with both OVO and HA - and possibly won't work until either;

charlienewey commented 1 year ago

Edit: as a brief update, I noticed that some other UK energy suppliers have the same issue. Check out the FAQ page for the popular Octopus Energy integration.

https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy#faq

timmo001 commented 1 year ago

Yes unfortunately statistics will be a day behind as OVO only supply yesterday's readings. This is an extract from the same API that the my.ovoenergy site uses.

For real-time data, alternatives are needed. This is one which I'm still searching for a simple and not costly method

issue-triage-workflows[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.