fledge-power / fledge-south-iec61850

A south plugin for collecting data via the IEC 61850 protocol
3 stars 5 forks source link

Allow `status-only` type `xxC` common data classes #33

Closed JakobVogelsang closed 6 months ago

JakobVogelsang commented 7 months ago

Describe the bug IEC 61850 south client fails with error when exchange data is pointing to DPC type object (e.g. XCBR1.Pos) with missing data attributes of functional constraint [CO]. This is not very uncommon and should in my point of view not be a source for error.

To Reproduce Steps to reproduce the behavior:

  1. Load file with status-only DPC (e.g. XCBR1.Pos)
  2. Make sure that this specific is requested in exchange_data
  3. See error log and sniffer results. I see there a GetDataDefinition pointing to this very object requesting definition for data attributes of the type [CO]

Expected behavior Allow xxC type common data classes of type status-only

mzillgith commented 7 months ago

Can you upload the error log and sniffer output? Didn't it work to read the status value or is the problem just the warning in the log?

JakobVogelsang commented 7 months ago

No the client does expect data structures with the function constraint [CO] to be present. This might not be the case when the ctlModel is status only. I will upload the SCL file including the pcap files for further discussion.

jude-adam commented 7 months ago

The plugin works with Status-only, however it shows a warning message for not being able to create a Control Object Client when there is no CO. This has been fixed and will be pushed soon (no warning log will be shown for objects with Status-Only ctlModel) .

aklira commented 7 months ago

Can we close this issue if the answer is OK ?

JakobVogelsang commented 7 months ago

There is a workaround: Define as DpsTyp. Still, I think that is misleading. IEC61850 defines DPC which allows both read status data and control. More than that, there are cases where DPC type CDCs are used for monitoring purpose only. This seems not to be the case in the pivot model. It is misleading and should have proper documentation.

jude-adam commented 6 months ago

There is a workaround: Define as DpsTyp. Still, I think that is misleading. IEC61850 defines DPC which allows both read status data and control. More than that, there are cases where DPC type CDCs are used for monitoring purpose only. This seems not to be the case in the pivot model. It is misleading and should have proper documentation.

I don't believe this is necessary, I tested in the newest version and DPC works fine in both ways (status and control). Using the SCD file and config given in issue #37 , a DpcTyp's status values are sent as readings.

JakobVogelsang commented 6 months ago

I can confirm it is working. There is just a small thing that you only can see on the sniffer:

I see a service asking for the ctlModel like so:

After that there is a GetDataDefinition for

Why the second request if you already know the ctlModel is status-only.