Skip to main content
Version: V2 (Ignition 8.1)

system.mes.meter.getMeterRecord

Description

Retrieves a Meter Record by its ID.

Permissions

This method requires the METERING.READ.GET permission.

Syntax

system.mes.meter.getMeterRecord(id)

Parameters

ParameterTypeNullableDescription
idString (ULID)FalseThe ID of the Meter Record to retrieve.

Returns

Returns a JSON representation of the Meter Record. Returns nothing if no Meter Record is found.

NameTypeDescription
idString (ULID)The ULID of the Meter Record.
nameStringDisplay name of the Meter Record.
descriptionStringOptional description.
equipmentIdString (ULID)The ULID of the equipment this record belongs to.
equipmentPathStringPath of the associated equipment.
locationIdString (ULID)The ULID of the location where the equipment is stationed.
locationPathStringPath of the associated location.
meterTypeIdString (ULID)The ULID of the Meter Type being tracked.
meterTypeNameStringName of the Meter Type.
statusStringStatus of this record. One of: RUNNING, COMPLETED, FAULTED, CANCELLED, IDLE.
startDateInstantStart date and time of this record.
endDateInstantEnd date and time of this record. Null if the record is still running.
totalDurationSecDoubleTotal duration of this record in seconds.
usageDoubleTotal usage accumulated during this record period.
costDoubleTotal cost accumulated during this record period.
usageUnitOfMeasureIdString (ULID)The ULID of the unit of measure for usage.
usageUnitOfMeasureNameStringDisplay name of the usage unit of measure.
usageUnitOfMeasureSymbolStringSymbol of the usage unit of measure.
costUnitOfMeasureIdString (ULID)The ULID of the unit of measure for cost.
costUnitOfMeasureNameStringDisplay name of the cost unit of measure.
costUnitOfMeasureSymbolStringSymbol of the cost unit of measure.
notesStringNotes related to the meter record.
enabledBooleanIndicates if the meter record 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 a Meter Record by ID
meterRecord = system.mes.meter.getMeterRecord('01J9YP3JBR-WQ8GWRR2-8Y879V2G')

# Output the Meter Record
print(meterRecord)