Loading...
Consumption calculation and metering
Featured

Consumption calculation and metering

Multiple tariffs in consumption metering for accurate billing and reporting.

This example demonstrates a complete and flexible solution for multi-tariff energy metering, accurate consumption calculation, and automated reporting using bOS. Accurate energy metering is a critical foundation for understanding, optimizing, and controlling energy consumption—especially in environments where multiple tariffs, seasonal pricing, or time-based rates are used. The logic is built around real-world energy pricing models where electricity cost depends on time-based tariff blocks and seasonal pricing. As a reference implementation, the example uses the Slovenian tarifni semafor API to determine active tariffs, but the design is fully modular. The same logic can be reused with any other tariff API, local data source, or manually defined tariff schedules by simply replacing the main API node.

API preparation

Note that this example uses the Slovenian “tarifni semafor” API as a reference source for tariff data. However, the same logic can be easily adapted for other clients who use different APIs or local data sources for tariff values. To adapt the example, simply replace the main API node or connect your own tariff information source, or implement the logic nodes into the API for your country/location.

Configuration

Download the example from our website and import it into your configuration. Step by step instructions on how to import are available in our instructional video.

The inclusion of seasonal tariff logic (cheap and expensive periods or seasons) further improves accuracy, ensuring that consumption data always matches real-world billing models used by energy providers. This is especially important in regions where tariffs change dynamically or are influenced by external factors such as grid load or time of year.

By breaking consumption down into individual tariff blocks, this example enables precise insight into when and how energy is being used. This allows homeowners, facility managers, and businesses to: Verify utility bills with confidence, identify high-cost consumption periods, optimize usage by shifting loads to cheaper tariff windows make informed decisions about automation, scheduling, and energy savings. To use the example, simply connect your consumption meter output to the Total Consumption node. bOS will automatically calculate consumption distribution across all tariff blocks based on the active tariff and season. Many conumption meters may display value as an integer, to link it correctly to our total consumption value, simply create a new calculation task and include the meter output value as the input of the calculation, the calculation value can then be linked to our double consumption variable. The example includes two different seasons and 5 different price tariffs. These zones and tariffs can of course be tweaked to match yours.

Top