Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

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

Breadcrumb

  1. Home
  2. Use Gurux.DLMS.Simulator.Net and Gurux.DLMS.Client.Example.python

use Gurux.DLMS.Simulator.Net and Gurux.DLMS.Client.Example.python

By Ford_YE , 12 September, 2023
Forums
Gurux.DLMS

I have questions about DLMS, I use the Gurux.DLMS.Net simulator to simulate the smart meter (I use the xml in the github : crystal.xml). And how to get the simulator meter data using Gurux.DLMS.Client.Example.python code?

The steps I have done as below:

I clone the Gurux.DLMS.Net from github and run the simulator as the command:

> Gurux.DLMS.Simulator.Net.exe -p 1000 -x crystal.xml -t Verbose -N 1
Is this command simulate a meter from crystal.xml?

and it print the content as below:

DLMS HDLC Logical Name simulator start in ports 1000-1000.
Waiting 1.00:00:00 before next execution.
Server address: 1
Associations:
++++++++++++++++++++++++++++
Client address: 16 Without authentication.
Conformance:
Get
MaxReceivePduSize: 832 MaxSendPduSize: 65535

And I clone the Gurux.DLMS.Python. And use the command as below

> cd Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python
> python main.py -h localhost -p 1000
Is this command connect to the simulated meter we made above using dotnet ?

gurux_dlms version: 1.0.145
gurux_net version: 1.0.19
gurux_serial version: 1.0.20
Authentication: Authentication.NONE
ClientAddress: 0x10
ServerAddress: 0x1
Standard: Standard.DLMS
-------- Reading 15 0.0.40.0.0.255 Ch. 0 Current association
Index: 1 Value: 0.0.40.0.0.255
Index: 2 Value: 0.0.40.0.0.255 Ch. 0 Current association, 0.0.40.0.1.255 Ch. 0 Association #1
Index: 3 Value: 16, 1
Index: 4 Value: 96 133 116 5 8 1 1
Index: 5 Value: Conformance.GET 832 65535 6 0
Index: 6 Value: 96 133 116 5 8 2 0
Attribute7 is not readable.
Index: 8 Value: 2
Attribute9 is not readable.
-------- Reading 15 0.0.40.0.1.255 Ch. 0 Association #1
Index: 1 Value: 0.0.40.0.0.255
Index: 2 Value: 0.0.40.0.0.255 Ch. 0 Current association, 0.0.40.0.1.255
Index: 3 Value: 16, 1
Index: 4 Value: 96 133 116 5 8 1 1
Index: 5 Value: Conformance.GET 832 65535 6 0
Index: 6 Value: 96 133 116 5 8 2 0
Attribute7 is not readable.
Index: 8 Value: 2
Attribute9 is not readable.
DisconnectRequest
Ended. Press any key to continue.

How can I get specific content or value using obis code in this project(Gurux.DLMS.Client.Example.python main.py)?

I'm not so familiar with this protocol(Still study). Can you bring some example code demo how to use the functionality about "Get". And the meter data from the simulator above.(crystal.xml)

Thank you very much.

Profile picture for user Kurumi

Kurumi

2 years 8 months ago

Hi, You can use the same…

Hi,

You can use the same command line arguments with Python. If you know what you want to read, you can also add objects manually. Like this:

obj = GXDLMSRegister("Logical name or your object")
#Read scaler and unit
self.read(obj, 3)
#Read value.
self.read(obj, 2)

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin