Hello,
I have a clean smart meter (ZIV) for testing that I want to use to control different areas of an industrial warehouse, although this is unrelated to my problem ;).
The thing is, when I read information from the device using GXDLMSDirector, such as the “Current association,” I get the following error: “Cannot convert an object of type ‘System.byte[]’ to type ‘System.Objec[]’.”
This has happened to me with several OBIS devices, and I wanted to know if there is any kind of solution, because I am unable to connect it to the Python API.
This also happens with the image activation OBIS.
Thank you for your time and help.
An example of trace when i try to read some OBIS
10:26:38
<HDLC len="19" >
<!-- Logical address:1, Physical address:16 -->
<TargetAddress Value="90" />
<SourceAddress Value="3" />
<FrameType Value="54" />
<PDU>
<GetRequest>
<GetRequestNormal>
<!-- Priority: High, ServiceClass: Confirmed, Invoke ID: 1 -->
<InvokeIdAndPriority Value="C1" />
<AttributeDescriptor>
<!-- ActionSchedule -->
<ClassId Value="0016" />
<!-- 0.0.15.0.2.255 -->
<InstanceId Value="00000F0002FF" />
<!-- Executed script logical name -->
<AttributeId Value="02" />
</AttributeDescriptor>
</GetRequestNormal>
</GetRequest>
</PDU>
</HDLC>
10:26:38
<HDLC len="1F" >
<TargetAddress Value="3" />
<!-- Logical address:1, Physical address:16 -->
<SourceAddress Value="4010" />
<FrameType Value="74" />
<PDU>
<GetResponse>
<GetResponseNormal>
<!-- Priority: High, ServiceClass: Confirmed, Invoke ID: 1 -->
<InvokeIdAndPriority Value="C1" />
<Result>
<Data>
<Structure Qty="02" >
<!-- 0.0.10.0.107.255 -->
<OctetString Value="00000A006BFF" />
<UInt16 Value="0001" />
</Structure>
</Data>
</Result>
</GetResponseNormal>
</GetResponse>
</PDU>
</HDLC>
10:26:38
<HDLC len="19" >
<!-- Logical address:1, Physical address:16 -->
<TargetAddress Value="90" />
<SourceAddress Value="3" />
<FrameType Value="76" />
<PDU>
<GetRequest>
<GetRequestNormal>
<!-- Priority: High, ServiceClass: Confirmed, Invoke ID: 1 -->
<InvokeIdAndPriority Value="C1" />
<AttributeDescriptor>
<!-- ActionSchedule -->
<ClassId Value="0016" />
<!-- 0.0.15.0.2.255 -->
<InstanceId Value="00000F0002FF" />
<!-- Type -->
<AttributeId Value="03" />
</AttributeDescriptor>
</GetRequestNormal>
</GetRequest>
</PDU>
</HDLC>
10:26:38
<HDLC len="14" >
<TargetAddress Value="3" />
<!-- Logical address:1, Physical address:16 -->
<SourceAddress Value="4010" />
<FrameType Value="96" />
<PDU>
<GetResponse>
<GetResponseNormal>
<!-- Priority: High, ServiceClass: Confirmed, Invoke ID: 1 -->
<InvokeIdAndPriority Value="C1" />
<Result>
<Data>
<Enum Value="01" />
</Data>
</Result>
</GetResponseNormal>
</GetResponse>
</PDU>
</HDLC>
10:26:38
<HDLC len="19" >
<!-- Logical address:1, Physical address:16 -->
<TargetAddress Value="90" />
<SourceAddress Value="3" />
<FrameType Value="98" />
<PDU>
<GetRequest>
<GetRequestNormal>
<!-- Priority: High, ServiceClass: Confirmed, Invoke ID: 1 -->
<InvokeIdAndPriority Value="C1" />
<AttributeDescriptor>
<!-- ActionSchedule -->
<ClassId Value="0016" />
<!-- 0.0.15.0.2.255 -->
<InstanceId Value="00000F0002FF" />
<!-- Execution time -->
<AttributeId Value="04" />
</AttributeDescriptor>
</GetRequestNormal>
</GetRequest>
</PDU>
</HDLC>
10:26:38
<HDLC len="21" >
<TargetAddress Value="3" />
<!-- Logical address:1, Physical address:16 -->
<SourceAddress Value="4010" />
<FrameType Value="B8" />
<PDU>
<GetResponse>
<GetResponseNormal>
<!-- Priority: High, ServiceClass: Confirmed, Invoke ID: 1 -->
<InvokeIdAndPriority Value="C1" />
<Result>
<Data>
<Structure Qty="02" >
<!-- 09/10/2052 -->
<OctetString Value="08040A0903" />
<!-- 5:07:00 -->
<OctetString Value="05070000" />
</Structure>
</Data>
</Result>
</GetResponseNormal>
</GetResponse>
</PDU>
</HDLC>
More info: System…
More info:
System.InvalidCastException: No se puede convertir un objeto de tipo 'System.Byte[]' al tipo 'System.Object[]'.
en Gurux.DLMS.Objects.GXDLMSAssociationLogicalName.Gurux.DLMS.Objects.IGXDLMSBase.SetValue(GXDLMSSettings settings, ValueEventArgs e)
en Gurux.DLMS.GXDLMSClient.UpdateValue(GXDLMSObject target, Int32 attributeIndex, Object value, List`1 columns)
en Gurux.DLMS.GXDLMSClient.UpdateValue(GXDLMSObject target, Int32 attributeIndex, Object value)
en GXDLMSDirector.GXDLMSCommunicator.Read(Object sender, GXDLMSObject obj, Boolean forceRead)
en GXDLMSDirector.MainForm.Read(Object sender, GXAsyncWork work, Object[] parameters)
Hi, First, try to read the…
Hi,
First, try to read the association view again. It might be that it's changed.
If you have read the association view with GXDLMSDirector and try to read it with Python, it will fail, because the XML structure is different.
BR,
Mikko