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.
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
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
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?
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
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?
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
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
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
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
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
Authentication level is
Authentication level is present in GXDLMSDirector command line arguments
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
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?
Now its working I guess the
Now its working I guess the meter is replying slowly. Thanks for your guidance
Hi,
Hi,
Thank you for letting me know. Happy coding.
BR,
Mikko