Skip to content

Support for OPC UA Boolean Array (and other array types) in device-opc-ua #137

@AshishAvesta

Description

@AshishAvesta

🐞 Bug Report

Description

I’m using EdgeX Foundry (Odessa, v4.0.0) with device-opc-ua to read data from a PLC that exposes a Boolean array node.
When I configure the resource as shown below, the read fails.


- description: generated status alarm array number
  name: alarmArray
  isHidden: false
  properties:
    valueType: BoolArray
    readWrite: RW
  attributes:
    nodeId: ns=2;s=Application.GVL.Status_Alarm

Error log:


level=ERROR ts=2025-10-10T10:14:14.746748428+05:30 app=device-opcua source=readhandler.go:50 msg="Driver.HandleReadCommands: Handle read commands failed: parse reading fail. Reading [false false false false false false false false false false false false] is out of the value type(BoolArray)'s range"

After debugging, it seems the array handling implementation for various types (e.g., BoolArray, Int32Array, StringArray, etc.) is not yet supported here.

Expected Behaviour

Device-OPC-UA should correctly parse and return OPC UA array values (Boolean, Int, String, etc.) as corresponding EdgeX value types.

Actual Behaviour

The driver throws a parse error for Boolean arrays:
“Reading [...] is out of the value type(BoolArray)'s range”

Environment

  • EdgeX Foundry: Odessa (v4.0.0)
  • Device Service: device-opc-ua (from Odessa branch)
  • PLC: Custom OPC UA server exposing Boolean array node
  • NodeId example: ns=2;s=Application.GVL.Status_Alarm

Question

  1. Is array support (for Boolean, Int, String, etc.) planned in upcoming releases?
  2. If yes, will it be available in the Odessa (4.0.x) branch?
  3. Any temporary workaround or known PR we can test for this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions