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. Reading Profiles Generic

Reading Profiles Generic

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 James P , 8 March, 2021
Forums
Gurux.DLMS

Hi,
I'm using Gurux.DLMS Python.

What is the best approach to read profiles when I want to call the script by cron monthly?

For now I'm able to read it in ReadAll() like this
profiles = self.getProfileGenericColumns()

for i in range(4):
self.readRowsByRange(profiles[i], start, end)

and then in profiles, I've got what I want. (start, end - dates)
ofc I can get the current date and get a specified period time, but I wanted to know if I can do it better?

BR,
James

Profile picture for user Kurumi

Kurumi

5 years 4 months ago

Hi,

Hi,

You can read profile generic using start and end index (readRowsByEntry) or start and end time (readRowsByRange). If you want to read all data from the meter to the database, you can save the last read time and give it to the start time for the next read.

BR,
Mikko

James P

5 years 4 months ago

Hi,

Hi,

Ok, thank you for your response.
So I will stay with this approach
profiles = self.getProfileGenericColumns()
for i in range(4):
self.readRowsByRange(profiles[i], start, end)
but hera I've got one more question
first line getProfileGenericColumns(), needs to have getAssociationView() red before, how to use saved before xml file in this case?

Profile picture for user Kurumi

Kurumi

5 years 4 months ago

Hi,

Hi,

Columns are saved to the file if you save the file after you have read the profile generic columns.

BR,
Mikko

James P

5 years 4 months ago

Ok, so if first run the

Ok, so if first run the program where I've got
self.getAssociationView()
self.getProfileGenericColumns()
and set parameter -o output.xml
will I have in output.xml profiles saved?
and then how to use this output.xml in case of reading profiles?

BR,
James

Profile picture for user Kurumi

Kurumi

5 years 4 months ago

Hi,

Hi,

Parameter "-o" is saving all the values that you have read from the meter. If you have read capture objects of the profile generic, you don't need to read them from the meter again, if they are not changed. You can use values that you have saved to the file.

You can read the values as I have replied here:
http://gurux.fi/node/18048

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

  • 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
  • Connecting Meter to Agent via serial
  • Reading block profile with Compact array
More

Who's new

  • Danielfaw
  • TcmLCyrzROrdrv…
  • Anas Zaatreh
  • QDeYZLrphMziQF…
  • sharrongm69
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin