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. Profile Generic - Python

Profile Generic - Python

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 jonasfoyth , 12 February, 2020
Forums
Gurux.DLMS

Hello,

I create a test to read a Profile generic of a meter (Python), but the result of read is a row of zeroes. The script :

def readProfile(reader, count=24):
rows = []
try:
loadProfile = reader.client.settings.objects.findByLN(ObjectType.PROFILE_GENERIC, '1.0.99.1.0.255')
captureObjects = reader.read(loadProfile, 3)
capturePeriod = reader.read(loadProfile, 4)
sortMethod = reader.read(loadProfile, 5)
sortObject = reader.read(loadProfile, 6)
entriesInUse = reader.read(loadProfile, 7)
entries = reader.read(loadProfile, 8)
BeginOfreadedEntries = entriesInUse - count - 1
rows = reader.readRowsByEntry(loadProfile, BeginOfreadedEntries, count)
except Exception as e:
print(e)
return rows

Any alternative way to read a Profile Generic by entry?

Profile picture for user Kurumi

Kurumi

6 years 3 months ago

Hi,

Hi,

All meters don't implement readRowsByEntry. You can also try with readRowsByRange.

Try to read one row. Use values 1 and 1
reader.readRowsByEntry(loadProfile, 1, 1)

The start index is usually one-based. There are some meters that are using zero for first row and for this reason zero must accept for start index.

BR,
Mikko

jonasfoyth

6 years 3 months ago

I have tried use Read by

I have tried use Read by range, read all Profile buffer (reader.read(loadProfile, 2)) and the result is the same.

For compare, i use GXDLMSDirector and read the same thing and works, using the same security configuration:

self.media = GXNet(NetworkType.UDP, METER_IP, PORT)
self.client = GXDLMSClient(True)
self.client.interfaceType = InterfaceType.WRAPPER
self.client.serverAddress = int(1)
self.client.authentication = Authentication['LOW']
self.client.password = 'xxxxx'
self.client.useLogicalNameReferencing = True

Reading first 'one row' the result is the same too.

The colums of row are: [date, eventid, event_description, OBIS1, OBIS2, OBIS3, OBIS4]

for all types of read, the result are:

row: [01/01 (date wrong) hour ok, event_id ok, event_description a number, 0 (not change), 0 (not change) , 0 (not change),0 (not change)]

jonasfoyth

6 years 3 months ago

The request made by the

The request made by the readbyentry function is correct, the meter responds the information contained in meter. The image attached shows the analysis made via wireshark (left) and the result of program (right). It's possible be a bug?

Image
Profile picture for user Kurumi

Kurumi

6 years 3 months ago

Hi,

Hi,

There was an issue with register scaler. I added issue from this.
http://gurux.fi/node/14848

This is now fixed and a new version is released.

BR,
Mikko

  • 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