Skip to main content
Version: V3 (Ignition 8.3)

system.mes.meter.getMeterConfigurationsForEquipmentPath

Description

Retrieves all Meter Configuration records for the equipment at the specified path and every equipment beneath it - a path-prefix (subtree) match.

This differs from getMeterConfigurationsForEquipment, which returns the configurations of a single equipment. Use this method when you want the configurations for an entire branch of the equipment hierarchy (for example, every meter configured anywhere under a site or line).

The path is matched as a literal prefix on whole path segments, so Enterprise/Site/Line1 matches Enterprise/Site/Line1 and any descendant such as Enterprise/Site/Line1/Pump1, but not Enterprise/Site/Line10. Any * or % characters in the supplied path are ignored.

Permissions

This method requires the METERING.READ.GET permission.

Syntax

system.mes.meter.getMeterConfigurationsForEquipmentPath(path, [includeDisabled])

Parameters

ParameterTypeNullableDescription
pathStringFalseThe equipment path. Configurations for the equipment at this path and all of its descendants are returned.
includeDisabledBooleanTrueOptional. When True, soft-deleted (disabled) Meter Configurations are also returned. When False (the default), only enabled configurations are returned.

Returns

Returns a list of JSON objects representing all Meter Configurations for the equipment subtree. Each object in the list has the following properties:

NameTypeDescription
idString (ULID)The ULID of the Meter Configuration.
nameStringDisplay name for this meter configuration.
descriptionStringOptional description.
equipmentIdString (ULID)The ULID of the equipment this configuration is attached to.
equipmentPathStringPath of the associated equipment.
locationPathStringPath of the equipment's location.
maxRecordDurationSecondsIntegerMaximum record duration in seconds.
maxTimeBetweenExecutionsSecondsIntegerMaximum seconds between data collection executions.
maxFlushIntervalSecondsIntegerMaximum seconds between database flush operations.
pruneDaysIntegerNumber of days to retain completed records before pruning.
meterTypeIdString (ULID)The ULID of the Meter Type being measured.
meterTypeNameStringName of the associated Meter Type.
usageExpressionStringIgnition expression returning the current usage counter value.
overflowValueDoubleMaximum counter value before rollover. Null means no rollover.
costSourceStringSource for cost calculation. One of: STATIC, FROM_METER_TYPE, EXPRESSION.
costDoubleStatic cost per unit of measure.
costExpressionStringIgnition expression returning cost per unit.
notesStringNotes related to the meter configuration.
enabledBooleanIndicates if the meter configuration is active and enabled.
spare1StringAdditional field for user-defined context.
spare2StringAdditional field for user-defined context.
spare3StringAdditional field for user-defined context.

Code Examples

# Retrieve every enabled Meter Configuration under a site, across all equipment beneath the path
meterConfigs = system.mes.meter.getMeterConfigurationsForEquipmentPath('Enterprise/Site')

# Output the list of Meter Configurations
print(meterConfigs)

# Include soft-deleted (disabled) configurations as well
allMeterConfigs = system.mes.meter.getMeterConfigurationsForEquipmentPath('Enterprise/Site', includeDisabled=True)
print(allMeterConfigs)