Skip to content

Commit 23d80f9

Browse files
committed
Merge branch 'main' of https://github.com/MicrosoftDocs/azure-docs-pr into aznet-namechange
2 parents 7246732 + 35ca410 commit 23d80f9

File tree

2 files changed

+23
-10
lines changed

2 files changed

+23
-10
lines changed

articles/iot-develop/concepts-convention.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ title: IoT Plug and Play conventions | Microsoft Docs
33
description: Description of the conventions IoT Plug and Play expects devices to use when they send telemetry and properties, and handle commands and property updates.
44
author: rido-min
55
ms.author: rmpablos
6-
ms.date: 07/10/2020
6+
ms.date: 04/06/2022
77
ms.topic: conceptual
88
ms.service: iot-develop
99
services: iot-develop
1010
---
1111

1212
# IoT Plug and Play conventions
1313

14-
IoT Plug and Play devices should follow a set of conventions when they exchange messages with an IoT hub. IoT Plug and Play devices use the MQTT protocol to communicate with IoT Hub.
14+
IoT Plug and Play devices should follow a set of conventions when they exchange messages with an IoT hub. IoT Plug and Play devices use the MQTT protocol to communicate with IoT Hub, AMQP is supported by IoT Hub and available in some device SDKs.
1515

1616
Devices can include [modules](../iot-hub/iot-hub-devguide-module-twins.md), or be implemented in an [IoT Edge module](../iot-edge/about-iot-edge.md) hosted by the IoT Edge runtime.
1717

@@ -129,16 +129,29 @@ The device or module should confirm that it received the property by sending a r
129129
- `av` - an acknowledgment version that refers to the `$version` of the desired property. You can find this value in the desired property JSON payload.
130130
- `ad` - an optional acknowledgment description.
131131

132+
### Acknowledgment responses
133+
134+
When reporting writable properties the device should compose the acknowledgment message, using the four fields described above, to indicate the actual device state, as described in this table
135+
136+
137+
|Status(ac)|Version(av)|Value(value)|Description(av)|
138+
|:---|:---|:---|:---|
139+
|200|Desired version|Desired value|Desired property value accepted|
140+
|202|Desired version|Value accepted by the device|Desired property value accepted, update in progress (should finish with 200)|
141+
|203|0|Value set by the device|Property set from the device, not reflecting any desired|
142+
|400|Desired version|Actual value used by the device|Desired property value not accepted|
143+
|500|Desired version|Actual value used by the device|Exception when applying the property|
144+
132145
When a device starts up, it should request the device twin, and check for any writable property updates. If the version of a writable property increased while the device was offline, the device should send a reported property response to confirm that it received the update.
133146

134-
When a device starts up for the first time, it can send an initial value for a reported property if it doesn't receive an initial desired property from the hub. In this case, the device should set `av` to `1`. For example:
147+
When a device starts up for the first time, it can send an initial value for a reported property if it doesn't receive an initial desired property from the hub. In this case, the device can send the default value with `av` to `0` and `ac` to `203`. For example:
135148

136149
```json
137150
"reported": {
138151
"targetTemperature": {
139152
"value": 20.0,
140-
"ac": 200,
141-
"av": 1,
153+
"ac": 203,
154+
"av": 0,
142155
"ad": "initialize"
143156
}
144157
}
@@ -164,7 +177,7 @@ When the device reaches the target temperature it sends the following message:
164177
"targetTemperature": {
165178
"value": 20.0,
166179
"ac": 200,
167-
"av": 3,
180+
"av": 4,
168181
"ad": "Reached target temperature"
169182
}
170183
}

articles/iot-edge/iot-edge-certs.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: stevebus
55

66
ms.author: stevebus
77
ms.reviewer: kgremban
8-
ms.date: 10/25/2021
8+
ms.date: 03/28/2022
99
ms.topic: conceptual
1010
ms.service: iot-edge
1111
services: iot-edge
@@ -176,6 +176,6 @@ You can see the hierarchy of certificate depth represented in the screenshot:
176176

177177
## Next steps
178178

179-
[Understand Azure IoT Edge modules](iot-edge-modules.md)
180-
181-
[Configure an IoT Edge device to act as a transparent gateway](how-to-create-transparent-gateway.md)
179+
* For more information about how to install certificates on an IoT Edge device and reference them from the config file, see [Manage certificate on an IoT Edge device](how-to-manage-device-certificates.md).
180+
* [Understand Azure IoT Edge modules](iot-edge-modules.md)
181+
* [Configure an IoT Edge device to act as a transparent gateway](how-to-create-transparent-gateway.md)

0 commit comments

Comments
 (0)