Skip to content

Commit 75faef6

Browse files
authored
Merge pull request #212286 from kgremban/sep22-hubui
Devices and Configurations+Deployments UI changes
2 parents 85847dc + 710ab9d commit 75faef6

File tree

7 files changed

+79
-76
lines changed

7 files changed

+79
-76
lines changed

articles/iot-hub-device-update/create-update-group.md

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ ms.service: iot-hub-device-update
99
---
1010

1111
# Create device groups in Device Update for IoT Hub
12-
Device Update for IoT Hub allows deploying an update to a group of IoT devices.
1312

14-
> [!NOTE]
15-
> If you would like to deploy to a default group instead of a user-created group, you can directly move to [How to Deploy an Update](deploy-update.md)
13+
Device Update for IoT Hub allows deploying an update to a group of IoT devices.
1614

15+
> [!NOTE]
16+
> If you would like to deploy to a default group instead of a user-created group, you can directly move to [How to deploy an update](deploy-update.md)
1717
1818
## Prerequisites
1919

@@ -28,38 +28,44 @@ Device Update for IoT Hub allows deploying an update to a group of IoT devices.
2828

2929
The below documentation describes how to add and update a tag.
3030

31-
### Programmatically update Device Twin
31+
### Programmatically update device twins
32+
33+
You can update a device twin with the appropriate tag using RegistryManager after enrolling the device with Device Update.
3234

33-
You can update the Device Twin with the appropriate Tag using RegistryManager after enrolling the device with Device Update.
34-
[Learn how to add tags using a sample .NET app.](../iot-hub/iot-hub-csharp-csharp-twin-getstarted.md)
35-
[Learn about tag properties](../iot-hub/iot-hub-devguide-device-twins.md#tags-and-properties-format).
35+
* [Learn how to add tags using a sample .NET app.](../iot-hub/iot-hub-csharp-csharp-twin-getstarted.md)
36+
* [Learn about tag properties](../iot-hub/iot-hub-devguide-device-twins.md#tags-and-properties-format).
3637

37-
#### Device Update Tag Format
38+
#### Device Update tag format
3839

3940
```json
4041
"tags": {
4142
"ADUGroup": "<CustomTagValue>"
4243
}
4344
```
4445

45-
### Using Jobs
46+
### Using jobs
47+
48+
It is possible to schedule a job on multiple devices to add or update a Device Update tag. For examples, see [Schedule jobs on multiple devices](../iot-hub/iot-hub-devguide-jobs.md). You can update a device twin or module twin (if the Device Update agent is set up as a module identity) using jobs. For more information, see [Schedule and broadcast jobs](../iot-hub/iot-hub-csharp-csharp-schedule-jobs.md).
49+
50+
> [!NOTE]
51+
> This action counts against your IoT Hub messages quota and it is recommended to change only up to 50,000 device or module twin tags at a time otherwise you may need to buy more IoT Hub units if you exceed your daily IoT Hub message quota. Details can be found at [Quotas and throttling](../iot-hub/iot-hub-devguide-quotas-throttling.md#quotas-and-throttling).
4652
47-
It is possible to schedule a Job on multiple devices to add or update a Device Update tag following [these](../iot-hub/iot-hub-devguide-jobs.md) examples. You can update Device Twin or Module Twin (if Device Update agent is set up as a Module Identity) using Jobs. [Learn more](../iot-hub/iot-hub-csharp-csharp-schedule-jobs.md).
53+
### Direct twin updates
4854

49-
> [!NOTE]
50-
> This action goes against your current IOT Hub messages quota and it is recommended to change only up to 50,000 device or module twin Tags at a time otherwise you may need to buy more IoT Hub units if you exceed your daily IoT Hub message quota. Details can be found at [Quotas and throttling](../iot-hub/iot-hub-devguide-quotas-throttling.md#quotas-and-throttling).
55+
Tags can also be added or updated in a device twin or module twin directly.
5156

52-
### Direct Twin Updates
57+
1. Sign in to the [Azure portal](https://portal.azure.com) and navigate to your IoT Hub.
5358

54-
Tags can also be added or updated in Device twin or Module Twin directly.
59+
1. Select **Devices** from the navigation menu and select your IoT device to open its device details.
5560

56-
1. Log into [Azure portal](https://portal.azure.com) and navigate to your IoT Hub.
61+
1. Open the twin details.
5762

58-
2. From **Devices** or **IoT Edge** on the left navigation pane find your IoT device and navigate to the Device Twin, or the Device Update Module and then its Module Twin (this will be available if Device Update agent is set up as a Module Identity).
63+
* If the Device Update agent is configured as a device identity, select **Device twin**.
64+
* If the Device Update agent is configured as a module identity, select the Device Update module and then **Module identity twin**.
5965

60-
3. In the Device Twin or Module Twin, delete any existing Device Update tag value by setting them to null.
66+
1. In the device twin or module twin, delete any existing Device Update tag value by setting them to null.
6167

62-
4. Add a new Device Update tag value as shown below. [Example device twin JSON document with tags.](../iot-hub/iot-hub-devguide-device-twins.md#device-twins)
68+
1. Add a new Device Update tag value as shown below. [Example device twin JSON document with tags.](../iot-hub/iot-hub-devguide-device-twins.md#device-twins)
6369

6470
```JSON
6571
"tags": {

articles/iot-hub-device-update/device-update-raspberry-pi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,10 @@ Use that version number in the later "Import the update" section.
214214
## Add a tag to your device
215215

216216
1. Sign in to the [Azure portal](https://portal.azure.com) and go to the IoT hub.
217-
1. On the left pane, under **Devices** or **IoT Edge**, find your IoT device and go to the device twin or module twin.
217+
1. On the left pane, under **Devices**, find your IoT device and go to the device twin or module twin.
218218
1. In the module twin of the Device Update agent module, delete any existing Device Update tag values by setting them to null. If you're using the device identity with the Device Update agent, make these changes on the device twin.
219219
1. Add a new Device Update tag value, as shown:
220-
220+
221221
```JSON
222222
"tags": {
223223
"ADUGroup": "<CustomTagValue>"

articles/iot-hub-device-update/device-update-simulator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Read the license terms prior to using the agent. Your installation and use const
128128
## Add a tag to your device
129129

130130
1. Sign in to the [Azure portal](https://portal.azure.com) and go to the IoT hub.
131-
1. From **Devices** or **IoT Edge** on the left pane, find your IoT device and go to the device twin or module twin.
131+
1. From **Devices** on the left pane, find your IoT device and go to the device twin or module twin.
132132
1. In the module twin of the Device Update agent module, delete any existing Device Update tag values by setting them to null. If you're using the device identity with a Device Update agent, make these changes on the device twin.
133133
1. Add a new Device Update tag value, as shown:
134134

articles/iot-hub-device-update/device-update-ubuntu-agent.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ Read the license terms before you use a package. Your installation and use of a
138138
## Add a tag to your device
139139
140140
1. Sign in to the [Azure portal](https://portal.azure.com) and go to the IoT hub.
141-
1. On the left pane, under **IoT Edge**, find your IoT Edge device and go to the device twin or module twin.
141+
1. On the left pane, under **Devices**, find your IoT Edge device and go to the device twin or module twin.
142142
1. In the module twin of the Device Update agent module, delete any existing Device Update tag values by setting them to null. If you're using Device identity with Device Update agent, make these changes on the device twin.
143143
1. Add a new Device Update tag value, as shown:
144-
144+
145145
```JSON
146146
"tags": {
147147
"ADUGroup": "<CustomTagValue>"

articles/iot-hub/iot-hub-automatic-device-management.md

Lines changed: 50 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
title: Automatic device management at scale with Azure IoT Hub | Microsoft Docs
3-
description: Use Azure IoT Hub automatic configurations to manage multiple IoT devices and modules
2+
title: Automatic device management at scale with Azure IoT Hub
3+
description: Use Azure IoT Hub automatic configurations to manage multiple IoT devices and modules in the Azure portal
44
author: kgremban
55
ms.service: iot-hub
66
services: iot-hub
77
ms.topic: conceptual
8-
ms.date: 10/26/2021
8+
ms.date: 09/22/2022
99
ms.author: kgremban
1010
ms.custom: ['Role: Cloud Development', 'Role: IoT Device']
1111
---
@@ -18,7 +18,7 @@ Automatic device management in Azure IoT Hub automates many of the repetitive an
1818

1919
[!INCLUDE [iot-hub-basic](../../includes/iot-hub-basic-whole.md)]
2020

21-
Automatic device management works by updating a set of device twins or module twins with desired properties and reporting a summary that's based on twin reported properties. It introduces a new class and JSON document called a *Configuration* that has three parts:
21+
Automatic device management works by updating a set of device twins or module twins with desired properties and reporting a summary that's based on twin reported properties. It introduces a new class and JSON document called a _Configuration_ that has three parts:
2222

2323
* The **target condition** defines the scope of device twins or module twins to be updated. The target condition is specified as a query on twin tags and/or reported properties.
2424

@@ -53,23 +53,23 @@ You can create a maximum of 100 automatic configurations on standard tier IoT hu
5353

5454
1. In the [Azure portal](https://portal.azure.com), go to your IoT hub.
5555

56-
2. Select **Configurations** in the left navigation pane.
56+
2. Select **Configurations + Deployments** in the left navigation pane.
5757

58-
3. Select **Add device configuration** or **Add module configuration**.
58+
3. Select **Add** and choose **Device twin configuration** or **Module twin configuration** from the drop-down list.
5959

6060
:::image type="content" source="./media/iot-hub-automatic-device-management/create-automatic-configuration.png" alt-text="Screenshot showing how to add a configuration." border="true":::
6161

62-
There are five steps to create a configuration. The following sections walk through each one.
62+
There are five steps to create a configuration. The following sections walk through each one.
6363

64-
### Name and Label
64+
### Name and label
6565

6666
1. Give your configuration a unique name that is up to 128 characters long. Lowercase letters and the following special characters are allowed: `-+%_*!'`. Spaces are not allowed.
6767

6868
2. Add labels to help track your configurations. Labels are **Name**, **Value** pairs that describe your configuration. For example, `HostPlatform, Linux` or `Version, 3.0.1`.
6969

7070
3. Select **Next** to move to the next step.
7171

72-
### Specify Settings
72+
### Twin settings
7373

7474
This section defines the content to be set in targeted device twin or module twin desired properties. There are two inputs for each set of settings. The first is the twin path, which is the path to the JSON section within the twin desired properties that will be set. The second is the JSON content to be inserted in that section.
7575

@@ -82,8 +82,7 @@ For example, you could set the twin path to `properties.desired.chiller-water` a
8282
}
8383
```
8484

85-
![Set the twin path and content](./media/iot-hub-automatic-device-management/module-config-twin-settings.png)
86-
85+
:::image type="content" source="./media/iot-hub-automatic-device-management/module-config-twin-settings.png" alt-text="Screenshot of setting the device or module twin property and json content.":::
8786

8887
You can also set individual settings by specifying the entire twin path and providing the value with no brackets. For example, with the twin path `properties.desired.chiller-water.temperature`, set the content to `66`. Then create a new twin setting for the pressure property.
8988

@@ -93,55 +92,53 @@ If you wish to remove an existing property, specify the property value to `null`
9392

9493
You can add additional settings by selecting **Add Device Twin Setting** or **Add Module Twin Setting**.
9594

96-
### Specify Metrics (optional)
95+
### Target devices or modules
9796

98-
Metrics provide summary counts of the various states that a device or module may report back after applying configuration content. For example, you may create a metric for pending settings changes, a metric for errors, and a metric for successful settings changes.
97+
Use the tags property from your twins to target the specific devices or modules that should receive this configuration. You can also target twin reported properties.
9998

100-
Each configuration can have up to five custom metrics.
99+
Automatic device configurations can only target device twin tags, and automatic module configurations can only target module twin tags.
101100

102-
1. Enter a name for **Metric Name**.
101+
Since multiple configurations may target the same device or module, each configuration needs a priority number. If there's ever a conflict, the configuration with the highest priority wins.
103102

104-
2. Enter a query for **Metric Criteria**. The query is based on device twin reported properties. The metric represents the number of rows returned by the query.
103+
1. Enter a positive integer for the configuration **Priority**. The highest numerical value is considered the highest priority. If two configurations have the same priority number, the one that was created most recently wins.
105104

106-
For example:
105+
2. Enter a **Target condition** to determine which devices or modules will be targeted with this configuration. The condition is based on twin tags or twin reported properties and should match the expression format.
107106

108-
```sql
109-
SELECT deviceId FROM devices
110-
WHERE properties.reported.chillerWaterSettings.status='pending'
111-
```
107+
For automatic device configuration, you can specify just the tag or reported property to target. For example, `tags.environment='test'` or `properties.reported.chillerProperties.model='4000x'`. You can specify `*` to target all devices.
108+
109+
For automatic module configuration, use a query to specify tags or reported properties from the modules registered to the IoT hub. For example, `from devices.modules where tags.environment='test'` or `from devices.modules where properties.reported.chillerProperties.model='4000x'`. The wildcard cannot be used to target all modules.
112110

113-
You can include a clause that the configuration was applied, for example:
111+
### Metrics
114112

115-
```sql
116-
/* Include the double brackets. */
117-
SELECT deviceId FROM devices
118-
WHERE configurations.[[yourconfigname]].status='Applied'
119-
```
120-
121-
If you're building a metric to report on configured modules, select `moduleId` from `devices.modules`. For example:
113+
Metrics provide summary counts of the various states that a device or module may report back after applying configuration content. For example, you may create a metric for pending settings changes, a metric for errors, and a metric for successful settings changes.
122114

123-
```sql
124-
SELECT deviceId, moduleId FROM devices.modules
125-
WHERE properties.reported.lastDesiredStatus.code = 200
126-
```
115+
Each configuration can have up to five custom metrics.
127116

128-
### Target Devices
117+
1. Enter a name for **Metric Name**.
129118

130-
Use the tags property from your twins to target the specific devices or modules that should receive this configuration. You can also target twin reported properties.
119+
2. Enter a query for **Metric Criteria**. The query is based on device twin reported properties. The metric represents the number of rows returned by the query.
131120

132-
Automatic device configurations can only target device twin tags, and automatic module configurations can only target module twin tags.
121+
For example:
133122

134-
Since multiple configurations may target the same device or module, each configuration needs a priority number. If there's ever a conflict, the configuration with the highest priority wins.
123+
```sql
124+
SELECT deviceId FROM devices
125+
WHERE properties.reported.chillerWaterSettings.status='pending'
126+
```
135127

136-
1. Enter a positive integer for the configuration **Priority**. The highest numerical value is considered the highest priority. If two configurations have the same priority number, the one that was created most recently wins.
128+
You can include a clause that the configuration was applied, for example:
137129

138-
2. Enter a **Target condition** to determine which devices or modules will be targeted with this configuration. The condition is based on twin tags or twin reported properties and should match the expression format.
130+
```sql
131+
/* Include the double brackets. */
132+
SELECT deviceId FROM devices
133+
WHERE configurations.[[yourconfigname]].status='Applied'
134+
```
139135

140-
For automatic device configuration, you can specify just the tag or reported property to target. For example, `tags.environment='test'` or `properties.reported.chillerProperties.model='4000x'`. You can specify `*` to target all devices.
141-
142-
For automatic module configuration, use a query to specify tags or reported properties from the modules registered to the IoT hub. For example, `from devices.modules where tags.environment='test'` or `from devices.modules where properties.reported.chillerProperties.model='4000x'`. The wildcard cannot be used to target all modules.
136+
If you're building a metric to report on configured modules, select `moduleId` from `devices.modules`. For example:
143137

144-
3. Select **Next** to move on to the final step.
138+
```sql
139+
SELECT deviceId, moduleId FROM devices.modules
140+
WHERE properties.reported.lastDesiredStatus.code = 200
141+
```
145142

146143
### Review Configuration
147144

@@ -153,7 +150,7 @@ To view the details of a configuration and monitor the devices running it, use t
153150

154151
1. In the [Azure portal](https://portal.azure.com), go to your IoT hub.
155152

156-
2. Select **Configurations** in Device management.
153+
2. Select **Configurations ** in Device management.
157154

158155
3. Inspect the configuration list. For each configuration, you can view the following details:
159156

@@ -173,13 +170,13 @@ To view the details of a configuration and monitor the devices running it, use t
173170

174171
5. Inspect the configuration details. You can use tabs to view specific details about the devices that received the configuration.
175172

176-
* **Target Condition** - the devices or modules that match the target condition.
173+
* **Target Devices** or **Target Modules** - the devices or modules that match the target condition.
177174

178175
* **Metrics** - a list of system metrics and custom metrics. You can view a list of devices or modules that are counted for each metric by selecting the metric in the drop-down and then selecting **View Devices** or **View Modules**.
179176

180-
* **Device Twin Settings** or **Module Twin Settings** - the twin settings that are set by the configuration.
177+
* **Labels** - key-value pairs used to describe a configuration. Labels have no impact on functionality.
181178

182-
* **Configuration Labels** - key-value pairs used to describe a configuration. Labels have no impact on functionality.
179+
* **Device Twin Settings** or **Module Twin Settings** - the twin settings that are set by the configuration, if any.
183180

184181
## Modify a configuration
185182

@@ -197,16 +194,16 @@ To modify a configuration, use the following steps:
197194

198195
1. In the [Azure portal](https://portal.azure.com), go to your IoT hub.
199196

200-
2. Select **Configurations** in Device management.
197+
2. Select **Configurations + Deployments** in Device management.
201198

202199
3. Select the configuration that you want to modify.
203200

204-
4. Make updates to the following fields:
201+
4. You can make updates to the following fields:
205202

206-
* Priority
203+
* Priority
207204
* Metrics
208-
* Target condition
209-
* Labels
205+
* Target condition
206+
* Labels
210207

211208
4. Select **Save**.
212209

@@ -218,7 +215,7 @@ When you delete a configuration, any device twins take on their next highest pri
218215

219216
1. In the [Azure portal](https://portal.azure.com), go to your IoT hub.
220217

221-
2. Select **Configurations** in Device management.
218+
2. Select **Configurations + Deployments** in Device management.
222219

223220
3. Use the checkbox to select the configuration that you want to delete.
224221

5.86 KB
Loading
2.29 KB
Loading

0 commit comments

Comments
 (0)