Giter Site home page Giter Site logo

kingbbq / google-sheets-solaredge Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stvbll/google-sheets-solaredge

0.0 3.0 0.0 17 KB

Collection of Google Sheets scripts for interacting with SolarEdge API

License: Apache License 2.0

JavaScript 100.00%

google-sheets-solaredge's Introduction

#Google Sheets SolarEdge A collection of Google Sheets scripts for interacting with the SolarEdge API

##About This project's goal is to leverage the SolarEdge API using Google Scripts to pull data into a Google Sheets spreadsheet. Once in the spreadsheet, you can choose to do whatever you'd like with the data. Using Google Sheets Triggers, you can trigger a series of scripts to execute at an interval you define. For example, during a particular time of day, once a day, once a week, on load, etc.

If your utility provider also provides an API, you can combine the information from your SolarEdge inverter with that from your utility provider.

Dashboard

###Requirements You need to have the following to use this code

  1. SolarEdge private API Key
  2. Site ID
  3. Inverter Serial Number (only if you want to pull inverter data)

You can request a private API key from SolarEdge or your Solar installer on behalf of SolarEdge. You should have your Site ID as well, but you can get that and your inverter's serial number from the SolarEdge monitoring site.

###Script Files There are four script files that you can use. You can choose to combine them as they are separate for each function but redundant in code in many places between them.

  • month.gs - Fetches the total kWh for the current month (no longer used, but available if you want to use it)
  • day.gs - Fetches the total kWh for each day of the current month (no longer used, but available if you want to use it)
  • details.gs - Fetches site specific information like panel type and peak power information
  • inverter.gs - Fetches the kW and temperature from the inverter for the given day
  • overview.gs - Fetches total kWh for lifetime, year, month, and day (replaces month.gs and day.gs)

###Script File References Each script has some hard-coding in it that you can change at will

  • Names of sheets are hardcoded in lines similar to var sheetSiteInfo = ss.getSheetByName("details");
  • Location lookups for API Key, Site ID, and Inverter Serial var apiKey = sheetSiteInfo.getRange("B7").getValue();

##Usage

  1. Open a spreadsheet in Google Sheets
  2. Create five sheets month_data, day_data, inverter_data, details, and Dashboard (if you want a dashboard page for charts and graphs)
  3. On the details sheet, enter your API Key into B7
  4. On the details sheet, enter your Site ID into B2
  5. On the details sheet, enter your Inverter Serial into B8

  1. Click Tools > Script Editor*
  2. Create three scripts overview.gs, inverter.gs, and details.gs
  3. Paste the code from this repository into the corresponding example.gs sheet script like monthly.gs
  4. Click Resources > ....Triggers in the Script Editor and set the frequency you'd like each to be triggered

Note that there is a limit on the number of calls you can make in a day as a best practice. Please be a mindful consumer :)

google-sheets-solaredge's People

Contributors

stvbll avatar kingbbq avatar

Watchers

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