Module identity and module twin provides the same capabilities as device identity and device twin but at a finer granularity. This finer granularity enables capable devices, such as operating system based devices or firmware devices managing multiple components, to isolate configuration and conditions for each of those components.
For example, you have a vending machine that has three different sensors. Each sensor is controlled by different departments in your company. You can create a module for each sensor. This way, each department is only able to send jobs or direct methods to the sensor that they control, avoiding conflicts and user errors.
With the v1.4.0 release of Azure IoT Toolkit, it supports module management. You could easily create module, view module twin, update module twin, invoke module direct method and delete module in VS Code.
Right-click your device and select Create Module, enter a module ID and the new module will be created in a few seconds.
Edit Module Twin
Right-click your edge module and select Edit Module Twin, edit the module twin, then right-click in the editor and select Update Module Twin to take effect.
Note: Azure IoT Edge system modules are read-only and cannot be modified. Changes can be submitted via deploying a configuration.
Invoke Module Direct Method
Right-click your module and select Invoke Module Direct Method, then enter the method name and payload, results will be shown in OUTPUT > Azure IoT Toolkit view.
Right-click your module and select Delete Module, the selected module will be deleted in a few seconds.
Monitor D2C Message for Module
One more thing! Now you could see the module id when you are monitoring D2C message sent from a module.
If you have any feedback or suggestion, feel free to submit an issue in our GitHub !
- Channel 9 video: Walkthrough of Azure IoT Toolkit extension
- Create an IoT hub using the Azure IoT Toolkit for Visual Studio Code
- Use Azure IoT Toolkit to send and receive messages between your device and IoT Hub
- Use Azure IoT Toolkit for Azure IoT Hub device management
- Quickly build your Azure IoT application with Node.js, Python or REST API
- Azure IoT Toolkit supports C#, Go, Java, Node.js, PHP, Python and Ruby to develop Azure IoT application in VS Code
- Use VS Code as IoT Hub Device Simulator
- Use VS Code to call Azure IoT Hub REST APIs
- Create and control an IoT device connected to an IoT hub (Node.js)
- Create and control an IoT device connected to an IoT hub (.NET)
- Handy Tool When You Develop With Azure IoT
- Azure IoT Toolkit for Visual Studio Code generally available for managing Azure IoT Hub and Devices with ease