Solved

Can we get access to the live usage API?



Show first post

204 replies

Userlevel 7
let's get you added our list of future volunteers, I'm sorry to say no API is available, nor any trials confirmed at the moment. I have a list for when things change..


@100903609 @Riscy @r3m0dul8 please PM me to confirm your OVO account number, name, and email address!
+1 for API access

My use case:

To integrate it into a home automation system - show daily/monthly/yearly usage along with pricing maybe? I would love to have this show up on my home automation system - would be the first UK company to have this option and functionality - and also home automation is becoming a more wider sought-after tech required in a modern day home.

GET THIS CONTENT SORTED - ASAP (please!!!)
+1 again.


My use-case?

Alerting me when the underfloor heating has come on unexpectedly while we're out, due to the frost stat being triggered. I could then decide to turn on the GCH heating remotely, saving on total energy use.


How?

Use an Ovo API to monitor for when the kW rate jumps by more than a threshold, for a period of time. This would indicate that a high-load device has turned on.

I'd then check whether the house is occupied, e.g. by connecting to Tado's location service or similar.

Finally I'd check if the weather service suggests it's a cold day outside.

If nobody is at home, and the load has jumped, it suggests the underfloor heating has turned on due to the frost stat. Send an alert to mobile phones, so we can decide to switch on Tado remotely to mitigate the underfloor heating.


Tech stack?

Raspberry Pi, Tado, Home Assistant, Node-RED, Python.
+1 for the API please
Userlevel 6
Hi everyone on this thread!

I've had an update from the team about the Smart live usage API - unfortunately we're no longer running trials at the moment, but if anyone is still interested, send us your details and we can add you to our list of future volunteers.

Thanks
Userlevel 3
@jdenver, I have a passive-class house which uses electricity only, so I haven't needed to work out how the API works for gas MPRNs.

The logon function established a new session with the OVO server and collects the valid session cookies for your account in the returned Session object. The getMPAN function issues a /api/paym/accounts request which returns a JSON object containing all of your account info.

If you use the debugger mode in FF or Chrome, then you can walk this object interactively to see the field that you need to pick. I infer from what @SianiAnni says, that there is a corresponding mprn field that you could access in line 67 as data[0]['consumers'][0]['mprm'] to fetch your MPRN, and that this can be substituted in the remaining code to get your gas half-hourly figures. (Perhaps she could clarify.)

As I said, I don't have a gas meter so I can't check this myself.

Hope this helps ☺️

Thanks Terry, Im quiet new to Python but learning fast. Ive not ventured into NodeRED yet. When I ran the script there was issues with MySQL but the data was displayed on the screen as it should.

Trying to work out how to adapt the code to capture gas data.
To get the gas data you just replace the Meter Point Administrative Number (MPAN) with your Meter Point Reference Number (MPRN)



Still not sure on where or how to change the MPRN number in the script if anyone can help.
Userlevel 3
I really like OVO, but a 30+% price hike is just too much, when other suppliers offer better deals.

To be fair to OVO, in the spirit of full disclosure, etc, and having shopped around and built up a decent sized spreadsheet comparison of fixed tariff alternatives, I didn't find any price-fixed tariffs that was better than their 24mth Fixed Tariff online offer, so I will be staying with OVO for another 2 years.

And this has the upside that I will have one less ESP8266 project less to do, as the Python script being called from Node RED continues to do everything that I would want it to. ☺️

The lack of standardisation of Smart metering during initial roll-out was a major cock-up on the part of the regulators, IMO, as the loss of Smart Metering on switch is an impediment to consumer choice.
Hi @Tim_OVO,

Is there any more news on the Live usage API access? I signed up quite a while ago now but haven't heard any news about the trial. I'm keen to build a component for the Home Assistant opensource home automation server to make it aware of energy usage within the home.

Also will the live usage API give real-time information uploaded to OVO via the supplied CAD rather than having to wait for the smart meter to check in every half and hour.

Regards,

Adrian.


Ive just stated to get involved in Home Assistant with Hassio on the pi. Very good system.
Hi @Tim_OVO,

Is there any more news on the Live usage API access? I signed up quite a while ago now but haven't heard any news about the trial. I'm keen to build a component for the Home Assistant opensource home automation server to make it aware of energy usage within the home.

Also will the live usage API give real-time information uploaded to OVO via the supplied CAD rather than having to wait for the smart meter to check in every half and hour.

Regards,

Adrian.
good morning,
I would like access to the API too.

Let us play with OUR data 🙂
Thanks Terry, Im quiet new to Python but learning fast. Ive not ventured into NodeRED yet. When I ran the script there was issues with MySQL but the data was displayed on the screen as it should.

Trying to work out how to adapt the code to capture gas data.

To get the gas data you just replace the Meter Point Administrative Number (MPAN) with your Meter Point Reference Number (MPRN)


Thanks, will check it out
Userlevel 4
Badge
There are some of us that have been on the list for quite a while and there has been no further news on access, so dont hold your breath... There are other small startup providers that are really embracing making all this 'open' to those who are capable.
Ooh, who are they? Not been happy since Ovo pulled the plug on 5 minute data, and now you can't even view current day usage on the website.
Userlevel 4
Badge
I'm interested in making the current live usage more accessible - the page on the website is great but means physically going to look at it, so I'd like to have the current usage readily available on something such as my phone.

I think it would also be interesting to look at the historic usage on other ways such as day of the week and cross reference with freely available weather history to see if there are correlations temperature and gas usage.🆒


Our developers will love this feedback, Gary - keep it coming! Anyone else have any suggestions for how we could use your smart meter data?

Tim

I think its us customers who want to use it Tim!
Userlevel 4
Badge
That reminds me. Need to sort out leaving for a better company.
Not happy with the fact I've been on the waiting list for the API for over a year now and heard little from it except that it's now being backbenched, and the rediculous price hike recently.
Wish me luck 👍

Only waiting for an API for a year? I've been waiting much longer than that!
Userlevel 4
Badge
Thanks Terry, Im quiet new to Python but learning fast. Ive not ventured into NodeRED yet. When I ran the script there was issues with MySQL but the data was displayed on the screen as it should.

Trying to work out how to adapt the code to capture gas data.

To get the gas data you just replace the Meter Point Administrative Number (MPAN) with your Meter Point Reference Number (MPRN)
That reminds me. Need to sort out leaving for a better company.
Not happy with the fact I've been on the waiting list for the API for over a year now and heard little from it except that it's now being backbenched, and the rediculous price hike recently.
Wish me luck 👍
Userlevel 4
Badge

Advanced programmers could no doubt script the whole session connection to recover the session cookies. I am one, but I haven't bothered.


Further to @ErTnEc's git contribution, I have updated this to do the V2 API for historic consumption. I run the following script daily to download the previous day's half-hourly consumption into the MySQL DB that underpins my NodeRED installation: load_readings.py.
There's an issue with NodeRED HTTPrequest which causes logon problems so I haven't got the native NodeRED version working. Sorry. It's not worth my spending time on this because I will moving supplier when my contract ends. I really like OVO, but a 30+% price hike is just too much, when other suppliers offer better deals.


Thanks for this. I haven't managed to get your load_readings.py script to run on Windows, but as long as I'm already logged into MyOvo, pasting a handcrafted url from your script certainly returns the data, which is great because the url which I was using last winter no longer works! I copy the displayed data into a python script which then parses and outputs something human readable and graphable into a csv file.
Thanks Terry, Im quiet new to Python but learning fast. Ive not ventured into NodeRED yet. When I ran the script there was issues with MySQL but the data was displayed on the screen as it should.

Trying to work out how to adapt the code to capture gas data.
Userlevel 3
works a treat.
@jdenver, If you check, I've updated the script slightly. What I've found is that the Smart Meter sends its SMS message once a day about 02:00, so the consumption figures for the previous day are only available after that. The message occasionally fails for whatever reason, so you can miss a day, but it does retry at some point. So what I've done is to query the max DTS from my readings table and set the FROM to 30 mins after the last end. That way, the reading will catch up and you don't end up dropping data in your table.

I am note sure why the NodeRED native version fails to authenticate, but it is just easier to trigger the flow by a cron injector (actually I use node-red-contrib-pkjq as this is better maintained) and then exec the python script.
Thanks TerryE works a treat.
Userlevel 3

Advanced programmers could no doubt script the whole session connection to recover the session cookies. I am one, but I haven't bothered.


Further to @ErTnEc's git contribution, I have updated this to do the V2 API for historic consumption. I run the following script daily to download the previous day's half-hourly consumption into the MySQL DB that underpins my NodeRED installation: load_readings.py.

There's an issue with NodeRED HTTPrequest which causes logon problems so I haven't got the native NodeRED version working. Sorry. It's not worth my spending time on this because I will moving supplier when my contract ends. I really like OVO, but a 30+% price hike is just too much, when other suppliers offer better deals.
Just PM'd you Tim account number ending in ****910, very interested in the API trials for integration into our home automation system.
It's been a bit quiet here. Quite a long trial it seems. @Tim_OVO is there any further news?
Userlevel 3
@ErTnEc, this is exactly what I want to be able to do. I use NodeRED to poll darksky.net for current weather readings. Can you send me your python script to play with?

Sorry I've had a hectic time lately and not had chance to pick this back up.

https://gist.github.com/PaulW/7f3ce29c3469757c26504b572597a45c

I still need to add in some extra error handling (specifically around initial auth requests as it takes a while for the authtoken to be fully active it seems) but it's a fairly simple process which people can easily build upon if need be.

Reply