DLMS/COSEM meters FAQ

We are receiving lots of emails about DLMS/COSEM DLMS/COSEM for smart meters.
We hope that this FAQ is usefull to you.

I want to build own AMR system /meter. How to get started?

Read intraductions how to make own AMR system or DLMS/COSEM meter/proxy/simulator.

Reading meters using GPRS connection

If you want to read your meters using GPRS connection you must have static IP addresses on your meters (SIM card).
If you have dynamic IP addresses, your meter must always start the connection to the server.
This means that your meter can send example scheduled push messages, but you can't read your meter when you want to.
In GPRS connections are always established from modem to GPRS network, and never
from GPRS network to modem. It is not possible for a client application to open a connection.

Static IP address: Meter or reading system can start the connection.
Dynamic IP address: Meter always starts the connection.

Reading meters using optical probe

If you want to read your meter using optical probe (optical eye or read-out head) there are few things.
1. Don't buy cheap. There is a reason for the price.
2. Sunlight or powerful light can cause harm.
3. The cable from the readout head must always point downwards.

IEC 62056-21 is not DLMS/COSEM

For time to time we are receiving inqueries where people have mixed IEC 62056-21 (AKA 61107) and DMLS.

IEC 62056-21 is not DMLS!
In short: IEC 62056-21 is ASCII based standard and DLMS is binary based.
They are TOTALLY different standards. You can't mix them!
You can read more from here:
https://en.wikipedia.org/wiki/IEC_62056

High Authentication (High Level Security)

We are receiving queries how to count High authentication for some meter.
1. All meters do not support High Authentication at all. The manufacturer may decide whether it is supported.
2. High authentication is a problem, because DLMS specification does not specify details of the HLS mechanism. So each manufacturer have own implementation. Indian standard (IS 15959.2011) describes this, but there are lots of smart meter manufacturers who are using own way to count it and they do not tell it. You can read from High Level Security at DLMS UA home page.

I want to add manufacturer specific object type (IC)

Sometimes device manufacturers are using custom objects to add new functionality to the meters. You can create Manufacture specific object types (IC) for Gurux DLMS/COSEM as described
here.

What I should known to read DLMS/COSEM meter

Usually people are asking how to read meter from manufacturer XXX.
There are three different parameters that are changing between manufacturers:

  • Is used Logical Name (LN) or Short Name (SN) referencing
  • Server ID(AKA Server Address or primary station)
  • Client ID(AKA Client Address or secondary station )

Basically Server and Client IDs should be same for all manudacturers as I have explained here. Unfortunately some meter manufacturers are using own ID numbers. New meters are usually working in same way, but older (> three years) meters might use own Client and Server IDs and you should know this or meter do not answer anything.

What DLMS/COSEM means

In ISO OSI model DLMS is Data link layer and COSEM is presentation layer. See picture below. Some older meters are supporting DLMS, but not fully COSEM and they have anyhow COSEM certificated. This is causing lots of work because we must add manufacturer spesific functionality.

OSI Model

Data unit

Layer

Function

DLMS/COSEM

Host
layers

Data

7. Application

Network process to application

Application like GXDLMSDirector

6. Presentation

Data representation, encryption and decryption, convert machine dependent data to machine independent data

COSEM

5. Session

Interhost communication, managing sessions between applications

DLMS

Segments

4. Transport

End-to-end connections, reliability and flow control

DLMS

Media
layers

Packet/Datagram

3. Network

Path determination and logical addressing

 

Frame

2. Data link

Physical addressing

HDLC or IEC 62056-47

Bit

1. Physical

Media, signal and binary transmission

Gurux Media like Serial, TCP/IP

Basics

Meter Objects are read through Interfaces. Example Clock, Register, etc. Each Object has always Logical Name. Logical name is found from 1st. attribute. Basic idea of Logical Name referencing is that manufacturers are using same Logical names (Example 0.0.1.0.0.266 is Clock's Logical Name AKA OBIS Code). If all manufacturers are using same Logical Names data collector can read data from different meters with one data collecting application. This can be done by comparing the logical names.

If you know what you want to read. With Logical name referencing there is nesessary need to read Association View that describes all meter's Objects. Short name referencing is basically memory address and it can change between meter models. Bad side of this is that Association View must always read first to find wanted object as you can see example below.

Products and Services Information Organization Documentation Conformance FAQ - Answers News Collaboration Tools Home page Documentation List of standard OBIS codes and COSEM objects Documentation

List of standard OBIS codes and COSEM objects is available
here.

Reading Clock time with Logican Name referencing:



dlms.Read("", ObjectType.Clock, 2);
...
object tm = dlms.GetValue(reply, ObjectType.Clock, 2);

Reading Clock time with Short Name referencing:



//Read Association View.
dlms.GetObjects();
GXDLMSObjectCollection objects = dlms.ParseObjects(reply, true);
foreach(GXDLMSObject it in objects)
{
if(it.ObjectType == ObjectType.Clock && it.Logicalname == "0.0.1.0.0.255")
{
dlms.Read("", ObjectType.Clock, 2);
...
object tm = dlms.GetValue(reply, ObjectType.Clock, 2);
break;
}

Addressing

More information from DLMS/COSEM device addressing you can find here.

Why we have not documented what is done in line XXX

We are received lots of emails where people are asking why you have not described what is done in line XXX. We are offering solution and only interfaces are documented. In some parts there is a lack of documentation but we try to improve it all the time. But basically DLMS/COSEM is a standard and you can get info from standard spesifications. There is no point that we will wry to write standard documents again. You can read following documents where DLMS/COSEM is based on:

  • IEC 62056-21 Direct local data exchange
  • IEC 62056-42 Physical Layer Services and Procedures for Connection-Oriented Asynchronous Data Exchange
  • IEC 62056-46 Data link layer using HDLC protocol
  • IEC 62056-47 COSEM transport layers for IPv4 networks
  • IEC 62056-53 COSEM application layer
  • IEC 62056-61 OBIS Object identification system
  • IEC 62056-62 Interface objects
Undefined