Flatpeak supports instant energy cost (for imports) and value (for exports) calculation at both Device and Location levels (i.e. property address). Use device-level reporting when calculating costs for a specific device — this allows additional devices to be added to the same location later without losing historical data (recommended). To implement:Documentation Index
Fetch the complete documentation index at: https://docs.flatpeak.com/llms.txt
Use this file to discover all available pages before exploring further.
Create device identifier
- Call create-a-device endpoint; add you internal device ID for cross-reference.
- Store the returned
device_idpermanently in your system.
This step only needs to be performed once per device.
Submit meter records & get energy cost/value
- Call instant-cost-calculate endpoint to submit energy consumption or export meter records collected from your device.
-
Set
energy_flow_direction=INBOUNDandtariff_direction=IMPORTto submit meter records for energy import and calculate cost using import price. -
Set
energy_flow_direction=OUTBOUNDandtariff_direction=EXPORTto submit meter records for energy export and calculate cost using export price.
Submit actual solar generation data
If a PV system is installed at the location and you have access to its production records, submit them as they arrive. This is particularly important if you use Solar Generation Forecasts, as it ensures accurate generation data for cost calculations. Submitted records are applied immediately in all energy cost calculations. The per-kWh cost is assumed to be zero unless the customer uses the Connect to set a local generation price.- Submit generation to submit-meter-interval endpoint.
- If your system generates cumulative records, use submit-meter-cumulative instead.
- Include relevant
device_idandlocation_id - Set
energy_flow_direction=INBOUNDandtariff_direction=LOCAL - Set the
confidenceparameter to 1

