Skip to content

IEC 62056 Driver

Version: 1.0.0

The ESF IEC 62056 Driver implements the IEC 62056-21 protocol using the Driver model. The Driver can be used to interact with slave devices such as gas, water, heat, or electricity meters using different abstractions, such as the Wires framework, the Asset model or by directly using the Driver itself.

Features

The IEC 62056 Driver features include:

  • Support for Mode C.
  • Support for reading data sets with/without addresses.

The protocol defines a programming mode in which commands can be sent to the meter device. Such feature is not handled by the driver.

Instance creation

A new IEC 62056 instance can be created either by clicking the New Driver button in the dedicated Drivers and Assets Web UI section or by clicking on the + button under Services. In both cases, the com.eurotech.framework.iec62056.driver.Iec62056Driver factory must be selected and a unique name must be provided for the new instance.

Driver life-cycle

The driver opens and closes two serial connections towards the tariff device for every read that is triggered in ESF channels. The first connection at a fixed baud rate of 300 is opened to obtain identification data from the tariff device with protocol Mode C, and return with an acknowledgement. The second connection is then opened with the baud rate previously received in the identification message, and data is obtained.

Master ---- Request message ---> Slave
Master <--- Identification message ---- Slave
Master ---- Acknowledgment message ---> Slave
Master <--- Data message ---- Slave

Driver Configuration

The following properties are configurable:

  • serial.port: the serial port used for communication. Examples are /dev/ttyS1 (Linux).
  • open.timeout: connection timeout in ms.
  • receive.timeout: receive timeout in ms.
  • device.address: the device address that is sent with the request message.