system.mes.meter.getMeterConfigurationsForEquipment
Description
Retrieves all Meter Configuration records for a specific piece of equipment.
Permissions
This method requires the METERING.READ.GET permission.
Syntax
system.mes.meter.getMeterConfigurationsForEquipment(equipmentIdOrPath)
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
equipmentIdOrPath | String | False | The ID or path of the equipment. |
Returns
Returns a list of JSON objects representing all Meter Configurations for the specified equipment. Each object in the list has the following properties:
| Name | Type | Description |
|---|---|---|
id | String (ULID) | The ULID of the Meter Configuration. |
name | String | Display name for this meter configuration. |
description | String | Optional description. |
equipmentId | String (ULID) | The ULID of the equipment this configuration is attached to. |
equipmentPath | String | Path of the associated equipment. |
locationPath | String | Path of the equipment's location. |
maxRecordDurationSeconds | Integer | Maximum record duration in seconds. |
maxTimeBetweenExecutionsSeconds | Integer | Maximum seconds between data collection executions. |
maxFlushIntervalSeconds | Integer | Maximum seconds between database flush operations. |
pruneDays | Integer | Number of days to retain completed records before pruning. |
meterTypeId | String (ULID) | The ULID of the Meter Type being measured. |
meterTypeName | String | Name of the associated Meter Type. |
usageExpression | String | Ignition expression returning the current usage counter value. |
overflowValue | Double | Maximum counter value before rollover. Null means no rollover. |
costSource | String | Source for cost calculation. One of: STATIC, FROM_METER_TYPE, EXPRESSION. |
cost | Double | Static cost per unit of measure. |
costExpression | String | Ignition expression returning cost per unit. |
notes | String | Notes related to the meter configuration. |
enabled | Boolean | Indicates if the meter configuration is active and enabled. |
spare1 | String | Additional field for user-defined context. |
spare2 | String | Additional field for user-defined context. |
spare3 | String | Additional field for user-defined context. |
Code Examples
# Retrieve all Meter Configurations for a specific piece of equipment
meterConfigs = system.mes.meter.getMeterConfigurationsForEquipment('Enterprise/Site/Line1')
# Output the list of Meter Configurations
print(meterConfigs)