Skip to main content
Home
for DLMS smart meters

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Gurux.DLMS.Simulator.Templates
Getting started

Gurux.DLMS library is a high-performance component that helps you to read your DLMS/COSEM compatible electricity, gas, or water meters. We have tried to make component so easy to use that you do not need to understand protocol at all.

Read basic information from Gurux.DLMS.Simulator and how you can build it.

If you have problems you can ask your questions in Gurux Forum.

The purpose of Gurux.DLMS.Simulator is to help you create a testing environment without requiring a large number of physical meters. Due to popular demand, default templates have been added to the Templates-folder. These templates help you get started quickly and allow you to create virtual meters tailored to your needs.

Templates

You can use the provided device templates to simulate DLMS devices without needing actual meter. The templates support Logical Name (LN) referencing and include the following authentication levels:
  • Low
  • High
  • MD5
  • SHA1
  • GMAC
  • Sha-256
The LN-v2 templates use Association LN version 2, while LN-v3 templates are for version 3.
GMAC and SHA-256 authentication levels are also available for encrypted GMAC connections in Security Setup Suites 0, 1 and 2.

Getting Started

To start a simulator instance using a template, run:
bin/Release/net9.0/Gurux.DLMS.Simulator.Net -p 4059 -x Templates/LN-v2-High.xml -t Verbose -N 10
Configuration details will be shown in the console output. The client address and authentication level are defined in the template. TCP/IP port settings determine the listening ports and default password (note: the password is case-sensitive).
Example output:
DLMS HDLC Logical Name simulator start in Tcp ports 4059-4069.
Server address: 1
Associations:
++++++++++++++++++++++++++++
Client address: 18 High authentication, password Gurux
 Conformance:
Get, Set, SelectiveAccess, EventNotification, Action
 MaxReceivePduSize: 1024 MaxSendPduSize: 1024

Connecting with GXDLMSDirector

Start GXDLMSDirector and connect to the simulator by selecting "Gurux" as the manufacturer and "High" as the authentication level. After the connection is established, read the association view to retrieve basic information from the meter. The default simulated meter includes only the association view and a logical device name.

GXDLMSDirector settings

Adding new COSEM objects.

You can add new dummy COSEM objects. These objects have static content but support reading and writing of attribute values.
To add a new COSEM object:
Select "Current Association" in GXDLMSDirector.

Association view

Click "Add" to create a new object.
Choose the desired object type (e.g., a clock object).
Assign a Logical Name and configure access rights (default is read/write, but you can set to read-only).

New COSEM object
Once added, the object will appear in the association view.
To display it in the object tree:
Go to File and Refresh, which reloads the updated association view. Next synchronize the time zone with your PC:

  • Select the clock object.
  • Click "Current time zone".
The updated values will be saved to the template file. When you restart the simulator, changes like the time zone will persist.

Similarly, you can add all the COSEM objects required for your needs. The simulator can also be modified to implement custom behavior, such as changing register values on every read request.

Logical names of COSEM objects must be unique

Logical names of COSEM objects must be unique. If you try to add a logical name that already exists, you will receive an 'Access Error : Device reports a undefined object' message.

Data type

The attribute data type is not always defined in the DLMS standard. For example, the Data object does not specify it. You can set the desired data type before writing the initial value.

To do this:

  • Select the added object.
  • Go to the Access rights tab.
  • Change the data type to the one you want.

Data type

Set the desired value and write it to the meter.

Value

Once written, the data type is assigned to that attribute of the COSEM object.
Note: After initialization, the data type can only be changed by editing the XML file directly.

In this example, we have gone through how to create a DLMS meter that uses High-level authentication. You can similarly create meters that use other authentication levels as needed.

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Wed, 07/09/2025 - 16:41
    Gurux.Serial.Android 2.0.13
  • Wed, 07/09/2025 - 12:07
    gurux.dlms.c 9.0.2507.0901
  • Sat, 07/05/2025 - 15:04
    Gurux.DLMS.Python 1.0.188
  • Tue, 07/01/2025 - 10:09
    Gurux.DLMS.Python 1.0.187
  • Tue, 07/01/2025 - 09:54
    gurux.dlms.c 9.0.2507.0101

New forum topics

  • Regarding the dlms android project
  • Unable to read attribute =3 (1.0.94.91.0.255) IC=7 for Indian Metering, while I'm able to read attribute 3 for other Profile generic class
  • Register Activation class (class_id = 9) attribute index 3 data is not visible
  • Load profile
  • DLMS Decryption Implementation Status and Clarification Needed
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin