The DLMS/COSEM protocol (also known as the IEC 62056 standard) for communication with energy meters (electricity meters, gas meters and others) has been implemented in the Ipesoft D2000 application server for over 10 years. You can read a blog Communication - DLMS/COSEM protocol about how it works, what addressing methods it supports and how D2000 can communicate with tens of thousands of meters. Today I would like to focus on communication with the AC750 concentrator (gateway) from the renowned Slovenian manufacturer of electricity meters Iskraemeco.
The AC750 concentrator is a device that connects to an Ethernet network or a mobile network via a built-in 3G modem on one side, and on the other side it creates a PLC (Power Line Communication) network that communicates with the meters via 220 V cables (the AC750 allows all three phases to be used for communication). Thus, it is not necessary to pull communication cables (Ethernet or serial) to individual meters, or to equip each meter with its own SIM card. As a bonus, it also has an RS-485 interface for communication with meters equipped with a serial communication port.
It is worth mentioning that the PLC communication is standardized - the AC750 gateway can thus talk to Iskraemeco meters but also to e.g. Landis-Gyr meters.
The concentrator handles autonomous collection of data from the meters, which is then transferred to the master system using the SOAP protocol. It can also function as a router that forwards the requests of the master system to the meter and the meter responses in the opposite direction. We have used this mode.
How is it possible to get data from meters to D2000? For communication it is necessary to use a TCP connection to the gateway on port 5005. Unlike serial communication, the data is not wrapped in an HDLC envelope, but has two envelopes:
The outer envelope is the so-called Wrapper header. This envelope is used within the DLMS protocol for data transmitted over TCP and UDP. It has four 2-byte fields (Version, Source wPort, Destination wPort and Length). The first three fields had to be set to 1, the last one indicates the length of the transmitted data.
The inner envelope is the Gateway Protocol header. This is used to distinguish the target device to which the data is destined. It contains the fields Header (1 byte, request 0xE6 or response 0xE7), Network ID (network number, or 0 if only one site is connected to the gateway), Address length (device address length) and Physical device address (address of the device).
In our case, the physical address was the 8-byte MAC address of the meter on the PLC network. We found the addresses of the meters from the AC750 gateway webpage. The gateway serves as the "network coordinator" of the PLC network and, among other things, assigns addresses to them - interestingly, 16-byte IPv6 addresses are used.
Of course it was necessary to support both envelopes - the Wrapper Protocol Data Unit and the Gateway Protocol - on the D2000 side. The protocol parameters configured at the station level were therefore extended to include the TCP/UDP Wrapper parameters and Gateway parameters sections, and the meaning of the Opening mode parameter, which previously offered communication options via HDLC and IEC mode E (used on serial links), was also extended. TCP/UDP Wrapper (communication directly with the meter via TCP/UDP) and TCP/UDP Wrapper + Gateway protocol (communication with the meter via gateway via TCP/UDP) options have been added.
We encountered one complication when working with the gateway. The communication between the gateway and the meters can be done via UDP port 4059 (the standard port assigned to the DLMS protocol) or via port 61616. Communication via port 61616 is used for slow "power line" communications and the data is compressed compared to standard communication.
The problem was that the meters were set to use port 4059, but the gateway was set to use port 61616, so the settings had to be unified. Consequently, communication with the meters was up and running and data could be read.
Helpful employees of Iskraemeco's service department helped us to analyze why the gateway was not responding to the requests. Thank you guys!
The DLMS protocol is nowadays the preferred and frequently used communication protocol for collecting data from electricity meters (but also meters of other types of energy). The support of DLMS Gateway communication in the Ipesoft D2000 real-time application server gives our customers and OEM partners the possibility to also use devices such as the Gateway AC750 from the renowned Slovenian company Iskraemeco, thus offering a cost-optimal solution for installations involving tens or hundreds of meters connected within a single low-voltage branch.
December 3, 2021, Ing. Peter Humaj, www.ipesoft.com