Electric vehicle
This guide shows how to utilise FlatPeak to optimise EV charging schedules to minimise and accurately report energy costs.
Design
To optimise charging of the EV by energy cost, we need to:
Once the customer completes the Connect flow, or if you imported their tariff:
- When the vehicle connects to a charging station, obtain its SoC & ready-by time.
- Call schedules API to calculate a cost-optimised charging schedule.
- Send this schedule to the vehicle.
To display charging costs:
- Log the transferred energy to the meter records API under the IMPORT tariff.
- When you want to display the charging costs, call the API to get them by charging session (including in real-time) or day/month/year.
Implementation
Create charging schedule
Create charging schedule
To create a cost-optimised charging schedule, you will need:
- Time when charging can start (i.e. when the vehicle was plugged in).
- Amount of energy required in KWH.
- Expected charging speed (use charger rating or 7KW for AC charging).
- Time when charging must be completed (i.e. ready-by or departure time).
Call the Scheduling API to create an IMPORT schedule that follows a low tariff.
In the example vehicles require 5,3KWH. Charging can start at 7 pm must be completed by 5 am the following day. The schedule instructs the vehicle to start charging at 1 am and stop at 5 am schedule.start_time
and schedule.end_time
.
Log transferred energy
Log transferred energy
Call Metering API and submit IMPORT metering (at the device level) when the vehicle is charging. Set direction=IMPORT
and tariff_rate=IMPORT
.
session_reference_id=SESSION123
.Display charging costs
Display charging costs
When you need to display the cost of charging, call calculate-cost-by-interval API endpoint to show the cost of charging aggregated by day/month/year. To display the cost per charging session, call the calculate-cost-by-session endpoint.
When you need to display the cost of charging, call calculate-cost-by-interval API endpoint to show the cost of charging aggregated by day/month/year. To display the cost per charging session, call the calculate-cost-by-session endpoint.
When you want to display the cost of energy that has been transferred via your device aggregated by day, month or year, use calculate-energy-cost-by-time-interval API: