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. Metcom MCS301 ProfileGeneric ReadRowsByRange Not Working

Metcom MCS301 ProfileGeneric readRowsByRange not working

By Slavo , 3 December, 2024
Forums
Gurux.DLMS

Hi I'm new here and want to ask you, why reading ProfileGeneric with method readRowsByRange is not working for Metcom MCS301?
Method readRowsByEntry is working ok.
I think it is in datetime formatting, because data comming from meter are like this:

11/24/24 02:00:00 | 743 | 62682
11/25/24 02:00:00 | 750 | 62976
11/25/24 02:00:00 | 750 | 62976
11/26/24 02:00:00 | 756 | 63983
11/26/24 02:00:00 | 756 | 63983

But when I try to format it like this, tyhis error appears:

python : Traceback (most recent call last):
At line:1 char:1
+ python main3.py ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Traceback (most recent call last)::String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError

File "main3.py", line 95, in main
cells = reader.readRowsByRange(profile, dt_from, dt_to)
File "C:\Users\Administrator\Documents\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python\GXDLMSReader.py", line 358, in readRowsByRange
data = self.client.readRowsByRange(pg, start, end)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\gurux_dlms\GXDLMSClient.py", line 1381, in readRowsByRange
_GXCommon.setData(self.settings, buff, DataType.OCTET_STRING, start)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\gurux_dlms\internal\_GXCommon.py", line 1378, in setData
cls.setDateTime(settings, buff, value)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\gurux_dlms\internal\_GXCommon.py", line 1560, in setDateTime
d = int(dt.value.utcoffset().seconds / 60)
AttributeError: 'NoneType' object has no attribute 'seconds'

Thx a lot.

Profile picture for user Kurumi

Kurumi

1 year 6 months ago

Hi, You have given None…

Hi,

You have given None value to the start or end time. Check the client example:

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

BR,
Mikko

Slavo

1 year 6 months ago

Hi, everything works fine…

Hi, everything works fine.
My mistake - switched start and end date.
Thanks for your answer.

  • 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
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin