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. Problem With Reading Data From Landis+Gyr E570 Meter Using Gurux Library In Python.

Problem with reading data from Landis+Gyr E570 meter using Gurux library in Python.

By kuba172 , 21 January, 2025
Forums
Gurux.DLMS

Hello,

I have a problem reading data from the Landis+Gyr E570 electricity meter using the Gurux library (in Python). I use a network connection (TCP) with the DLMS protocol, security level low (low security). My code is based on GXDLMSReader and GXSettings from the Gurux library.

Problem symptoms:
Incorrect data for the OBIS clock code: When trying to read the clock value (OBIS code 0.0.1.0.0.255) using the client.read(obj, 2) function, I get a bytearray instead of a formatted date and time.

No data for other OBIS codes: When trying to read active and reactive energy, current and voltage values, (OBIS codes such as 1.0.1.8.0.255, 1.0.2.8.0.255, 1.0.5.8.0.255, 1.0.6.8.0.255, 1.0.7.8.0.255, 1.0.8.8.0.255, 1.0.83.8.1.255, 1.0.83.8.2.255, 1.0.83.8.4.255, 1.0.83.8.5.255 ) I get a warning that no data was found for these OBIS codes.

I have tried various combinations of reading from the Gurux library, including client.read and readRowsByRange and readWithList methods.

I tried to manually format the data from the response, but it didn't work.

I tried various protocol settings in the library, including forcing HDLC with useHdlc = True.

I was only able to read the data from the counter using GXDLMSDirector, and I need to write a Python program that does this.

Timestamp;0.0.1.0.0.255;1.0.1.8.0.255;1.0.2.8.0.255;1.0.5.8.0.255;1.0.6.8.0.255;1.0.7.8.0.255;1.0.8.8.0.255;1.0.83.8.1.255;1.0.83.8.2.255;1.0.83.8.4.255;1.0.83.8.5.255
2025-01-21 18:43:10;[bytearray(b'~\xa0\x11\x03At\xd0\x7f\xe6\xe6\x00\x05\x01\x02+\xc8\xf7\x1e~')]

Thanks in advance for your help.

Profile picture for user Kurumi

Kurumi

1 year 6 months ago

Hello, The meter sends date…

Hello,

The meter sends date-time value as byte-array. You need to set UIDataType and call updateValue.

https://github.com/Gurux/Gurux.DLMS.Python/blob/b1ccf60630f503f2994b549…

After that, you can get the date-time value like this:

obj = GXDLMSClock()
self.read(obj, 2)
print("time" + str(obj.time))

Check the client example. It does everything you want to do.
https://github.com/Gurux/Gurux.DLMS.Python/tree/master/Gurux.DLMS.Clien…

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Mon, 07/27/2026 - 12:37
    gurux.dlms.cpp 9.0.2607.2701
  • Thu, 07/23/2026 - 16:19
    gurux.dlms.java 4.0.96
  • Thu, 07/09/2026 - 14:34
    Gurux.DLMS.Python 1.0.201
  • Fri, 06/26/2026 - 16:32
    Gurux.Service 3.0.2606.2601
  • Wed, 06/24/2026 - 08:36
    Gurux.DLMS.Python 1.0.200

New forum topics

  • gurux_dlms.GXDateTime.GXDateTime object Error in Python
  • T_APPL_DATA_LN_N1 subtest 3 fails on an LN-only server regardless of the response to a non-existing-object GET
  • Version mismatch between Gurux.DLMS 9.x and Gurux.Common/Gurux.Serial 8.x
  • Service not known error on gprs communication
  • Help Needed: Interfacing Saral 100 Energy Meter with Microcontroller via RS232
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin