Getting data from meter Python "DisconnectRequest"

6 posts / 0 new
Last post
ThomasS
Getting data from meter Python "DisconnectRequest"

Hi,

I'm facing an issue with communication between the meter and the computer (Python). I am using Landis+Gyr E650 and USB converter plugged through RS485. When I'm running the Gurux.DLMS.Client.Example.python using this command "python main.py -S COM4:9600:8None1 -r sn -c 32 -s 1 -a Low -P 00000000" I'm getting log like this https://pastebin.com/TfgH6Esb (I'm running it on windows, all libraries are up to date).

The first problem I've got is the 'DisconnectRequest' at the end after its console is frozen.

And the second question is how to retrieves just specific data from the meter. I mean retrieves for example object with names and values of chosen parameters.

Thank you in advance for your help.

Kurumi
Kurumi's picture

Hi,

Can you run this with -t Verbose parameter to get more data.

If you want to read data from the meter, you need to know object type and OBIS code. Check updateFrameCounter method from the client example. It'll read data object without reading association view.

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

ThomasS

Hi,
Thank you very much for your quick response.
This is the output of command with -t Verbose https://pastebin.com/XY1PSdHw At the and 'DisconnectRequest' was printed from function close() in GXDLMSReader.py.
Ok, I'll look at this function to read data and test it.
edit: How to use updateFrameCounter method? I need to invoke it in the main.py instead of readAll? and then to commad add "-g OBIS code" and what is the 'object type' what you have mentioned?
edit2: Meter it is not currently connected to any external devices. Could it be the reason of 'DisconnectRequest'?

Kurumi
Kurumi's picture

Hi,

The client example is improved to close the media if there is an error. That was causing the hanging. Get the latest version and let me know if you have problems.

Copy idea to readAll.
Object type is COSEM Object Type. Example Clock, Data, Register, etc. If data type is wrong, error is returned.

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

ThomasS

Hi,
I checked it, unfortunately the result is the same. The close() method print "DisconnectRequest" and console is frozen. This is the output https://pastebin.com/x6t1NBpK and with -t Verbose https://pastebin.com/TET86Z3y

I appreciate your help with these problems

BR,
Thomas

ThomasS

Hi,
I see DisconnectRequest occurs whengetProfileGenerics() in RedAll() is invoked. Mabey I should just comment this.
When comes to reading data. For now, I use for reading profiles getProfileGenericColumns() I can see the object of this function has I think all data about profiles. The register is read by readScalerAndUnits().
Is this the right approach or should i use other functions?
I have got a problem with reading "Data" object I can get to that in getAssociationView() data=self.client.parseObjects(reply.data, True, False) but when I look at it in debug I can see all names which are inside 'data' but without value. Do I have to use another method for this?
Is there a function to read only 'RegisterMonitor" or I have to 'catch' those values form another function?