Skip to main content
Home
for DLMS smart meters

Main navigation

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

Breadcrumb

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

Join the Gurux Community or follow "@Guruxorg" for project updates.

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 component before you start to modify simulator for your needs.


If you have problems you can ask your questions in Gurux Forum. You can get source codes of C# example or Java example.

Purpose of Gurux.DLMS.Simulator is help you make testing environment without the huge number of real meter. You need only one meter to get started. There is also one simulator template in this project. We have read Crystal Smart meter and added it to the GitHub project. (crystal.xml). You can use it to get started.

Preparation for Java

If you want to use java version from Gurux.DMLS.Sinulator you need to build it using maven. Run this command to build java package:
mvn clean backage
Then you can start server running:
java -jar target/gurux.dlms.simulator.java-0.0.1-SNAPSHOT.jar

Preparation for .Net Core

If you have Visual Studio 2019 installed, you don't need to do anything. If you want to run .Net version in Linux you need to first install .NET Core 3.1 SDK to build the project. Run this to check is .NET Core installed:
dotnet --info
You should see something like:
.NET Core SDK (reflecting any global.json):
 Version:   3.1.101
 Commit:    b377529961
If SDK is not installed, Install .Net Core from here. Next build the project running:
dotnet build Gurux.DLMS.Simulator.NetCore.sln
After build you can start the simulator running:
dotnet bin/Debug/netcoreapp3.1/Gurux.DLMS.Simulator.Net.dll

Usage

First, you need to read values from the real meter. You use meter values to make a simulator template. You create a simulator template running Gurux.DLMS.Simulator. In this example, the meter is connected to serial port 8.
You get a description from all the parameters if you run Gurux.DLMS.Simulator.Net.exe without parameters.
Gurux.DLMS.Simulator.Net.exe -S COM8 -o simulator_template.xml -t Verbose
This might take some time because all the values are read from the meter. After you have created the simulator file you can start the simulator.
Gurux.DLMS.Simulator.Net.exe -p 1000 -x simulator_template.xml -t Verbose -N 10

If you want to that all the meters are using the same TCP/IP port you can use -X parameter.
You need to use the serial number to read the meter if you are using the same TCP/IP port.

Gurux.DLMS.Simulator.Net.exe -p 1000 -x simulator_template.xml -N 10000 -X

Modifying values.

Because needs are so different when simulating meters, there is only a few basic values are updated. Everything else are static values. You can see them in UpdateValues function. If you need only meters to read that should be enough for you. Default functionality updates COSEM Logical Device Name and meter serial number. Serial number is a one-based number the is increased by one.

You can expand the functionality of your needs.
You can read what each method does.

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

Fri, 03/24/2023 - 14:22
gurux.dlms.c 20230324.1
Thu, 03/23/2023 - 11:01
GXDLMSDirector 9.0.2303.2301
Thu, 03/23/2023 - 09:10
Gurux.DLMS.Python 1.0.142
Wed, 03/22/2023 - 13:51
Gurux.DLMS.Net 9.0.2303.2201
Wed, 03/22/2023 - 10:15
gurux.dlms.c 20230322.1

Open bugs

Gurux.DLMS.AMI4
1
Gurux.DLMS.Android
1
gurux.dlms.c
3
gurux.dlms.cpp
3
gurux.dlms.delphi
1
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin