Giter Club home page Giter Club logo

sense's Introduction

sense_api

Sense Energy Monitor API Interface [WIP]

Systematic access to the Sense monitor data. Exploratory work on pulling data from Sense to be used in other tools - Smartthings, ActiveTiles, etc.

Python version based on the work done here in Powershell: https://gist.github.com/mbrownnycnyc/db3209a1045746f5e287ea6b6631e19c

Contributors

Feel free to fork and PR!

https://github.com/kbickar

Todo

  • Add POST/PUT where/if applicable
  • CLI
  • Improved error handling

Install

pip install sense_energy

Example Usage:

    sense = Senseable()
    sense.authenticate(username, password)
    sense.update_realtime()
    sense.update_trend_data()
    print ("Active:",sense.active_power,"W")
    print ("Active Solar:",sense.active_solar_power,"W")
    print ("Daily:",sense.daily_usage,"KW")
    print ("Daily Solar:",sense.daily_production,"KW")
    print ("Active Devices:",", ".join(sense.active_devices))

There are plenty of methods for you to call so modify however you see fit

If using the API to log data, you should only create one instance of Senseable and then reuse that to get the updated stats. Creating the instance authenticates with the Sense API which should only be once every 15-20 minutes at most.
Calling the update_trend_data() function will update all the trend stats and get_realtime() will retrieve the latest real time stats.

The get_realtime() is by default rate limited to one call per 30 seconds. This can be modified by setting the Senseable object attribute rate_limit to a different value.

sense's People

Contributors

kbickar avatar scottbonline avatar popre avatar kylekampy avatar firestormo avatar michaeldavie avatar

Watchers

James Cloos avatar Eric Hubbard 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.