Skip to main content
Home
for DLMS smart meters

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Change Metering Mode In Python

Change Metering Mode in Python

By Kumaresh, 7 August, 2025
Forums
General discussion

Hi Kurmi Ji,
pls Guide how Can I Change the Attribute index 2 of this OBIS 0.0.94.96.19.255.

as i want Read as well as i want to update the value in the meter by 1.

presently the value is 0

def write(self, item, attributeIndex):
data = self.client.write(item, attributeIndex)
self.readDLMSPacket(data)

def read(self, item, attributeIndex):
data = self.client.read(item, attributeIndex)[0]
reply = GXReplyData()
self.readDataBlock(data, reply)
#Update data type on read.
if item.getDataType(attributeIndex) == DataType.NONE:
item.setDataType(attributeIndex, reply.valueType)
return self.client.updateValue(item, attributeIndex, reply.value)

what code i mention to update this in reader.py

Profile picture for user Kurumi

Kurumi

5 months 1 week ago

Hi, At first, ensure you…

Hi,

At first, ensure you have sufficient access rights to modify the value.

You can do it like this:

obj = GXDLMSData("0.0.94.96.19.255")
self.read(obj, 2)
obj.value = 1 + obj.value
self.write(obj, 2)

Check also this:

https://gurux.fi/Gurux.DLMS.Client

BR,
Mikko
BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Wed, 01/14/2026 - 14:29
    Gurux.DLMS.Python 1.0.196
  • Mon, 12/29/2025 - 10:38
    Gurux.Serial.Android 3.0.5
  • Mon, 12/15/2025 - 08:11
    Gurux.DLMS.Net 4.0.87
  • Fri, 12/12/2025 - 08:38
    Gurux.DLMS.Python 1.0.195
  • Thu, 12/11/2025 - 13:22
    Gurux.DLMS.Python 1.0.194

New forum topics

  • 6-digit field values from meter not fully received (only 5 digits shown)
  • Gurux DLMS Android App
  • AMR support for bidirectional meters.
  • addition of new object in object list, meter not working
  • old meter take to much time(l&t)
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin