Skip to main content
Version: V2 (Ignition 8.1)

Meter Configuration

Overview

The MeterConfiguration entity defines how the data collection engine monitors and records utility usage for a specific piece of equipment. Each configuration references a meter type, an Ignition expression that returns the current usage counter value, and parameters that control how frequently records are created, flushed to the database, and pruned. Cost can be sourced statically, inherited from the meter type, or evaluated from an expression.

Table Structure

The following table outlines the SQL columns for the meter_configurations table, providing a brief description of each.

ColumnTypeDescriptionExample
idString (ULID)Unique identifier for the entity.01JAP8RJBN-8ZTPXSGY-J9GSDPE1
enabledBooleanIf the entity is enabled or not.true
created_dateDateTimeDate the entity was created.2024-12-31T19:48:44Z
created_byStringPerson who created the entity.TamakiMES
modified_dateDateTimeDate the entity was modified. Value is null upon creation, and gets initially populated upon the first edit.2024-12-31T19:48:44Z
modified_byStringLast person to modify the entity. Value is null upon creation, and gets initially populated upon the first edit.TamakiMES
notesStringNotes about the entity.This entity has these extra notes
spare1StringThe first spare column that can be used for additional context on the entity.some extra context 1
spare2StringThe second spare column that can be used for additional context on the entity.some extra context 2
spare3StringThe third spare column that can be used for additional context on the entity.some extra context 3
nameStringName of the meter configuration. Required and unique within the equipment (uk_meter_configuration_equipment_name). Defaults to the meter type name.Conveyor Water Meter
descriptionStringOptional description of the meter configuration.Water usage on conveyor line 1
equipment_idString (ULID)References the equipment this configuration is attached to. Required. See equipment.01JAP8R5RT-3FPXQABY-7KQZT6VF
max_record_duration_secondsIntegerMaximum record duration. Controls how often the engine cuts over to a new meter record. Required. Defaults to 600.600
max_time_between_executions_secondsIntegerMaximum number of seconds between data collection executions. Required. Defaults to 5.5
max_flush_interval_secondsIntegerMaximum number of seconds between flush operations to the database. Optional. Defaults to 30.30
prune_daysIntegerNumber of days to retain completed records. Optional; null retains records indefinitely.10
meter_type_idString (ULID)References the meter type this configuration measures. Required. See meter_types.01JAP8RJBN-4VYZUKE1-LY2QHV8X
usage_expressionStringIgnition expression that returns the current usage counter value. Required.{[provider]Meters/Water/Counter}
overflow_valueDoubleMaximum counter value before the counter rolls over to zero. Optional; null means the counter does not overflow.9999.0
cost_sourceString (Enum)Source used to determine the cost per unit: STATIC, FROM_METER_TYPE, or EXPRESSION. Required. Defaults to STATIC.STATIC
costDoubleStatic cost per unit of measure. Used when cost_source is STATIC. Optional.0.38
cost_expressionStringIgnition expression that returns the cost per unit. Used when cost_source is EXPRESSION. Optional.{[provider]Meters/Water/Rate}
cost_unit_of_measure_idString (ULID)References the unit of measure for cost values. Required. See unit_of_measures.02K4M9QY3F-7XW8A2ZL-QM9D6B1P

Field Details

name

The name of the meter configuration. Required and must be unique within the associated equipment. Defaults to the name of the associated meter type when not explicitly provided.

equipment_id

References the Equipment that this configuration is attached to. Required. See equipment for details.

max_record_duration_seconds

Maximum record duration. Controls how often the data collection engine cuts over to a new meter record. Required, defaults to 600, and must be at least 30 seconds.

max_time_between_executions_seconds

Maximum number of seconds between data collection executions. Controls how frequently the engine reads the usage counter expression. Required, defaults to 5, and must be at least 1 second.

max_flush_interval_seconds

Maximum number of seconds between flush operations to the database. When null, the engine only flushes on record cutover or explicit request. Optional, defaults to 30, and when set must be at least 10 seconds.

prune_days

Number of days to retain completed meter records. Records older than this threshold are pruned by the pruning service. When null, records are retained indefinitely. Must be greater than 0.

usage_expression

The Ignition expression that returns the current usage counter value. The engine reads this expression on each execution cycle and computes the delta since the last reading. Required.

overflow_value

The maximum value the usage counter reaches before it rolls over to zero. When specified, the data collection engine detects a rollover event (when the new counter reading is less than the previous reading) and computes the usage delta as (overflow_value - previous_value) + new_value. If null, the counter is assumed to increase indefinitely and rollovers are not handled.

cost_source

The source used to determine the cost per unit for meter records created by this configuration:

  • STATIC - a fixed cost value stored on this configuration.
  • FROM_METER_TYPE - the cost is inherited from the associated meter type.
  • EXPRESSION - cost is evaluated at runtime via cost_expression.

Required, and defaults to STATIC.

cost

Static cost per unit of measure. Used when cost_source is STATIC. May be null for other cost sources.

cost_expression

Ignition expression that returns the cost per unit. Used when cost_source is EXPRESSION. May be null for other cost sources.

cost_unit_of_measure_id

References the UnitOfMeasure for cost values (e.g. USD). Required.