如何解决Thingsboard IOT 网关连接在连接到 OPC-UA 服务器时被拒绝
我正在尝试连接到使用 opcua Python 库创建的简单 OPC-UA 服务器,但出现以下错误:
ERROR - [opcua_connector.py] - opcua_connector - 113 - Connection refused on connection to OPC-UA server with url opc.tcp://localhost:53530/OPCUA/SimulationServer/"
我在 opcua.json 文件上尝试了很多设置,重新启动了容器,但错误仍然存在。
我可以使用 opcua 客户端和其他模拟客户端连接到服务器。我可以使用 opcua_connector.py 文件中的部分源代码进行事件连接。
我可以使用默认的自定义串行连接器示例在 Thingsboard 上发布数据。
这是我的 opcua.json 文件:
{
"server": {
"name": "OPC-UA Default Server","url": "opc.tcp://localhost:4840/freeopcua/server/","timeoutInMillis": 5000,"scanPeriodInMillis": 5000,"disableSubscriptions":false,"subCheckPeriodInMillis": 100,"showMap": false,"security": "Basic128Rsa15","identity": {
"type": "anonymous"
},"mapping": [
{
"deviceNodePattern": "Root\\.Objects\\.Device1","deviceNamePattern": "Device ${Root\\.Objects\\.Device1\\.serialNumber}","attributes": [
{
"key": "temperature °C","path": "${ns=2;i=4}"
}
],"timeseries": [
{
"key": "humidity","path": "${Root\\.Objects\\.Device1\\.TemperatureAndHumiditySensor\\.Humidity}"
},{
"key": "batteryLevel","path": "${Battery\\.batteryLevel}"
}
],"attributes_updates": [
{
"attributeOnThingsBoard": "deviceName","attributeOnDevice": "Root\\.Objects\\.Device1\\.serialNumber"
}
]
}
]
}
}
欢迎任何帮助!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。