https://github.com/eddiewebb/sense-to-pvoutput
Feed Sense Energy data to PVOutput.org - realtime or backfill
https://github.com/eddiewebb/sense-to-pvoutput
pvoutput sense-energy
Last synced: 5 days ago
JSON representation
Feed Sense Energy data to PVOutput.org - realtime or backfill
- Host: GitHub
- URL: https://github.com/eddiewebb/sense-to-pvoutput
- Owner: eddiewebb
- Created: 2020-04-04T18:38:46.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-07T00:12:29.000Z (about 6 years ago)
- Last Synced: 2023-12-16T15:47:46.576Z (over 2 years ago)
- Topics: pvoutput, sense-energy
- Language: Python
- Homepage: https://pvoutput.org/intraday.jsp?id=84216&sid=74670
- Size: 238 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pvoutput.org loader for Sense users.
## Setup
1) Create a `.env` file or environment vairables containing API keys for sense and pvoutput.org
2) use pipenv to install dependencies in pipfile.
3) Run commands below
## Live Status Loads
**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.
### Via Cron
The live.py file will load generation and consumpotion currents and totals, along with line voltage.
```
*/15 * * * * /usr/bin/python3 /WHEREVERYOUSAVETHIS/live.py
```

## Backfilling
### Backfill one day
```
# main.py YYYY MM DD
pipenv run python main.py 2020 02 01
```
### Backfill many days
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
```
### Backfil yesterday
```
# no argument run
pipenv run python main.py
```

## Authentication
```
SENSE_USER="YOUR EMAIL"
SENSE_PASSWD="SENSE PASSWORD"
PVOUTPUT_KEY="API KE FROM PV"
PVOUTPUT_ID="SITE ID FROM PV"
```