Handy Tool When You Develop With Azure IoT
IoT Application Development is naturally more complicated than regular application development, in that even the simplest E2E IoT application involves a long chain from device layer, to communication layer, then to the cloud and beyond. This makes the development especially the testing and debugging difficult. Even though there are corresponding tools exist at each layer, switching development environment and tools is not a pleasant experience.
In a typical IoT Development scenario, for example, working with Azure IoT Hub, developers often need to work with the device connected to the IoT Hub, sending test messages between device and IoT Hub, and monitoring the message flow. Without a handy tool, developers have to print messages through Serial Monitor on device end, and use different set of tools or even the web browsers to trace the message sent and received from IoT Hub.
We are glad that a community contributor Jun Han, who is also Microsoft employee, donated his personal VS Code extension and converted it into official extension: “Azure IoT Toolkit”
It provides some key features that help IoT developers to easily interact with Azure IoT Hub, and the devices connected to it:
- Device management
- List devices
- Get device info
- Create device
- Delete device
- Interact with Azure IoT Hub
- Send D2C message to IoT Hub
- Monitor IoT Hub D2C message
- Send C2D message to device
- Monitor C2D message from IoT Hub
- Invoke Direct Method
- Get/update Device Twin
The tool is very easy to use:
Once installed from VS Code Marketplace or directly from within VS Code extension panel, a tab will show:
For the fist time you may be prompted to input your IoT Hub’s connection string, which you can get from Azure Portal (a reference can be found on Azure IoT Documentation)
Upon successful connection, the panel should list all devices connected to the IoT Hub. and right click any device, you can follow the menu to perform a series of operations.
The Tool Kit also helps you to create code snippet to simplify the coding process:
The animated gif below also provide some examples on using the Azure IoT Toolkit to perform basic IoT Hub operations such as D2C message, and manage Devices, etc.
The Azure IoT Toolkit works well with our previously released Arduino extension, so that using the same VS Code, you can develop, test and debug both the device end and cloud end applications.