Hello Mikko Kurumi Sir,
As I am able to read the objects from the meter through the Gurux DLMS android app,
I am getting trouble in reading the data of ProfileGeneric objects, for e.g.,
1.0.94.91.0.255 Instantaneous Profile, 1.0.99.1.0.255 BlockLoad Profile, 1.0.99.2.0.255 Daily Load Profile, etc.
I need to see "All" data (or particularly by custom date range).
The first challenge I'm getting is how do I get the data by custom date range.
Secondly, how do I process the data?
I need to see the data in a relational format like shown in the Windows application:-
+-------------------+-------------------+-------------------+-------------------+-------------------+
| 0.0.1.0.0.255 | 1.0.2.8.0.255 | 1.0.8.0.255 | 1.0.1.8.0.255 | 1.0.9.8.0.255 |
| Time Clock | Value Cum. | Value Cum. | Value Cum. | Value Cum. |
| | Energy-Wh(Exp) | Energy-VAh(Exp) | Energy-Wh(Imp) | Energy-VAh(Imp) |
+-------------------+-------------------+-------------------+-------------------+-------------------+
| 15-11-2024 | 0 | 0 | 57579 | 57627 |
| 00:00:00 | | | | |
+-------------------+-------------------+-------------------+-------------------+-------------------+
| 14-11-2024 | 0 | 0 | 57579 | 57627 |
| 00:00:00 | | | | |
+-------------------+-------------------+-------------------+-------------------+-------------------+
| 01-11-2024 | 0 | 0 | 57579 | 57627 |
| 00:00:00 | | | | |
+-------------------+-------------------+-------------------+-------------------+-------------------+
| 31-10-2024 | 0 | 0 | 57579 | 57627 |
| 00:00:00 | | | | |
+-------------------+-------------------+-------------------+-------------------+-------------------+
| 30-10-2024 | 0 | 0 | 57579 | 57627 |
| 00:00:00 | | | | |
+-------------------+-------------------+-------------------+-------------------+-------------------+
| 29-10-2024 | 0 | 0 | 57579 | 57627 |
| 00:00:00 | | | | |
+-------------------+-------------------+-------------------+-------------------+-------------------+
| 26-10-2024 | 0 | 0 | 57579 | 57627 |
| 00:00:00 | | | | |
+-------------------+-------------------+-------------------+-------------------+-------------------+
| 25-10-2024 | 0 | 0 | 57579 | 57627 |
| 00:00:00 | | | | |
+-------------------+-------------------+-------------------+-------------------+-------------------+
| 23-10-2024 | 0 | 0 | 57579 | 57627 |
| 00:00:00 | | | | |
+-------------------+-------------------+-------------------+-------------------+-------------------+
| 19-10-2024 | 0 | 0 | 57579 | 57627 |
| 00:00:00 | | | | |
+-------------------+-------------------+-------------------+-------------------+-------------------+
But, instead, I'm getting the data in the android application like this :-
1.0.99.2.0.255
Ch. 0 Load profile with recording period 2 #1
------------------------------------------------------------------
1.0.99.2.0.255
------------------------------------------------------------------
[Ljava.lang.Object;@fc53414
------------------------------------------------------------------
[gurux.dlms.GXSimpleEntry@84d74bd, gurux.dlms.GXSimpleEntry@9ba7ab2, gurux.dlms.GXSimpleEntry@d74aa03, gurux.dlms.GXSimpleEntry@7cb7d80, gurux.dlms.GXSimpleEntry@2e19fb9]
------------------------------------------------------------------
86400
------------------------------------------------------------------
FIFO
------------------------------------------------------------------
null
------------------------------------------------------------------
12
------------------------------------------------------------------
180
------------------------------------------------------------------
Is the data unparsed, or what is the issue I'm not able to understand?
How do I parse it, print the values instead.
Please respond, sir, at your earliest convenience.
Here's the tabular data …
Here's the tabular data of windows app (more readable) for reference :-
Response in mobile app :-
Hi, You need to loop profile…
Hi,
You need to loop profile generic buffer. Now you have printed the profile generic.
Check getProfileGenerics from the java client example.
https://github.com/Gurux/gurux.dlms.java/blob/c6cdf87ba570ecb5c73b16901…
BR,
Mikko
Hi, sir, Can you add this…
Hi, sir,
Can you add this function in the android library?
And, can you please explain how do I loop the profile generic buffer?
Just give me an example, I haven't read much of the code in the library, so it will take a bit of time for me to understand the written functions and use them.
Thank you,
Kshitiz Saraf
Hi, The example loops the…
Hi,
The example loops the buffer and shows all the data. You need to study it.
BR,
Mikko
Hello, sir, I studied the…
Hello, sir,
I studied the getProfileGenerics() function, and tried to use it.
Here is my code :-
And, I'm stuck on this line :-
I'm not able to getCaptureObjects, it is returning empty List, although they are configured in the meter, and I'm able to get them using windows director application.
They look like :-
Please guide, sir.
Also, I modified the writeTrace function, as there were storage permission issues in android 14 :-
Hi, You must read capture…
Hi,
You must read capture objects before you read the buffer. You can find more information from here:
https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSProfileGeneric
BR,
Mikko
Hi,Thanks, this is done now,…
Hi,
Thanks, this is done now, I'm able to read the data of ProfileGeneric objects.
But, not able to further process the data of Scaler objects.
My code looks like this :-
The data I'm getting looks like this :-
And, I want the format as given in windows application :-
Please guide, sir. How do I read the scaler objects?
Please note: both the example data I've given are of different objects.
Hi, Indian standard uses its…
Hi,
Indian standard uses its own table where register scalers are saved.
You can get the scaler with this formula:
10^-1 = 0.001
BR,
Mikko
Okay, sir, I'll try this…
Okay, sir,
I'll try this. And, how do I process the second integer value?
For example, 33 - Current, 35 - Voltage, 255 - NoUnit, 30 - ActiveEnergy :-
[-3 33] [-3 35] [-3 255] [0 30]
as
{0.001, Current} {0.001, Voltage} {0.001, NoUnit} {1, ActiveEnergy}
Also, I'm having issue in reading Block Load Profile object data, app is taking very much time to read this data, still it either crashes in the end (after 8-10 minutes), or we can wait and we have no other option, and I'm not reading ALL data, I'm reading by time range (for e.g., last 4 hours).
Object -> 1.0.99.1.0.255 : BlockLoad Profile
Please help, sir.
Hello Mikko Kurumi Sir, I am…
Hello Mikko Kurumi Sir,
I am expecting a response for the issue, I'm not able to fetch the block load profile data from the meter, the app is taking an infinite amount of time for that.
Except blockload profile, all other objects are read.
When I'm running the following code :-
The BlockLoad Profile data is read successfully, I'm using readObject function defined in MainFragment.java and passing '3' as attributeIndex manually.
Please give me a reference for studying what is attributeIndex and what value can be/should be passed here.
Also, please suggest if I'm doing anything wrong in my code.
Thanks,
Kshitiz
Hi, You are reading all the…
Hi,
You are reading all the load profile data. Use read by entry or read by range methods and not readObject method. It will read all the data from the profile generic object and it will take a long time.
You can get the unit like this:
Unit unit = Unit.forValue(33);
BR,
Mikko
Hi, I'm reading by date…
Hi,
I'm reading by date range. Here's my full code :-
By this code, I'm able to read blockload profile data. I'm writing data to a csv file.
But, I wanted to learn the "attributeIndex" thing, for e.g., I'm passing 3 in the function readObject(), and only 3 is working. what is that? can I get any documentation to study that?
Hi, In your code, you are…
Hi,
In your code, you are reading all rows:
if (pg.getLogicalName().equals("1.0.99.1.0.255")) readObject(it, 3);
You need to fix that.
BR,
Mikko
Hi, I'm reading all rows,…
Hi,
I'm reading all rows, but it is working fine for me.
I'm getting the data.
Hi Mikko Kurumi Sir, I want…
Hi Mikko Kurumi Sir,
I want to show the attribute name in the edittext.
Here's my code :-
I've modified the showObject() function in MainFragment.java file. But, I'm not able to get the name of the attributeSetting.
Please guide.
Thanks,
Kshitiz
Hi, You can get the…
Hi,
You can get the attribute names with getNames method like this.
Log.d(TAG, "showObject: attributeSettings.getName(): " + target.getNames()
[pos - 1]);
BR,
Mikko
Hello Mikko Sir, There is…
Hello Mikko Sir,
There is no function named "getNames()" in the class GXDLMSObject.
There is only "getName()" method which returns the logical name of the object.
Thanks,
Kshitiz
Hi, You need to use…
Hi,
You need to use IGXDLMSBase interface. Like this:
Log.d(TAG, "showObject: attributeSettings.getName(): " + ((IGXDLMSBase)target).getNames()
[pos - 1]);
BR,
Mikko
Yes, Sir, It is done now,…
Yes, Sir,
It is done now, thanks.