Azure IoT Hub extension for Visual Studio Code
Перейти к файлу
Takashi Matsuoka 780dcd8256
Add Japanese (#526)
2021-06-17 15:37:16 -07:00
.github/workflows Replace TravisCI pipeline with github action workflows (#506) 2021-03-11 10:48:34 -08:00
.vscode Use Webpack to improve extension performance (#226) 2018-12-20 17:14:07 +08:00
external_lib/dummy-json Include dummy json source code in order to fix handlebles vulnerability (#452) 2020-02-12 09:55:07 +08:00
images Add DPS support (#419) 2019-10-21 14:48:54 +08:00
resources Fix a bunch of Event Hub connection string changes (#492) 2020-09-03 11:40:12 -07:00
scripts Separate AI key for prod and test environment (#82) 2018-04-16 15:39:52 +08:00
snippets Only provide module completion in correct JSON path (#57) 2017-12-18 15:16:27 +08:00
src Fix a bunch of Event Hub connection string changes (#492) 2020-09-03 11:40:12 -07:00
test Package vulnerability updates and 2.16.6 RC (#508) 2021-02-17 17:22:54 -08:00
.gitattributes Force EOF of package.json and package-lock.json as LF 2017-11-29 09:54:59 +08:00
.gitignore Enhance send D2C message feature (#383) 2019-09-24 11:57:11 +08:00
.travis.yml Fix travis secret 2021-02-18 11:42:46 -08:00
.vscodeignore Switch to VS Code built-in clipboard API (#272) 2019-02-19 15:09:22 +08:00
CHANGELOG.md Package vulnerability updates and 2.16.6 RC (#508) 2021-02-17 17:22:54 -08:00
CONTRIBUTING.md Add CONTRIBUTING.md 2017-03-02 20:14:47 +08:00
LICENSE.txt Rename (#441) 2019-12-24 14:59:10 +08:00
README.md Fix #446, fix #447 (#448) 2019-12-27 12:54:00 +08:00
ThirdPartyNotice.html Update third party notice (#462) 2020-03-27 21:52:11 +08:00
appveyor.yml Fix CI failure due to azure-iothub breaking change 2017-03-01 22:34:19 +08:00
logo.png 2.0.0 (#224) 2018-12-13 10:38:38 +08:00
package-lock.json Bump underscore from 1.9.1 to 1.13.1 (#519) 2021-05-12 17:15:09 +00:00
package.json Bump handlebars from 4.7.6 to 4.7.7 (#522) 2021-05-12 10:07:16 -07:00
package.nls.ja.json Add Japanese (#526) 2021-06-17 15:37:16 -07:00
package.nls.json Rename (#441) 2019-12-24 14:59:10 +08:00
tsconfig.json Add dom libraries for RequestInit 2020-08-25 13:48:25 -07:00
tslint.json Update version to 0.2.1, update BI, handle devices with X.509 cert (#9) 2017-08-24 14:40:05 +08:00
webpack.config.js [Dependency Security] Webpack 5 updates to bump SSRI to 8.0.1 (#515) 2021-04-06 10:26:51 -07:00

README.md

Azure IoT Hub

Join the chat at https://gitter.im/Microsoft/azure-iot-toolkit Marketplace Version

Azure IoT Hub extension is now a part of Azure IoT Tools extension pack. We highly recommend installing Azure IoT Tools extension pack, which makes it easy to discover and interact with Azure IoT Hub that power your IoT Edge and device applications. This extension pack can help you:

  • Develop and connect your Azure IoT Applications to Azure. With this extension, you can interact with an Azure IoT Hub, manage connected devices, and enable distributed tracing for your Azure IoT applications.
  • Develop and debug Certifies Azure IoT Devices (including MXChip IoT DevKit, ESP32, Raspberry Pi) to Azure. This extension pack makes it easy to code, build, deploy and debug your IoT applications with popular IoT development boards.
  • Develop and deploy artificial intelligence and your custom logic to Azure IoT Edge. This extension pack makes it easy to code, build, deploy, and debug your IoT Edge applications.

Overview

Interact with Azure IoT Hub, IoT Device Management, IoT Edge Management, IoT Hub Device Simulation, IoT Hub Code Generation and IoT Hub Device Provisioning Service.

Device Explorer

The Wiki page includes a comprehensive getting started guide as well as detailed usage instructions of the following features:

  • IoT Hub management
    • Create IoT Hub
    • Select IoT Hub
    • Copy IoT Hub Connection String
    • Generate SAS Token for IoT Hub
  • Device management
    • List devices
    • Get device info
    • Create IoT device
    • Create Edge device
    • Delete device
    • Copy Device Connection String
    • Generate SAS Token for Device
  • Module management
    • List Modules
    • Get Module Info
    • Create Module
    • Edit Module Twin
    • Invoke Module Direct Method
    • Copy Module Connection String
    • Delete Module
  • Interact with Azure IoT Hub
    • Generate Code for C#, F#, Go, Java, Node.js, PHP, Python, Ruby or REST API
    • Send D2C message to IoT Hub
    • Monitor Built-in Event Endpoint
    • Send C2D message to device
    • Receive C2D message from IoT Hub
    • Invoke Device Direct Method
    • Edit Device Twin
    • Manage Azure IoT distributed tracing
  • Interact with Azure IoT Edge (Install Azure IoT Edge for more IoT Edge support)
    • List Modules
    • Edit Module Twin
    • Create deployment for Single Device
    • Create Deployment at Scale
  • Endpoints management
    • List Built-in and Custom Endpoints
    • Monitor Custom Event Hub Endpoint

Prerequisites

  1. In Explorer of VS Code, click "Azure IoT Hub" in the bottom left corner.

Click Device Explorer

  1. Click "Set IoT Hub Connection String" in context menu.

Set Connection String

  1. An input box will pop up, then enter your IoT Hub Connection String (It is one-time configuration, and please make sure it is IoT Hub Connection String not Device Connection String. The format is HostName=<my-hub>.azure-devices.net;SharedAccessKeyName=<my-policy>;SharedAccessKey=<my-policy-key>).

Enter Connection String

  1. The devices list will be shown.

Device Explorer

Sign in to Azure

Instead of copying and pasting to set IoT Hub Connection String, you could sign in to Azure to select IoT Hub from your Azure Subscription.

  1. Click "Select IoT Hub" in context menu.

Select IoT Hub

  1. If you have not signed in to Azure, a pop-up will show to let you sign in to Azure.
  2. After you sign in, your Azure Subscription list will be shown, then select an Azure Subscription.
  3. Your IoT Hub list will be shown, then select an IoT Hub.
  4. The devices and endpoints list will be shown.

IoT Hub Explorer

Device Provisioning Service Explorer

  1. Open "Azure" view on the Activity Bar, and expand "IOT HUB DEVICE PROVISIONING SERVICE".

DPS Explorer

  1. If you're not signed in, click "Sign in to Azure..." to sign in.

  2. Expand one subscription to start exploring your device provisioning services.

Code Generation

Code Generation

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

Snippet

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.

Configuration

IoT Hub Consumer Group (default is "$Default"):

{
    "azure-iot-toolkit.iotHubConsumerGroup": "$Default"
}

The time span (in minutes) of monitoring D2C message before current time (default is 0):

{
    "azure-iot-toolkit.monitorD2CBeforeNowInMinutes": 0
}

Whether to show verbose info when monitoring messages (default is false):

{
    "azure-iot-toolkit.showVerboseMessage": false
}

Whether to stringify device-to-cloud messages (default is false):

{ 
    "azure-iot-toolkit.iotHubD2CMessageStringify": false
}

Whether to show IoT Hub info when IoT Hub Connection String is not set (default is true):

{ 
    "azure-iot-toolkit.showIoTHubInfo": true
}

Whether to enable auto refresh of tree view (default is false):

{ 
    "azure-iot-toolkit.treeViewAutoRefreshEnable": false
}

Time interval in seconds for tree view auto refresh, auto refresh has to be enabled for it to work. (default is 60):

{ 
    "azure-iot-toolkit.treeViewAutoRefreshIntervalInSeconds": 60
}

Resources

❤️ Contributors

Thanks to all the contributors!

Data/Telemetry

This project collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more. If you dont wish to send usage data to Microsoft, you can set the telemetry.enableTelemetry setting to false. Learn more in our FAQ.