How to read single OBIS command and get result using android library

12 posts / 0 new
Last post
Virabhadrappa
How to read single OBIS command and get result using android library

Hi sir,
We are using android library. How we can communicate meter using single OBIS command?. Is there any code or reference? Please help.
Ex: logical name: 0.0.1.0.0.255
output data: 13/07/2021 16:24:10

Kurumi
Kurumi's picture

Hi,

You need to establish the connection to the meter before you can read anything, so you can't do this with a single command.

You can skip reading the association view and read clock object like this:

//Open the connection...
GXDLMSClock clock = new GXDLMSClock("0.0.1.0.0.255");
read(clock, 2);

//Close the connection...

BR,
Mikko

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

Virabhadrappa

Hi sir,
Thank you for your reply. We are doing open and close connection correctly. But this

GXDLMSClock clock = new GXDLMSClock("0.0.1.0.0.255");
read(clock); // Here accepting only one parameter not 2 param's.

Unable receive data if we pass only one parameter( i.e clock object). Is there any other code or any
modification is required?
Please help me.

Kurumi
Kurumi's picture

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

Virabhadrappa

Hi sir,
Open and close connection working fine. We checked this code

GXDLMSClock clock = new GXDLMSClock("0.0.1.0.0.255");
readObject(clock,2);

Getting message "Failed to receive reply from the device in given time".
Is there any other way or any modification is required?
Please help me.

Kurumi
Kurumi's picture

Hi,

Do you call initializeConnection method? Opening the connection is not that you just open the serial port connectio.

https://github.com/Gurux/Gurux.DLMS.Android/blob/036e1a1de18f45e312e40eb...

BR,
Mikko

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

dhanush

Virabhadrappa which meter your using and can you tell me Meter Details

Virabhadrappa

HI sir,
We are using Larsen & Turbo DLMS 3-phase meter. Also tell me how to get result using
1) Data object ( i.e Exp: 0.0.42.0.0.255),
2) Register object ( i.e Exp: 1.0.32.7.0.255 (Voltage))
3) ProfileGenerica object ( i.e Exp: 1.0.99.1.0.255 (Load profile..1))
Any code how to get data. Please help me.

Kurumi
Kurumi's picture

Hi,

Check the android example. It will read the association view and read all the objects from the meter.

BR,
Mikko

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

dhanush

Virabhadrappa can you me your email because i am also working on same LNT 3 phase android

Virabhadrappa

Hi sir,
We don't want all the objects come from the meter only few i.e 7 to 8 object values. That's it. How can we get the values only manually given objects. Is there any specific way?
Please help me.

Kurumi
Kurumi's picture

Hi,

You need to add those objects like this:
GXDLMSData data = new GXDLMSData("Logical name");
readObject(data,2);

Find refresh and add objects that you want to read to there.
https://github.com/Gurux/Gurux.DLMS.Android/blob/036e1a1de18f45e312e40eb...

BR,
Mikko

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