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