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
| Connected object types | IoT devices | IoT devices, and assets (a broader set of physical or virtual entities that includes IoT devices) |
118
-
| Device connectivity protocols | HTTP, AMQP, MQTT v3.1.1 | HTTP, AMQP, MQTT v3.1.1, MQTT v5. In [Azure IoT Operations](../iot-operations/overview-iot-operations.md), connectors enable other protocols. Azure IoT Operations includes OPC UA connector, media connector, and ONVIF connector. Custom connectors are possible. |
118
+
| Device connectivity protocols | HTTP, AMQP, MQTT v3.1.1 | HTTP, AMQP, MQTT v3.1.1, MQTT v5. In [Azure IoT Operations](../iot-operations/overview-iot-operations.md), connectors enable other protocols. Azure IoT Operations includes connector for OPC UA, media connector, and connector for ONVIF. Custom connectors are possible. |
119
119
| Device implementation | Microsoft IoT device SDKs and embedded device SDKs | Microsoft IoT device SDKs and embedded device SDKs |
120
120
| Device management |[IoT DPS](../iot-dps/index.yml), [Device Update](../iot-hub-device-update/index.yml), [IoT Central](../iot-central/index.yml)| In Azure IoT Operations, use [Azure Device Registry](../iot-operations/discover-manage-assets/overview-manage-assets.md). Use Akri to enable automated asset/device discovery with native protocols. In [IoT Edge](../iot-edge/index.yml), use [IoT DPS](../iot-dps/index.yml) for large-scale device management.|
Copy file name to clipboardExpand all lines: articles/iot/iot-overview-device-development.md
+84-30Lines changed: 84 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,33 @@
1
1
---
2
-
title: Device development introduction
3
-
description: An overview of Azure IoT device development including an introduction to the device SDKs, modeling, IoT Edge modules, and a survey of the available tools.
2
+
title: Asset and device development introduction
3
+
description: An overview of Azure IoT asset and device development including an introduction to the device SDKs, modeling, IoT Edge modules, and a survey of the available tools.
4
4
ms.service: azure-iot
5
5
services: iot
6
6
author: dominicbetts
7
7
ms.author: dobett
8
8
ms.topic: overview
9
9
ms.date: 02/28/2024
10
10
ms.custom: template-overview
11
-
# Customer intent: As a solution builder or device developer I want a high-level overview of the issues around device development so that I can easily find relevant content.
11
+
# Customer intent: As a solution builder or asset/device developer I want a high-level overview of the issues around asset and device development so that I can easily find relevant content.
12
12
---
13
13
14
-
# IoT device development
14
+
# IoT asset and device development
15
15
16
-
This overview introduces the key concepts around developing devices that connect to a typical Azure IoT solution. Each section includes links to content that provides further detail and guidance.
16
+
This overview introduces the key concepts around developing assets and devices that connect to typical Azure IoT solutions. Each section includes links to content that provides further detail and guidance. Typically, devices connect directly to cloud services such as IoT Hub and assets connect to services in your edge environment such as Azure IoT Operations. This article includes information about both assets and devices.
17
17
18
-
The following diagram shows a high-level view of the components in a typical IoT solution. This article focuses on the devices and gateway shown in the diagram.
18
+
# [Edge-based solution](#tab/edge)
19
19
20
-
:::image type="content" source="media/iot-overview-device-development/iot-architecture.svg" alt-text="Diagram that shows the high-level IoT solution architecture highlighting device connectivity areas." border="false":::
20
+
The following diagram shows a high-level view of the components in a typical edge-based IoT solution. This article focuses on the assets and connectors shown in the diagram:
21
+
22
+
:::image type="content" source="media/iot-overview-device-development/iot-edge-architecture.svg" alt-text="Diagram that shows the high-level IoT solution architecture highlighting asset connectivity areas." border="false":::
23
+
24
+
Assets typically have built-in firmware that that implements standard protocols. For example, a robotic arm might be an OPC UA client and a security video might implement ONVIF. Azure IoT Operations includes various connectors that can use these protocols to assets, and translate messages from the assets into MQTT messages. You can create your own, custom connectors to connect to assets that use protocols not natively supported by Azure IoT Operations.
25
+
26
+
# [Cloud-based solution](#tab/cloud)
27
+
28
+
The following diagram shows a high-level view of the components in a typical cloud-based IoT solution. This article focuses on the devices and gateway shown in the diagram:
29
+
30
+
:::image type="content" source="media/iot-overview-device-development/iot-cloud-architecture.svg" alt-text="Diagram that shows the high-level IoT solution architecture highlighting device connectivity areas." border="false":::
21
31
22
32
In Azure IoT, a device developer writes the code to run on the devices in the solution. This code typically:
23
33
@@ -28,9 +38,37 @@ In Azure IoT, a device developer writes the code to run on the devices in the so
28
38
- Enables the installation of software updates from the cloud.
29
39
- Enables the device to keep functioning while disconnected from the cloud.
30
40
31
-
## Device types
41
+
---
42
+
43
+
## Asset and device types
44
+
45
+
An IoT solution can contain many types of [assets](iot-glossary.md#asset) and [devices](iot-glossary.md#device). You typically find devices in cloud-based solutions and assets in edge-based solutions, but this rule isn't absolute.
46
+
47
+
# [Edge-based solution](#tab/edge)
32
48
33
-
IoT devices can be separated into two broad categories, microcontrollers (MCUs) and microprocessors (MPUs):
49
+
Example assets in an edge-based solution include:
50
+
51
+
- Robotic arms, conveyor belts, and elevators.
52
+
- Industrial CNC machines, lathes, saws, and drills.
53
+
- Medical diagnostic imaging machines.
54
+
- Security video cameras.
55
+
- Software or software components
56
+
- Programmable logic controllers.
57
+
58
+
These assets typically have built-in firmware that implements standard protocols. For example, a robotic arm might be an OPC UA client and a security video camera might implement the ONVIF protocol. In an edge-based solution, you use specialized connectors to connect to these assets and translate messages from them into a common format.
59
+
60
+
For assets, there's no direct equivalent to the device developer role. Instead, an operator can configure the connectors to connect to the assets. However, you might need to develop custom connectors to connect to assets that use protocols not natively supported by your edge-based solution.
61
+
62
+
# [Cloud-based solution](#tab/cloud)
63
+
64
+
Example devices in a cloud-based solution include:
65
+
66
+
- A pressure sensor on a remote oil pump.
67
+
- Temperature and humidity sensors in an air-conditioning unit.
68
+
- An accelerometer in an elevator.
69
+
- Presence sensors in a room.
70
+
71
+
These devices are typically built using microcontrollers (MCUs) or microprocessors (MPUs):
34
72
35
73
- MCUs are less expensive and simpler to operate than MPUs.
36
74
- An MCU contains many of the functions, such as memory, interfaces, and I/O on the chip itself. An MPU accesses this functionality from components in supporting chips.
@@ -44,9 +82,9 @@ Examples of specialized hardware and operating systems include:
44
82
45
83
[Azure Sphere](/azure-sphere/product-overview/what-is-azure-sphere) is a secure, high-level application platform with built-in communication and security features for internet-connected devices. It comprises a secured, connected, crossover MCU, a custom high-level Linux-based operating system, and a cloud-based security service that provides continuous, renewable security.
46
84
47
-
##Primitives
85
+
### Device primitives
48
86
49
-
An Azure IoT device can use the following primitives to interact with the cloud:
87
+
A device developer typically implements the following primitives in device code to interact with the cloud:
50
88
51
89
-*Device-to-cloud* messages to send time series telemetry to the cloud. For example, temperature data collected from a sensor attached to the device.
52
90
-*File uploads* for media files such as captured images and video. Intermittently connected devices can send telemetry batches. Devices can compress uploads to save bandwidth.
@@ -57,7 +95,7 @@ An Azure IoT device can use the following primitives to interact with the cloud:
57
95
58
96
To learn more, see [Device-to-cloud communications guidance](../iot-hub/iot-hub-devguide-d2c-guidance.md) and [Cloud-to-device communications guidance](../iot-hub/iot-hub-devguide-c2d-guidance.md).
59
97
60
-
##Device SDKs
98
+
### SDKs and libraries
61
99
62
100
The device SDKs provide high-level abstractions that let you use the primitives without knowledge of the underlying communications protocols. The device SDKs also handle the details of establishing a secure connection to the cloud and authenticating the device.
-[Azure SDK for Embedded C](https://github.com/Azure/azure-sdk-for-c)
77
115
78
-
## Samples and guidance
116
+
###Samples and guidance
79
117
80
118
All of the device SDKs include samples that demonstrate how to use the SDK to connect to the cloud, send telemetry, and use the other primitives.
81
119
82
120
The [IoT device development](./concepts-iot-device-development.md) site includes tutorials and how-to guides that show you how to implement code for a range of device types and scenarios.
83
121
84
122
You can find more samples in the [code sample browser](/samples/browse/?expanded=azure&products=azure-iot%2Cazure-iot-edge%2Cazure-iot-pnp%2Cazure-rtos).
85
123
86
-
To learn more about implementing automatic reconnections to endpoints, see [Manage device reconnections to create resilient applications](./concepts-manage-device-reconnections.md).
87
-
88
-
## Device development without a device SDK
124
+
### Device development without a device SDK
89
125
90
126
Although you're recommended to use one of the device SDKS, there might be scenarios where you prefer not to. In these scenarios, your device code must directly use one of the communication protocols that IoT Hub and the Device Provisioning Service (DPS) support.
91
127
@@ -94,9 +130,23 @@ For more information, see:
94
130
-[Using the MQTT protocol directly (as a device)](iot-mqtt-connect-to-iot-hub.md#using-the-mqtt-protocol-directly-as-a-device)
95
131
-[Using the AMQP protocol directly (as a device)](../iot-hub/iot-hub-amqp-support.md#device-client)
96
132
97
-
## Device modeling
133
+
---
134
+
135
+
## Modeling and schemas
136
+
137
+
Device and asset models define the data that devices and assets exchange with the cloud. Models enable a range of low-code or no-code scenarios for integrating your devices and assets with your IoT solution.
138
+
139
+
# [Edge-based solution](#tab/edge)
140
+
141
+
In an edge-based solution, an operator configures connectors to connect to assets. This configuration includes a mapping between the asset's data and a cloud schema. For example, the OPC UA connector lets the operator map OPC UA node Ids to tags and events in a JSON message exchanged with the MQTT broker. The following screenshot shows an example in the digital operations experience web UI that defines two such mappings for an asset:
142
+
143
+
:::image type="content" source="media/iot-overview-device-development/add-tag.png" alt-text="Screenshot that shows an example asset definition.":::
98
144
99
-
IoT Plug and Play enables solution builders to integrate IoT devices with their solutions without any manual configuration. At the core of IoT Plug and Play, is a device model that a device uses to advertise its capabilities to an IoT Plug and Play-enabled application such as IoT Central. This model is structured as a set of elements that define:
145
+
Elsewhere in the solution, an operator can refer directly to the **Temperature** and **Tag 10** tags without needing to know the details of the OPC UA node Ids.
146
+
147
+
# [Cloud-based solution](#tab/cloud)
148
+
149
+
In a cloud-based solution, IoT Plug and Play enables solution builders to integrate IoT devices with their solutions without any manual configuration. At the core of IoT Plug and Play, is a device model that a device uses to advertise its capabilities to an IoT Plug and Play-enabled application such as IoT Central. This model is structured as a set of elements that define:
100
150
101
151
-*Properties* that represent the read-only or writable state of a device or other entity. For example, a device serial number might be a read-only property and a target temperature on a thermostat might be a writable property.
102
152
-*Telemetry* that's the data emitted by a device, whether the data is a regular stream of sensor readings, an occasional error, or an information message.
@@ -106,7 +156,7 @@ You can group these elements in interfaces to reuse across models to make collab
106
156
107
157
The model is specified by using the [Digital Twins Definition Language (DTDL)](https://github.com/Azure/opendigitaltwins-dtdl).
108
158
109
-
The use of IoT Plug and Play, modeling, and DTDL is optional. You can use the IoT device primitives without using IoT Plug and Play or modeling. The [Azure Digital Twins](../digital-twins/overview.md) service also uses DTDL models to create twin graphs based on digital models of environments such as buildings or factories.
159
+
The use of IoT Plug and Play, modeling and DTDL is optional. You can use the IoT device primitives without using IoT Plug and Play or modeling. The [Azure Digital Twins](../digital-twins/overview.md) service also uses DTDL models to create twin graphs based on digital models of environments such as buildings or factories.
110
160
111
161
As a device developer, when you implement an IoT Plug and Play device there are a set of conventions to follow. These conventions provide a standard way to implement the device model in code by using the primitives available in the device SDKs.
112
162
@@ -115,7 +165,17 @@ To learn more, see:
115
165
-[What is IoT Plug and Play?](../iot/overview-iot-plug-and-play.md)
116
166
-[IoT Plug and Play modeling guide](../iot/concepts-modeling-guide.md)
117
167
118
-
## Containerized device code
168
+
---
169
+
170
+
## Containerization
171
+
172
+
Containerization is a way to package and run your code in a lightweight, isolated environment. Containers are portable and can run on any platform that supports the container runtime. Containers are a good way to package and deploy your code because they provide a consistent runtime environment for your code. The runtime environment typically includes the services, libraries, and packages that your code needs to run.
173
+
174
+
# [Edge-based solution](#tab/edge)
175
+
176
+
Azure IoT Operations containerizes all its connectors, brokers, and other components that run on the edge. Azure IoT Edge deploys to a Kubernetes cluster, which is a container orchestration platform. Deploy any custom connectors or other components that you create to the Kubernetes cluster.
177
+
178
+
# [Cloud-based solution](#tab/cloud)
119
179
120
180
If you use containers, such as in Docker, to run your device code you can deploy code to your devices by using the capabilities of the container infrastructure. Containers also let you define a runtime environment for your code with all the required library and package versions installed. Containers make it easier to deploy updates and to manage the lifecycle of your IoT devices.
121
181
@@ -124,20 +184,14 @@ Azure IoT Edge runs device code in containers. You can use Azure IoT Edge to dep
124
184
> [!TIP]
125
185
> Azure IoT Edge enables multiple scenarios. In addition to running your IoT device code in containers, you can use Azure IoT Edge to run Azure services on your devices and implement [field gateways](iot-overview-device-connectivity.md#field-gateways). For more information, see [What is Azure IoT Edge?](../iot-edge/about-iot-edge.md)
126
186
127
-
## Development tools
187
+
---
128
188
129
-
The following table lists some of the available IoT development tools:
189
+
## Device development tools
190
+
191
+
The following table lists some of the available IoT device development tools:
130
192
131
193
| Tool | Description |
132
194
| --- | --- |
133
195
|[Azure IoT Hub (VS Code extension)](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-toolkit)| This VS Code extension lets you manage your IoT Hub resources and devices from within VS Code. |
134
196
|[Azure IoT explorer](howto-use-iot-explorer.md)| This cross-platform tool lets you manage your IoT Hub resources and devices from a desktop application. |
135
197
|[Azure IoT extension for Azure CLI](/cli/azure/service-page/azure%20iot)| This CLI extension includes commands such as `az iot device simulate`, `az iot device c2d-message`, and `az iot hub monitor-events` that help you test interactions with devices. |
136
-
137
-
## Next steps
138
-
139
-
Now that you've seen an overview of device development in Azure IoT solutions, some suggested next steps include:
0 commit comments