API Reference

Background

A synthetic snapshot allows you to simulate a usage pattern scenario as if you had actually introduced such change to your household. For example:

  • How much electricity would I generate per 30 minutes if I had solar panels on the roof of my house?
  • How much electricity would I consume if I swapped to using an electric car?
  • How much electricity would I consume if I put in a swimming pool?

Each and every one of these examples is nuanced. However, Ahiko is smart enough to understand the important subtleties of each, capturing the important details. This allows Ahiko to generate a synthetic usage snapshot for a period of time that would impact the household consumption.

Such synthetic snapshots can then be composed along side your real historical consumption to produce a realistic forecast. Each snapshot follows a standard usage snapshot protocol, stored as a blob here.

Prerequisites

Before you can follow this guide, you will need:

  • To be able to make a request in your programming language of choice, our API reference has example requests using multiple common languages and libraries, just look for the "Language" dropdown at the top of the page.
  • Your subscription key (32 alphanumerical combination key).

Synthetic Snapshots

As of today only solar is supported as a synthetic solar snapshot type.

POST - Creating a Synthetic Solar Snapshot

Calculating the potential energy generation from the sun at a given location on the planet is not a small feit. It requires a combination of global understanding in the seasonality of the sunlight along with localised knowledge of the weather at the said location and the impact of cloud cover. The following diagram best describes the variables that need to be considered

Ahiko trivialises such complexities by requiring the minimum amount of information to get maximum perspective.

Solar Calculation Inputs

{
  "customer_id": "demo_customer",
  "solar_configuration": {
    "solar_array_list": [
      {
        "number_of_panels": 8,
        "panel_tilt": 20,
        "panel_bearing": 25,
        "panel_surface_area_m2": 1.5,
        "panel_efficiency_percentage": 0.23
      }
    ]
  }
}
  

Let's break down each of these:

  • customer_id the customer_id against which you'd like the snapshot associated
  • solar_configuration the wider json body capturing the solar configuration
  • solar_array_list it is assumed you might have arrays of solar panels, an array of panels is unique by the tilt and bearing of the panel configuration. That way for each house you can have multiple arrays of panels
  • number_of_panels is the number of solar panels in the array
  • panel_tilt measured in degrees, this is a floating point number 0-90 of the panel tilt
  • panel_bearing measured in degrees, this is the direction offset from due north (0 degrees) that the panel is facing
  • panel_surface_area_m2 the size of each panel in the array in metres-squared. Often somewhere between 1 to 2 meters squared depending on the panel specification details
  • panel_efficiency_percentage is the % of total sunlight hitting the panel that is converted into stored power. The latest, most efficient panels are often operating somewhere between 20-25% efficiency, denoted as 0.20

POST - Handling the Response

The Ahiko API uses JSON to encode responses. Most languages have libraries to encode and decode JSON.

The API response will look like:

{
  "success": true,
  "id": "task_d5c5b3a8-2174-48b1-ba33-56dfca574bbf"
}

Let's break down this response:

  • success whether or not the snapshot was successfully generated
  • id the synthetic snapshot unique identifier