Build with FlatPeak
Switched system
This tutorial shows how to use FlatPeak to reduce and report energy costs for systems like EVSEs or smart sockets.
Design
To create a schedule optimised by energy cost:
Once customer completes the Connect flow, or if you created their tariff via the API:
- Create a default schedule that provides a fixed number of daily “on” hours when the tariff is low (i.e. 5 hours between 8pm and 6am on the following day).
- Allow the customer to change that schedule by setting a choice of:
- Number of daily “on” hours (add weekday/weekend and so on), or/and
- When the “on” period must end (i.e. complete charging by 6 am) or
- Absolute tariff threshold (i.e. “on” when the tariff is below $0.15/kWh), or
- Relative tariff threshold (i.e. “on” when the tariff is below 40% daily average).
To keep the schedule aligned with tariff changes:
- When an energy user (i.e. an EV) connects to your device or scheduled daily:
- Pass schedule settings to the API,
- Receive actualised schedule (slots),
- Apply this actualised schedule to your device.
To log the amount of transferred energy:
- During or after the energy transfer, log it to meter records API under IMPORT tariff.
- Log any energy from local generation (i.e., solar) under the LOCAL tariff.
To display the cost of transferred energy:
- When you want to display the energy cost, call the API to get it in real-time, aggregated by (charging) session or day/month/year.
Consider offering tariff threshold-based (aka price cap) scheduling as a premium feature.
Implementation
Was this page helpful?