Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am paulw on github.
  • I am ertnec (https://keybase.io/ertnec) on keybase.
  • I have a public key ASBMxZeVBAPk1HjIwKGSSNs7sI0Nkr5LBPZHOXXhisWNgwo

To claim this, I am signing this object:

@PaulW
PaulW / ovoapi.py
Created March 14, 2018 11:52
Python script to authenticate and pull data from ovo energy to track smart meter usage. Uses ovo's RESTful API interface. At present, the script will error on the initial authentication if no valid token already exists, as takes a short while for ovo to catch up it seems, so I need to add in a catch for this.
#!/usr/bin/env python
# This requires Python 2.7. This will not work with Python 3
USERNAME = 'Your@email.address'
PASSWORD = 'Your ovo Password'
from requests import Request, Session
import json
import time