You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/iot-operations/connect-to-cloud/howto-configure-dataflow-endpoint.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -299,6 +299,9 @@ spec:
299
299
copyMqttProperties: enabled
300
300
```
301
301
302
+
> [!IMPORTANT]
303
+
> By default, data flows don't send MQTT message user properties to Kafka destinations. These user properties include values such as `subject` that stores the name of the asset sending the message. To include user properties in the Kafka message, you must update the `DataflowEndpoint` configuration to include: `copyMqttProperties: enabled`.
description: Understand the structure of the OPC UA messages published to the MQTT broker by the connector for OPC UA.
4
+
author: dominicbetts
5
+
ms.author: dobett
6
+
ms.subservice: azure-opcua-connector
7
+
ms.topic: conceptual
8
+
ms.date: 08/05/2024
9
+
10
+
# CustomerIntent: As an industrial edge IT or operations user, I want to understand the structure of the messages that the connector for OPC UA publishes so that I can process the messages.
11
+
---
12
+
13
+
# Connector for OPC UA message format
14
+
15
+
The connector for OPC UA publishes messages from OPC UA servers to the MQTT broker in JSON format. Each message has a payload and a collection of properties that are a part of the MQTT user properties section. The payload contains the telemetry data from the OPC UA server, and the properties provide metadata about the message.
16
+
17
+
## Payload
18
+
19
+
The payload of an OPC UA message is a JSON object that contains the telemetry data from the OPC UA server. The following example shows the payload of a message from the sample thermostat asset used in the quickstarts. Use the following command to subscribe to messages in the `azure-iot-operations/data` topic:
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). The headers from an OPC UA message become user properties in a message published to the MQTT broker. The following example shows the user properties of a message from the sample thermostat asset used in the quickstarts. Use the following command to subscribe to messages in the `azure-iot-operations/data` topic:
The subject field contains the name of the asset that the message is related to. The sequence field contains the sequence number of the message.
58
+
59
+
> [!NOTE]
60
+
> There's a known issue for assets created using the operations experience web UI where the subject property for any messages sent by the asset is set to the `externalAssetId` value. In this case, the `subject` is a GUID rather than a friendly asset name.
Copy file name to clipboardExpand all lines: articles/iot-operations/discover-manage-assets/howto-autodetect-opcua-assets-using-akri.md
+32-51Lines changed: 32 additions & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,18 +24,18 @@ The Akri services enable you to detect and create assets in the address space of
24
24
## Prerequisites
25
25
26
26
- Install Azure IoT Operations Preview. To install Azure IoT Operations for demonstration and exploration purposes, see [Quickstart: Run Azure IoT Operations Preview in Github Codespaces with K3s](../get-started-end-to-end-sample/quickstart-deploy.md).
27
-
- Verify that the the Akri services pods are properly configured by running the following command:
27
+
- Verify that the Akri services pods are properly configured by running the following command:
28
28
29
29
```bash
30
30
kubectl get pods -n azure-iot-operations
31
31
```
32
32
33
-
The output includes lines that show the Akri agent and discovery handler pods are running:
33
+
The output includes a line that shows the Akri agent and discovery pods are running:
> In a default Azure IoT Operations deployment, the OPC UA discovery handler is already configured to discover the simulated PLC server. If you want to discover assets connected to additional OPC UA servers, you can add them to the configuration file.
83
+
81
84
## Verify the configuration
82
85
83
86
To confirm that the asset discovery container is configured and running:
84
87
85
88
1. Use the following command to check the pod logs:
86
89
87
90
```bash
88
-
kubectl logs <insert aio-akri-opcua-asset-discovery pod name> -n azure-iot-operations
91
+
kubectl logs <insert aio-opc-asset-discovery pod name> -n azure-iot-operations
89
92
```
90
93
91
-
A log from the `aio-akri-opcua-asset-discovery` pod indicates after a few seconds that the discovery handler registered itself with the Akri services:
92
-
93
-
```output
94
-
2023-06-07 10:45:27.395 +00:00 info: OpcUaAssetDetection.Akri.Program[0] Akri OPC UA Asset Detection (0.2.0-alpha.203+Branch.main.Sha.cd4045345ad0d148cca4098b68fc7da5b307ce13) is starting with the process id: 1
95
-
2023-06-07 10:45:27.695 +00:00 info: OpcUaAssetDetection.Akri.Program[0] Got IP address of the pod from POD_IP environment variable.
96
-
2023-06-07 10:45:28.695 +00:00 info: OpcUaAssetDetection.Akri.Program[0] Registered with Akri system with Name opcua-asset for http://10.1.0.92:80 with type: Network as shared: True
97
-
2023-06-07 10:45:28.696 +00:00 info: OpcUaAssetDetection.Akri.Program[0] Press CTRL+C to exit
94
+
A log from the `aio-opc-asset-discovery` pod indicates after a few seconds that the discovery handler registered itself with the Akri services:
95
+
96
+
```2024-08-01T15:04:12.874Z aio-opc-asset-discovery-4nsgs - Akri OPC UA Asset Discovery (1.0.0-preview-20240708+702c5cafeca2ea49fec3fb4dc6645dd0d89016ee) is starting with the process id: 1
97
+
2024-08-01T15:04:12.948Z aio-opc-asset-discovery-4nsgs - OPC UA SDK 1.5.374.70 from 07/20/2024 07:37:16
98
+
2024-08-01T15:04:12.973Z aio-opc-asset-discovery-4nsgs - OPC UA SDK informational version: 1.5.374.70+1ee3beb87993019de4968597d17cb54d5a4dc3c8
2024-08-01T15:04:13.547Z aio-opc-asset-discovery-4nsgs - Overriding HTTP_PORTS '8080' and HTTPS_PORTS ''. Binding to values defined by URLS instead 'http://+:8080'.
102
+
2024-08-01T15:04:13.774Z aio-opc-asset-discovery-4nsgs - Now listening on: http://:8080
103
+
2024-08-01T15:04:13.774Z aio-opc-asset-discovery-4nsgs - Application started. Press Ctrl+C to shut down.
104
+
2024-08-01T15:04:13.774Z aio-opc-asset-discovery-4nsgs - Hosting environment: Production
2024-08-01T15:04:13.774Z aio-opc-asset-discovery-4nsgs - Hosting started
107
+
2024-08-01T15:04:13.881Z aio-opc-asset-discovery-4nsgs - Registering with Agent as HTTP endpoint using own IP from the environment variable POD_IP: 10.42.0.245
108
+
2024-08-01T15:04:14.875Z aio-opc-asset-discovery-4nsgs - Registered with the Akri agent with name opcua-asset for http://10.42.0.245:8080 with type Network and shared True
109
+
2024-08-01T15:04:14.877Z aio-opc-asset-discovery-4nsgs - Successfully re-registered OPC UA Asset Discovery Handler with the Akri agent
110
+
2024-08-01T15:04:14.877Z aio-opc-asset-discovery-4nsgs - Press CTRL+C to exit
98
111
```
99
112
100
113
After about a minute, the Akri services issue the first discovery request based on the configuration:
After the discovery is complete, the discovery handler sends the result back to the Akri services to create an Akri instance custom resource with asset information and observable variables. The discovery handler repeats the discovery every 10 minutes to detect any changes on the server.
@@ -150,8 +131,8 @@ To confirm that the asset discovery container is configured and running:
150
131
The output from the previous command looks like the following example. You might need to wait for a few seconds for the Akri instance to be created:
The connector for OPC UA supervisor watches for new Akri instance custom resources of type `opc-ua-asset`, and generates the initial asset types and asset custom resources for them. You can modify asset custom resources by adding settings such as extended publishing for more data points, or connector for OPC UA observability settings.
Copy file name to clipboardExpand all lines: articles/iot-operations/discover-manage-assets/overview-opcua-broker.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,7 @@ The connector for OPC UA supports the following features as part of Azure IoT Op
36
36
37
37
- Simultaneous connections to multiple OPC UA servers configured by using Kubernetes `AssetEndpointProfile` custom resources (CRs).
38
38
- Publish OPC UA data value changes in OPC UA PubSub format with JSON encoding.
39
+
- 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).
39
40
- Publish OPC UA events with predefined event fields.
40
41
- Asset definition by using Kubernetes Asset CRs
41
42
- Payload compression including `gzip` and `brotli`.
> There's currently a known issue where the configuration for the asset endpoint contains an invalid setting. To work around this issue, you need to remove the `"securityMode":"none"` setting from the configuration for the `opc-ua-broker-opcplc-000000-50000` asset endpoint. To learn more, see [Connector for OPC UA](../troubleshoot/known-issues.md#akri-services).
270
+
268
271
To verify the configuration, run the following command to view the Akri instances that represent the OPC UA data sources discovered by Akri services. You might need to wait a few minutes for the configuration to be available:
0 commit comments