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-onvif-connector.md
+136-6Lines changed: 136 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ author: dominicbetts
5
5
ms.author: dobett
6
6
ms.service: azure-iot-operations
7
7
ms.topic: how-to
8
-
ms.date: 11/06/2024
8
+
ms.date: 04/24/2025
9
9
10
10
#CustomerIntent: As an industrial edge IT or operations user, I want to configure the connector for ONVIF so that I can read and write camera settings to control an ONVIF compliant camera.
11
11
---
@@ -139,15 +139,34 @@ authentication: {
139
139
140
140
After you create the asset endpoint, the connector for ONVIF runs a discovery process to detect the capabilities of the connected camera. The results of the discovery process are **DiscoveredAsset** and **DiscoverAssetEndpointProfile** custom resources:
141
141
142
-
- A **DiscoveredAsset** custom resource represents one of the [ONVIF services](https://www.onvif.org/profiles/specifications/) such as pan-tilt-zoom (PTZ) that the camera supports.
142
+
- A **DiscoveredAsset** custom resource represents one of the [ONVIF services](https://www.onvif.org/profiles/specifications/) such as pan-tilt-zoom (PTZ) that the camera supports. The output from `kubectl get discoveredassets -n azure-iot-operations` might look like the following example:
143
143
144
-
- A **DiscoveredAssetEndpointProfile** custom resource represents a video stream format that the camera exposes.
144
+
```output
145
+
NAME AGE
146
+
contoso-onvif-aep-device 3m
147
+
contoso-onvif-aep-media 3m
148
+
contoso-onvif-aep-ptz 3m
149
+
```
150
+
151
+
- A **DiscoveredAssetEndpointProfile** custom resource represents a video stream format that the camera exposes. The output from `kubectl get discoveredassetendpointprofiles -n azure-iot-operations` might look like the following example:
152
+
153
+
```output
154
+
NAME AGE
155
+
contoso-onvif-aep-mainstream-http 3m
156
+
contoso-onvif-aep-mainstream-rtsp 3m
157
+
contoso-onvif-aep-mainstream-tcp 3m
158
+
contoso-onvif-aep-mainstream-udp 3m
159
+
contoso-onvif-aep-minorstream-http 3m
160
+
contoso-onvif-aep-minorstream-rtsp 3m
161
+
contoso-onvif-aep-minorstream-tcp 3m
162
+
contoso-onvif-aep-minorstream-udp 3m
163
+
```
145
164
146
165
Currently, during public preview, you must manually create the **Asset** and **AssetEndpointProfile** custom resources that represent the capabilities of the camera and its video streams.
147
166
148
167
### Access the PTZ capabilities of the camera
149
168
150
-
Use the PTZ capabilities of an ONVIF compliant camera to control its position and orientation.To manually create an asset that represents the PTZ capabilities of the camera discovered previously:
169
+
Use the PTZ capabilities of an ONVIF compliant camera to control its position and orientation.To manually create an asset that represents the PTZ capabilities of the camera discovered previously:
151
170
152
171
# [Bash](#tab/bash)
153
172
@@ -203,7 +222,7 @@ The following snippet shows the bicep file that you used to create the asset. Th
203
222
204
223
### Access the media capabilities of the camera
205
224
206
-
To use the PTZ capabilities of an ONVIF-complian camera, you need a profile token from the camera's media service. To manually create an asset that represents the media capabilities of the camera discovered previously:
225
+
To manually create an asset that represents the media capabilities of the camera discovered previously:
207
226
208
227
# [Bash](#tab/bash)
209
228
@@ -257,6 +276,117 @@ The following snippet shows the bicep file that you used to create the asset. Th
The camera can send notifications such as motion detected events to the Azure IoT Operations cluster. The connector for ONVIF subscribes to the camera's event service and publishes the events to the Azure IoT Operations MQTT broker.
282
+
283
+
To find the events that camera can send, use the following command to view the description of the **DiscoveredAsset** custom resource that represents the camera. The discovered asset that lists the supported events has a `-device` suffix to the asset name:
Last Updated On: 2025-04-23T15:48:21.585506712+00:00
313
+
Name: tns1:RuleEngine/TamperDetector/Tamper
314
+
Topic:
315
+
Path:
316
+
Retain: Never
317
+
```
318
+
319
+
During public preview, you must manually add an asset definition based on the information in the discovered asset. To manually create an asset that represents the media capabilities of the camera discovered previously:
$CUSTOM_LOCATION_NAME = (az iot ops list -g $RESOURCE_GROUP --query "[0].extendedLocation.name" -o tsv)
362
+
363
+
# Use the Bicep file to deploy the asset
364
+
az deployment group create --subscription $SUBSCRIPTION_ID --resource-group $RESOURCE_GROUP --template-file asset-onvif-device.bicep --parameters customLocationName=$CUSTOM_LOCATION_NAME aepName=$AEP_NAME
365
+
```
366
+
367
+
---
368
+
369
+
The following snippet shows the bicep file that you used to create the asset. The `-device` suffix to the asset name is a required convention to indicate that the asset represents the device capabilities of the camera:
The connector for ONVIF now receives notifications of motion detected events from the camera and publishes them to the `data/camera-device` topic in the MQTT broker:
To interact with the ONVIF camera, you can publish MQTT messages that the connector for ONVIF subscribes to. The message format is based on the [ONVIF network interface specifications](https://www.onvif.org/profiles/specifications/).
@@ -274,4 +404,4 @@ To manually create an asset endpoint and asset that enable access to the video s
274
404
275
405
1. During public preview, first use a tool to discover the RTSP stream URLs of the camera.
276
406
277
-
1. Use the RTSP stream URL to create the asset endpoint and asset. To lean more, see [Configure the media connector (preview)](howto-use-media-connector.md).
407
+
1. Use the RTSP stream URL to create the asset endpoint and asset. To learn more, see [Configure the media connector (preview)](howto-use-media-connector.md).
0 commit comments