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. Disconnection Control

Disconnection control

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 , 22 November, 2022
Forums
General discussion

For remote disconnect/reconnect how will we pass the obis code with attribute index when I pass 1&2 as attribute index it is returning logical name and output state. Any one have idea about that and I am using python library.

Profile picture for user Kurumi

Kurumi

3 years 6 months ago

Hi,

Hi,

You can do it like this:

reply = GXReplyData()
dc = GXDLMSDisconnectControl()

self.readDataBlock(dc.remoteDisconnect(self.client), reply)

OR
self.readDataBlock(dc.remoteReconnect(self.client), reply)

BR,
Mikko

kevin jose minj

3 years 6 months ago

In reply to Hi, by Kurumi

In which file I have to write

In which file I have to write this code, actually I don't have much idea about this library

from gurux_dlms.object import GXDLMSDisconnectionControl

reply = GXReplyData()
dc = GXDLMSDisconnectControl()

self.readDataBlock(dc.remoteDisconnect(self.client), reply)

This one I already tried, is there any problem with this code?

Profile picture for user Kurumi

Kurumi

3 years 6 months ago

Hi,

Hi,

You can add it for the readAll after the connection is initialized.

https://github.com/Gurux/Gurux.DLMS.Python/blob/ab0262534ee49b4d24bbf67…

Your code looks correct. Try to connect with GXDLMSDirector and use the command line arguments that you see when you select the device.

BR,
Mikko

kevin jose minj

3 years 6 months ago

In reply to Hi, by Kurumi

Thanks for your reply if I

Thanks for your reply if I code like this it will turn off the meter remotely? Instead of that it is throwing an error message
return client.method(self, 1, int(0), DataType.INT8)
File "C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\site-packages\gurux_dlms\GXDLMSClient.py", line 872, in method
return self.__method(item.name, item.objectType, index, data, type_)
File "C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\site-packages\gurux_dlms\GXDLMSClient.py", line 878, in __method
raise ValueError("Invalid parameter")
ValueError: Invalid parameter

Profile picture for user Kurumi

Kurumi

3 years 6 months ago

Hi,

Hi,

I believe that the logical name is missing from the contructor. I didn't add it because I don't know what is logical name that your meter is using.

dc = GXDLMSDisconnectControl(LOGICAL_NAME_OF_THE OBJECT)

BR,
Mikko

kevin jose minj

3 years 6 months ago

In reply to Hi, by Kurumi

I passed logical name now its

I passed logical name now its showing access error how will I tackle that? I tried in gurux dlms director there it is accessible and disconnection also working

Profile picture for user Kurumi

Kurumi

3 years 6 months ago

Hi,

Hi,

What authentication level you are using? I believe it's None. Check what you are using in GXDLMSDirector and use the same settings.

BR,
Mikko

kevin jose minj

3 years 6 months ago

In reply to Hi, by Kurumi

Authentication level is

Authentication level is present in GXDLMSDirector command line arguments

Profile picture for user Kurumi

Kurumi

3 years 6 months ago

Hi,

Hi,

Is the logical name the same in GXDLMSDirector and in your app?
Have you established the connection for the meter before calling the remoteDisconnect method?

BR,
Mikko

kevin jose minj

3 years 6 months ago

Logical name is correct .This

Logical name is correct .This is the code I written

def readAll(self, outputFile):
try:
#read = False
self.initializeConnection()
reply = GXReplyData()
dc = GXDLMSDisconnectControl('0.0.96.3.10.255')
self.readDataBlock(dc.remoteDisconnect(self.client), reply)

Is there any problem with code?

kevin jose minj

3 years 6 months ago

Now its working I guess the

Now its working I guess the meter is replying slowly. Thanks for your guidance

Profile picture for user Kurumi

Kurumi

3 years 6 months ago

Hi,

Hi,

Thank you for letting me know. Happy coding.

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