Toolkit makes Azure IoT Development easier. For more awesome Azure IoT projects and resources, please visit https://aka.ms/azure.iot
Upgrade to Microsoft offical Azure IoT Toolkit extension
This extension is deprecated. It is moved to Microsoft offical Azure IoT Toolkit extension. Please uninstall this extension and install the offical extension.
[x] Device Explorer
[x] Send messages to Azure IoT Hub (device-to-cloud message)
[x] Monitor device-to-cloud messages
[x] Code snippet for IoT Hub
[x] Send messages to Azure Event Hub
[x] Monitor Event Hub messages
[x] Send/monitor messages from Azure IoT Hub to device (cloud-to-device message)
[x] Device management (List, Create, Delete)
[x] Discover devices connected via Ethernet, USB serial and WiFi
[x] Deploy and run in remote machine
[x] Invoke Direct Method
[x] Get/update Device Twin
[ ] Debug in remote machines
[ ] And more...
- 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
- In Explorer of VS Code, click "IoT Hub Devices" in the bottom left corner.
- If you have not set Iot Hub Connection String before, an input box will pop up, then enter your Iot Hub Connection String (It is one-time configuration).
- The device list will be shown.
Command | Keyboard Shortcuts | Menu Contexts |
---|---|---|
IoT: Send message to IoT Hub | Ctrl+Alt+F9 | view/item/context |
IoT: Start monitoring IoT Hub message | Ctrl+Alt+F10 | view/title |
IoT: Stop monitoring IoT Hub message | Ctrl+Alt+F11 | editor/context (in output panel) |
IoT: Send C2D message to device | None | view/item/context |
IoT: Start monitoring C2D message | None | view/item/context |
IoT: Stop monitoring C2D message | None | editor/context (in output panel) |
IoT: Send message to Event Hub | None | editor/context |
IoT: Start monitoring Event Hub message | None | editor/context |
IoT: Stop monitoring Event Hub message | None | editor/context (in output panel) |
IoT: List device | Ctrl+Alt+F1 | None |
IoT: Create device | Ctrl+Alt+F2 | view/title |
IoT: Delete device | Ctrl+Alt+F3 | view/item/context |
IoT: Discover connected device | Ctrl+Alt+F6 | editor/context |
IoT: Deploy to remote machine | Ctrl+Alt+F4 | None |
IoT: Run in remote machine | Ctrl+Alt+F5 | None |
- Code Snippets
Trigger | Content |
---|---|
iotSendD2CMessage | Send D2C message to IoT Hub |
iotMonitorD2CMessage | Monitor D2C message for IoT Hub |
iotSendC2DMessage | Send C2D message to device |
iotMonitorC2DMessage | Monitor C2D message from IoT Hub |
iotCallDirectMethods | Send direct methods to device |
iotReceiveDirectMethods | Receive direct methods from IoT Hub |
After code snippet is created, you need to install corresponding npm package (e.g. azure-iot-device-mqtt) to run the code snippet. If you want to 'Run Code' directly, you need to install Code Runner.
- Send/monitor messages for Azure Event Hub
- Deploy and run in remote machine
Config | description |
---|---|
azure-iot-toolkit.localFolder | The folder of current machine to deploy |
azure-iot-toolkit.remoteFolder | The folder of remote machine to deploy |
azure-iot-toolkit.host | The hostname or IP address of remote machine |
azure-iot-toolkit.username | The username of remote machine |
azure-iot-toolkit.password | The password of remote machine |
azure-iot-toolkit.command | The command to run in remote machine |
-
Discover Ethernet, USB serial, WiFi devices
- Install Node.js or install device-discovery-cli:
$ npm install --global device-discovery-cli
- Discover devices in VS Code:
To set the Device Connection String which is used to send device-to-cloud message or other functions as a device simulator:
{
"azure-iot-toolkit.deviceConnectionString": "HostName=<my-hub>.azure-devices.net;DeviceId=<known-device-id>;SharedAccessKey=<known-device-key>"
}
To set the IoT Hub Connection String to monitor device-to-cloud message or other functions as a service simulator:
{
"azure-iot-toolkit.iotHubConnectionString": "HostName=<my-hub>.azure-devices.net;SharedAccessKeyName=<my-policy>;SharedAccessKey=<my-policy-key>"
}
To set the IoT Hub Consumer Group (default is "$Default"):
{
"azure-iot-toolkit.iotHubConsumerGroup": "$Default"
}
To set the Event Hub Connection String:
{
"azure-iot-toolkit.eventHubConnectionString": "{Event Hubs connection string}"
}
To set the Event Hub Path:
{
"azure-iot-toolkit.eventHubPath": "{Event Hub path/name}"
}
To set the Event Hub Consumer Group (default is "$Default"):
{
"azure-iot-toolkit.eventHubConsumerGroup": "$Default"
}
To set whether to show verbose info when monitoring messages (default is true
):
{
"azure-iot-toolkit.showVerboseMessage": true
}
To set whether to stringify device-to-cloud messages (default is true
):
{
"azure-iot-toolkit.iotHubD2CMessageStringify": true
}
By default, anonymous telemetry data collection is turned on to understand user behavior to improve this extension. To disable it, update the settings.json as below:
{
"azure-iot-toolkit.enableAppInsights": false
}
See Change Log here
Submit the issues if you find any bug or have any suggestion.
Fork the repo and submit pull requests.