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

10 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

  • 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
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin