Calculating energy cost
FlatPeak supports both device-level and location-level metering and energy cost calculation. You can send meter records from your device or property meter to FlatPeak API and get the cost of that energy back in real-time or aggregated by (usage) session, day, month or a year.
Device level
Before you begin, you need to obtain a FlatPeak identifier for your device. Follow the creating device identifiers article to learn how to do this. Once you have the FlatPeak device identifier, the device_id
, you can get its energy cost calculated in two ways:
Use instant-cost-calculate endpoint to submit metering records and instantly get the cost of that energy. Your API request will look similar to the example below. The response will include your original request and monetary energy cost in the tariff
object:
Use instant-cost-calculate endpoint to submit metering records and instantly get the cost of that energy. Your API request will look similar to the example below. The response will include your original request and monetary energy cost in the tariff
object:
Use submit-an-array-of-meter-records endpoint when you don’t need instant calculation of the energy cost of that metering interval. For example, when you want FlatPeak to calculate aggregated costs:
Once you have submitted metering records, you can use cost-by-time-interval or cost-by-session-id API endpoints to get energy cost (or export value if your device was exporting).
Location level
FlatPeak also supports location-level energy cost reporting. You can submit meter readings from the property, and FlatPeak will compute the energy cost using the tariff associated with that location. Use the same flow for device-level, but only provide the location_id
.
Simulating energy usage profiles
If you need to model energy usage (and/or export) scenarios, pass non_persistent
with your request to instant-cost-calculate endpoint. This will enable you to estimate energy cost without affecting actual consumption data.