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. Forums
  3. Gurux DLMS Python

Gurux DLMS Python

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 kevin jose minj , 11 October, 2022
Forums
General discussion

Kindly please help me out how to run Gurux DLMS python library. I want to pass obis code through command line. Anyone can brief me how this library is running past 1 week I am trying

Profile picture for user Kurumi

Kurumi

3 years 8 months ago

Hi,

Hi,

Download the client example from here:

https://github.com/Gurux/Gurux.DLMS.Python/tree/master/Gurux.DLMS.Clien…

When you run the app you get possible arguments.

For example: python main.py -h YOUR_METER_IP_ADDRESS -p YOUR_METER_PORT_NUMBER

BR,
Mikko

kevin jose minj

3 years 8 months ago

How will get IP address and

How will get IP address and port number? I am connected the meter with the optical prob

kevin jose minj

3 years 8 months ago

In reply to Hi, by Kurumi

I tried this python main.py

I tried this python main.py -S COM5 but it is not returning the voltage ,current values

Profile picture for user Kurumi

Kurumi

3 years 8 months ago

Hi,

Hi,

If you are trying to connect using an optical probe you can try with this:

python main.py -S COM5 -i HdlcWithModeE

BR,
Mikko

kevin jose minj

3 years 8 months ago

In reply to Hi, by Kurumi

Thanks for your reply this is

Thanks for your reply this is what i am getting as output, it is not returing any values

gurux_dlms version: 1.0.137
gurux_net version: 1.0.19
gurux_serial version: 1.0.20
Authentication: Authentication.NONE
ClientAddress: 0x10
ServerAddress: 0x1
Standard: Standard.DLMS
DisconnectRequest

kevin jose minj

3 years 8 months ago

In reply to Thanks for your reply this is by kevin jose minj

when i trying this command

when i trying this command
python main.py -S COM5 -i HdlcWithModeE -C Authentication -v 0.0.96.3.10.255

output is
gurux_dlms version: 1.0.137
gurux_net version: 1.0.19
gurux_serial version: 1.0.20
Authentication: Authentication.NONE
ClientAddress: 0x10
ServerAddress: 0x1
Standard: Standard.DLMS
Security: Security.AUTHENTICATION
System title: 41 42 43 44 45 46 47 48
Authentication key: D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF
Block cipher key: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
DisconnectRequest

can you please help me out how to pass specific obis code and get output value

Profile picture for user Kurumi

Kurumi

3 years 8 months ago

Hi,

Hi,

DLMS is not an easy protocol and I believe that one of your settings is different from what the meter expects and the meter doesn't reply because of that. Add -t Verbose to get a trace and see if the meter replying at all.

I propose that you download the GXDLMSDirector and try to connect with that. It will help you get a better idea of DLMS meters.

BR,
Mikko

sankar@gurux

2 years 9 months ago

Hi continue with same topic …

Hi continue with same topic ,

I can able run and read DLMSGURX py library by giving simple command

>>python main.py COM3

and getting follwing as a response

TX: 13:36:22 7E A0 07 03 21 93 0F 01 7E
RX: 13:36:22 7E A0 20 21 03 73 73 98 81 80 14 05 02 03 40 06 02 03 40 07 04 00 00 00 01 08 04 00 00 00 01 B7 29 7E
TX: 13:36:22 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
RX: 13:36:23 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 0E 08 00 06 5F 1F 04 00 00 00 10 03 40 00 07 D1 F0 7E
TX: 13:36:23 7E A0 19 03 21 32 6F D8 E6 E6 00 C0 01 C1 00 0F 00 00 28 00 00 FF 02 00 91 53 7E
RX: 13:36:23 7E A2 80 21 03 52 4D 1C E6 E7 00 C4 01 C1 00 01 0A 02 04 12 00 01 11 00 09 06 00 00 2A 00 00 FF 02 02 01 02 02 03 0F 01 16 01 01 00 02 03 0F 02 16 01 01 00 01 00 02 04 12 00 01 11 00 09 06 00 00 60 01 00 FF 02 02 01 02 02 03 0F 01 16 01 01 00 02 03 0F 02 16 01 01 00 01 00 02 04 12 00 01 11 00 09 06 00 00 2B 01 02 FF 02 02 01 02 02 03 0F 01 16 01 01 00 02 03 0F 02 16 01 01 00 01 00 02 04 12 00 01 11 00 09 06 00 00 2B 01 03 FF 02 02 01 02 02 03 0F 01 16 01 01 00 02 03 0F 02 16 01 01 00 01 00 02 04 12 00 01 11 00 09 06 00 00 2B 01 04 FF 02 02 01 02 02 03 0F 01 16 01 01 00 02 03 0F 02 16 01 01 00 01 00 02 04 12 00 01 11 00 09 06 00 00 2B 01 05 FF 02 02 01 02 02 03 0F 01 16 01 01 00 02 03 0F 02 16 01 01 00 01 00 02 04 12 00 01 11 00 09 06 00 00 5E 60 01 FF 02 02 01 02 02 03 0F 01 16 01 01 00 02 03 0F 02 16 01 01 00 01 00 02 04 12 00 08 11 00 09 06 00 00 01 00 00 FF 02 02 01 09 02 03 0F 01 16 01 01 00 02 03 0F 02 16 01 01 00 02 03 0F 03 16 01 01 00 02 03 0F 04 16 01 01 00 02 03 0F 05 16 01 01 00 02 03 0F 06 16 01 01 00 02 03 0F 07 16 01 01 00 02 03 0F 08 16 01 01 00 02 03 0F 09 16 01 01 00 01 06 02 02 0F 01 16 00 02 02 0F 02 16 00 02 02 0F 03 16 00 02 02 0F 04 16 00 02 02 0F 05 16 00 02 02 0F 06 16 00 02 04 12 00 0F 11 01 09 06 00 00 28 00 00 FF 02 02 01 09 02 03 0F 01 16 01 01 00 02 03 0F 02 16 01 01 00 02 03 0F 03 16 01 01 00 02 03 0F 04 16 01 01 00 02 03 0F 05 16 01 01 00 02 03 0F 06 16 01 01 00 02 03 0F 07 16 01 01 00 02 03 0F 08 16 01 01 00 02 03 0F 09 16 01 01 00 01 04 02 02 0F 01 16 00 02 02 0F 02 16 00 02 02 0F 03 16 00 02 02 0F 04 16 00 02 04 12 00 0F 11 01 09 06 00 00 28 00 01 FF 02 02 01 09 02 03 0F 01 16 01 01 00 02 03 0F 02 16 01 01 00 02 03 0F 03 16 01 01 00 02 03 0F 04 16 01 01 00 02 03 0F 05 16 01 01 00 02 03 0F 06 16 01 01 00 02 03 0F 07 16 01 01 00 02 03 0F 08 16 01 01 00 02 03 0F 09 16 01 01 00 01 04 02 02 0F 01 16 00 02 02 0F 02 16 00 02 02 0F 03 16 00 02 02 0F 04 16 00 04 E0 7E
-------- Reading 1 0.0.42.0.0.255 Ch. 0 COSEM Logical device name
TX: 13:36:23 7E A0 19 03 21 54 5F DE E6 E6 00 C0 01 C1 00 01 00 00 2A 00 00 FF 01 00 7A AA 7E
RX: 13:36:24 7E A0 18 21 03 74 E6 45 E6 E7 00 C4 01 C1 00 09 06 00 00 2A 00 00 FF C0 57 7E
Index: 1 Value: 0.0.42.0.0.255

But if I want to get particular profile say for example "profile generic" information ,how to get this alone

Can you pls help me to get the same ?

kevin jose minj

2 years 9 months ago

I think you are reading the…

I think you are reading the LLS Association. Try with HLS Association with correct parameters. Try once from Gurux GXDLMSDirector tool and same parameters something like this

python main.py -S COM3 -P xxxx -A xxxxxxxxxxx -D xxxxxxxxxxxx -C 80 -a High
-t Verbose

Profile picture for user Kurumi

Kurumi

2 years 9 months ago

Hi sankar, Please, create a…

Hi sankar,

Please, create a new topic if you have a new question.

You can read only one attribute if you use -g argument.

BR,
Mikko

sankar@gurux

2 years 9 months ago

Means if I wants to read…

Means if I wants to read ProfileGeneric can I use below format or ?

python main.py -S COM3 -G 'ProfileGeneric'

sankar@gurux

2 years 6 months ago

is this the correct comment…

is this the correct comment to read the nameplate profile?

python main.py -S COM9 -g 0.0.94.91.10.255

Im getting following as response

C:\Users\fsn3kor\PycharmProjects\DLMS_Python\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python>python main.py -S COM9 -g 0.0.94.91.10.255
gurux_dlms version: 1.0.146
gurux_net version: 1.0.19
gurux_serial version: 1.0.20
Invalid Logical name or attribute index.
Ended. Press any key to continue.

Profile picture for user Kurumi

Kurumi

2 years 6 months ago

Hi sankar, Please, create a…

Hi sankar,

Please, create a new topic if you have a new question.

You must add the attribute index after the logical name. Like this:

-g 0.0.94.91.10.255: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

Who's new

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