Skip to content

Commit 7d975c0

Browse files
Merge pull request #297257 from DENKEN02MSFT/IoTFreshness_Row18
IoT Freshness - row 18
2 parents 66f46e9 + 6556e8f commit 7d975c0

10 files changed

+62
-58
lines changed

articles/iot-hub/quickstart-control-device.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.service: azure-iot-hub
77
services: iot-hub
88
ms.topic: quickstart
99
ms.custom: [mvc, mqtt, "Role: Cloud Development", devx-track-azurecli, mode-other, devx-track-dotnet, devx-track-extended-java, devx-track-python, devx-track-js]
10-
ms.date: 02/25/2022
10+
ms.date: 03/28/2025
1111
zone_pivot_groups: iot-hub-set1
1212
#Customer intent: As a developer new to IoT Hub, I need to see how to use a service application to control a device connected to the hub.
1313
---
@@ -51,4 +51,4 @@ In this quickstart, you called a direct method on a device from a service applic
5151
To learn how to route device-to-cloud messages to different destinations in the cloud, continue to the next tutorial.
5252

5353
> [!div class="nextstepaction"]
54-
> [Tutorial: Route telemetry to different endpoints for processing](tutorial-routing.md)
54+
> [Tutorial: Send device data to Azure Storage using IoT Hub message routing](tutorial-routing.md)

includes/iot-hub-cli-version-info.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
2-
title: include file
3-
description: include file
2+
title: Include file
3+
description: An include file describing the Azure IoT extension and the az extension commands you can use to list, add, and remove the Azure IoT extension.
44
services: iot-hub
55
author: SoniaLopezBravo
66
ms.service: azure-iot-hub
77
ms.topic: include
8-
ms.date: 03/05/2020
8+
ms.date: 03/28/2025
99
ms.author: sonialopez
1010
ms.custom: include file
1111
---
1212
> [!NOTE]
13-
> This article uses the newest version of the Azure IoT extension, called `azure-iot`. The legacy version is called `azure-cli-iot-ext`.You should only have one version installed at a time. You can use the command `az extension list` to validate the currently installed extensions.
13+
> This article uses the newest version of the Azure IoT extension, called `azure-iot`. The legacy version is called `azure-cli-iot-ext`. You should only have one version installed at a time. You can use the command `az extension list` to validate the currently installed extensions.
1414
>
1515
> Use `az extension remove --name azure-cli-iot-ext` to remove the legacy version of the extension.
1616
>
1717
> Use `az extension add --name azure-iot` to add the new version of the extension.
1818
>
19-
> To see what extensions you have installed, use `az extension list`.
19+
> To see what extensions are currently installed, use `az extension list`.
2020
>

includes/iot-hub-include-create-device-cli.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: SoniaLopezBravo
55
ms.author: sonialopez
66
ms.service: azure-iot-hub
77
ms.topic: include
8-
ms.date: 01/31/2023
8+
ms.date: 03/28/2025
99
---
1010

1111
A device must be registered with your IoT hub before it can connect. In this section, you use Azure CLI to create a device identity.
@@ -16,18 +16,18 @@ To create a device identity:
1616

1717
1. Run the [az iot hub device-identity create](/cli/azure/iot/hub/device-identity#az-iot-hub-device-identity-create) command in your CLI shell. This command creates the device identity.
1818

19-
*your_iot_hub_name*. Replace this placeholder below with the name you chose for your IoT hub.
19+
*YourIoTHubName*. Replace this placeholder and the surrounding braces in the following command, using the name you chose for your IoT hub. An IoT hub name must be globally unique in Azure.
2020

2121
*myDevice*. You can use this name for the device ID throughout this article, or provide a different device name.
2222

2323
```azurecli-interactive
24-
az iot hub device-identity create --device-id myDevice --hub-name {your_iot_hub_name}
24+
az iot hub device-identity create --device-id myDevice --hub-name {YourIoTHubName}
2525
```
2626
2727
1. Run the [az iot hub device-identity connection-string show](/cli/azure/iot/hub/device-identity/connection-string#az-iot-hub-device-identity-connection-string-show) command.
2828
2929
```azurecli-interactive
30-
az iot hub device-identity connection-string show --device-id myDevice --hub-name {your_iot_hub_name}
30+
az iot hub device-identity connection-string show --device-id myDevice --hub-name {YourIoTHubName}
3131
```
3232
3333
The connection string output is in the following format:
@@ -39,4 +39,4 @@ To create a device identity:
3939
1. Save the connection string in a secure location.
4040
4141
> [!NOTE]
42-
> Keep your CLI app open. You'll use it in later steps.
42+
> Keep your CLI app open. You use it in later steps.

includes/iot-hub-include-create-hub-cli.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: SoniaLopezBravo
55
ms.author: sonialopez
66
ms.service: azure-iot-hub
77
ms.topic: include
8-
ms.date: 01/31/2023
8+
ms.date: 03/28/2025
99
---
1010

1111
In this section, you use Azure CLI to create an IoT hub and a resource group. An Azure resource group is a logical container into which Azure resources are deployed and managed. An IoT hub acts as a central message hub for bi-directional communication between your IoT application and the devices.
@@ -36,8 +36,8 @@ To create an IoT hub and a resource group:
3636
3737
1. Run the [az iot hub create](/cli/azure/iot/hub#az-iot-hub-create) command to create an IoT hub. It might take a few minutes to create an IoT hub.
3838
39-
*YourIotHubName*. Replace this placeholder and the surrounding braces in the following command, using the name you chose for your IoT hub. An IoT hub name must be globally unique in Azure. Use your IoT hub name in the rest of this quickstart wherever you see the placeholder.
39+
*YourIoTHubName*. Replace this placeholder and the surrounding braces in the following command, using the name you chose for your IoT hub. An IoT hub name must be globally unique in Azure. Use your IoT hub name in the rest of this quickstart wherever you see the placeholder.
4040
4141
```azurecli-interactive
42-
az iot hub create --resource-group MyResourceGroup --name {your_iot_hub_name}
42+
az iot hub create --resource-group MyResourceGroup --name {YourIoTHubName}
4343
```

includes/iot-hub-quickstarts-clean-up-resources.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,30 @@ services: iot-hub
55
author: SoniaLopezBravo
66
ms.service: azure-iot-hub
77
ms.topic: include
8-
ms.date: 06/19/2018
8+
ms.date: 03/28/2025
99
ms.author: sonialopez
1010
ms.custom: include file
1111
---
1212

1313

14-
If you will be continuing to the next recommended article, you can keep the resources you've already created and reuse them.
14+
If you're continuing to the next recommended article, you can keep the resources you already created and reuse them.
1515

1616
Otherwise, you can delete the Azure resources created in this article to avoid charges.
1717

1818
> [!IMPORTANT]
19-
> Deleting a resource group is irreversible. The resource group and all the resources contained in it are permanently deleted. Make sure that you do not accidentally delete the wrong resource group or resources. If you created the IoT Hub inside an existing resource group that contains resources you want to keep, only delete the IoT Hub resource itself instead of deleting the resource group.
19+
> Deleting a resource group is irreversible. The resource group and all the resources contained in it are permanently deleted. Make sure that you don't accidentally delete the wrong resource group or resources. If you created the IoT hub inside an existing resource group that contains resources you want to keep, only delete the IoT Hub resource itself instead of deleting the resource group.
2020
>
2121
2222
To delete a resource group by name:
2323

2424
1. Sign in to the [Azure portal](https://portal.azure.com) and select **Resource groups**.
2525

26-
2. In the **Filter by name** textbox, type the name of the resource group containing your IoT Hub.
26+
2. In the **Filter for any field** textbox, type the name of the resource group containing your IoT hub.
2727

28-
3. To the right of your resource group in the result list, select **...** then **Delete resource group**.
28+
3. In the result list, select the resource group containing your IoT hub.
2929

30-
![Delete](./media/iot-hub-quickstarts-clean-up-resources/iot-hub-delete-resource-group.png)
30+
4. In the working pane for the resource group, select **Delete resource group** from the command bar.
3131

32-
4. You will be asked to confirm the deletion of the resource group. Type the name of your resource group again to confirm, and then select **Delete**. After a few moments, the resource group and all of its contained resources are deleted.
32+
:::image type="content" source="./media/iot-hub-quickstarts-clean-up-resources/iot-hub-delete-resource-group.png" alt-text="Screenshot that shows the working pane of a resource group in Azure portal, with the Delete resource group command highlighted in the command bar.":::
33+
34+
5. You're asked to confirm the deletion of the resource group. Type the name of your resource group again to confirm, and then select **Delete**. After a few moments, the resource group and all of its contained resources are deleted.
-13.6 KB
Loading

includes/quickstart-control-device-dotnet.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ services: iot-hub
66
ms.devlang: csharp
77
ms.topic: include
88
ms.custom: [mvc, mqtt, 'Role: Cloud Development', devx-track-azurecli]
9-
ms.date: 03/08/2022
9+
ms.date: 03/28/2025
1010
---
1111

12-
The quickstart uses two pre-written .NET applications:
12+
The quickstart uses two prewritten .NET applications:
1313

1414
* A simulated device application that responds to direct methods called from a service application. To receive the direct method calls, this application connects to a device-specific endpoint on your IoT hub.
1515

@@ -29,9 +29,9 @@ The quickstart uses two pre-written .NET applications:
2929
dotnet --version
3030
```
3131
32-
* Clone or download the [Azure IoT C# SDK](https://github.com/Azure/azure-iot-sdk-csharp) from GitHub.
32+
* Clone or download the [Microsoft Azure IoT SDK for .NET](https://github.com/Azure/azure-iot-sdk-csharp) from GitHub. The sample applications used by this quickstart are included in the SDK.
3333
34-
* Make sure that port 8883 is open in your firewall. The device sample in this quickstart uses MQTT protocol, which communicates over port 8883. This port may be blocked in some corporate and educational network environments. For more information and ways to work around this issue, see [Connecting to IoT Hub (MQTT)](../articles/iot/iot-mqtt-connect-to-iot-hub.md#connect-to-iot-hub).
34+
* Make sure that port 8883 is open in your firewall. The device sample in this quickstart uses MQTT protocol, which communicates over port 8883. This port might be blocked in some corporate and educational network environments. For more information and ways to work around this issue, see the [Connect to IoT Hub](../articles/iot/iot-mqtt-connect-to-iot-hub.md#connect-to-iot-hub) section of [Communicate with an IoT hub using the MQTT protocol](../articles/iot/iot-mqtt-connect-to-iot-hub.md).
3535
3636
[!INCLUDE [azure-cli-prepare-your-environment.md](~/reusable-content/azure-cli/azure-cli-prepare-your-environment-no-header.md)]
3737
@@ -59,9 +59,9 @@ You use this value later in the quickstart.
5959

6060
The simulated device application connects to a device-specific endpoint on your IoT hub, sends simulated telemetry, and listens for direct method calls from your hub. In this quickstart, the direct method call from the hub tells the device to change the interval at which it sends telemetry. The simulated device sends an acknowledgment back to your hub after it executes the direct method.
6161

62-
1. In a local terminal window, navigate to the root folder of the sample C# project. Then navigate to the **iothub\device\samples\getting started\SimulatedDeviceWithCommand** folder.
62+
1. In a local terminal window, navigate to the root folder of the SDK. Then, navigate to the **iothub\device\samples\getting started\SimulatedDeviceWithCommand** folder.
6363

64-
2. Run the following command to install the required packages for simulated device application:
64+
2. Run the following command to install the required packages for the simulated device application:
6565

6666
```cmd/sh
6767
dotnet restore
@@ -77,13 +77,13 @@ The simulated device application connects to a device-specific endpoint on your
7777
7878
The following screenshot shows the output as the simulated device application sends telemetry to your IoT hub:
7979
80-
![Run the simulated device](./media/quickstart-control-device-dotnet/SimulatedDevice-1.png)
80+
:::image type="content" source="./media/quickstart-control-device-dotnet/SimulatedDevice-1.png" alt-text="Screenshot of a terminal window that shows the output of the simulated device application.":::
8181
8282
## Call the direct method
8383
8484
The service application connects to a service-side endpoint on your IoT Hub. The application makes direct method calls to a device through your IoT hub and listens for acknowledgments. An IoT Hub service application typically runs in the cloud.
8585
86-
1. In another local terminal window, navigate to the root folder of the sample C# project. Then navigate to the **iothub\service\samples\getting started\InvokeDeviceMethod** folder.
86+
1. In another local terminal window, navigate to the root folder of the SDK. Then, navigate to the **iothub\service\samples\getting started\InvokeDeviceMethod** folder.
8787
8888
2. In the local terminal window, run the following commands to install the required libraries for the service application:
8989
@@ -103,8 +103,9 @@ The service application connects to a service-side endpoint on your IoT Hub. The
103103
104104
The following screenshot shows the output as the application makes a direct method call to the device and receives an acknowledgment:
105105
106-
![Run the service application](./media/quickstart-control-device-dotnet/BackEndApplication.png)
106+
:::image type="content" source="./media/quickstart-control-device-dotnet/BackEndApplication.png" alt-text="Screenshot of a terminal window that shows the result of the direct method call from the service application.":::
107+
108+
After you run the service application, you see a message in the local terminal window running the simulated device, and the rate at which it sends messages changes:
107109
108-
After you run the service application, you see a message in the console window running the simulated device, and the rate at which it sends messages changes:
109-
110-
![Change in simulated client](./media/quickstart-control-device-dotnet/SimulatedDevice-2.png)
110+
:::image type="content" source="./media/quickstart-control-device-dotnet/SimulatedDevice-2.png" alt-text="Screenshot of a terminal window that shows the direct message result and updated output from the simulated device application.":::
111+

includes/quickstart-control-device-java.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services: iot-hub
66
ms.devlang: java
77
ms.topic: include
88
ms.custom: mvc, mqtt, devx-track-java, devx-track-azurecli
9-
ms.date: 01/31/2023
9+
ms.date: 03/28/2025
1010
---
1111

1212
This quickstart uses two Java applications:
@@ -34,9 +34,9 @@ This quickstart uses two Java applications:
3434
mvn --version
3535
```
3636
37-
* Clone or download the [Azure IoT Java samples](https://github.com/Azure-Samples/azure-iot-samples-java/) from GitHub.
37+
* Clone or download the [Azure IoT Samples for Java](https://github.com/Azure-Samples/azure-iot-samples-java/) from GitHub.
3838
39-
* Make sure that port 8883 open in your firewall. The device sample in this quickstart uses MQTT protocol, which communicates over port 8883. This port may be blocked in some corporate and educational network environments. For more information and ways to work around this issue, see [Connecting to IoT Hub (MQTT)](../articles/iot/iot-mqtt-connect-to-iot-hub.md#connect-to-iot-hub).
39+
* Make sure that port 8883 is open in your firewall. The device sample in this quickstart uses MQTT protocol, which communicates over port 8883. This port might be blocked in some corporate and educational network environments. For more information and ways to work around this issue, see the [Connect to IoT Hub](../articles/iot/iot-mqtt-connect-to-iot-hub.md#connect-to-iot-hub) section of [Communicate with an IoT hub using the MQTT protocol](../articles/iot/iot-mqtt-connect-to-iot-hub.md).
4040
4141
[!INCLUDE [azure-cli-prepare-your-environment.md](~/reusable-content/azure-cli/azure-cli-prepare-your-environment-no-header.md)]
4242
@@ -54,7 +54,7 @@ This quickstart uses two Java applications:
5454
5555
You also need a _service connection string_ to enable the back-end application to connect to your IoT hub and retrieve the messages. The following command retrieves the service connection string for your IoT hub:
5656
57-
**YourIoTHubName**: Replace this placeholder below with the name you chose for your IoT hub.
57+
**YourIoTHubName**: Replace this placeholder in the following command with the name you chose for your IoT hub.
5858
5959
```azurecli-interactive
6060
az iot hub connection-string show --policy-name service --hub-name {YourIoTHubName} --output table
@@ -90,7 +90,7 @@ The simulated device application connects to a device-specific endpoint on your
9090
9191
The following screenshot shows the output as the simulated device application sends telemetry to your IoT hub:
9292
93-
![Output from the telemetry sent by the device to your IoT hub](./media/quickstart-control-device-java/iot-hub-application-send-telemetry-output.png)
93+
:::image type="content" source="./media/quickstart-control-device-java/iot-hub-application-send-telemetry-output.png" alt-text="Screenshot of a terminal window that shows the output of the simulated device application.":::
9494
9595
## Call the direct method
9696
@@ -116,8 +116,9 @@ The back-end application connects to a service-side endpoint on your IoT Hub. Th
116116
117117
The following screenshot shows the output as the application makes a direct method call to the device and receives an acknowledgment:
118118
119-
![Output as the application makes a direct method call through your IoT hub](./media/quickstart-control-device-java/iot-hub-direct-method-call-output.png)
119+
:::image type="content" source="./media/quickstart-control-device-java/iot-hub-direct-method-call-output.png" alt-text="Screenshot of a terminal window that shows the result of the direct method call from the service application.":::
120+
121+
After you run the back-end application, you see a message in the local terminal window running the simulated device, and the rate at which it sends messages changes:
120122
121-
After you run the back-end application, you see a message in the console window running the simulated device, and the rate at which it sends messages changes:
122-
123-
![Console message from device shows the rate at which it changes](./media/quickstart-control-device-java/iot-hub-sent-message-change-rate.png)
123+
:::image type="content" source="./media/quickstart-control-device-java/iot-hub-sent-message-change-rate.png" alt-text="Screenshot of a terminal window that shows the direct message result and updated output from the simulated device application.":::
124+

0 commit comments

Comments
 (0)