Load Solar Production and Calculate Its Costs

Create a Solar Profile to hold actual solar production

Now you will create a solar profile that will hold the actual solar production in kWh for each hour from your Solar Data Acquisition system. When you create this profile, you can load all the historical solar production you have at the same time. Below is an example to add a solar profile that includes some hourly solar production data. A systemSize property should be included in the request so it can be calculated for tariff rates based on system size.

POST /rest/v1/profiles
{ 
  "providerAccountId" : "{providerAccountId}",
  "providerProfileId" : "{providerProfileId}",
  "profileName" : "Solar System Actual Production",
  "serviceTypes" : "SOLAR_PV",
  "sourceId" : "ReadingEntry",
  "properties" : {
   "systemSize" : {
     "keyName" : "systemSize",
     "dataValue" : "5"
   }},
  "readingData" : [ 
      { "fromDateTime" : "2015-06-01T09:00-0700",
        "quantityUnit" : "kWh",
        "quantityValue" : "2.15",
        "toDateTime" : "2015-06-01T10:00-0700"
      },      
      { "fromDateTime" : "2015-06-01T10:00-0700",
        "quantityUnit" : "kWh",
        "quantityValue" : "3.64",
        "toDateTime" : "2015-06-01T11:00-0700"
      },   
      { "fromDateTime" : "2015-06-01T11:00-0700",
        "quantityUnit" : "kWh",
        "quantityValue" : "4.98",
        "toDateTime" : "2015-06-01T12:00-0700"
      }, 
      { "fromDateTime" : "2015-06-01T12:00-0700",
        "quantityUnit" : "kWh",
        "quantityValue" : "5.67",
        "toDateTime" : "2015-06-01T13:00-0700"
      },
      { "fromDateTime" : "2015-06-01T13:00-0700",
        "quantityUnit" : "kWh",
        "quantityValue" : "5.13",
        "toDateTime" : "2015-06-01T14:00-0700"
      },
      { "fromDateTime" : "2015-06-01T14:00-0700",
        "quantityUnit" : "kWh",
        "quantityValue" : "5.96",
        "toDateTime" : "2015-06-01T15:00-0700"
      },
      { "fromDateTime" : "2015-06-01T15:00-0700",
        "quantityUnit" : "kWh",
        "quantityValue" : "4.32",
        "toDateTime" : "2015-06-01T16:00-0700"
      },
      { "fromDateTime" : "2015-06-01T16:00-0700",
        "quantityUnit" : "kWh",
        "quantityValue" : "1.02",
        "toDateTime" : "2015-06-01T17:00-0700"
      },

      /* edited for length */

    ]
}

Once the solar profile has been uploaded, take note of the profileId because this will be used in the calculation for the solar cost and the calculation for the Bill Without Solar cost. You can also run the following request to retrieve the profiles and their IDs for an account:

GET /rest/v1/profiles?accountId={accountId}

You can read more about how to Upload a Solar Production Profile with Readings and how to Get Profiles in our Genability Developer documentation.

Periodically add new production to this Solar Profile

You will want to update this solar profile with additional solar readings either in real time, or periodically, such as every day or month. Here is an example:

PUT /rest/v1/profiles/{profileId}/readings
{
  "usageProfileId": "{profileId}",
  "readings" : [ {
    "fromDateTime" : "2015-06-02T09:00-0700",
    "toDateTime" : "2015-06-02T10:00-0700",
    "quantityUnit" : "kWh",
    "quantityValue" : 1.76
  },{
    "fromDateTime" : "2015-06-02T10:00-0700",
    "toDateTime" : "2015-06-02T11:00-0700",
    "quantityUnit" : "kWh",
    "quantityValue" : 2.74
  },{
    "fromDateTime" : "2015-06-02T11:00-0700",
    "toDateTime" : "2015-06-02T12:00-0700",
    "quantityUnit" : "kWh",
    "quantityValue" : 3.92
  },{
    "fromDateTime" : "2015-06-02T12:00-0700",
    "toDateTime" : "2015-06-02T13:00-0700",
    "quantityUnit" : "kWh",
    "quantityValue" : 4.35
  },{
    "fromDateTime" : "2015-06-02T13:00-0700",
    "toDateTime" : "2015-06-02T14:00-0700",
    "quantityUnit" : "kWh",
    "quantityValue" : 5.26
  },{
    "fromDateTime" : "2015-06-02T14:00-0700",
    "toDateTime" : "2015-06-02T15:00-0700",
    "quantityUnit" : "kWh",
    "quantityValue" : 5.03
  },{
    "fromDateTime" : "2015-06-02T15:00-0700",
    "toDateTime" : "2015-06-02T16:00-0700",
    "quantityUnit" : "kWh",
    "quantityValue" : 4.82
  },{
    "fromDateTime" : "2015-06-02T16:00-0700",
    "toDateTime" : "2015-06-02T17:00-0700",
    "quantityUnit" : "kWh",
    "quantityValue" : 3.49
  },{
    "fromDateTime" : "2015-06-02T16:00-0700",
    "toDateTime" : "2015-06-02T17:00-0700",
    "quantityUnit" : "kWh",
    "quantityValue" : 1.93
  },

/* edited for length */

 ]
}

Visit our Genability Developer documentation to learn more about how to Update Readings.

Calculate the Solar Cost

The next step is to calculate the cost of the solar production using the customer’s solar tariff. Here is a sample request to calculate the solar cost for a billing period.

POST /rest/v1/accounts/pid/{providerAccountId}/calculate/
{
   "fromDateTime":"2015-07-20T00:00-0700",
   "toDateTime":"2015-08-19T00:00-0700",
   "serviceType":"SOLAR_PV",
   "masterTariffId": "{masterTariffId of solar tariff}",
   "profileId": "{profileId of solar profile}",
   "billingPeriod": true,
   "minimums": false,
   "groupBy":"MONTH",
   "detailLevel":"CHARGE_TYPE"
}

You can read our documentation on Account Cost Calculation for more information.

Previously you loaded electricity usage data and calculated Electricity Costs. In this step you did the same for solar usage and optionally solar costs.

Next : Determine what the customer would have paid without solar and thus Calculate Actual Savings.