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

The data in opc-ua server is not collected. The thingsboard panel does not display telemetry data. #71

Closed
BIT-masterpy opened this issue Apr 24, 2018 · 9 comments

Comments

@BIT-masterpy
Copy link

Hello, I use the third-party opc-ua server (milo) and tb-gateway and thingsboard for the test of data collection.Milo and TB -gateway were successfully connected, and tb-gateway and thingsboard were successful, but there was no telemetry data.The log files of the three are as follows:
@mp-loki @ashvayka

opc-server(milo).txt
tb-gateway.txt
thingsboard.txt

2018-04-24_154439

tb-gateway.yml:

gateways:
tenants:
-
label: "Tenant"
reporting:
interval: 60000
persistence:
type: file
path: storage
bufferSize: 1000
connection:
host: localhost
port: 1882
retryInterval: 3000
maxInFlight: 1000
security:
accessToken: "4cq1eFC25o6ZpSLkyXec"
remoteConfiguration: false
extensions:
-
id: "opc-ua"
type: "OPC UA"
extensionConfiguration: opc-config.json

opc-config.json:
{
"servers": [
{
"applicationName": "Thingsboard OPC-UA client",
"applicationUri": "",
"host": "192.168.56.1",
"port": 12686,
"scanPeriodInSeconds": 10,
"timeoutInMillis": 5000,
"security": "None",
"identity": {
"type": "anonymous"
},
"keystore": {
"type": "PKCS12",
"location": "example.pfx",
"fileContent": "",
"password": "secret",
"alias": "gateway",
"keyPassword": "secret"
},
"mapping": [
{
"deviceNodePattern": "Objects\.HelloWorld\.Dynamic",
"deviceNamePattern": "Device1",
"attributes":[
{
"key": "Boolean val",
"type": "boolean",
"value":"${Boolean}"
}
],
"timeseries":[
{
"key": "Double Val",
"type":"double",
"value":"${Double}"
}
]
}
]
}
]
}

Milo address space:
c

@mp-loki
Copy link
Contributor

mp-loki commented Apr 25, 2018

  1. deviceNodePattern should have double backslashes:
    "deviceNodePattern": "Objects\\.HelloWorld\\.Dynamic",
  2. delete any gateway logs.
  3. Go to logback.xml, set *org.thingsboard log level to TRACE, restart the gateway and post your gateway log here.
    This way we will be able to see if it got connected to OPC-UA server and found the devices or not.

@BIT-masterpy
Copy link
Author

@mp-loki
Thank you. I have made some changes.The results are as follows:

tb-gateway.txt

2018-04-25_093726
2018-04-25_094224
2018-04-25_094611

@BIT-masterpy
Copy link
Author

tb-gateway.txt

@mp-loki
Copy link
Contributor

mp-loki commented Apr 25, 2018

Can you please try to change deviceNodePattern to "HelloWorld/Dynamic" or "HelloWorld\/Dynamic" and let me know if it helps?
I think I figured out how the behaviour is different from KEPServer.

@BIT-masterpy
Copy link
Author

@mp-loki
Thank you very much. The thingsboard is running successfully.

@mp-loki
Copy link
Contributor

mp-loki commented Apr 25, 2018

So may I assume this issue resolved?

@BIT-masterpy
Copy link
Author

yes

@mp-loki mp-loki closed this as completed Apr 26, 2018
@liangguorui666
Copy link

@BIT-masterpy 你好 ,我在解析的时候和你遇到相同的问题 能否告知一下您最后的配置文件的格式。
谢谢了

@liangguorui666
Copy link

opc-config.json 这个文件

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants