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. How To Read Single OBIS Using Python

How to read single OBIS using 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 nhzq , 25 January, 2021
Forums
Gurux.DLMS

Hi,

I'm trying to read single OBIS instead of read the whole association view. In GXDLMSReader.py, I did modify the codes like this:

def readAll(self, outputFile):
try:
read = False
self.initializeConnection()

#OBIS Clock
d = GXDLMSData("0.0.1.0.0.255")
self.read(d, 2)

self.getReadOut()
self.getProfileGenerics()
if outputFile:
self.client.objects.save(outputFile)
except (KeyboardInterrupt, SystemExit):
self.media = None
raise
finally:
self.close()

.
.
.

The response return is like this:

gurux_dlms version: 1.0.95
gurux_net version: 1.0.17
gurux_serial version: 1.0.15
Authentication: Authentication.LOW
ClientAddress: 0x14
ServerAddress: 0xff
Standard: Standard.DLMS

TX: 13:26:40 7E A0 08 02 FF 29 93 D1 80 7E
RX: 13:26:43 7E A0 21 29 02 FF 73 CC 61 81 80 14 05 02 01 20 06 02 01 20 07 04 00 00 00 01 08 04 00 00 00 01 0B C9 7E

TX: 13:26:43 7E A0 45 02 FF 29 10 14 8B E6 E6 00 60 36 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 33 33 33 33 33 33 33 33 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF D5 AF 7E
RX: 13:26:46 7E A0 38 29 02 FF 30 77 F4 E6 E7 00 61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 04 00 00 18 1D 01 20 00 07 76 D3 7E

TX: 13:26:46 7E A0 1A 02 FF 29 32 9A 96 E6 E6 00 C0 01 C1 00 01 00 00 01 00 00 FF 02 00 57 28 7E
RX: 13:26:48 7E A0 12 29 02 FF 52 5A 98 E6 E7 00 C4 01 C1 01 04 CC F6 7E

DisconnectRequest
TX: 13:26:48 7E A0 08 02 FF 29 53 DD 46 7E
RX: 13:26:50 7E A0 08 29 02 FF 73 39 50 7E
Access Error : Device reports a undefined object.

.
.
.
Can you please help me what could be the cause of this error and how fix it?

nhzq

5 years 6 months ago

Hi,

Hi,

I think I found the answer. I tried using GXDLMSClock("0.0.1.0.0.255") instead of GXDLMSData("0.0.1.0.0.255") and it did work.

Profile picture for user Kurumi

Kurumi

5 years 6 months ago

Hi,

Hi,

I'm glad that this is solved. Amount of error codes is limited in DLMS and object type must be correct or meter returns an error. Data type just also be correct if you try to write something to the meter.

BR,
Mikko

DomenP

3 years 2 months ago

Hello, I tried using your…

Hello, I tried using your method, I imported GXDLMSClock, changed the code, but still I get an error:

Access Error : Device reports a undefined object.

I wanted to read the voltage with OBIS : 1.0.32.7.0.255. I'm using Low Authentication with Password and I can read every parameter through the GXDLMS Director. Do you think the reason is that I would need High Authentication?

EDIT: I found the reason for this error, I was trying to read a register with GXDLMSClock and GXDLMSData, but you have to use GXDLMSRegister (for a register of course). Hope it helps anyone, if they stumble on the same problem.

Profile picture for user Kurumi

Kurumi

3 years 2 months ago

Hi, Please, create a new…

Hi,
Please, create a new topic if you have a new question. The reason for your error is that the OBIS code that you try to read doesn't exist in the association view.

BR,
Mikko

DomenP

3 years 2 months ago

Hello, I solved the issue as…

Hello, I solved the issue as I stated in the Edit. And yes while that OBIS code isn't in the Associaton view, I can read it normally.

With regards

Reese

3 years ago

Hi @DomenP, did you get read…

Hi @DomenP, did you get read obis code successfully ?, did you do that using the getAssociationView or it can be done without reading getAssociationView?
i'm trying to read justvoltage value (Obis Code: 1.1.32.7.0.255) but it only works when I use getAssociationView, otherwise, it's just return Index: 2 Value: None

  • 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

  • LutzG
  • Ralf Schmitz
  • prosper.abanga
  • moGiaco
  • RobertEncum
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin