
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
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 10Configuration 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.
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.

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).

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".
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.


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.