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. Python DLMS Example - Commands Failing

Python DLMS example - Commands failing

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 DylanClark , 13 August, 2021
Forums
Gurux.Serial

Hi there,

I am trying to read the Landys-Gyr E650, via a Kocos optical eye. I have had success connecting with the GXDLMSDirector but I cannot connect using the python example. I am VERY new to this sort of thing so please bear with me.

I try to copy/ paste the command line given by the Director but the results are the following:

py Gurux.DLMS.Client.Example.python\main.py -S COM3:9600:8NoneOne -r sn -iHdlcWithModeE -n 95669535 -t Verbose

gurux_dlms version: 1.0.104
gurux_net version: 1.0.17
gurux_serial version: 1.0.15
Traceback (most recent call last):
File "C:\wamp64\www\Gurux.DLMS.Python-master\Gurux.DLMS.Client.Example.python\main.py", line 79, in main
ret = settings.getParameters(args)
File "C:\wamp64\www\Gurux.DLMS.Python-master\Gurux.DLMS.Client.Example.python\GXSettings.py", line 209, in getParameters
self.media.parity = Parity[tmp[2][1: len(tmp[2]) - 1].upper()]
File "C:\Python39\lib\enum.py", line 432, in __getitem__
return cls._member_map_[name]
KeyError: 'NONEON'
Ended. Press any key to continue.

I have tried a few other variations of commands with different results. But I still cannot connect to the meter.

Thanks :)
Dylan

Profile picture for user Kurumi

Kurumi

4 years 8 months ago

Hi,

Hi,

It seems like your meter didn't respond and that might happens sometimes. There is a wait time of five seconds before there will be a timeout exception.

BR,
Mikko

DylanClark

4 years 8 months ago

Hi Mikko,

Hi Mikko,

What do you make of this?
I tried: py main.py -S COM3 -r sn -i HdlcWithModeE -t Verbose

Response:
gurux_dlms version: 1.0.107
gurux_net version: 1.0.17
gurux_serial version: 1.0.17
Authentication: Authentication.NONE
ClientAddress: 0x10
ServerAddress: 0x1
Standard: Standard.DLMS
TX: 12:21:21 /?!

RX: 12:21:22 bytearray(b'/LGZ5\\2ZMD3104407.B24\r\n')
Bitrate is : 9600
TX: 12:21:23 06 32 35 32 0D 0A
RX: 12:21:24 None
TX: 12:21:25 7E A0 07 03 21 93 0F 01 7E
RX: 12:21:25
DisconnectRequest
Invalid Interface type.

Regards,
Dylan

Profile picture for user Kurumi

Kurumi

4 years 8 months ago

Hi Dylan,

Hi Dylan,

Your DLMS component version is old. Run this:
pip install --upgrade gurux-dlms

BR,
Mikko

DylanClark

4 years 8 months ago

Hi Mikko

Hi Mikko

I can now connect without any issues, on Windows and Linux machines. What was the issue, If you don't mind me asking? Was it the Optical Eye drivers?
Thanks again for the help!

Regards,
Dylan

Profile picture for user Kurumi

Kurumi

4 years 8 months ago

Hi Dylan,

Hi Dylan,

There were issues with the DLMS component and in the serial port component. HdlcWithModeE is a new feature and it was causing some problems. The hardest part was with the serial port component and find the simple reason that was causing the problem. It was working without problems with several chipsets, but yours was causing the problems. After this was tried with your optical probe chipset in the correct
PC was easy to solve.

BR,
Mikko

Pagination

  • First page
  • Previous page
  • Page 1
  • Page 2
  • 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