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
# 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.
13
12
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.
16
14
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)
17
17
18
18
## Prerequisites
19
19
@@ -28,38 +28,44 @@ Device Update for IoT Hub allows deploying an update to a group of IoT devices.
28
28
29
29
The below documentation describes how to add and update a tag.
30
30
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.
32
34
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).
36
37
37
-
#### Device Update Tag Format
38
+
#### Device Update tag format
38
39
39
40
```json
40
41
"tags": {
41
42
"ADUGroup": "<CustomTagValue>"
42
43
}
43
44
```
44
45
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).
46
52
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
48
54
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.
51
56
52
-
### Direct Twin Updates
57
+
1. Sign in to the [Azure portal](https://portal.azure.com) and navigate to your IoT Hub.
53
58
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.
55
60
56
-
1.Log into [Azure portal](https://portal.azure.com) and navigate to your IoT Hub.
61
+
1.Open the twin details.
57
62
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**.
59
65
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.
61
67
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)
Copy file name to clipboardExpand all lines: articles/iot-hub-device-update/device-update-raspberry-pi.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -214,10 +214,10 @@ Use that version number in the later "Import the update" section.
214
214
## Add a tag to your device
215
215
216
216
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.
218
218
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.
Copy file name to clipboardExpand all lines: articles/iot-hub-device-update/device-update-simulator.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -128,7 +128,7 @@ Read the license terms prior to using the agent. Your installation and use const
128
128
## Add a tag to your device
129
129
130
130
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.
132
132
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.
Copy file name to clipboardExpand all lines: articles/iot-hub-device-update/device-update-ubuntu-agent.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -138,10 +138,10 @@ Read the license terms before you use a package. Your installation and use of a
138
138
## Add a tag to your device
139
139
140
140
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.
142
142
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.
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:
22
22
23
23
* 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.
24
24
@@ -53,23 +53,23 @@ You can create a maximum of 100 automatic configurations on standard tier IoT hu
53
53
54
54
1. In the [Azure portal](https://portal.azure.com), go to your IoT hub.
55
55
56
-
2. Select **Configurations** in the left navigation pane.
56
+
2. Select **Configurations + Deployments** in the left navigation pane.
57
57
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.
59
59
60
60
:::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":::
61
61
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.
63
63
64
-
### Name and Label
64
+
### Name and label
65
65
66
66
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.
67
67
68
68
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`.
69
69
70
70
3. Select **Next** to move to the next step.
71
71
72
-
### Specify Settings
72
+
### Twin settings
73
73
74
74
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.
75
75
@@ -82,8 +82,7 @@ For example, you could set the twin path to `properties.desired.chiller-water` a
82
82
}
83
83
```
84
84
85
-

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.":::
87
86
88
87
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.
89
88
@@ -93,55 +92,53 @@ If you wish to remove an existing property, specify the property value to `null`
93
92
94
93
You can add additional settings by selecting **Add Device Twin Setting** or **Add Module Twin Setting**.
95
94
96
-
### Specify Metrics (optional)
95
+
### Target devices or modules
97
96
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.
99
98
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.
101
100
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.
103
102
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.
105
104
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.
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.
112
110
113
-
You can include a clause that the configuration was applied, for example:
111
+
### Metrics
114
112
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.
Each configuration can have up to five custom metrics.
127
116
128
-
### Target Devices
117
+
1. Enter a name for **Metric Name**.
129
118
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.
131
120
132
-
Automatic device configurations can only target device twin tags, and automatic module configurations can only target module twin tags.
121
+
For example:
133
122
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.
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:
137
129
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
+
```
139
135
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:
@@ -153,7 +150,7 @@ To view the details of a configuration and monitor the devices running it, use t
153
150
154
151
1. In the [Azure portal](https://portal.azure.com), go to your IoT hub.
155
152
156
-
2. Select **Configurations** in Device management.
153
+
2. Select **Configurations** in Device management.
157
154
158
155
3. Inspect the configuration list. For each configuration, you can view the following details:
159
156
@@ -173,13 +170,13 @@ To view the details of a configuration and monitor the devices running it, use t
173
170
174
171
5. Inspect the configuration details. You can use tabs to view specific details about the devices that received the configuration.
175
172
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.
177
174
178
175
***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**.
179
176
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.
181
178
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.
183
180
184
181
## Modify a configuration
185
182
@@ -197,16 +194,16 @@ To modify a configuration, use the following steps:
197
194
198
195
1. In the [Azure portal](https://portal.azure.com), go to your IoT hub.
199
196
200
-
2. Select **Configurations** in Device management.
197
+
2. Select **Configurations + Deployments** in Device management.
201
198
202
199
3. Select the configuration that you want to modify.
203
200
204
-
4.Make updates to the following fields:
201
+
4.You can make updates to the following fields:
205
202
206
-
* Priority
203
+
* Priority
207
204
* Metrics
208
-
* Target condition
209
-
* Labels
205
+
* Target condition
206
+
* Labels
210
207
211
208
4. Select **Save**.
212
209
@@ -218,7 +215,7 @@ When you delete a configuration, any device twins take on their next highest pri
218
215
219
216
1. In the [Azure portal](https://portal.azure.com), go to your IoT hub.
220
217
221
-
2. Select **Configurations** in Device management.
218
+
2. Select **Configurations + Deployments** in Device management.
222
219
223
220
3. Use the checkbox to select the configuration that you want to delete.
0 commit comments