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 4 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 3 months ago

Thank you, I look forward to…

Thank you, I look forward to your solution

Profile picture for user Kurumi

Kurumi

3 years 3 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 3 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 3 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

  • 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