
Without load shifting: usage = 96 kWh → cost = €49. With load shifting: usage = 98 kWh → cost = €34
Design
To optimise the operation of an HVAC system by energy cost:
Once the customer completes the Connect flow, or if you imported their tariff:- Use Flatpeak API to find time periods when the energy price is above the daily average.
- Pre-cool before those high-cost periods.
- Reduce consumption during high-cost periods until either:
- the maximum temperature tolerance is reached, or
- the energy price falls back down.
To display energy cost:
- Submit consumed energy to the submit-interval-meter-records endpoint with tariff_type = IMPORT and direction = IMPORT.
- Use calculate-energy-cost-by-time-interval to fetch costs for the IMPORT direction and present them to the customer.
Implementation
Find periods if high energy price
Find periods if high energy price
To detect high-cost periods, use the schedules-by-price-limit endpoint.
- Request a 12 or 24 hour window and set segment=HIGH with relative=0.25 to capture the top 25% periods of high electriciy price.
- Run this periodically to generate or update the next day’s operating schedule.
Program your system
Program your system
Use the data from the previous step to schedule your system to pre-cool before a high-cost period begins.In this example, the high-cost period starts at 08:00. The system is programmed to start lowering the temperature at 07:45, reaching the minimum allowed temperature of -21°C before prices rise.
Submit energy consumption to Flatpeak
Submit energy consumption to Flatpeak
Submit electricity meter readings from your system to Flatpeak API:
If your system logs meter records as intervals, call the submit-interval-meter-records endpoint.
If your system can differentiate between grid-supplied and locally generated energy (e.g. solar), set “tariff_rate”: “LOCAL” when submitting records for solar generation. This tells Flatpeak to treat the energy as zero-cost during cost calculations.
Display energy cost to your customer
Display energy cost to your customer
To display the energy cost used by your system, call the calculate-energy-cost-by-time-interval endpoint.You can request:The
- Raw (unaggregated) costs for custom processing, or
- Pre-aggregated totals by DAY or MONTH.
tariff.value
in the response is the total energy cost — ready to display directly to the customer.