Read per-minute energy usage form the Emporia Vue API

Jason Tarka 88f6010203 Make `run.sh` run in the right dir + better output 11 maanden geleden
.gitignore ef058e92cd Read minutely usage data for the last 7 days 11 maanden geleden
README.md 913a922c89 Add `run.sh` + fix small bugs 11 maanden geleden
main.py 44d021b5ae Add retries for fetching the usage data 11 maanden geleden
requirements.txt 5c315fddfd Initial commit, getting devices & 12h of usage 11 maanden geleden
run.sh 88f6010203 Make `run.sh` run in the right dir + better output 11 maanden geleden

README.md

Emporia Vue Energy Monitor Readings

Setting Up

# One of these:
pip install virtualenv
sudo apt install python3-venv

# Then setup the virtual environment:
python3 -m venv env

# Activate the environment:
source env/bin/activate

# Install required packages
pip install -r requirements.txt

# Update set of required packages
pip freeze > requirements.txt

Authentication

Create a keys.json file in this directory containing your username & password:

{
	"username": "<your username>",
	"password": "<your password>"
}

After the first time the script is run, the file will automatically be updated to use access tokens, rather than your password.

Usage

To create a usage.tsv file, and keep it updated with new, non-duplicated, results, just run the script:

./run.sh

To run the code manually:

# Activate the environment:
source env/bin/activate

# Run the script & store the results:
python3 main.py >> output.tsv