Rediger

Del via


IoT asset and device development

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-based services such as IoT Hub, while assets connect to edge-based services in your environment such as Azure IoT Operations. This article includes information about both assets and devices.

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:

Diagram that shows the high-level IoT solution architecture highlighting asset connectivity areas.

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 ONVIF. Azure IoT Operations includes various connectors that can use these protocols to communicate with assets and translate messages from the assets into MQTT messages. Some assets can receive messages enabling you to perform operations on them such as:

  • Pan or tilt a security camera.
  • Change the logging level on a robotic arm.
  • Initiate a firmware update.

You can create your own, custom connectors to connect to assets that use protocols not natively supported by Azure IoT Operations.

Asset and device types

An IoT solution can contain many types of assets and devices. You typically find devices in cloud-based solutions and assets in edge-based solutions. It's also possible to have a hybrid solutions that contain both devices and assets.

Example assets in an edge-based solution include:

  • Robotic arms, conveyor belts, and elevators.
  • Industrial CNC machines, lathes, saws, and drills.
  • Medical diagnostic imaging machines.
  • Security video cameras.
  • Software or software components
  • Programmable logic controllers.

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.

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.

Modeling and schemas

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.

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:

Screenshot that shows an example asset definition.

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.

Containerization

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.

Azure IoT Operations containerizes all its connectors, brokers, and other components that run on the edge. Azure IoT Operations 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.

You can view a solution that uses Azure IoT Edge as an edge-based gateway to IoT Hub as a hybrid solution that includes elements of both edge-based and cloud-based solutions.

Device development tools

The following table lists some of the available IoT device development tools:

Tool Description
Azure IoT Hub (VS Code extension) This VS Code extension lets you manage your IoT Hub resources and devices from within VS Code.
Azure IoT explorer This cross-platform tool lets you manage your IoT Hub resources and devices from a desktop application.
Azure IoT extension for Azure CLI 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.