Good afternoon.
The task is that I need to read the values for 1 day.
I am reading the ProfileGeneric and capture objects, and reading the information from the buffer.
Here is my code :
GXDLMSProfileGeneric profileGeneric = new GXDLMSProfileGeneric("1.0.99.1.0.255");
reader.read(profileGeneric, 3);
reader.readRowsByRange(profileGeneric, startDate, Util.getCurrentDate1());
reader.read(profileGeneric, 2);
But there are too many objects in the buffer around 4500.
When using GuruxDLMSDirector on this device, I get only 24 lines of readings for each hour.
What could be my mistake? Is it possible to read the information line by line. And can I have an example of how to correctly read from the buffer.
Check your start and end dates. Set minutes and seconds to zero. Some meters can't handle if they are different than zero. You can try to set the start time to midnight and the end time to 6:00 am.
Hi,
Hi,
Remove this line. It will read the whole buffer.
reader.read(profileGeneric, 2);
readRowsByRange will read the values from the given range.
BR,
Mikko
Good morning.
Good morning.
If I remove a line reader.read(profileGeneric, 2) then I don't have any objects in the buffer at all.
Might not work correctly
public Object[] readRowsByRange(final GXDLMSProfileGeneric pg, final GXDateTime start,
final GXDateTime end) throws Exception {
GXReplyData reply = new GXReplyData();
byte[][] data = dlms.readRowsByRange(pg, start, end);
readDataBlock(data, reply);
return (Object[]) dlms.updateValue(pg, 2, reply.getValue());
}
How else can you count values from a given date range.
Help me please.
Hi,
Hi,
Check your start and end dates. Set minutes and seconds to zero. Some meters can't handle if they are different than zero. You can try to set the start time to midnight and the end time to 6:00 am.
BR,
Mikko
Hi,
Hi,
Thanks for the help, figured it out