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. L&G ZMD Not Sending Deviation Information

L&G ZMD not sending deviation information

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 Rolorob , 28 August, 2019
Forums
Gurux.DLMS

We are trying to set our meters to local time instead of utc time. Which we used to do.
This means that we have set the offset and timezone info in the meter Clock object. We have done this correctly.

When we read the buffer (ReadRowsByRange) of most meters, we receive a GXDateTime per row that contains a correct DateTimeOffset for our time zone.

We have one type of meter (L&G ZMD e650) however, that reports the timezone incorrectly. It will use the local time of the VM it runs on.
We have debugged it into GXCommon.cs, and noticed that the Deviation bytes that are sent to us by the meter contains the following value:

0x8000

Line 822 of GXCommon.cs contains the following comment:
//0x8000 = -32768

If this value is returned, Gurux will default to current time in stead of using a deviation.

The byte[] that is being parsed in the method GetDateTime (of GXCommon.cs
private static object GetDateTime(GXDLMSSettings settings, GXByteBuffer buff, GXDataInfo info)

The byte[] (Buff)
{07 E3 08 1C 03 0A 1E 00 FF 80 00 80}

Is this an issue with the meter, can we do anything about it?

Image
Profile picture for user Kurumi

Kurumi

6 years 9 months ago

Hi,

Hi,

If the deviation is 0x8000 deviation is ignored.

If the deviation is ignored, application expects that time zone is same with the client app and the meter and uses client app time.

Can you try to set deviation to the meter?

BR,
Mikko

Rolorob

6 years 9 months ago

We have actually. We have

We have actually. We have succesfully set the clock deviation with the following method on which we pass the TimeZone we want to sync towards and the time. This results in the deviation being set on the clock object, also when we read the clock, the deviation is set. It is just not set on the readings that we retrieve using ReadRowsByRange. Our clock synchronization code:

https://www.codepile.net/pile/g2xJgXeY

When we use GX Director or the Landis Gyr Map110 software, we notice that the clock is set correctly as well.

Any more clues?

Rolorob

6 years 9 months ago

Our code in a readable way

I've updated the previous post with a link to readable code.

Profile picture for user Kurumi

Kurumi

6 years 9 months ago

Hi,

Hi,

Check is the deviation set correctly to new values in profile generic (Values that are generated after you updated deviation).

BR,

Mikko

Rolorob

6 years 9 months ago

Hi Mikko,

Hi Mikko,

Thanks for the suggestion. We have tried this, and even values that are generated after we updated the deviation in the Clock do not have the deviation set correctly.
They have the same value. 0x8000.

Any more clues on how to fix this issue?

Best regards,
Rob

Profile picture for user Kurumi

Kurumi

6 years 9 months ago

Hi,

Hi,

If the deviation is not given, the only option is that your VM is on the same time zone where meters are.

Ask from the vendor if there is a new firmware where this is improved.

BR,

Mikko

Rolorob

6 years 9 months ago

Hi Mikko,

Hi Mikko,

This does not appear to be the case. As a test, we've already changed the TimeZone of our VM to a different one (China). The meter still only sends us 0x8000. Gurux will then use the (wrong) local timezone of the VM. Even though the data should have been in CEST timezone. (+2:00).

We can indeed check if the firmware is out-of-date and improved. These meters are however manufactured very recently (2019) for a new metering project.

If you have any more suggestions on how to tackle this problem, we would love to hear from you!

Best regards,
Rob

Profile picture for user Kurumi

Kurumi

6 years 9 months ago

Hi,

Hi,

If meter sends 0x8000, the only option is use PC's time zone. There is no way how to get it somewhere.

From the source code:
if devitation is 0x8000
DateTime tmp = new DateTime(year, month, day, hours, minutes, seconds, milliseconds, DateTimeKind.Local);

BR,
Mkko

Rolorob

6 years 9 months ago

Thanks for confirming that

Thanks for confirming that the problem lies within the meter. We are going to contact Landis + Gyr and see what they can do for us.

  • 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