Anteckning
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Med IoT Plug and Play kan lösningsbyggare integrera IoT-enheter med sina lösningar utan någon manuell konfiguration. At the core of IoT Plug and Play, is a device model that describes a device's capabilities to an IoT Plug and Play-enabled application. This model is structured as a set of interfaces that define:
- Properties that represent the read-only or writable state of a device or other entity. For example, a device serial number is a read-only property and a target temperature on a thermostat is a writable property.
- Telemetri som är de data som genereras av en enhet, oavsett om data är en vanlig ström av sensoravläsningar, ett tillfälligt fel eller ett informationsmeddelande.
- Kommandon som beskriver en funktion eller åtgärd som kan utföras på en enhet. Ett kommando kan till exempel starta om en gateway eller ta en bild med hjälp av en fjärrkamera.
Every model and interface has a unique ID.
The following diagram shows the key elements of an IoT Plug and Play solution:
Modelldatabas
The model repository is a store for curated model and interface definitions. Models and interfaces are defined using the Digital Twins Definition Language (DTDL).
The web UI lets you search for and retrieve the models and interfaces.
Devices
A device builder implements the code to run on an IoT device using one of the Azure IoT device SDKs. The device SDKs help the device builder to:
- Connect securely to an IoT hub.
- Register the device with your IoT hub and announce the model ID that identifies the collection of DTDL interfaces the device implements.
- Synchronize the properties defined in the DTDL interfaces between the device and your IoT hub.
- Add command handlers for the commands defined in the DTDL interfaces.
- Send telemetry to the IoT hub.
IoT Edge gateway
An IoT Edge gateway acts as an intermediary to connect IoT Plug and Play devices that can't connect directly to an IoT hub. To learn more, see How an IoT Edge device can be used as a gateway.
IoT Edge modules
An IoT Edge module lets you deploy and manage business logic on the edge. Azure IoT Edge-moduler är den minsta beräkningsenheten som hanteras av IoT Edge och kan innehålla Azure-tjänster (till exempel Azure Stream Analytics) eller din egen lösningsspecifika kod.
The IoT Edge hub is one of the modules that make up the Azure IoT Edge runtime. It acts as a local proxy for IoT Hub by exposing the same protocol endpoints as IoT Hub. This consistency means that clients (whether devices or modules) can connect to the IoT Edge runtime just as they would to IoT Hub.
The device SDKs help a module builder to:
- Use the IoT Edge hub to connect securely to your IoT hub.
- Register the module with your IoT hub and announce the model ID that identifies the collection of DTDL interfaces the device implements.
- Synchronize the properties defined in the DTDL interfaces between the device and your IoT hub.
- Add command handlers for the commands defined in the DTDL interfaces.
- Send telemetry to the IoT hub.
IoT Hub
IoT Hub is a cloud-hosted service that acts as a central message hub for bi-directional communication between your IoT solution and the devices it manages.
An IoT hub:
- Makes the model ID implemented by a device available to a backend solution.
- Maintains the digital twin associated with each IoT Plug and Play device connected to the hub.
- Forwards telemetry streams to other services for processing or storage.
- Routes digital twin change events to other services to enable device monitoring.
Backend solution
A backend solution monitors and controls connected devices by interacting with digital twins in the IoT hub. To implement a backend solution, use one of the Azure IoT service SDKs. To understand the capabilities of a connected device, the solution backend:
- Retrieves the model ID the device registered with the IoT hub.
- Uses the model ID to retrieve the interface definitions from any model repository.
- Uses the model parser to extract information from the interface definitions.
The backend solution can use the information from the interface definitions to:
- Read property values reported by devices.
- Update writable properties on a device.
- Call commands implemented by a device.
- Understand the format of telemetry sent by a device.
Nästa steg
Now that you have an overview of the architecture of an IoT Plug and Play solution, the next steps are to learn more about: