Uwaga
Dostęp do tej strony wymaga autoryzacji. Może spróbować zalogować się lub zmienić katalogi.
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować zmienić katalogi.
Usługa IoT Plug and Play umożliwia konstruktorom rozwiązań integrację urządzeń IoT z ich rozwiązaniami bez konieczności ręcznej konfiguracji. 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. Ten model jest ustrukturyzowany jako zestaw elementów, które definiują:
- Właściwości reprezentujące stan tylko do odczytu lub zapisywalny urządzenia lub innej jednostki. For example, a device serial number may be a read-only property and a target temperature on a thermostat may be a writable property.
- Dane telemetryczne , które są danymi emitowane przez urządzenie, niezależnie od tego, czy dane są zwykłym strumieniem odczytów czujników, okazjonalnym błędem, czy komunikatem informacyjnym.
- Polecenia opisujące funkcję lub operację, którą można wykonać na urządzeniu. Na przykład polecenie może ponownie uruchomić bramę lub zrobić zdjęcie przy użyciu aparatu zdalnego.
Te elementy można grupować w interfejsach, aby używać ich ponownie w różnych modelach, aby ułatwić współpracę i przyspieszyć programowanie.
To make IoT Plug and Play work with Azure Digital Twins, you define models and interfaces using the Digital Twins Definition Language (DTDL). IoT Plug and Play and the DTDL are open to the community, and Microsoft welcomes collaboration with customers, partners, and industry. Both are based on open W3C standards such as JSON-LD and RDF, which enables easier adoption across services and tooling.
There's no extra cost for using IoT Plug and Play and DTDL. Standard rates for Azure IoT Hub and other Azure services remain the same.
This article outlines:
- The typical roles associated with a project that uses IoT Plug and Play.
- How to use IoT Plug and Play devices in your application.
- How to develop an IoT device application that supports IoT Plug and Play.
Role użytkowników
IoT Plug and Play is used by two types of developer:
- A solution builder who is responsible for developing an IoT solution using Azure IoT Hub and other Azure resources, and for identifying IoT devices to integrate. To learn more, see IoT Plug and Play service developer guide.
- A device builder who creates the code that runs on a device connected to your solution. To learn more, see IoT Plug and Play device developer guide.
Use IoT Plug and Play devices
As a solution builder, you can use IoT Central or IoT Hub to develop a cloud-hosted IoT solution that uses IoT Plug and Play devices.
The web UI in IoT Central lets you monitor device conditions, create rules, and manage millions of devices and their data throughout their life cycle. IoT Plug and Play devices connect directly to an IoT Central application. Here you can use customizable dashboards to monitor and control your devices. You can also use device templates in the IoT Central web UI to create and edit DTDL models.
IoT Hub - a managed cloud service - acts as a message hub for secure, bi-directional communication between your IoT application and your devices. When you connect an IoT Plug and Play device to an IoT hub, you can use the Azure IoT explorer tool to view the telemetry, properties, and commands defined in the DTDL model.
To learn more, see IoT Plug and Play architecture
Develop an IoT device application
As a device builder, you can develop an IoT hardware product that supports IoT Plug and Play. The process includes three key steps:
Define the device model. You author a set of JSON files that define your device's capabilities using the DTDL. A model describes a complete entity such as a physical product, and defines the set of interfaces implemented by that entity. Interfaces are shared contracts that uniquely identify the telemetry, properties, and commands supported by a device. You can reuse interfaces across different models.
Implement your device software or firmware such that your telemetry, properties, and commands follow the IoT Plug and Play conventions.
Ensure the device announces the model ID as part of the MQTT connection. The Azure IoT SDKs include constructs to provide the model ID at connection time.