Edit

Share via


Automatically discover and configure OPC UA assets (preview)

In this article, you learn how to automatically discover and configure OPC UA assets connected to your Azure IoT Operations deployment. The automatic discovery process starts when you add an asset endpoint with the Enable discovery option selected.

To learn more, see What is asset discovery (preview)?.

Prerequisites

  • Enable resource sync rules. A deployed instance of Azure IoT Operations with resource sync rules enabled. To learn more, see Deploy Azure IoT Operations.

    Important

    By default, the deployment quickstart instructions do not enable resource sync rules. If resource sync rules aren't enabled on your instance, see Enable resource sync rules on an existing instance.

  • Set permissions on your custom location. The custom location in the resource group where you deployed Azure IoT Operations must have the Azure Kubernetes Service Arc Contributor Role role enabled with K8 Bridge as a member: For example:

    1. Go to the custom location for your Azure IoT Operations instance in the Azure portal.

    2. Select Access control (IAM).

    3. Select Add > Add role assignment.

    4. Search for and select the Azure Kubernetes Service Arc Contributor Role role. Then click Next.

    5. Select Select members. Search for and select K8 Bridge. Then click Review + Assign.

    6. To finish adding the role assignment, select Review + assign again.

Deploy the preview connectors

Currently, discovery is only enabled in the preview version of the connector for OPC UA.

To deploy the preview version of the connectors, you can either enable them when you deploy your Azure IoT Operations instance or enable them after you deploy your instance.

To enable the preview connectors when you deploy your Azure IoT Operations instance:

Select ONVIF Connector and Media Connector (Preview) in the Connectors section of the Install Azure IoT Operations > Basics page:

Screenshot of Azure portal that shows how to select the preview connectors.

To enable the preview connectors after you deploy your Azure IoT Operations instance:

  1. Go to your Azure IoT Operations instance in the Azure portal.

  2. Enable the preview connectors:

Screenshot of Azure portal that shows how to enable the preview connectors.

Create an asset endpoint

To create an asset endpoint with discovery enabled:

  1. Go to your Azure IoT Operations instance in the operations experience web UI.

  2. Add a new asset endpoint and select the Enable discovery option:

    Screenshot that shows how to create an asset endpoint with discovery enabled.

  3. Select Create to create the asset endpoint.

Review the discovered assets

Azure IoT Operations uses the asset endpoint to connect to the OPC UA server and scan for assets. To view the discovered assets:

  1. Go to the Discovery page for your instance in the operations experience:

    Screenshot that shows how to view discovered assets.

  2. You can filter the list by the asset endpoint name, or by keyword. The list shows the discovered assets and their status.

Import an asset from a discovered asset

From the list of discovered assets, you can import an asset into your Azure IoT Operations instance. To import an asset:

  1. Select the asset you want to import from the list of discovered assets. Then select + Import and create asset.

  2. The site takes you to the Add asset details page, where you can review the asset details and make any changes. The asset name is automatically populated with the name of the discovered asset, but you can override the name on this page:

    Screenshot that shows an asset created from a discovered asset.

  3. Step through the rest of the Create asset pages and select the imported tags and events that you want to use:

    Screenshot that shows how to modify the tags of an imported asset.

  4. The imported asset is created in your Azure IoT Operations instance. You can view the asset in the Assets page of the operations experience:

    Screenshot that shows how to view the imported asset.

To learn more about managing asset configurations, see Manage asset configurations remotely.

Review the asset definitions in the Azure portal (optional)

Both the discovered asset and the imported asset are visible in your resource group in the Azure portal:

Screenshot that shows how to view the discovered and imported asset in the Azure portal.

Review the custom resource definitions in your cluster (optional)

To review the discovered assets in your cluster, you can use the kubectl command line tool:

kubectl get discoveredassets -n azure-iot-operations

To view the details of a discovered asset, use the following command:

kubectl describe discoveredasset <name> -n azure-iot-operations

Tip

The previous commands assume that you installed your Azure IoT Operations instance in the default azure-iot-operations namespace. If you installed it in a different namespace, replace azure-iot-operations with the name of your namespace.

Use the imported asset in your data flows

After you complete the import process for a discovered asset, you can use the imported asset in your data flows. Imported asset definitions behave in exactly the same way as manually entered asset definitions. To learn more, see Create and manage data flows.