Studio Layers

Layers add extra consumption on top of your base profile. Each layer has a preset type, an optional schedule that controls when it is active, and an hourly kW curve that defines its shape.


Layer concepts

Every layer is defined by three things:

  1. Preset — determines the default name, icon, and power curve. Available presets: ev, warmtepomp, zwembad, custom, and solar (covered in the next tutorial).
  2. Schedule — a 7 × 12 boolean matrix (boolean[][]) controlling which day-of-week / month combinations the layer is active. Index 0 = Monday, index 6 = Sunday. When omitted the layer is active every day of the year.
  3. hourlyKw — an array of 24 numbers representing the kW shape for one active day. Index 0 = midnight. Not needed for solar layers.

Add a preset layer

The simplest way to add a layer is to pick a preset. The API fills in sensible defaults for the schedule and hourly curve.

  • Name
    presetId
    Type
    string
    required
    Description

    One of ev, warmtepomp, zwembad, custom, or solar.

  • Name
    name
    Type
    string
    Description

    Custom display name. Falls back to the preset label.

  • Name
    enabled
    Type
    boolean
    Description

    Whether the layer contributes to the total. Default true.

  • Name
    maxKw
    Type
    number
    Description

    Peak power in kW. Defaults vary by preset (e.g. 11 kW for EV, 5 kW for heat pump).

Add an EV charger layer

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": "ev",
    "name": "Home charger",
    "maxKw": 7.4
  }'

Response (profile summary)

{
  "id": "cm...",
  "name": "My first profile",
  "baseProfileType": "template",
  "totalKwh": 5842,
  "peakKw": 8.21,
  "layerCount": 1,
  "hasSolarLayer": false,
  "year": 2025
}
EV charger layer with schedule matrix — 7×12 grid showing active days per month

Schedule matrix

The schedule is a boolean[][] array — 7 rows (Monday through Sunday) of 12 columns (January through December). A true value means the layer is active on that day/month combination.

For example, to make a pool pump run only on weekends during May through September:

  • Rows 0–4 (Mon–Fri): all false
  • Rows 5–6 (Sat–Sun): columns 4–8 true, rest false

When you omit the schedule entirely the layer is active every day of every month.

Weekend-summer-only schedule

{
  "schedule": [
    [false,false,false,false,false,false,false,false,false,false,false,false],
    [false,false,false,false,false,false,false,false,false,false,false,false],
    [false,false,false,false,false,false,false,false,false,false,false,false],
    [false,false,false,false,false,false,false,false,false,false,false,false],
    [false,false,false,false,false,false,false,false,false,false,false,false],
    [false,false,false,false,true,true,true,true,true,false,false,false],
    [false,false,false,false,true,true,true,true,true,false,false,false]
  ]
}

Add a custom layer

Use the custom preset when none of the built-in shapes fits. You supply both the hourlyKw curve (24 values, one per hour) and an optional schedule.

  • Name
    hourlyKw
    Type
    number[]
    Description

    24 values representing kW per hour of the day. Index 0 = midnight. The shape is scaled by maxKw.

Add a custom layer

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": "custom",
    "name": "Server rack",
    "maxKw": 2,
    "hourlyKw": [
      1.8,1.8,1.8,1.8,1.8,1.8,
      2.0,2.0,2.0,2.0,2.0,2.0,
      2.0,2.0,2.0,2.0,2.0,2.0,
      1.9,1.9,1.8,1.8,1.8,1.8
    ]
  }'

Update a layer

Change any layer property with PATCH. Updating solarConfig on a solar layer triggers a fresh PVWatts fetch (covered in the next tutorial).

Rename and change maxKw

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 '{
    "name": "Night charger",
    "maxKw": 11
  }'

Remove a layer

Delete a layer by ID. The profile's totals are recalculated automatically.

Delete a layer

curl -X DELETE https://api.enhub.nl/v1/studio-profiles/{id}/layers/{layerId} \
  -H "x-api-key: {your-api-key}"

View the combined chart

After adding layers, use the chart endpoint to see how they stack on top of the base profile. The year view gives an overview; drill into individual weeks or months with the index parameter.

Week chart for week 2

curl "https://api.enhub.nl/v1/studio-profiles/{id}/chart?view=week&index=2" \
  -H "x-api-key: {your-api-key}"
Combined profile week chart — EV charging peaks stacked on top of the base consumption curve

Next steps

You now know how to add, update, and remove consumption layers. The next tutorial covers the special solar layer, which fetches real PVWatts irradiance data and supports multiple roof surfaces.

Solar & roof surfaces

Was this page helpful?