Giter Site home page Giter Site logo

sejalv / solarsys_sv Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 2.73 MB

Service to send a daily email, highlighting hours of the day when solar DC power was less than 80% of reference DC power data

Home Page: https://oorjan-sv.herokuapp.com

Python 12.04% HTML 1.42% CSS 27.84% JavaScript 58.70%

solarsys_sv's Introduction

Web Service (only API links available at the moment): https://oorjan-sv.herokuapp.com

Created a service that measures performance of solar systems against reference/estimated performance, and sends daily alerts highlighting hours of the day when actual solar power (DC, in watts) was less than 80% of reference/estimated solar power (DC, in watts).

Technologies: Python 2.7 with Django Framework, REST API (Web), PostgreSQL (Database), Heroku (Deployment)

API end points:

  • Setup Reference Data either by admin interface OR using Postman / cURL:

curl -D - -X POST https://oorjan-sv.herokuapp.com/solarsys/api/postreference/ -d 'lat=19&long=73&system_capacity=4' (DC Output - 8760 data points, will be automatically fetched from NREL API and stored in a JSONField in the same table/row as its Ref Installation Metadata โ€“ Lat/Lon/SC)

  • Setup Installation Key either by admin interface OR using Postman / cURL:

curl -D - -X POST https://oorjan-sv.herokuapp.com/solarsys/api/postinstallationkey/ -d 'lat=19&long=73&sc=10'

  • Store LiveDC with installation key using Postman / cURL OR command (simulatelivedc.py):

curl -D - -X POST https://oorjan-sv.herokuapp.com/solarsys/api/livedc/ -d 'installationkey=c97bc848-047a-4940-957d-b70cfd9be1ba&date=2017-03-03'

OR

python simulatelivedc c97bc848-047a-4940-957d-b70cfd9be1ba 2017-03-03

  • Get Performance of Live DC (compared to nearest Ref DC) using Postman / cURL OR command (dailyReport.py):

https://oorjan-sv.herokuapp.com/solarsys/api/performance/?installationkey=1c51c1ad-734a-4fb2-996f-b1b423092e2e&date=05-03-2017

OR

python manage.py dailyReport 05-03-2017 1c51c1ad-734a-4fb2-996f-b1b423092e2e

(python manage.py dailyReport -date -installation_key : Setup on Heroku Scheduler for 8.00 PM to be sent to settings.EMAIL_HOST_USER)

Other API end points:

  • Get Live DC for installation key and date:

https://oorjan-sv.herokuapp.com/solarsys/api/getlivedc/?installationkey=722066cc-50a7-47d1-9bb5-04e287d6033c&date=2017-03-01

  • Get Reference Data based on SC and approx. lat/long (from database):

https://oorjan-sv.herokuapp.com/solarsys/api/getreference/?lat=28.1&long=77.1&sc=3&date=04-03-2017

NOTE: Please use cURL/Postman (or a script, if specified) for API calls. Links may not work on browsers as the content type is x-www-form-urlencoded. Also refer to Design-Docs folder for more information.

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.