A common issue that solar developers run into when analyzing a potential project is that most people don’t know how much energy they’re using. They may have some idea of how much they pay for electricity, but they have no idea how that translates into kWh. The Genability API has just the tool for this job: the Bill Solve option in the Calculate API. With this option, you can estimate a customer’s energy usage for a single bill based on the cost of that bill. If your customer knows what they spend annually on electricity, Bill Solve can estimate annual kWh as well.

While Bill Solve provides monthly and annual options to determine a customer’s usage we recommend using exact dates to improve the precision of the results.

The Bill Solve Request

Here’s an example of how the monthly option works. For this scenario, we have the following customer:

  1. Residential customer in Southern California Edison territory on the “D” tariff (masterTariffId 447)
  2. Actual bill of $51.76 for the period 2015-11-25 to 2015-12-28

To solve for this customer’s monthly consumption value, we’ll make the following call:

POST /rest/v1/calculate
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
  "providerAccountId": "sce-cust",
  "fromDateTime": "2015-11-25",
  "toDateTime": "2015-12-28",
  "billingPeriod": "true",
  "tariffInputs": [
    {
      "fromDateTime": "2015-11-25",
      "toDateTime": "2015-12-28",
      "keyName": "total",
      "dataValue": "54.71",
      "unit": "cost"
    },
    {
      "fromDateTime": "2015-11-25",
      "toDateTime": "2015-12-28",
      "keyName": "baselineType",
      "dataValue": "typicalElectricity"
    }
  ]
}

Let’s break this down a little. Remember: you can see the full documentation for the Calculate API here.

Important Parameters

  1. Prior to this call, we’ve created an account called sce-cust that holds our customer’s data. Most importantly, it has their ZIP code, their utility, and their tariff. In this case, the customer is on SCE’s “D” tariff (masterTariffId 447).
  2. We set our billing period with fromDateTime and toDateTime to 2015-11-25 and 2015-12-28, respectively. To get the most accurate results, you’ll want to make sure to use the actual dates on the bill.
  3. We set billingPeriod to true, because we want to ensure monthly charges (if any) are considered in the calculation.
  4. We have two entries in the tariffInputs array. These are the inputs to our calculation. The first one is the most important one. For the billing period, our customer’s cost is $54.71, so we send in a total property with a dataValue of 54.71. We also need to set the unit to cost so the calculator knows we’re talking dollars instead of kWh or kW.
  5. The second input sets our initial guess of monthly consumption. Instead of choosing a particular value, I’m telling the API to use our database of typicals to set the first guess. This has two advantages: the typical profile should start out closer to the customer’s actual usage, resulting in fewer guesses and a faster response. More importantly, it will give you fine-grained hourly data for your guess, resulting in more accurate results for TOU customers.

Running the Calculation

Once we’ve got our request set up, we run it. Here are the results:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
  "status": "success",
  "count": 1,
  "type": "CalculatedCost",
  "results": [
    {
      "masterTariffId": 447,
      "tariffName": "Domestic",
      "totalCost": 54.97,
      "fromDateTime": "2015-11-25T00:00:00-08:00",
      "toDateTime": "2015-12-28T00:00:00-08:00",
      "currency": "USD",
      "summary": {
        "subTotalCost": 54.97
        "taxCost": 0,
        "totalCost": 54.97,
        "adjustedTotalCost": 55.07,
        "kWh": 352.25,
        "kW": 0.72
      }
      ...

So according to our calculator, this customer’s usage should be around 352 kWh for December. What happens if we run it in the other direction? We can use the following request to do just that:

POST /rest/v1/calculate
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
  "providerAccountId": "sce-cust",
  "fromDateTime": "2015-11-25",
  "toDateTime": "2015-12-28",
  "billingPeriod": "true",
  "tariffInputs": [
    {
      "fromDateTime": "2015-11-25",
      "toDateTime": "2015-12-28",
      "keyName": "consumption",
      "dataValue": "352"
    }
  ]
}

The results of which are:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
  "status": "success",
  "count": 1,
  "type": "CalculatedCost",
  "results": [
    {
      "masterTariffId": 447,
      "tariffName": "Domestic",
      "totalCost": 54.92,
      "fromDateTime": "2015-11-25T00:00:00-08:00",
      "toDateTime": "2015-12-28T00:00:00-08:00",
      "currency": "USD",
      "summary": {
        "subTotalCost": 54.92,
        "taxCost": 0,
        "totalCost": 54.92,
        "adjustedTotalCost": 55.02,
        "kWh": 352,
        "kW": 0
      }
      ...

That’s how a monthly Bill Solve request works but what if we want to find out consumption based on a year’s electricity cost?

Here’s an example of how the annual option works. For this scenario, we have the following customer:

  1. Residential customer in Baltimore Gas & Electric’s territory on the “R” tariff (masterTariffId 674)
  2. Estimated annual cost of $1700 for the period 2016-10-15 to 2017-10-15

To solve for this customer’s annual consumption value, we’ll make the following call:

POST /rest/v1/calculate
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
  "providerAccountId": "bge-cust",
  "fromDateTime": "2016-10-15",
  "toDateTime": "2017-10-15",
  "billingPeriod": "false",
  "tariffInputs": [
    {
      "fromDateTime": "2016-10-15",
      "toDateTime": "2017-10-15",
      "keyName": "total",
      "dataValue": "1700",
      "unit": "cost"
    },
    {
      "fromDateTime": "2016-10-15",
      "toDateTime": "2017-10-15",
      "keyName": "baselineType",
      "dataValue": "typicalElectricity"
    }
  ]
}

Important Parameters

  1. For this example, we’ve created an account called bge-cust that holds our customer’s data. Like the first example, it has their ZIP code, their utility, and their tariff. In this case, the customer is on BG&E’s “R” tariff (masterTariffId 674).
  2. We set our billing period with fromDateTime and toDateTime to 2016-10-15 and 2017-10-15, respectively. As with monthly bill solve, using the day of the month from the bill will improve precision.
  3. We set billingPeriod to false, because this calculation will include many billing periods, not one. This is important for tariffs that have fixed monthly charges.
  4. We have two entries in the tariffInputs array. These are the inputs to our calculation. The first one is the most important one. For the billing period, our customer’s cost is $1700, so we send in a total property with a dataValue of 1700. We also need to set the unit to cost so the calculator knows we’re talking dollars instead of kWh or kW.
  5. The second input sets our initial guess of monthly consumption. Instead of choosing a particular value, I’m telling the API to use our database of typicals to set the first guess. This has two advantages: the typical profile should start out closer to the customer’s actual usage, resulting in fewer guesses and a faster response. More importantly, it will give you fine-grained hourly data for your guess, resulting in more accurate results for TOU customers.

Running the Calculation

Once we’ve got our request set up, we run it. Here are the results:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
  "status": "success",
  "count": 1,
  "type": "CalculatedCost",
  "results": [
    {
      "masterTariffId": 674,
      "tariffName": "Residential",
      "totalCost": 1702.21,
      "fromDateTime": "2016-10-15T00:00:00-04:00",
      "toDateTime": "2017-10-15T00:00:00-04:00",
      "currency": "USD",
      "summary": {
        "subTotalCost": 1702.21,
        "taxCost": 0,
        "totalCost": 1702.21,
        "adjustedTotalCost": 1702.21,
        "kWh": 11108.53,
        "kW": 3.75
      }
      ...

So according to our calculator, this customer’s usage should be around 11109 kWh for a year starting in mid-October of 2016. What happens if we run it in the other direction? We can use the following request to do just that:

POST /rest/v1/calculate
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
  "providerAccountId": "bge-cust",
  "fromDateTime": "2016-10-15",
  "toDateTime": "2017-10-15",
  "billingPeriod": "false",
  "tariffInputs": [
    {
      "fromDateTime": "2016-10-15",
      "toDateTime": "2017-10-15",
      "keyName": "consumption",
      "dataValue": "11109"
    }
  ]
}

The results of which are:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
  "status": "success",
  "count": 1,
  "type": "CalculatedCost",
  "results": [
    {
      "masterTariffId": 674,
      "tariffName": "Residential",
      "totalCost": 1708.23,
      "fromDateTime": "2016-10-15T00:00:00-04:00",
      "toDateTime": "2017-10-15T00:00:00-04:00",
      "currency": "USD",
      "summary": {
        "subTotalCost": 1708.23,
        "taxCost": 0,
        "totalCost": 1708.23,
        "adjustedTotalCost": 1708.23,
        "kWh": 11109,
        "kW": 0
      }
      ...

And that’s it! Remember, calculating usage for one bill will yield more precise results than an annual calculation.