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

7 months 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

  • Thu, 02/19/2026 - 11:51
    gurux.dlms.cpp 9.0.2602.1901
  • Sun, 02/01/2026 - 19:47
    gurux.dlms.cpp 9.0.2602.0101
  • Tue, 01/20/2026 - 10:38
    gurux.dlms.java 4.0.89
  • Wed, 01/14/2026 - 14:29
    Gurux.DLMS.Python 1.0.196
  • Mon, 12/29/2025 - 10:38
    Gurux.Serial.Android 3.0.5

New forum topics

  • Clou Meter CL730D22L connection
  • Gurux C library DLMS book edition support
  • Help with connection and read with landis+gyr e650 + CU-E22 using python
  • Preestablished connection
  • RJ11 to RS232 Pin out SECURE Premier 300
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin