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

8 months 2 weeks 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, 04/14/2026 - 11:47
    gurux.dlms.java 4.0.93
  • Mon, 04/13/2026 - 16:12
    gurux.dlms.java 4.0.92
  • Mon, 04/13/2026 - 11:39
    Gurux.DLMS.Net 9.0.2604.1301
  • Tue, 04/07/2026 - 17:17
    Gurux.DLMS.Python 1.0.197
  • Tue, 04/07/2026 - 15:03
    gurux.dlms.c 9.0.2604.0701

New forum topics

  • Connecting To iskrameco ME382- Single Phase Meter with Optical Probe
  • Create custom AARQ Request for encrypted communication
  • Issue when reading Itron Type620 meter
  • Handling Unexpected Disconnects
  • DLMS Communication Issue – No Response (L&T Meter via USB Probe)
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin