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
Use the Azure IoT Hub device SDK and service SDK to develop applications that handle common device twin tasks. Device twins are JSON documents that store device state information including metadata, configurations, and conditions. IoT Hub persists a device twin for each device that connects to it. You can use device twins to:
19
19
20
-
* Store device metadata from your solution back end.
21
-
* Report current state information such as available capabilities and conditions, for example, the connectivity method used, from your device app.
22
-
* Synchronize the state of long-running workflows, such as firmware and configuration updates, between a device app and a back-end app.
23
-
* Query your device metadata, configuration, or state.
20
+
* Store device metadata from your solution back end
21
+
* Report current state information such as available capabilities and conditions, for example, the connectivity method used, from your device app
22
+
* Synchronize the state of long-running workflows, such as firmware and configuration updates, between a device app and a back-end app
23
+
* Query your device metadata, configuration, or state
24
24
25
25
For more information about device twins, including when to use device twins, see [Understand device twins](iot-hub-devguide-device-twins.md).
This article shows you how to develop two types of applications. Device apps can handle requests to update desired properties and respond with changes to reported properties. Service apps can update device twin tags, set new desired properties, and query devices based on device twin values.
29
+
This article shows you how to develop two types of applications:
30
+
31
+
* Device apps can handle requests to update desired properties and respond with changes to reported properties.
32
+
* Service apps can update device twin tags, set new desired properties, and query devices based on device twin values.
30
33
31
34
> [!NOTE]
32
35
> This article is meant to complement [Azure IoT SDKs](iot-hub-devguide-sdks.md) samples that are referenced from within this article. You can use SDK tools to build both device and back-end applications.
@@ -37,8 +40,6 @@ This article shows you how to develop two types of applications. Device apps can
37
40
38
41
***A registered device**. Some SDK calls require the device primary connection string, so make a note of the connection string.
39
42
40
-
* Make sure that **port 8883** is open in your firewall. The device sample in this article 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)](../iot/iot-mqtt-connect-to-iot-hub.md#connecting-to-iot-hub).
41
-
42
43
***IoT Hub service connection string**
43
44
44
45
In this article, you create a back-end service that adds desired properties to a device twin and then queries the identity registry to find all devices with reported properties that have been updated accordingly. Your service needs the **service connect** permission to modify desired properties of a device twin, and it needs the **registry read** permission to query the identity registry. There is no default shared access policy that contains only these two permissions, so you need to create one.
0 commit comments