Code Monkey home page Code Monkey logo

bats-core's Introduction

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 

Live Status at 5 Minute Interval

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

Backfille months of data

Authentication

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

bats-core's People

Contributors

adamhjk avatar agent-0028 avatar ahippo avatar alexskrypnyk avatar btamayo avatar cdevinesr avatar cyphar avatar dotmpe avatar eddiewebb avatar flamefire avatar gitter-badger avatar jasonkarns avatar jwerle avatar kenden avatar mbland avatar mislav avatar nkakouros avatar pixdrift avatar qneill avatar rfay avatar roktas avatar spikegrobstein avatar sstephenson avatar sublimino avatar sylvain303 avatar toc-me[bot] avatar trygvis avatar virgilwashere avatar xdhmoore avatar xnum avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.