Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

OPCUA - Read the data of an array #11898

Open
Giu-seppe opened this issue Sep 28, 2022 · 7 comments · May be fixed by #16359
Open

OPCUA - Read the data of an array #11898

Giu-seppe opened this issue Sep 28, 2022 · 7 comments · May be fixed by #16359
Labels
feature request Requests for new plugin and for new features to existing plugins help wanted Request for community participation, code, contribution size/m 2-4 day effort

Comments

@Giu-seppe
Copy link
Contributor

Use Case

I am using the plugin OPC UA but cannot access inside an array

For objects I simply solved by pointing to the variable within the structure
Structure example:

V10 = {
   RPMx100 = 100;
   Temp = 18;
   PowerOn = True;
}

Configuration used

nodes = [
    {name="V10.RPMx100", namespace="6", identifier_type="s", identifier="::Program:V10.RPMx100"},
    {name="V10.temp", namespace="6", identifier_type="s", identifier="::Program:V10.temp"},
    {name="V10.powerOn", namespace="6", identifier_type="s", identifier="::Program:V10.powerOn"},
    {name="V10.torque", namespace="6", identifier_type="s", identifier="::Program:V10.torque"},
    {name="V10.torquePercentage", namespace="6", identifier_type="s", identifier="::Program:V10.torquePercentage"},
  ]

Expected behavior

It would be convenient to access an array address via dot annotation or by entering the address in square brackets

Examples

    {name="byteArray", namespace="6", identifier_type="s", identifier="::Program:byteArray.2"},

or

    {name="byteArray", namespace="6", identifier_type="s", identifier="::Program:byteArray[1]"},

Actual behavior

It is currently not possible to read data within an array.
If you try to read the metrics of an entire array, the plugin does not return any errors but not even any data

Additional info

I have previously opened a post on the influx data forum, I am attaching the link in case it may be useful

@Giu-seppe Giu-seppe added the feature request Requests for new plugin and for new features to existing plugins label Sep 28, 2022
@Giu-seppe Giu-seppe changed the title Read the data of an array OPCUA - Read the data of an array Sep 28, 2022
@reimda
Copy link
Contributor

reimda commented Oct 3, 2022

Hi @Giu-seppe, thanks for the feature request. Are you able to write a PR to make the code changes to Telegraf? Could you provide test data that we can use to build a unit test for array data?

@Giu-seppe
Copy link
Contributor Author

No, unfortunately I am not able to write this code :(

image
This is an example of a byte array I try to read.

@reimda reimda added help wanted Request for community participation, code, contribution size/m 2-4 day effort labels Oct 4, 2022
@reimda
Copy link
Contributor

reimda commented Oct 4, 2022

@Giu-seppe I've labeled this "help wanted" to invite any interested developers to contribute a PR

@Giu-seppe
Copy link
Contributor Author

Thank you @reimda

@Doolhofx
Copy link

@Giu-seppe Did you already find another solution to log arrays? Since I see this topic is still open. I am also in the need to log data that's inside an array.

@inhinias
Copy link

@Doolhofx @Giu-seppe @reimda PR with a possible solution created.

@Doolhofx
Copy link

Doolhofx commented Jan 1, 2025

@Doolhofx @Giu-seppe @reimda PR with a possible solution created.

Thank you very much! If there is more information I will test if we experience any problems with it.

Where can I see if the request is accepted in the new Telegraf?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requests for new plugin and for new features to existing plugins help wanted Request for community participation, code, contribution size/m 2-4 day effort
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants