Industrial-IoT icon indicating copy to clipboard operation
Industrial-IoT copied to clipboard

OPC Twin not mapping custom node namespace

Open maalliet opened this issue 4 years ago • 2 comments

Describe the bug OPC Twin is unable to retrieve nodes that have a custom expanded format encoding namespace

To Reproduce Steps to reproduce the behavior:

While browsing through nodes of an endpoint using the Engineering tool of Industrial IoT platform, I noticed that in my case no node childs are shown for a certain path. In addition, when trying to navigate back to the parent node, I recieved an error message in the UI displaying:

An error has occurred. This application may no longer respond until reloaded. Reload

So I used the OPC Twin Browse API to investigate the issue. Browsing the parent node (that was still showing its child nodes in the tool) returned following JSON:

{
	"node": {
		"nodeClass": "Object",
		"displayName": "ServerInterfaces",
		"nodeId": "http://www.siemens.com/simatic-s7-opcua#s=ServerInterfaces",
		"browseName": "http://www.siemens.com/simatic-s7-opcua#ServerInterfaces",
		"writeMask": 0,
		"userWriteMask": 0,
		"children": true
	},
	"references": [
		{
			"target": {
				"nodeClass": "Object",
				"displayName": "SI_Main_PLC",
				"nodeId": "http://SI_Main_PLC#i=1",
				"browseName": "http://SI_Main_PLC#SI_Main_PLC",
				"writeMask": 0,
				"userWriteMask": 0,
				"typeDefinitionId": "i=61",
				"children": true
			}
		}
	]
}

Browsing one more level down to its only child node using the URI http://SI_Main_PLC#i=1 returns the error message:

{
	"node": {
		"nodeId": "http://si_main_plc/#i=1",
		"browseName": "",
		"writeMask": 0,
		"userWriteMask": 0,
		"isAbstract": false,
		"containsNoLoops": false,
		"executable": false,
		"userExecutable": false,
		"accessLevel": 0,
		"userAccessLevel": 0,
		"valueRank": "OneOrMoreDimensions",
		"historizing": false,
		"minimumSamplingInterval": 0,
		"symmetric": false,
		"children": false
	},
	"references": [],
	"errorInfo": {
		"statusCode": 2150891520,
		"errorMessage": "BadNodeIdUnknown",
		"diagnostics": [
			"BadNodeIdUnknown"
		]
	}
}

So it is not recognizing the node, resulting in the issue where nodes cannot be shown in the app and the error message appearing. When translating the node URI into its original pattern ns=4;i=1 and use this with the browsing API, I get a JSON response containing all the child nodes.

For now I used the Publisher API to subscribe to the node values (again, after translating the namespace to ns=4) in order to retrieve the data in TSI.

Expected behavior Custom namespace should be mapped to the namespace index

Additional context IoT Edge - Ubuntu 18.04 Modules - latest version Platform version - Release 2.7.206

maalliet avatar Feb 03 '21 14:02 maalliet

Does it work when using http://si_main_plc#i=1 instead of http://si_main_plc/#i=1? Also, could you browse the namespaces node on the server object and let us know the namespaces uri for index 4?

marcschier avatar Feb 06 '21 13:02 marcschier

Hi,

Browsing to both nodes http://si_main_plc#i=1 and http://si_main_plc/#i=1 return the BadNodeIdUnknown error message.

I can find the namespace in the NamespaceArray node:

image

The Namespace node itself does not contain http://si_main_plc namespace:

image

I checked with the OT team and they told me that the OT setup is as follows: There is a machine PLC that sends data over OPC UA to the main OPC UA server (which I'm connected to) The main OPC UA server makes the data available

maalliet avatar Feb 09 '21 08:02 maalliet

A lot of time has passed, could you retry with OPC Publisher 2.9.0-preview3 or higher and see if you can reproduce? Also, please try against UAExpert as well to compare and please let us know. I will close for now, but please re-open if you have had a chance or are still interested in this bug.

marcschier avatar Jun 25 '23 16:06 marcschier