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. Unparseable Dates

Unparseable dates

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.

Profile picture for user tbvk
By tbvk , 7 February, 2023
Forums
Gurux DLMS for Java

When I load an association viw from disk (XML I dumped) I have noticed that in some cases date fields are empty, resulting in an ibject like:

<GXDLMSData>
<LN>0.0.96.2.13.255</LN>
<Description>Ch. 0 Date of last firmware activation</Description>
<Access>10</Access>
<MethodAccess></MethodAccess>
<Value Type="0" UIType="25"></Value>
</GXDLMSData>

Failing to parse with an error because the Value tag is empty. Is there a way for GuruX to parse these in a less strict way ike defaulting to a certain date possibly?

Profile picture for user Kurumi

Kurumi

3 years 7 months ago

Hi, I understand the problem…

Hi,

I understand the problem but I don't have an answer on how to handle this yet. Value is empty if it's not read from the meter. I have two options at the moment.

a. Value tag is not written at all if date-time is not read.
b. Epoch time (Jan 01 01:00:00 GMT 1970) is written.

At the moment I believe that option a is better, but I need to think that this is not break anything.

BR,
Mikko

Profile picture for user tbvk

tbvk

3 years 7 months ago

Thank you, I look forward to…

Thank you, I look forward to your solution

Profile picture for user Kurumi

Kurumi

3 years 6 months ago

Hi, Are you using…

Hi,

Are you using GXDLMSObjectCollection.load method to load this? Something like this or are you parsing it by yourself?

GXDLMSObjectCollection items = GXDLMSObjectCollection.load("file.xml");

BR,
Mikko

Profile picture for user tbvk

tbvk

3 years 6 months ago

In reply to Hi, Are you using… by Kurumi

Currently using this code:…

Currently using this code: https://paste.debian.net/1272385/

See the attached pastebin link

---

Sorry for my late reply by the way :)

Profile picture for user tbvk

tbvk

3 years 6 months ago

In reply to Currently using this code:… by tbvk

Any idea Hikko?

Any idea Hikko?

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Wed, 08/26/2026 - 09:04
    Gurux.DLMS.Python 1.0.203
  • Mon, 08/17/2026 - 11:28
    Gurux.DLMS.Python 1.0.202
  • Mon, 08/17/2026 - 09:47
    gurux.dlms.cpp 9.0.2608.1701
  • Mon, 08/17/2026 - 09:25
    gurux.dlms.c 9.0.2608.1701
  • Mon, 07/27/2026 - 12:37
    gurux.dlms.cpp 9.0.2607.2701

New forum topics

  • Security vulnerability report — request for a private contact (GuruxDLMS.c / ANSI C)
  • Topic: Insufficient Memory Error When Reading Class 7 Profile Generic Objects
  • SN ReadResponse returns all-null values when response spans multiple HDLC frames
  • Gurux.Serial.Android 3.0.6 – CH340 (HL-340) USB-Serial Adapter Not Working,
  • Trying to talk to a L&G E360 meter (Using Python Gurux)
More

Who's new

  • cyby
  • Metin Onan
  • ssv007
  • 3nzol3dur
  • dw772
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin