Skip to main content
Version: V3 (Ignition 8.3)

system.mes.meter.getMeterType

Description

Retrieves a Meter Type record by its ID or name.

Permissions

This method requires the METERING.READ.GET permission.

Syntax

system.mes.meter.getMeterType(idOrName)

Parameters

ParameterTypeNullableDescription
idOrNameStringFalseThe ID or name of the Meter Type to retrieve.

Returns

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

NameTypeDescription
idString (ULID)The ULID of the Meter Type.
nameStringDisplay name for this meter type (e.g., Water, Electricity, Gas).
usageUnitOfMeasureIdString (ULID)The ULID of the unit of measure for usage values.
usageUnitOfMeasureNameStringDisplay name of the usage unit of measure.
usageUnitOfMeasureSymbolStringSymbol of the usage unit of measure (e.g., kWh).
costDoubleDefault cost per unit of measure.
costUnitOfMeasureIdString (ULID)The ULID of the unit of measure for cost values.
costUnitOfMeasureNameStringDisplay name of the cost unit of measure.
costUnitOfMeasureSymbolStringSymbol of the cost unit of measure (e.g., USD).
notesStringNotes related to the meter type.
enabledBooleanIndicates if the meter type 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 Type by name
meterType = system.mes.meter.getMeterType('Electricity')

# Output the Meter Type
print(meterType)