The energy data coming from a British Gas smart meter is only available as a chart embedded in the "myenergy" web page of British Gas website, which makes it difficult to analyse offline. This utility downloads the energy data from the customer's online account and saves it as CSV files, available for offline analysis.
Install the Python script and its dependencies using
sudo ./setup.py install
The Dockerfile
provides information about the minimum environment required to install and run the program.
Once installed, you can download the energy data from a British Gas smart meter account by running:
download_myenergy [username] [password] [account_number]
Where username
is the myenergy account user name (typically the email address), password
is the account password, and account_number
is the myenergy account number. The account number can be found on the "Account Summary" web page of British Gas web site.
By default the program will try to download all daily energy (gas and electricity) data starting from 1st January 2016 until the present time. The results are then saved in electricity.csv
and gas.csv
files.