Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Forums
  3. Director Values Are Different From DLMS.reader

Director values are different from DLMS.reader

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

By karlpy , 23 March, 2018
Forums
Gurux.DLMS

I'm reading the active energy (1.0.15.8.0.255) via the DLMS.XmlClient. The problem is, the value is slightly different from the value the Director reads.

Director: 110196184
XMLClient: 110202726

Any idea why this is, and which value is correct?

The conversion in my HandleReply method is as follos

static void HandleReply(GXDLMSXmlPdu item, GXReplyData reply)
{
String xmlString = null;

if (reply.Value is byte[])
{
xmlString = Convert.ToString(GXCommon.ToHex((byte[])reply.Value, true));
}
else
{
xmlString = Convert.ToString(reply);
}

StringBuilder output = new StringBuilder();

// Create an XmlReader
using (XmlReader reader = XmlReader.Create(new StringReader(xmlString)))
{
reader.ReadToFollowing("UInt32");
reader.MoveToFirstAttribute();
string active_energy = reader.Value;
output.AppendLine(active_energy);
}

String outputstring = output.ToString();
Console.WriteLine("{0}{1}","Active Energy: ",outputstring);

// Save in DB
}

Profile picture for user Kurumi

Kurumi

8 years 2 months ago

Director values are different from DLMS.reader

Hi,
Can you post the last line from the log? You can get log pressing Ctrl + L.
They are using the same code, but I can verify this.
Do you have a load on your meter? Can that be the reason for different results?

BR,

Mikko

karlpy

8 years 2 months ago

9:07:32 AM Initializing

9:07:32 AM Initializing Network connection.
9:07:34 AM Send AARQ request.
00 01 00 01 00 01 00 38 60 36 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 31 32 33 34 35 36 37 38 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF
9:07:35 AM
00 01 00 01 00 01 00 2B 61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 04 00 00 1E 1D 05 00 00 07
9:07:35 AM Parsing AARE reply succeeded.
9:07:38 AM Read object type Register index: 2
00 01 00 01 00 01 00 0D C0 01 C1 00 03 01 00 10 08 00 FF 02 00
9:07:39 AM
00 01 00 01 00 01 00 09 C4 01 C1 00 05 06 91 75 D8

There is a little load but to exclude the possibility that the load is the issue, I made 3 measurements. First with the Director, then with my app, and again with the Director.
director: 110201395
app: 110209098
director: 110202371
The second director value was lower than the app value even though the measurement was later. So it must be a problem with the conversion is my guess. Maybe I have to parse the hex string differently ?

The director log from this last measurement was:
9:54:05 AM
00 01 00 01 00 01 00 05 63 03 80 01 00
10:00:08 AM Initializing Network connection.
10:00:10 AM Send AARQ request.
00 01 00 01 00 01 00 38 60 36 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 31 32 33 34 35 36 37 38 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF
10:00:12 AM
00 01 00 01 00 01 00 2B 61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 04 00 00 1E 1D 05 00 00 07
10:00:12 AM Parsing AARE reply succeeded.
10:00:14 AM Read object type Register index: 2
00 01 00 01 00 01 00 0D C0 01 C1 00 03 01 00 10 08 00 FF 02 00
10:00:14 AM
00 01 00 01 00 01 00 09 C4 01 C1 00 05 06 91 8E 03
10:02:04 AM Send Keep Alive

Data send failed. Try to resend 1/3
Data send failed. Try to resend 2/3
10:02:25 AM Failed to receive reply from the device in given time.
10:02:25 AM Disconnect request
10:02:25 AM Disconnect request
00 01 00 01 00 01 00 02 62 00
10:02:27 AM
00 01 00 01 00 01 00 05 63 03 80 01 00
System.Exception: Failed to receive reply from the device in given time.
at GXDLMSDirector.GXDLMSCommunicator.ReadDLMSPacket(Byte[] data, Int32 tryCount, GXReplyData reply)
at GXDLMSDirector.GXDLMSCommunicator.ReadDLMSPacket(Byte[] data, GXReplyData reply)
at GXDLMSDirector.GXDLMSCommunicator.ReadDataBlock(Byte[] data, String text, Int32 multiplier, GXReplyData reply)
at GXDLMSDirector.GXDLMSCommunicator.ReadDataBlock(Byte[] data, String text, GXReplyData reply)
at GXDLMSDirector.GXDLMSCommunicator.KeepAlive()
at GXDLMSDirector.GXDLMSDevice.KeepAlive_Elapsed(Object sender, ElapsedEventArgs e)

Profile picture for user Kurumi

Kurumi

8 years 2 months ago

Director values are different from DLMS.reader

Hi,

director: 110201395
director: 110202371

Your second read value is higher. What is your scaler? Attribute index 3?

Remove your load and read values again. I believe that they are same.

BR,

Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More

Who's new

  • Tuanhgg
  • Adel
  • charnon
  • Paddles
  • Miguel Ángel
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin