Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Improve OPC UA Schema Detection to Support All Identifier Types #1579

Open
tenthe opened this issue May 22, 2023 Discussed in #1567 · 6 comments
Open

Improve OPC UA Schema Detection to Support All Identifier Types #1579

tenthe opened this issue May 22, 2023 Discussed in #1567 · 6 comments
Labels
connect Related to the `connect` module (adapters)
Milestone

Comments

@tenthe
Copy link
Contributor

tenthe commented May 22, 2023

Issue:

The current implementation of OPC UA schema detection in our GitHub repository only supports numbers as Identifier Types. However, as discussed in issue #1567 and according to the OPC UA specification Link, the schema detection should be enhanced to support all Identifier Types defined by OPC UA.

Open question:

We need to clarify whether the identification of Identifier Types can be inferred automatically or if users need to provide this information manually.

Proposed Solution:

To optimize the current implementation, the following steps are suggested:

  1. Review the OPC UA specification Link thoroughly to understand the complete list of Identifier Types defined.
  2. Update the schema detection logic to support all the identified Identifier Types.
  3. Consider implementing an automatic inference mechanism that detects the Identifier Type based on the data provided by the OPC UA server. This can include analyzing metadata, examining naming conventions, or utilizing specific OPC UA server features.
  4. If automatic inference is not feasible or reliable, provide clear instructions to users on how to manually provide the Identifier Types information for their OPC UA server. This can be in the form of user input during the connection process.

By implementing these changes, we can enhance the OPC UA schema detection capabilities, making it more versatile and accommodating for a wider range of OPC UA servers and Identifier Types.

Discussed in #1567

Originally posted by curichan May 11, 2023
Hi there,
after Streampipes has connected to an OPC UA server and a node has been selected, I get the error "Could not guess schema for opc node: class java.lang.String cannot be cast to class org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger (java.lang.String is in module java.base of loader 'bootstrap'; org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger is in unnamed module of loader org.springframework.boot.loader.LaunchedURLClassLoader" when progressing to the "Configure fields" dialogue. It's not clear to me why Streampipes is trying to cast a string to an integer at this stage. Can someone help or is this a bug?

@tenthe tenthe added the connect Related to the `connect` module (adapters) label May 22, 2023
@tenthe tenthe added this to the 0.93.0 milestone May 22, 2023
@curichan
Copy link

Automatic detection of identifier type should be easy to accomplish since each node comes with the field "IdentifierType" as part of its metadata in OPC UA.

@bossenti
Copy link
Contributor

thanks a lot for the great issue description @tenthe
Do we even want to make it a good-first-issue?

@tenthe
Copy link
Contributor Author

tenthe commented May 22, 2023

I am not sure if this is a good candidate for a good-first-issue, as the OPC UA Adapter will need further refactoring once the new API is merged. Also, we want to add more functionality to the OPC UA Adapter, I think it makes sense to do that in the same move.

@curichan
Copy link

curichan commented May 24, 2023

Hi all, sorry to be a pain! But can you provide a very rough estimate when this issue might be available in a new release? I'm currently building up a new explorative analysis infrastructure, but this contains OPC UA servers providing many non-integer nodes. I'd love to use Streampipes for this, but may need to come up with a different solution, if Streampipes can't handle non-integer nodes. Sorry again for being pushy!

Actually, I did some more testing. I think I might have put you on the wrong track! I find that Streampipes is able to read nodes of types Int, Float, String and Boolean. It fails, however, when reading a node with a custom data type defined in the server itself. The custom type in my example is defined, see attached screenshot, as a variant of the String type in a subfolder of 'Types/DataTypes/OPC Binary/'. Could it be that Streampipes does not read and integrate custom types from the 'Types' folder and therefore fails when it encounters a node with this custom data type?
image

@bossenti
Copy link
Contributor

Hey @curichan,

please take for granted that you don't bother us. We highly appreciate all the feedback and insights you share with us, we are gaining a lot of value from them. So please keep that spirit and help us to improve StreamPipes 🙂
It would be really great if you could StreamPipes for your use case, and it's very nice to see that you seem to like StreamPipes despite some issues you encountered.

From our side, improving the OPC-UA adapter is the next topic we want to address, as we have already received some feedback where we should improve (your feedback counts massively here). Currently, there is a huge big PR (#1290) that we need to complete first. But after that, OPC-UA will be definitely a focus topic.

As for the time until a possible release, it's quite hard to put a number on as we can't really plan how many time we can invest in StreamPipes besides our everyday life.
I can understand that this is probably not helpful for you... But if you could share a rough time window by when you would need the changes in a release, then we could at least roughly estimate whether this is realistic for us or not.
Would that be sufficient for you?

@curichan
Copy link

Hi @bossenti , many thanks for your kind words and explanations. I found a workaround for my specific problem for now. However, allowing for custom data types would certainly be a major improvement to the OPC UA adapter. Given this backrground, a solution by the end of June would be great!

@bossenti bossenti modified the milestones: 0.93.0, 1.0.0 Oct 19, 2023
@bossenti bossenti modified the milestones: 0.95.0, 0.97.0 Apr 8, 2024
@dominikriemer dominikriemer modified the milestones: 0.97.0, Backlog Oct 2, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
connect Related to the `connect` module (adapters)
Projects
None yet
Development

No branches or pull requests

4 participants