> ## Documentation Index
> Fetch the complete documentation index at: https://doc.heat-solutions.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Schedules Guide

> How to use schedules and commands.

You can send commands to your sites using schedules. Commands can control setpoints, limits or grid services. Let's look at a few examples to get a quick first impression on how they work.

## Examples

### Set a schedule

The site as a whole should import 100kW from the grid during 10:00 to 12:00 on July 1st. How exactly the energy is absorbed is the controller's job. Note that this defines all schedules for `grid` and command type `activePowerkW`. It leaves all other schedules for other command type and asset combinations unaffected. For the grid specifically, a positive value implies import, a negative one export.

```json theme={null}
// POST /sites/{siteId}/schedules
{
    "schedules": [{
      "asset": "grid",
      "type": "activePowerkW",
      "entries": [{
          "startAt": "2026-06-01T10:00:00Z",
          "endAt": "2026-06-01T12:00:00Z",
          "value": 100
        }]
    }]
}
```

### Clear schedules

This next example makes sure that there are no schedules of type `activePowerkW` for the asset `grid`. Setting schedules always means setting all of them at once for a given asset/type pair, you're not adding new ones on top of others. That is why setting an empty array means no schedules at all for this asset/type pair. Again, this does not affect other command types.

```json theme={null}
// POST /sites/{siteId}/schedules
{
    "schedules": [{
      "asset": "grid",
      "type": "activePowerkW",
      "entries": []
    }]
}
```

### Set multiple schedules

This example shows setting schedules for and upper and lower limit at the grid connection point. From 8:00 to 10:00, power at the grid connection should be between -20 (exporting 20kW) and 50 (importing 50kW). From 14:00 to 16:00 it should be between 50kW and 100kW – both limits refer to import because they are positive values. Using the example above that clears `activePowerkW` schedules for the grid will not affect the schedules defined here because they refer to different command types.

```json theme={null}
// POST /sites/{siteId}/schedules
{
    "schedules": [{
        "asset": "grid",
        "type": "upperLimitkW",
        "entries": [{
            "startAt": "2026-06-01T08:00:00Z",
            "endAt": "2026-06-01T10:00:00Z",
            "value": 50
        }, {
            "startAt": "2026-06-01T14:00:00Z",
            "endAt": "2026-06-01T16:00:00Z",
            "value": 100
        }]
    },
    {
        "asset": "grid",
        "type": "lowerLimitkW",
        "entries": [{
            "startAt": "2026-06-01T08:00:00Z",
            "endAt": "2026-06-01T10:00:00Z",
            "value": -20
        }, {
            "startAt": "2026-06-01T14:00:00Z",
            "endAt": "2026-06-01T16:00:00Z",
            "value": 50
        }]
    }]
}
```

### Get schedules

Use `GET /sites/{siteId}` to get all currently set schedules. You can also use `GET /sites` to get all schedules of all your sites.

## Semantics

Each command targets an asset group or the grid with a list of time ranges. Each asset/type combination must appear at most once, duplicate pairs cause the entire schedule to be rejected. Schedules for the same asset/type combination must not overlap in time. At the time of writing you can only issue commands for complete groups of assets, not single ones – all BESS together for example, or all PV inverters.

## Supported commands

### Grid

| Command                        | Details                                                                                                                                                                                                 |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `upperLimitkW`, `lowerLimitkW` | Active power upper and lower limit. Positive values refer to import, negative to export. This means you can also have both limits in either the import or export region.                                |
| `activePowerkW`                | Active power setpoint. Positive values refer to import, negative to export.                                                                                                                             |
| `afrrImportBookingkW`          | Inform the controller of booked aFRR import grid services. Use positive values only.                                                                                                                    |
| `afrrExportBookingkW`          | Inform the controller of booked aFRR export grid services. Use positive values only.                                                                                                                    |
| `afrrActivationkW`             | Activation for an already booked aFRR service. Positive values refer to import, negative to export. If the activation schedule does not fit into an existing aFRR booking schedule it will be declined. |
| `mfrrImportBookingkW`          | Inform the controller of booked mFRR import grid services. Use positive values only.                                                                                                                    |
| `mfrrExportBookingkW`          | Inform the controller of booked mFRR export grid services. Use positive values only.                                                                                                                    |
| `mfrrActivationkW`             | Activation for an already booked aFRR service. Positive values refer to import, negative to export. If the activation schedule does not fit into an existing aFRR booking schedule it will be declined. |
| `fcrImportkW`                  | Request FCR import grid services. Use positive values only. Activation will be automatically executed on-premise by the controller.                                                                     |
| `fcrExportkW`                  | Request FCR export grid services. Use positive values only. Activation will be automatically executed on-premise by the controller.                                                                     |

Grid services can be stacked on top of each other and on top of an active power setpoint.

### Solar

| Command                | Details                               |
| ---------------------- | ------------------------------------- |
| `solarCurtailmentPcnt` | Curtailment in percent of rated power |

### BESS

| Command          | Details                                                                        |
| ---------------- | ------------------------------------------------------------------------------ |
| `activePowerkW`  | Active power setpoint. Positive values refer to discharge, negative to charge. |
| `optimalSocPcnt` | Optimal state of charge                                                        |

`activePowerkW` and `optimalSocPcnt` are mutually exclusive. A request containing both will be rejected, sending an `activePowerkW` command overwrites any existing `optimalSocPcnt` and vice-versa. To make sure both commands have no schedules, you need to only clear one of them.
