Skip to content

Commit e2d9900

Browse files
committed
Added device twin tag link, minor Acrolinx fixes
1 parent c442da5 commit e2d9900

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

articles/iot-hub/twin-getstarted-cli.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Get started with Azure IoT Hub device twins (Azure CLI)
3-
description: How to use Azure IoT Hub device twins to add tags and then use an IoT Hub query to filter device twins. You use the Azure CLI to create and simulate a device on your IoT hub, add tags to its corresponding device twin, and then run IoT Hub queries to filter the device twins on your IoT hub.
3+
description: How to use Azure IoT Hub device twins and the Azure CLI to create and simulate devices, add tags to device twins, and execute IoT Hub queries.
44
author: kgremban
55

66
ms.service: iot-hub
@@ -24,9 +24,9 @@ This article shows you how to:
2424

2525
This article shows you how to create two Azure CLI sessions:
2626

27-
* A session that creates a simulated device. The simulated device is configured to report its connectivity channel as a reported property on the device's corresponding device twin when initialized.
27+
* A session that creates a simulated device. The simulated device reports its connectivity channel as a reported property on the device's corresponding device twin when initialized.
2828

29-
* A session that updates the tags of the device twin for the simulated device, then queries devices from your IoT hub using filters on the tags and properties previously updated in both sessions.
29+
* A session that updates the tags of the device twin for the simulated device, then queries devices from your IoT hub. The queries use filters based on the tags and properties previously updated in both sessions.
3030

3131
## Prerequisites
3232

@@ -91,7 +91,7 @@ To create and start a simulated device:
9191
az iot hub device-identity create --device-id {DeviceName} --hub-name {HubName}
9292
```
9393
94-
1. In the first CLI session, run the [az iot device simulate](/cli/azure/iot/device#az-iot-device-simulate) command, replacing the following placeholders with their corresponding values. This command simulates the device you created in the previous step. The simulated device is configured to report its connectivity channel as a reported property on the device's corresponding device twin when initialized.
94+
1. In the first CLI session, run the [az iot device simulate](/cli/azure/iot/device#az-iot-device-simulate) command, replacing the following placeholders with their corresponding values. This command simulates the device you created in the previous step. The command also configures the simulated device to report its connectivity channel as a reported property on the device's corresponding device twin when initialized.
9595
9696
*{DeviceName}*. The name of your simulated device.
9797
@@ -107,7 +107,7 @@ To create and start a simulated device:
107107
108108
## Update the device twin
109109
110-
Once a device identity is created, a device twin is implicitly created in IoT Hub. In this section, you use the second CLI session to update a set of tags on the device twin associated with the device identity you created in the previous section.
110+
Once a device identity is created, a device twin is implicitly created in IoT Hub. In this section, you use the second CLI session to update a set of tags on the device twin associated with the device identity you created in the previous section. You can use device twin tags to organize and manage devices in your IoT solutions. For more information about managing devices using tags, see [How to manage devices using device twin tags in Azure IoT Hub](iot-hubs-manage-device-twin-tags.md).
111111
112112
1. Confirm that the simulated device in the first CLI session is running. If not, restart it by running the [az iot device simulate](/cli/azure/iot/device#az-iot-device-simulate) command again from [Create and simulate a device](#create-and-simulate-a-device).
113113
@@ -180,9 +180,9 @@ Once a device identity is created, a device twin is implicitly created in IoT Hu
180180
}
181181
```
182182
183-
## Query your IoT hub for devices
183+
## Query your IoT hub for device twins
184184
185-
IoT Hub exposes the device twins for your IoT hub as a document collection called **devices**. In this section, you use the second CLI session to execute two queries on the set of device twins for your IoT hub: the first query selects only the device twins of devices located in the **Redmond43** plant, and the second refines the query to select only the devices that are also connected through a cellular network. Both queries are configured to return only the first 100 devices in the result set.
185+
IoT Hub exposes the device twins for your IoT hub as a document collection called **devices**. In this section, you use the second CLI session to execute two queries on the set of device twins for your IoT hub: the first query selects only the device twins of devices located in the **Redmond43** plant, and the second refines the query to select only the devices that are also connected through a cellular network. Both queries return only the first 100 devices in the result set. For more information about device twin queries, see [Queries for IoT Hub device and module twins](query_twins.md).
186186
187187
1. Confirm that the simulated device in the first CLI session is running. If not, restart it by running the [az iot device simulate](/cli/azure/iot/device#az-iot-device-simulate) command again from [Create and simulate a device](#create-and-simulate-a-device).
188188

includes/iot-hub-selector-twin-get-started.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ Use device twins to:
2626

2727
* Query your device metadata, configuration, or state.
2828

29-
Device twins are designed for synchronization and for querying device configurations and conditions. More information on when to use device twins can be found in [Understand device twins](../articles/iot-hub/iot-hub-devguide-device-twins.md).
29+
Device twins are designed for synchronization and for querying device configurations and conditions. For more information about device twins, including when to use device twins, see [Understand device twins](../articles/iot-hub/iot-hub-devguide-device-twins.md).
3030

31-
Device twins are stored in an IoT hub and contain the following elements:
31+
IoT hubs store device twins, which contain the following elements:
3232

3333
* **Tags**. Device metadata accessible only by the solution back end.
3434

3535
* **Desired properties**. JSON objects modifiable by the solution back end and observable by the device app.
3636

3737
* **Reported properties**. JSON objects modifiable by the device app and readable by the solution back end.
3838

39-
Tags and properties cannot contain arrays, but objects can be nested.
39+
Tags and properties can't contain arrays, but can contain nested objects.
4040

4141
The following illustration shows device twin organization:
4242

0 commit comments

Comments
 (0)