- Create a
.env
file or environment vairables containing API keys for sense and pvoutput.org - use pipenv to install dependencies in pipfile.
- Run commands below
NOTE: live data (current watts generated, consumed, to/from grid, voltage) can be sent every 5 or 15 minutes. Daily Totals are only updated hourly this is a limitation of sense, and will match their API/UI.
The live.py file will load generation and consumpotion currents and totals, along with line voltage.
*/15 * * * * /usr/bin/python3 /WHEREVERYOUSAVETHIS/live.py
# main.py YYYY MM DD
pipenv run python main.py 2020 02 01
Just be aware of your API limits!
# main.py YYYY MM DD DAYS
pipenv run python main.py 2020 02 01 29 #leap year!
> Loading 29 days of data starting on 2020-02-01
# no argument run
pipenv run python main.py
SENSE_USER="YOUR EMAIL"
SENSE_PASSWD="SENSE PASSWORD"
PVOUTPUT_KEY="API KE FROM PV"
PVOUTPUT_ID="SITE ID FROM PV"