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-media-connector.md
+33-47Lines changed: 33 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,45 +84,9 @@ Make a note of this value, you use it later to access the media server.
84
84
85
85
## Configure the media connector (preview)
86
86
87
-
Before you begin, configure an endpoint that doesn't use TLS that you can use to connect to the MQTT broker. Create a YAML file with the following content:
87
+
To configure the media connector, you need to create an asset endpoint that defines the connection to the media source. The asset endpoint includes the URL of the media source, the type of media source, and any credentials needed to access the media source.
88
88
89
-
```yaml
90
-
apiVersion: mqttbroker.iotoperations.azure.com/v1
91
-
kind: BrokerListener
92
-
metadata:
93
-
name: aio-broker-notls
94
-
namespace: azure-iot-operations
95
-
spec:
96
-
brokerRef: default
97
-
serviceType: LoadBalancer
98
-
ports:
99
-
- port: 1883
100
-
protocol: Mqtt
101
-
102
-
---
103
-
104
-
apiVersion: v1
105
-
kind: Service
106
-
metadata:
107
-
name: aio-broker-notls
108
-
namespace: azure-iot-operations
109
-
spec:
110
-
type: LoadBalancer
111
-
ports:
112
-
- port: 1883
113
-
targetPort: 1883
114
-
```
115
-
116
-
To apply the settings, run the following command. Typically, you apply the settings to the `azure-iot-operations` namespace:
> These settings are not secure and should only be used for testing purposes.
124
-
125
-
To configure the asset endpoint, create a YAML file with the following content. Replace the placeholders with your camera's username, password, and RTSP address. An RTSP address looks like `rtsp://<CAMERA IP ADDRESS>:555/onvif-media/media.amp?streamprofile=Profile1&audio=1`
89
+
To create the asset endpoint, create a YAML file with the following content. Replace the placeholders with your camera's username, password, and RTSP address. An RTSP address looks like `rtsp://<CAMERA IP ADDRESS>:555/onvif-media/media.amp?streamprofile=Profile1&audio=1`
126
90
127
91
```yaml
128
92
apiVersion: v1
@@ -216,13 +180,35 @@ To add the asset, run the following command. Typically, you apply the settings t
> Use your favorite MQTT client to subscribe to the topic `aio/asset/contoso-rtsp-snapshot-to-mqtt-autostart/snapshot` to view the snapshots.
183
+
To verify that snapshots are publishing to the MQTT broker, use the **mosquitto_sub** tool. In this example, you run the **mosquitto_sub** tool inside a pod in your Kubernetes cluster:
184
+
185
+
1. Run the following command to deploy a pod that includes the **mosquitto_pub** and **mosquitto_sub** tools that are useful for interacting with the MQTT broker in the cluster:
> This configuration isn't secure. Don't use this configuration in a production environment.
193
+
194
+
1. When the **mqtt-client** pod is running, run the following command to create a shell environment in the pod you created:
195
+
196
+
```console
197
+
kubectl exec --stdin --tty mqtt-client -n azure-iot-operations -- sh
198
+
```
199
+
200
+
1. At the Bash shell in the **mqtt-client** pod, run the following command to connect to the MQTT broker using the **mosquitto_sub** tool subscribed to the `azure-iot-operations/data` topic:
This command continues to run and displays messages as they arrive on the `azure-iot-operations/data` topic until you press **Ctrl+C** to stop it. The output shows the topic the message was published to and its size. To exit the shell environment, type `exit`.
221
207
222
208
When you finish testing the asset, you can delete it by running the following command:
@@ -265,12 +251,12 @@ To view the files, create a shell in the pod. Use the full name of the pod in th
265
251
kubectl exec --stdin --tty aio-opc-media-1-* -n <AIO NAMESPACE> -- sh
266
252
```
267
253
268
-
Then navigate to the following folder to view the files: `\tmp\azure-iot-operations\data\contoso-rtsp-snapshot-to-fs-autostart\snapshot`. The folder name includes the name of your asset.
254
+
Then navigate to the following folder to view the files: `/tmp/azure-iot-operations/data/contoso-rtsp-snapshot-to-fs-autostart/snapshot`. The folder name includes the name of your asset.
269
255
270
256
When you finish testing the asset, you can delete it by running the following command:
@@ -313,12 +299,12 @@ To view the files, create a shell in the pod. Use the full name of the pod in th
313
299
kubectl exec --stdin --tty aio-opc-media-1-* -n <AIO NAMESPACE> -- sh
314
300
```
315
301
316
-
Then navigate to the following folder to view the files: `\tmp\azure-iot-operations\data\contoso-rtsp-clip-to-fs-autostart\clip`. The folder name includes the name of your asset.
302
+
Then navigate to the following folder to view the files: `/tmp/azure-iot-operations/data/contoso-rtsp-clip-to-fs-autostart/clip`. The folder name includes the name of your asset.
317
303
318
304
When you finish testing the asset, you can delete it by running the following command:
To view the media stream, use a URL that looks like: `https://<YOUR MEDIA SERVER IP ADDRESS>:8888/azure-iot-operations/data/contoso-rtsp-stream-to-rtsp-autostart/`.
337
+
To view the media stream, use a URL that looks like: `https://<YOUR KUBERNETES CLUSTER IP ADDRESS>:8888/azure-iot-operations/data/contoso-rtsp-stream-to-rtsp-autostart/`.
352
338
353
339
> [!TIP]
354
340
> If you're running Azure IoT Operations in Codespaces, run the following command to port forward the media server to your local machine: `kubectl port-forward service/media-server-public 8888:8888 -n media-server`.
355
341
356
342
When you finish testing the asset, you can delete it by running the following command:
Copy file name to clipboardExpand all lines: articles/iot-operations/discover-manage-assets/overview-onvif-connector.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,8 +43,6 @@ The connector for ONVIF is part of Azure IoT Operations. The connector deploys t
43
43
44
44
-_Assets_, in Azure IoT Operations are logical entities that you create to represent real assets such as cameras. An Azure IoT Operations ONVIF camera asset identifies the ONVIF network service the camera exposes, such as PTZ.
45
45
46
-
- The Azure IoT Operations experience web UI provides a unified experience for you to manage assets such as cameras. You can use the operations experience to configure the assets and asset endpoints that the media connector uses to access media sources.
47
-
48
46
- The MQTT broker that you can use to publish messages from the connectors to other local or cloud-based components in your solution.
49
47
50
48
- The Azure Device Registry that stores information about local assets in the cloud.
0 commit comments