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. DLMS Client With Gurux_dlms

DLMS client with Gurux_dlms

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

By Vinsmock , 31 August, 2022
Forums
General discussion

Hello,

I would like to create a DLMS client with gurux_dlms python library.I have already downloaded the source code on Github but i don't know how to use it.
Could I have some help please.

Vinsmock

3 years 9 months ago

P.S I tried to follow the

P.S: I tried to follow the steps in topic "How to make DLMS client for smart meter." but i got several at the end.

Profile picture for user Kurumi

Kurumi

3 years 9 months ago

Hi,

Hi,

Try to use the client example to read your meter. It will read all the data from the meter.
https://github.com/Gurux/Gurux.DLMS.Python/tree/master/Gurux.DLMS.Clien…

You need to give TCP/IP address and port number as a parameter like this:

python main.py -h HOST_NAME -p PORT_NUMBER

BR,
Mikko

Vinsmock

3 years 9 months ago

In reply to Hi, by Kurumi

Hi thanks for your reply,

Hi thanks for your reply,

But my problem is how can I use the client example , I only found modules in this folder. I don't quite understand how it works and how can use it to read data from my meter.

Profile picture for user Kurumi

Kurumi

3 years 9 months ago

Hi,

Hi,

The example client app reads all data from your meter. You can modify if for your needs.

Finst you need to install requirements like this:

pip install -r requirements.txt --upgrade

Then you can run the app as I described above.

BR,
Mikko
BR,
Mikko

Vinsmock

3 years 9 months ago

Hello thanks for your reply,

Hello thanks for your reply,

I managed to install the requirements as you said but I still don't understand the app you are talking about.
This is what I have, below in the image after downloading the file from GitHub. Which file should I open to be able to communicate with my meter?

Image
Profile picture for user Kurumi

Kurumi

3 years 9 months ago

Hi,

Hi,

You can start the communication using command line parameters. They are something like this:
python main.py -h HOST_NAME -p PORT_NUMBER

If you download the GXDLMSDirector and play with that, you get a better understanding of the DLMS meters. They can be pretty complicated.

BR,
Mikko

Vinsmock

3 years 9 months ago

Hi thanks for your reply,

Hi thanks for your reply,

I understood what you have said , now I can start a communication using command line parameters. But I get some errors when I try to establish un public client, like this :

python main.py -S COM4 -a None -c 16 -s 1 -r ln -t Verbose

gurux_dlms version: 1.0.136
gurux_net version: 1.0.19
gurux_serial version: 1.0.20
Authentication: Authentication.NONE
ClientAddress: 0x10
ServerAddress: 0x1
Standard: Standard.DLMS
TX: 12:01:33 7E A0 07 03 21 93 0F 01 7E
RX: 12:01:33 7E A0 20 21 03 73 73 98 81 80 14 05 02 00 80 06 02 00 80 07 04 00 00 00 01 08 04 00 00 00 01 CE 6A 7E
TX: 12:01:33 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 5D FF FF B3 E2 7E
Data send failed. Try to resend 1/3
Data send failed. Try to resend 2/3
RX: 12:01:48 7E A0 37 21 03 30 6C 7C E6 E7 00 61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 10 04 FE 7E A0 0C 21 03 97 3E 21 10 22 01 E8 4B 7E 7E A0 0C 21 03 97 3E 21 10 22 01 E8 4B 7E
DisconnectRequest
TX: 12:01:48 7E A0 07 03 21 53 03 C7 7E
RX: 12:01:48 7E A0 20 21 03 73 73 98 81 80 14 05 02 00 80 06 02 00 80 07 04 00 00 00 01 08 04 00 00 00 01 CE 6A 7E
Access Error : Unknown error.
Ended. Press any key to continue.

I use a "Kaifa AMD206D" meter.

Profile picture for user Kurumi

Kurumi

3 years 9 months ago

Hi,

Hi,

At first, everything looks good, but the content of the second message that the meter returns is invalid and there is no reason for that.

Is this happening every time? Can you try to reboot the meter and connect after that?

BR,
Mikko

Vinsmock

3 years 9 months ago

In reply to Hi, by Kurumi

Hi,

Hi,

Thanks you so much it's work.

Vinsmock

3 years 8 months ago

Hi,

Hi,

Using command line parameters is really cumbersome. Is there another way to use the gurux_DLMS_client_example without going through the cmd.

Profile picture for user Kurumi

Kurumi

3 years 8 months ago

Hi,

Hi,

You can use GXDLMSDirector to read your meter.
If you want to use Python, there are no other examples available at the moment.

BR,
Mikko

Vinsmock

3 years 8 months ago

Thanks you very much

Thanks you very much

Vinsmock

3 years 8 months ago

Hello, I would try to create

Hello, I would try to create a private client with the meter and read all the data on the meter using the python example. I tried this command but got no response. What commands should I use to do this?

py main.py -S COM4 -a High -c 16 -s 1 -r ln -t Verbose -C Authentication -A C018AE45B37DAE665486F4151E0C1E6F
gurux_dlms version: 1.0.136
gurux_net version: 1.0.19
gurux_serial version: 1.0.20
Authentication: Authentication.HIGH
ClientAddress: 0x10
ServerAddress: 0x1
Standard: Standard.DLMS
Security: Security.AUTHENTICATION
System title: 41 42 43 44 45 46 47 48
Authentication key: C0 18 AE 45 B3 7D AE 66 54 86 F4 15 1E 0C 1E 6F
Block cipher key: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
TX: 12:20:39 7E A0 07 03 21 93 0F 01 7E
RX: 12:20:39 7E A0 20 21 03 73 73 98 81 80 14 05 02 00 80 06 02 00 80 07 04 00 00 00 01 08 04 00 00 00 01 CE 6A 7E
TX: 12:20:39 7E A0 6B 03 21 10 4C B9 E6 E6 00 60 5D A1 09 06 07 60 85 74 05 08 01 03 A6 0A 04 08 41 42 43 44 45 46 47 48 8A 02 07 80 8B 07 60 85 74 05 08 02 02 AC 12 80 10 BE BF 2A F6 9B 5D D0 B7 B6 46 E7 EC A8 43 61 2F BE 23 04 21 21 1F 10 00 00 00 00 01 00 00 00 06 5F 1F 04 00 00 1E 5D FF FF 80 D0 12 3E 80 19 33 04 F2 87 B3 F4 88 E9 7E
Data send failed. Try to resend 1/3
RX: 12:20:44 7E A0 0C 21 03 97 3E 21 10 20 01 58 78 7E
DisconnectRequest
TX: 12:20:44 7E A0 07 03 21 53 03 C7 7E
RX: 12:20:44 7E A0 20 21 03 73 73 98 81 80 14 05 02 00 80 06 02 00 80 07 04 00 00 00 01 08 04 00 00 00 01 CE 6A 7E
Access Error : Unknown error.
Ended. Press any key to continue.

Profile picture for user Kurumi

Kurumi

3 years 8 months ago

Hi,

Hi,

You are using the ciphered connection. I belive that your block cipher or authentication key is invalid. You need to check what keys to use from the meter documentation or the vendor.

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

Who's new

  • Tuanhgg
  • Adel
  • charnon
  • Paddles
  • Miguel Ángel
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin