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