Skip to main content
Home
for DLMS smart meters

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
  • Gurux Club
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 months 3 weeks 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 months 3 weeks ago

Thank you, I look forward to…

Thank you, I look forward to your solution

Profile picture for user Kurumi

Kurumi

3 months 1 week 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 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 months ago

In reply to Currently using this code:… by tbvk

Any idea Hikko?

Any idea Hikko?

  • Log in or register to post comments
  • Create new account
  • Reset your password

Hire Us!

Latest Releases

Fri, 06/02/2023 - 14:13
GXDLMSDirector 9.0.2306.0201
Fri, 06/02/2023 - 13:51
Gurux.DLMS.Net 9.0.2306.0201
Fri, 06/02/2023 - 10:33
Gurux.DLMS.AMI4 4.0.2306.0201
Thu, 06/01/2023 - 16:39
Gurux.DLMS.AMI4 4.0.2306.0101
Thu, 06/01/2023 - 15:25
gurux.dlms.cpp 20230601.1

Open bugs

gurux.dlms.c
4
gurux.dlms.cpp
3
gurux.dlms.delphi
1

New forum topics

  • Optical port
  • Unable to connect - Unhandled exception.
  • Reading objects in US Association
  • Error when trying to read meter with GXDLMSDirector.
  • Meter without user
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin