Hi, im using the sample client with the option -o file.xml. I capture all the objects to allow the library to format the file.
<Objects>
<GXDLMSRegister>
<LN>1.1.1.8.0.255</LN>
<Description>Ch. 1 Sum Li Active power+ (QI+QIV) Time integral 1 Rate 0 (0 is total)</Description>
<Unit>30</Unit>
<Scaler>1.0</Scaler>
<Value Type="20" UIType="24">752684.975</Value>
</GXDLMSRegister>
<GXDLMSRegister>
(base) [memo@fedora Gurux.DLMS.Client.Example.python]$ head -n 10 Elster.xml
<?xml version="1.0" ?>
<Objects>
<GXDLMSRegister>
<LN>1.1.1.8.0.255</LN>
<Description>Ch. 1 Sum Li Active power+ (QI+QIV) Time integral 1 Rate 0 (0 is total)</Description>
<Unit>30</Unit>
<Scaler>1.0</Scaler>
<Value Type="20" UIType="24">752684.975</Value>
</GXDLMSRegister>
<GXDLMSRegister>
(base) [memo@fedora Gurux.DLMS.Client.Example.python]$ head -n 50 Elster.xml
<?xml version="1.0" ?>
<Objects>
<GXDLMSRegister>
<LN>1.1.1.8.0.255</LN>
<Description>Ch. 1 Sum Li Active power+ (QI+QIV) Time integral 1 Rate 0 (0 is total)</Description>
<Unit>30</Unit>
<Scaler>1.0</Scaler>
<Value Type="20" UIType="24">752684.975</Value>
</GXDLMSRegister>
<GXDLMSRegister>
<LN>1.1.1.8.1.255</LN>
<Description>Ch. 1 Sum Li Active power+ (QI+QIV) Time integral 1 Rate 1 (0 is total)</Description>
<Unit>30</Unit>
<Scaler>0.001</Scaler>
<Value Type="20" UIType="24">0.0</Value>
</GXDLMSRegister>
<GXDLMSRegister>
<LN>1.1.1.8.2.255</LN>
<Description>Ch. 1 Sum Li Active power+ (QI+QIV) Time integral 1 Rate 2 (0 is total)</Description>
<Unit>30</Unit>
<Scaler>0.001</Scaler>
<Value Type="20" UIType="24">0.0</Value>
</GXDLMSRegister>
In that file i remove the Association View Obis, because it takes some time to download. When i run it with the Passwords and Settings right, the scripts can read all attributes, expect the Value(2). Why?.
-------- Reading ObjectType.REGISTER 1.1.4.8.0.255 Ch. 1 Sum Li Reactive power- (QIII+QIV) Time integral 1 Rate 0 (0 is total)
TX: 10:19:22 7E A0 19 03 23 FE BF E7 E6 E6 00 C0 01 C1 00 03 01 01 04 08 00 FF 01 00 08 C9 7E
RX: 10:19:22 7E A0 18 23 03 1E 02 3C E6 E7 00 C4 01 C1 00 09 06 01 01 04 08 00 FF 7C BF 7E
Index: 1 Value: 1.1.4.8.0.255
TX: 10:19:22 7E A0 19 03 23 10 CF E9 E6 E6 00 C0 01 C1 00 03 01 01 04 08 00 FF 03 00 B8 FA 7E
RX: 10:19:23 7E A0 16 23 03 30 3C 5A E6 E7 00 C4 01 C1 00 02 02 0F FD 16 20 D7 7F 7E
Index: 3 Value: 0.001, Unit.REACTIVE_ENERGY
Attribute2 is not readable.
When i run it with the Association View Obis it works. Why?
This way it works. def…
This way it works.
def getReadOut(self):
#pylint: disable=unidiomatic-typecheck, broad-except
for it in self.client.objects:
if type(it) == GXDLMSObject:
print("Unknown Interface: " + it.objectType.__str__())
continue
if isinstance(it, GXDLMSProfileGeneric):
continue
self.writeTrace("-------- Reading " + str(it.objectType) + " " + str(it.name) + " " + it.description, TraceLevel.INFO)
for pos in it.getAttributeIndexToRead(True):
try:
if pos == 2: it.setAccess(pos, "READ") <-------- Edit!.
if it.canRead(pos) :
val = self.read(it, pos)
self.showValue(pos, val)
except Exception as ex:
self.writeTrace("Error! Index: " + str(pos) + " " + str(ex), TraceLevel.ERROR)
self.writeTrace(str(ex), TraceLevel.ERROR)
if not isinstance(ex, (GXDLMSException, TimeoutException)):
traceback.print_exc()
Hi, 1.1.4.8.0.255 attribute …
Hi,
1.1.4.8.0.255 attribute #2 access is not read or read-write. In default it's read-write,
so it must change during the reading or it's saved for the file.xml.
BR,
Mikko