Update README for Device Explorer
This commit is contained in:
Родитель
2f02e5e64f
Коммит
c398b590ce
31
README.md
31
README.md
|
@ -6,11 +6,13 @@ Toolkit makes Azure IoT Development easier. For more awesome Azure IoT projects
|
|||
|
||||
## Features
|
||||
|
||||
[x] Device Explorer
|
||||
|
||||
[x] Send messages to Azure IoT Hub (device-to-cloud message)
|
||||
|
||||
[x] Monitor device-to-cloud messages
|
||||
|
||||
[x] Code snippet to send/monitor D2C message for IoT Hub
|
||||
[x] Code snippet for IoT Hub
|
||||
|
||||
[x] Send messages to Azure Event Hub
|
||||
|
||||
|
@ -28,6 +30,31 @@ Toolkit makes Azure IoT Development easier. For more awesome Azure IoT projects
|
|||
|
||||
[ ] And more...
|
||||
|
||||
## Device Explorer
|
||||
|
||||
* 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
|
||||
|
||||
### Prerequisites
|
||||
|
||||
1. In Explorer of VS Code, click "IoT Hub Devices" in the bottom left corner.
|
||||
|
||||
![Click Device Explorer](images/device-explorer-click.png)
|
||||
|
||||
2. 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).
|
||||
|
||||
![Enter Connection String](images/enter-connection-string.png)
|
||||
|
||||
3. The device list will be shown.
|
||||
|
||||
![Device Explorer](images/device-explorer.png)
|
||||
|
||||
## Commands
|
||||
|
||||
| Command | Keyboard Shortcuts | Menu Contexts |
|
||||
|
@ -66,6 +93,8 @@ Toolkit makes Azure IoT Development easier. For more awesome Azure IoT projects
|
|||
| 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](images/snippet.gif)
|
||||
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 5.6 KiB |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 38 KiB |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 7.5 KiB |
|
@ -31,7 +31,7 @@ export class DeviceExplorer extends BaseExplorer {
|
|||
});
|
||||
}
|
||||
|
||||
public async getDevice(deviceId: string){
|
||||
public async getDevice(deviceId: string) {
|
||||
let label = "Device";
|
||||
let iotHubConnectionString = await Utility.getConfig("iotHubConnectionString", "IoT Hub Connection String");
|
||||
if (!iotHubConnectionString) {
|
||||
|
|
|
@ -9,12 +9,12 @@ export class Utility {
|
|||
|
||||
public static async getConfig(id: string, name: string) {
|
||||
let config = Utility.getConfiguration();
|
||||
let value = config.get<string>(id);
|
||||
if (!value || value.startsWith("<<insert")) {
|
||||
let configValue = config.get<string>(id);
|
||||
if (!configValue || configValue.startsWith("<<insert")) {
|
||||
AppInsightsClient.sendEvent("SetConfig");
|
||||
return await vscode.window.showInputBox({
|
||||
prompt: `${name}`,
|
||||
placeHolder: `Enter your ${name}`
|
||||
placeHolder: `Enter your ${name}`,
|
||||
}).then((value: string) => {
|
||||
if (value !== undefined) {
|
||||
config.update(id, value, true);
|
||||
|
@ -23,7 +23,7 @@ export class Utility {
|
|||
return null;
|
||||
});
|
||||
}
|
||||
return value;
|
||||
return configValue;
|
||||
}
|
||||
|
||||
public static getHostName(iotHubConnectionString: string): string {
|
||||
|
|
Загрузка…
Ссылка в новой задаче