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/discover-manage-assets/howto-use-http-connector.md
+40-7Lines changed: 40 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ In Azure IoT Operations, the connector for REST/HTTP (preview) enables access to
21
21
This article explains how to use the connector for REST/HTTP to perform tasks such as:
22
22
23
23
- Define the devices that connect HTTP sources to your Azure IoT Operations instance.
24
-
- Add assets, and define the data points to enable the data flow from the HTTP source to the MQTT broker.
24
+
- Add assets, and define the data points to enable the data flow from the HTTP source to the MQTT broker or [broker state store](../develop-edge-apps/overview-state-store.md).
25
25
26
26
## Prerequisites
27
27
@@ -35,14 +35,13 @@ You need any credentials required to access the HTTP source. If the HTTP source
> If you don't enable preview features, you see the following error message in the `aio-supervisor-...` pod logs when you try to use the HTTP, media, or ONVIF connectors: `No connector configuration present for AssetEndpointProfile: <AssetEndpointProfileName>`.
To configure the connector for REST/HTTP, first create a device that defines the connection to the HTTP source. The device includes the URL of the HTTP source and any credentials you need to access the HTTP source.
42
+
To configure the connector for REST/HTTP, first create a device that defines the connection to the HTTP source. The device includes the URL of the HTTP source and any credentials you need to access the HTTP source:
43
+
44
+
# [Operations experience](#tab/portal)
46
45
47
46
1. In the operations experience web UI, select **Devices** in the left navigation pane. Then select **Create new**.
48
47
@@ -64,10 +63,26 @@ To configure the connector for REST/HTTP, first create a device that defines the
64
63
65
64
:::image type="content" source="media/howto-use-http-connector/http-connector-device-created.png" alt-text="Screenshot that shows the list of devices." lightbox="media/howto-use-http-connector/http-connector-device-created.png":::
66
65
66
+
# [Azure CLI](#tab/cli)
67
+
68
+
Run the following commands:
69
+
70
+
```azurecli
71
+
az iot ops ns device create -n rest-http-connector-cli -g {your resource group name} --instance {your instance name}
To learn more, see [az iot ops ns device](/cli/azure/iot/ops/ns/device).
77
+
78
+
---
79
+
67
80
## Create a namespace asset
68
81
69
82
To define a namespace asset that publishes data points from the HTTP endpoint, follow these steps:
70
83
84
+
# [Operations experience](#tab/portal)
85
+
71
86
1. In the operations experience web UI, select **Assets** in the left navigation pane. Then select **Create namespace asset**.
72
87
73
88
1. Select the inbound endpoint for the connector for REST/HTTP that you created in the previous section.
@@ -80,8 +95,26 @@ To define a namespace asset that publishes data points from the HTTP endpoint, f
80
95
81
96
:::image type="content" source="media/howto-use-http-connector/add-data-point.png" alt-text="Screenshot that shows how to add a data point for HTTP source." lightbox="media/howto-use-http-connector/add-data-point.png":::
82
97
83
-
Add details for each data point to publish to the MQTT broker. Then select **Next** to continue.
98
+
Add details for each data point to publish to the MQTT broker.
99
+
100
+
1. To configure the destination for the data, select **Manage default dataset**. Choose either **MQTT broker** or **Broker state store** as the destination. If you choose **MQTT broker**, you can enter the name of the topic to publish to. If you choose **Broker state store**, you can enter the key of the entry in the state store to use.
101
+
102
+
:::image type="content" source="media/howto-use-http-connector/configure-dataset.png" alt-text="Screenshot that shows how to configure the dataset for HTTP source." lightbox="media/howto-use-http-connector/configure-dataset.png":::
103
+
104
+
Select **Next** to continue.
84
105
85
106
1. On the **Review** page, review the details of the asset and select **Create** to create the asset. After a few minutes, the asset is listed on the **Assets** page:
86
107
87
108
:::image type="content" source="media/howto-use-http-connector/http-asset-created.png" alt-text="Screenshot that shows the list of assets." lightbox="media/howto-use-http-connector/http-asset-created.png":::
> If you don't enable preview features, you see the following error message in the `aio-supervisor-...` pod logs when you try to use the media or ONVIF connectors: `No connector configuration present for AssetEndpointProfile: <AssetEndpointProfileName>`.
42
-
43
-
## Create a device
40
+
## Create a device with a media endpoint
44
41
45
42
To configure the media connector, first create a device that defines the connection to the media source. The device includes the URL of the media source and any credentials you need to access the media source:
46
43
44
+
# [Operations experience](#tab/portal)
45
+
47
46
1. In the operations experience web UI, select **Devices** in the left navigation pane. Then select **Create new**.
48
47
49
48
1. Enter a name for your device, such as `media-connector`. To add the endpoint for the media connector, select **New** on the **Microsoft.Media** tile.
@@ -64,9 +63,25 @@ To configure the media connector, first create a device that defines the connect
64
63
65
64
:::image type="content" source="media/howto-use-media-connector/media-connector-device-created.png" alt-text="Screenshot that shows the list of devices." lightbox="media/howto-use-media-connector/media-connector-device-created.png":::
66
65
66
+
# [Azure CLI](#tab/cli)
67
+
68
+
Run the following commands:
69
+
70
+
```azurecli
71
+
az iot ops ns device create -n media-connector-cli -g {your resource group name} --instance {your instance name}
72
+
73
+
az iot ops ns device endpoint inbound add media --device media-connector-cli -g {your resource group name} -i {your instance name} --name media-connector-cli-0 --endpoint-address rtsp://samplecamera:554/stream1
74
+
```
75
+
76
+
To learn more, see [az iot ops ns device](/cli/azure/iot/ops/ns/device).
77
+
78
+
---
79
+
67
80
## Create an asset to publish an image snapshot
68
81
69
-
To define a namespace asset that publishes an image snapshot from the media source, follow these steps:
82
+
To define a namespace asset that publishes an image snapshot from the media source to the MQTT broker:
83
+
84
+
# [Operations experience](#tab/portal)
70
85
71
86
1. In the operations experience web UI, select **Assets** in the left navigation pane. Then select **Create namespace asset**.
72
87
@@ -78,7 +93,7 @@ To define a namespace asset that publishes an image snapshot from the media sour
78
93
79
94
1. On the **Streams** page, select **Add stream** to add a stream for the asset.
80
95
81
-
1. Add a name for the stream, such as `mysnapshots`. Set MQTT as the destination and add a name for the MQTT topic to publish to such as `mysnapshots`. Select `mqtt-to-snapshot` as the task type.
96
+
1. Add a name for the stream, such as `mysnapshots`. Set MQTT as the destination and add a name for the MQTT topic to publish to such as `mysnapshots`. Select `snapshot-to-mqtt` as the task type.
82
97
83
98
:::image type="content" source="media/howto-use-media-connector/add-snapshot-stream.png" alt-text="Screenshot that shows how to add a snapshot stream." lightbox="media/howto-use-media-connector/add-snapshot-stream.png":::
84
99
@@ -88,10 +103,24 @@ To define a namespace asset that publishes an image snapshot from the media sour
88
103
89
104
1. On the **Review** page, review the details of the asset and select **Create** to create the asset.
To learn more, see [az iot ops ns asset rest](/cli/azure/iot/ops/ns/asset/rest).
115
+
116
+
---
117
+
91
118
## Add a stream to save a video clip
92
119
93
120
In this section, you add a stream to the asset that saves video clips from the media source to the file system.
94
121
122
+
# [Operations experience](#tab/portal)
123
+
95
124
1. In the operations experience web UI, select **Assets** in the left navigation pane. Then select the `my-media-source` asset you created in the previous section.
96
125
97
126
1. Select **Streams** and then select **Add stream** to add a stream to the asset.
@@ -105,3 +134,13 @@ In this section, you add a stream to the asset that saves video clips from the m
105
134
1. The new stream is listed in the asset's **Streams** page:
106
135
107
136
:::image type="content" source="media/howto-use-media-connector/media-connector-streams.png" alt-text="Screenshot that shows the list of streams for the media connector asset." lightbox="media/howto-use-media-connector/media-connector-streams.png":::
137
+
138
+
# [Azure CLI](#tab/cli)
139
+
140
+
Run the following command:
141
+
142
+
```azurecli
143
+
az iot ops ns asset media stream add --asset mymediaasset --instance {your instance name} -g {your resource group name} --name clipStream --task-type clip-to-fs --format mp4 --duration 30 --path /data/clips
> If you don't enable preview features, you see the following error message in the `aio-supervisor-...` pod logs when you try to use the media or ONVIF connectors: `No connector configuration present for AssetEndpointProfile: <AssetEndpointProfileName>`.
To add a device that defines an ONVIF endpoint for a compliant camera, follow these steps:
42
+
To add a device that includes an ONVIF endpoint for a compliant camera:
43
+
44
+
# [Operations experience](#tab/portal)
46
45
47
46
1. In the operations experience web UI, select **Devices** from the left navigation pane:
48
47
@@ -62,6 +61,20 @@ To add a device that defines an ONVIF endpoint for a compliant camera, follow th
62
61
63
62
:::image type="content" source="media/howto-use-onvif-connector/device-created.png" alt-text="Screenshot that shows the device created in the operations experience." lightbox="media/howto-use-onvif-connector/device-created.png":::
64
63
64
+
# [Azure CLI](#tab/cli)
65
+
66
+
Run the following commands:
67
+
68
+
```azurecli
69
+
az iot ops ns device create -n onvif-connector-cli -g {your resource group name} --instance {your instance name}
To learn more, see [az iot ops ns device](/cli/azure/iot/ops/ns/device).
75
+
76
+
---
77
+
65
78
## View the discovered assets and devices
66
79
67
80
After you create a device with an ONVIF endpoint, the connector for ONVIF automatically discovers the assets and devices that are available at the endpoint. To view the discovered assets and devices in the operations experience web UI, select **Discovery** from the left navigation pane:
Copy file name to clipboardExpand all lines: articles/iot-operations/discover-manage-assets/overview-media-connector.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,18 @@ The media connector can connect to various sources, including:
26
26
| Media file |`http://camera1/snapshot/profile1`<br/>`nfs://server/path/file.extension`<br/>` file://localhost/media/path/file.mkv`| Any media file with a URL accessible from the cluster. |
27
27
| Media folder |`file://host/path/to/folder/`<br/>`ftp://server/path/to/folder/`| A folder, accessible from the cluster, that contains media files such as snapshots or clips. |
28
28
29
+
## Task types
30
+
31
+
The media connector supports the following task types:
32
+
33
+
| Task type | Description |
34
+
|-----------|-------------|
35
+
| snapshot-to-mqtt | Captures a snapshot from a media source and publishes it to an MQTT topic. |
36
+
| clip-to-fs | Saves a video clip from a media source to the file system. |
37
+
| snapshot-to-fs | Saves a snapshot from a media source to the file system. |
38
+
| stream-to-rtsp | Proxies a live video stream from a media source to an RTSP endpoint. |
39
+
| stream-to-rtsps | Proxies a live video stream from a media source to an RTSPs endpoint. |
When you deploy the preview version of Azure IoT Operations, the deployment includes the three preview connectors. You can verify that you have a preview instance of Azure IoT Operations by checking in the Azure portal that preview features are enabled for your instance:
11
+
12
+
:::image type="content" source="media/deploy-preview-media-connectors-simple/portal-enable-preview-connectors.png" alt-text="Screenshot of Azure portal that shows that preview features are enabled." lightbox="media/deploy-preview-media-connectors-simple/portal-enable-preview-connectors.png":::
13
+
14
+
Before you can use the preview connectors (ONVIF, media, and REST/HTTP) in the operations experience web UI, an administrator must add connector template instances to your Azure IoT Operations instance.
15
+
16
+
All three preview connectors can publish captured data to the MQTT broker.
17
+
18
+
To add a connector template instance to your Azure IoT Operations instance:
19
+
20
+
1. In the Azure portal, go to your Azure IoT Operations instance, select **Connector templates**, and then select **Add connector template instances**:
21
+
22
+
:::image type="content" source="media/deploy-preview-media-connectors-simple/portal-add-connector-template.png" alt-text="Screenshot of Azure portal that shows how to add a connector template instance." lightbox="media/deploy-preview-media-connectors-simple/portal-add-connector-template.png":::
23
+
24
+
1. On the first page of the **Add an Akri connector template** wizard, select the type of connector template you want to add, such as **ONVIF**, **Media**, or **HTTP REST**. Then select **Metadata**.
25
+
26
+
:::image type="content" source="media/deploy-preview-media-connectors-simple/select-connector-template-type.png" alt-text="Screenshot of Azure portal that shows how to select the connector template instance type." lightbox="media/deploy-preview-media-connectors-simple/select-connector-template-type.png":::
27
+
28
+
1. On the **Metadata** page, accept the defaults, and then select **Device inbound endpoint type**.
29
+
30
+
1. On the **Device inbound endpoint type** page, accept the defaults, and then select **Diagnostics configurations**.
31
+
32
+
1. On the **Diagnostics configurations** page, accept the defaults, and then select **Runtime configuration**.
33
+
34
+
1. On the **Runtime configuration** page, accept the defaults, and then select **Review**:
35
+
36
+
1. On the **Review** page, review the details of the connector template instance, and then select **Create** to create the connector template instance.
37
+
38
+
An OT user can now use the operations experience web UI to create a device with a preview connector endpoint.
0 commit comments