Studio Solar & Roof Surfaces

The solar layer is special: when you add or update one, the API fetches real PVWatts irradiance data for your profile's coordinates and calculates an 8 760-hour production curve. Each profile supports at most one solar layer.


Solar layer basics

Unlike other layers, solar does not use hourlyKw or schedule. Instead, it uses a solarConfig object that describes your panel setup. The API fetches PVWatts data and generates the hourly production curve automatically.

There are two ways to define the panel layout:

  1. Flat fieldspanelCount, panelPowerWatts, tilt, azimuth, losses — for a single roof surface.
  2. roofSurfaces array — for multiple roof surfaces (dakvlakken) with different orientations. When provided, the flat fields are ignored.

Add a simple solar layer

For a single roof surface, use the flat solarConfig fields directly.

  • Name
    panelCount
    Type
    number
    Description

    Number of panels (1–200).

  • Name
    panelPowerWatts
    Type
    number
    Description

    Watt-peak per panel (50–1 000). Typical residential: 400–450 Wp.

  • Name
    tilt
    Type
    number
    Description

    Roof tilt in degrees (0 = flat, 90 = vertical). Typical: 30–40°.

  • Name
    azimuth
    Type
    number
    Description

    Panel orientation in degrees (0 = north, 90 = east, 180 = south, 270 = west).

  • Name
    losses
    Type
    number
    Description

    System losses as a percentage (0–100). Default: 14%.

Add solar layer (single roof)

curl -X POST https://api.enhub.nl/v1/studio-profiles/{id}/layers \
  -H "x-api-key: {your-api-key}" \
  -H "Content-Type: application/json" \
  -d '{
    "presetId": "solar",
    "solarConfig": {
      "panelCount": 12,
      "panelPowerWatts": 440,
      "tilt": 35,
      "azimuth": 180,
      "losses": 14
    }
  }'

Response

{
  "id": "cm...",
  "name": "My first profile",
  "baseProfileType": "template",
  "totalKwh": 1520,
  "peakKw": 8.21,
  "totalExportKwh": 2830,
  "peakExportKw": 4.95,
  "layerCount": 2,
  "hasSolarLayer": true,
  "year": 2025
}
Solar layer editor — single roof surface with 12 panels, 440 Wp, 35° tilt, south-facing

Multiple roof surfaces

Many homes have panels on two or more roof sections with different orientations. Use the roofSurfaces array to define each surface separately. Each surface needs a unique id (any string you choose).

When roofSurfaces is provided, the flat fields (panelCount, tilt, etc.) are ignored — each surface defines its own values.

The API fetches PVWatts data for each surface independently and sums the results into a single production curve.

  • Name
    roofSurfaces[].id
    Type
    string
    required
    Description

    Unique identifier for this roof surface.

  • Name
    roofSurfaces[].panelCount
    Type
    number
    required
    Description

    Number of panels on this surface (1–200).

  • Name
    roofSurfaces[].panelPowerWatts
    Type
    number
    required
    Description

    Watt-peak per panel (50–1 000).

  • Name
    roofSurfaces[].tilt
    Type
    number
    required
    Description

    Tilt in degrees (0–90).

  • Name
    roofSurfaces[].azimuth
    Type
    number
    required
    Description

    Orientation in degrees (0–360).

  • Name
    roofSurfaces[].losses
    Type
    number
    Description

    System losses percentage (0–100).

Add solar layer (two roof surfaces)

curl -X POST https://api.enhub.nl/v1/studio-profiles/{id}/layers \
  -H "x-api-key: {your-api-key}" \
  -H "Content-Type: application/json" \
  -d '{
    "presetId": "solar",
    "solarConfig": {
      "roofSurfaces": [
        {
          "id": "south-roof",
          "panelCount": 8,
          "panelPowerWatts": 440,
          "tilt": 35,
          "azimuth": 180
        },
        {
          "id": "east-roof",
          "panelCount": 6,
          "panelPowerWatts": 440,
          "tilt": 30,
          "azimuth": 90,
          "losses": 16
        }
      ]
    }
  }'
Solar layer editor — two roof surfaces (Dakvlak 1 south-facing, Dakvlak 2 east-facing)

Update solar config

Update the solar layer with PATCH /v1/studio-profiles/{id}/layers/{layerId}. Any change to solarConfig triggers a fresh PVWatts fetch — the production curve is recalculated automatically.

You can switch between flat and multi-roof layouts by providing or omitting roofSurfaces.

Change panel count

curl -X PATCH https://api.enhub.nl/v1/studio-profiles/{id}/layers/{layerId} \
  -H "x-api-key: {your-api-key}" \
  -H "Content-Type: application/json" \
  -d '{
    "solarConfig": {
      "panelCount": 16,
      "panelPowerWatts": 440,
      "tilt": 35,
      "azimuth": 180
    }
  }'

Production chart

Use the production chart view to see the hourly solar output in isolation. The export view shows only the surplus electricity fed back to the grid (production minus consumption).

Production chart

curl "https://api.enhub.nl/v1/studio-profiles/{id}/chart?view=production" \
  -H "x-api-key: {your-api-key}"

Export chart

curl "https://api.enhub.nl/v1/studio-profiles/{id}/chart?view=export" \
  -H "x-api-key: {your-api-key}"
Solar production and export year charts — production peaks in summer, export follows a similar pattern

Next steps

Your profile now has a realistic consumption-plus-production curve. The final tutorial shows how to upload real meter data via CSV instead of using a template, and how to export the result.

CSV upload & export

Was this page helpful?