Skip to content

Commit ca8838f

Browse files
committed
Add dynamic browse paths
1 parent 3fa19a1 commit ca8838f

4 files changed

Lines changed: 46 additions & 5 deletions

File tree

articles/iot-operations/discover-manage-assets/howto-configure-opc-ua.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ A dataset defines where the connector sends the data it collects from a collecti
158158

159159
:::image type="content" source="media/howto-configure-opc-ua/create-dataset.png" alt-text="Screenshot that shows how to create a dataset in the operations experience." lightbox="media/howto-configure-opc-ua/create-dataset.png":::
160160

161+
Use the **Start instance** field to specify the starting node for resolving relative browse paths for data points in the dataset. For more information, see [Resolve nodes dynamically using browse paths](overview-opc-ua-connector.md#resolve-nodes-dynamically-using-browse-paths).
162+
161163
1. Select **Create and next** to create the dataset.
162164

163165
> [!TIP]
@@ -188,6 +190,9 @@ Now you can define the data points associated with the dataset. To add OPC UA da
188190
| ns=3;s=FastUInt10 | Temperature |
189191
| ns=3;s=FastUInt100 | Humidity |
190192

193+
> [!NOTE]
194+
> If you're using relative browse paths to resolve dynamic nodes, the **Data source** field contains a relative browse path. For more information, see [Resolve nodes dynamically using browse paths](overview-opc-ua-connector.md#resolve-nodes-dynamically-using-browse-paths).
195+
191196
1. On the **data points** page, select **Next** to go to the **Add events** page.
192197

193198
# [Azure CLI](#tab/cli)
@@ -250,6 +255,9 @@ Now you can define the events associated with the asset. To add OPC UA events:
250255

251256
:::image type="content" source="media/howto-configure-opc-ua/add-event.png" alt-text="Screenshot that shows adding events in the operations experience." lightbox="media/howto-configure-opc-ua/add-event.png":::
252257

258+
> [!NOTE]
259+
> To resolve node IDs dynamically, use the **Start instance** field to specify the starting node ID, and the **Data source** field to specify the relative browse path. For more information, see [Resolve nodes dynamically using browse paths](overview-opc-ua-connector.md#resolve-nodes-dynamically-using-browse-paths).
260+
253261
1. Select **Manage default settings** to configure default event settings for the asset. These settings apply to all the OPC UA events that belong to the asset. You can override these settings for each event that you add. Default event settings include:
254262

255263
- **Publishing interval (milliseconds)**: The rate at which OPC UA server should publish data.

articles/iot-operations/discover-manage-assets/overview-opc-ua-connector-certificates-management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ By default, the connector for OPC UA connects to an OPC UA server by using the e
5555
- Export the public key of the connector for OPC UA application instance certificate from the Kubernetes secret store and then add it to trusted certificates list for the OPC UA server.
5656
- Export the public key of the OPC UA server's application instance and then add it to trusted certificates list for the connector for OPC UA.
5757

58-
Mutual trust validation between the OPC UA server and the connector for OPC UA is now possible. You can now configure an `AssetEndpointProfile` for the OPC UA server in the operations experience web UI and start working with it.
58+
Mutual trust validation between the OPC UA server and the connector for OPC UA is now possible. You can now configure a *device* for the OPC UA server in the operations experience web UI and start working with it.
5959

6060
## Use self-signed OPC UA server application instance certificates
6161

articles/iot-operations/discover-manage-assets/overview-opc-ua-connector.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ As part of Azure IoT Operations, the connector for OPC UA is a native Kubernetes
3737

3838
The connector for OPC UA supports the following features as part of Azure IoT Operations:
3939

40-
- Simultaneous connections to multiple OPC UA servers configured by using Kubernetes `AssetEndpointProfile` custom resources (CRs).
40+
- Simultaneous connections to multiple OPC UA servers configured by using Kubernetes `device` custom resources (CRs).
4141
- Publish OPC UA data value changes in OPC UA PubSub format with JSON encoding.
4242
- Publish message headers as user properties in the MQTT message. The headers in the messages published by the connector for OPC UA are based on the [CloudEvents specification for OPC UA](https://github.com/cloudevents/spec/blob/main/cloudevents/extensions/opcua.md).
4343
- Publish OPC UA events with predefined event fields.
@@ -47,7 +47,8 @@ The connector for OPC UA supports the following features as part of Azure IoT Op
4747
- Integrated [OpenTelemetry](https://opentelemetry.io/) compatible observability.
4848
- OPC UA transport encryption.
4949
- Anonymous authentication and authorization based on username and password.
50-
- `AssetEndpointProfile` and `Asset` CRs configurable by using Azure REST API and the operations experience web UI.
50+
- `device` and `asset` CRs configurable by using Azure REST API and the operations experience web UI.
51+
- Dynamic resolution of nodes at runtime using the OPC UA `TranslateBrowsePathToNodeId` service.
5152

5253
## How it works
5354

@@ -73,7 +74,7 @@ To write values to a node in a connected OPC UA server, the connector for OPC UA
7374

7475
1. Checks the payload to ensure all data points exist in the target dataset.
7576

76-
1. Writes the values to the OPC UA server, and publishes a success or failure response to the MQTT broker. The changed value is published to the standard telemetry topic associated with the dataset.
77+
1. Writes the values to the OPC UA server, and publishes a success or failure response to the MQTT broker. The changed value is published to the standard message topic associated with the dataset.
7778

7879
To generate a write request, publish a JSON message to the MQTT topic using MQTT v5 request/response semantics. Specify the dataset name and the values to be written in the payload. Each MQTT message includes metadata that defines system-level and user-defined properties such as `SourceId`, `ProtocolVersion`, and `CorrelationData` to ensure traceability and conformance.
7980

@@ -148,6 +149,38 @@ The subject field contains the name of the asset that the message is related to.
148149
> [!NOTE]
149150
> For assets created in the operations experience web UI, the subject property for any messages sent by the asset is set to the `externalAssetId` value. In this case, the `subject` property contains a GUID rather than a friendly asset name.
150151
152+
## Resolve nodes dynamically using browse paths
153+
154+
When you configure OPC UA data points or events in an asset, you typically add an OPC UA server node ID in the **Data source** field. This approach assumes that node IDs are stable across server restarts and deployments. However, some OPC UA servers create node IDs dynamically at runtime or on demand. You can't persist these dynamic node IDs in an asset configuration because they might change over time.
155+
156+
To address this scenario, the connector can resolve dynamic nodes at runtime using the OPC UA `TranslateBrowsePathToNodeId` service. This service resolves a target node ID from a starting object and a relative browse path. When you configure a **Start instance** value in a dataset or event configuration, each data point or event requires a valid relative browse path in its **Data source** property. The connector translates the relative browse path to a concrete node ID at runtime.
157+
158+
> [!NOTE]
159+
> If you don't provide a **Start instance** value, the connector uses the **Data source** property as a fixed node ID.
160+
161+
Example **Start instance** values:
162+
163+
* `i=2555`
164+
* `nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1`
165+
* `nsu=http://microsoft.com/Opc/OpcPlc/Boiler;i=5`
166+
* `ns=10;s=System.Pump1`
167+
* `ns=1;b=M/RbKBsRVkePCePcx24oRA==`
168+
169+
Example relative browse paths to use in the **Data source** field:
170+
171+
* `/1:SYSTEM/1:PUMP/1:P1`
172+
* `/2:Block&.Output`
173+
* `/3:Truck.0:NodeVersion`
174+
* `<!HasChild>Truck`
175+
* `<1:ConnectedTo>1:Boiler/`
176+
177+
For more information about the relative browse path syntax, see [OPC Foundation Part 4 A.2](https://reference.opcfoundation.org/Core/Part4/v105/docs/A.2).
178+
179+
The relative browse paths must use numeric OPC UA namespace indexes. There's currently no support for namespace names in string format.
180+
181+
> [!IMPORTANT]
182+
> Namespace indexes can change within the server. If namespace indexes change, you must reconfigure them in the asset definition.
183+
151184
## How does it relate to Azure IoT Operations?
152185

153186
The connector for ONVIF is part of Azure IoT Operations. The connector deploys to an Arc-enabled Kubernetes cluster on the edge as part of an Azure IoT Operations deployment. The connector interacts with other Azure IoT Operations elements, such as:

articles/iot-operations/troubleshoot/tips-tools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ To view custom resource types other that pods in the cluster:
203203

204204
1. Press **Ctrl-a** to display the list of custom resource types.
205205

206-
1. Select the custom resource type, such as **assetendpointprofiles** and press **Enter**.
206+
1. Select the custom resource type, such as **devices** and press **Enter**.
207207

208208
> [!TIP]
209209
> To search for a custom resource type by name, type **/** and then start typing the name of the type you're looking for.

0 commit comments

Comments
 (0)