Scheduling energy import and export
In this tutorial, you will learn how to lower your device’s energy cost by aligning its operation with price of energy in real-time with FlatPeak Copilot Schedules.
Introduction
FlatPeak Schedules API enables you to optimise your device’s energy costs without reducing its total energy usage. It does so by creating intelligent consumption or export schedules, that take into account your device’s energy needs, grid tariffs, real-time and projected local energy generation, and the availability of locally stored energy.
Example applications
Schedules API can help creating smart charging sessions for one or multiple EVs. Or maximise savings and export revenues from on-site PV, wind and/or energy storage systems.
Together with Meters API and Cost Calculate API, Schedules API provides a complete smart energy management and reporting solution for your devices.
How to use Schedules API
Creating your first Schedule
To create a schedule, you will need at least the following:
Object/Parameter | Description |
---|---|
device_id | FlatPeak ID of the device you will be creating the schedule for. You may include multiple devices in one request. |
location_id | FlatPeak ID of the location where you want to create the schedule. For example, the location where the device is permanently installed (such as an EV charger or BESS) or where the device is at the moment (for example, an electric vehicle). |
direction | Direction of energy transfer. Possible options are” IMPORT for when the device will be consuming the energy and EXPORT when the device will be exporting the energy (for example, when BESS is projected to have surplus energy that it will want to export into the grid). |
start_time | Time when energy transfer may begin. Set it to the current time if you don’t know. |
end_time . | Time when energy transfer must be completed. If you don’t have this information, set this value to a presumed reasonable figure. For example, overnight EV charging can be 5:30am. |
max_power | Maximum speed of power transfer this device supports (i.e. power rating) |
shaving_threshold.relative | Relative tariff cap. Where highest tariff over the requested period is 1 and lowest is 0.01, provide value up to which you are willing to by energy. |
shaving_threshold.absolute | Absolute tariff cap in local currency. Overrides relative value if provided. |
energy | Amount of energy the device requires in WH or KWh. Set it to an approximate amount if you don’t know. For example, for an electric cat, this can be 60KWh. |
With this information, use create-schedule endpoint to create your first Schedule:
Understanding the response
The response will include the following key values:
Object/Parameter | Description |
---|---|
id | Unique schedule response object identifier. |
energy.value | The scheduled amount of energy will be transferred under this schedule. |
tariff.value | Estimated total monetary cost (or value in case of EXPORT) of energy in currency_code . |
savings.shaving.cost.value | Amount of money saved by shaving algorythm. In local currency using large units. |
savings.shaving.cost.percentage | Percentage of cost saved by shaving algorythm. |
savings.optimisation.value | The amount of money this schedule will save you versus if you start using energy immediately without regard to the tariffs. |
savings.optimisation.percentage | The percentage of money this schedule will save you versus if you would start using energy immediately without regard to the tariffs. |
data.schedule | Series of time slots where your device can use or export energy with suggested max_power . The max_power value can be lower than your requested value in complex cases such as load balancing. |
IMPORT
is optimised for the lowest energy cost using the import tariff and local generation values; EXPORT
is optimised for the highest return using the export tariff.Was this page helpful?