This commit is contained in:
formulahendry 2017-02-27 21:23:08 +08:00
Родитель ef22e03cdb
Коммит 45444637f5
5 изменённых файлов: 74 добавлений и 37 удалений

Просмотреть файл

@ -1,3 +1,7 @@
### 0.0.8 (2017-02-27)
* Send messages to Azure Event Hub
* Monitor Event Hub messages
### 0.0.7
* Show detailed info when listing devices

Просмотреть файл

@ -1,20 +1,24 @@
# Azure IoT Toolkit
Toolkit makes Azure IoT Development easier
Toolkit makes Azure IoT Development easier. For more awesome Azure IoT projects and resources, please visit https://aka.ms/azure.iot
## Features
[*] Send messages to Azure IoT Hub (device-to-cloud message)
[x] Send messages to Azure IoT Hub (device-to-cloud message)
[*] Monitor device-to-cloud messages
[x] Monitor device-to-cloud messages
[x] Send messages to Azure Event Hub
[x] Monitor Event Hub messages
[ ] Send messages from Azure IoT Hub to device (cloud-to-device message)
[*] Device management (List, Create, Delete)
[x] Device management (List, Create, Delete)
[*] Discover devices connected via Ethernet, USB serial and WiFi
[x] Discover devices connected via Ethernet, USB serial and WiFi
[*] Deploy and run in remote machine
[x] Deploy and run in remote machine
[ ] Debug in remote machines
@ -25,14 +29,17 @@ Toolkit makes Azure IoT Development easier
| Command | Keyboard Shortcuts | Menu Contexts |
| --- | --- | --- |
| Send message to IoT Hub | Ctrl+Alt+F9 | editor/context |
| Start monitoring | Ctrl+Alt+F10 | editor/context |
| Stop monitoring | Ctrl+Alt+F11 | editor/context |
| Start monitoring IoT Hub message | Ctrl+Alt+F10 | editor/context |
| Stop monitoring IoT Hub message | Ctrl+Alt+F11 | editor/context |
| Send message to Event Hub | None | editor/context |
| Start monitoring Event Hub message | None | editor/context |
| Stop monitoring Event Hub message | None | editor/context |
| List device | Ctrl+Alt+F1 | editor/context |
| Create device | Ctrl+Alt+F2 | editor/context |
| Delete device | Ctrl+Alt+F3 | editor/context |
| Discover connected device | Ctrl+Alt+F6 | editor/context |
| Deploy to remote machine | Ctrl+Alt+F4 | editor/context |
| Run in remote machine | Ctrl+Alt+F5 | editor/context |
| Deploy to remote machine | Ctrl+Alt+F4 | None |
| Run in remote machine | Ctrl+Alt+F5 | None |
## Usages
@ -44,6 +51,10 @@ Toolkit makes Azure IoT Development easier
![Monitor](images/monitor.gif)
* Send/monitor messages for Azure Event Hub
![Event Hub](images/event-hub.gif)
* Device management (List, Create, Delete)
![Device](images/device.gif)
@ -90,7 +101,28 @@ To set the IoT Hub Connection String to monitor device-to-cloud message:
To set the IoT Hub Consumer Group (default is "$Default"):
```json
{
"azure-iot-toolkit.consumerGroup": "$Default"
"azure-iot-toolkit.iotHubConsumerGroup": "$Default"
}
```
To set the Event Hub Connection String:
```json
{
"azure-iot-toolkit.eventHubConnectionString": "{Event Hubs connection string}"
}
```
To set the Event Hub Path:
```json
{
"azure-iot-toolkit.eventHubPath": "{Event Hub path/name}"
}
```
To set the Event Hub Consumer Group (default is "$Default"):
```json
{
"azure-iot-toolkit.eventHubConsumerGroup": "$Default"
}
```

Двоичные данные
images/event-hub.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 360 KiB

Просмотреть файл

@ -1,8 +1,8 @@
{
"name": "azure-iot-toolkit",
"displayName": "Azure IoT Toolkit",
"description": "Interact with Azure IoT Hub; IoT Device Management; Discover Ethernet, USB serial, WiFi connected devices; Deploy and run in remote machine (e.g. Raspberry Pi, Arduino)",
"version": "0.0.7",
"description": "Interact with Azure IoT Hub and Azure Event Hub; IoT Device Management; Discover Ethernet, USB serial, WiFi connected devices; Deploy and run in remote machine (e.g. Raspberry Pi, Arduino)",
"version": "0.0.8",
"publisher": "formulahendry",
"icon": "images/logo.png",
"engines": {
@ -48,11 +48,11 @@
},
{
"command": "azure-iot-toolkit.startMonitorIoTHubMessage",
"title": "Start monitor IoT Hub message"
"title": "Start monitoring IoT Hub message"
},
{
"command": "azure-iot-toolkit.stopMonitorIoTHubMessage",
"title": "Stop monitor IoT Hub message"
"title": "Stop monitoring IoT Hub message"
},
{
"command": "azure-iot-toolkit.sendMessageToEventHub",
@ -60,11 +60,11 @@
},
{
"command": "azure-iot-toolkit.startMonitorEventHubMessage",
"title": "Start monitor Event Hub message"
"title": "Start monitoring Event Hub message"
},
{
"command": "azure-iot-toolkit.stopMonitorEventHubMessage",
"title": "Stop monitor Event Hub message"
"title": "Stop monitoring Event Hub message"
},
{
"command": "azure-iot-toolkit.listDevice",
@ -132,52 +132,54 @@
"menus": {
"editor/context": [
{
"when": "!inOutput",
"command": "azure-iot-toolkit.sendD2CMessage",
"group": "azure-iot-toolkit"
"group": "azure-iot-toolkit-1"
},
{
"when": "!inOutput",
"command": "azure-iot-toolkit.startMonitorIoTHubMessage",
"group": "azure-iot-toolkit"
"group": "azure-iot-toolkit-1"
},
{
"when": "inOutput",
"command": "azure-iot-toolkit.stopMonitorIoTHubMessage",
"group": "azure-iot-toolkit"
"group": "azure-iot-toolkit@1"
},
{
"when": "!inOutput",
"command": "azure-iot-toolkit.sendMessageToEventHub",
"group": "azure-iot-toolkit"
"group": "azure-iot-toolkit-2"
},
{
"when": "!inOutput",
"command": "azure-iot-toolkit.startMonitorEventHubMessage",
"group": "azure-iot-toolkit"
"group": "azure-iot-toolkit-2"
},
{
"when": "inOutput",
"command": "azure-iot-toolkit.stopMonitorEventHubMessage",
"group": "azure-iot-toolkit"
"group": "azure-iot-toolkit@2"
},
{
"when": "!inOutput",
"command": "azure-iot-toolkit.listDevice",
"group": "azure-iot-toolkit"
"group": "azure-iot-toolkit-3@1"
},
{
"when": "!inOutput",
"command": "azure-iot-toolkit.createDevice",
"group": "azure-iot-toolkit"
"group": "azure-iot-toolkit-3@2"
},
{
"when": "!inOutput",
"command": "azure-iot-toolkit.deleteDevice",
"group": "azure-iot-toolkit"
"group": "azure-iot-toolkit-3@3"
},
{
"when": "!inOutput",
"command": "azure-iot-toolkit.discoverDevice",
"group": "azure-iot-toolkit"
},
{
"command": "azure-iot-toolkit.deploy",
"group": "azure-iot-toolkit-2"
},
{
"command": "azure-iot-toolkit.run",
"group": "azure-iot-toolkit-2"
"group": "azure-iot-toolkit-3@4"
}
]
},

Просмотреть файл

@ -20,7 +20,7 @@ export class EventHubMessageExplorer extends BaseExplorer {
if (!eventHubConnectionString || !eventHubPath) {
return;
}
vscode.window.showInputBox({ prompt: `Enter message to send to ${Constants.EventHub}` }).then((message: string) => {
vscode.window.showInputBox({ prompt: `Enter message to send to ${Constants.EventHub}` }).then((message: string) => {
if (message !== undefined) {
let client = EventHubClient.fromConnectionString(eventHubConnectionString, eventHubPath);
try {
@ -44,7 +44,6 @@ export class EventHubMessageExplorer extends BaseExplorer {
let eventHubConnectionString = Utility.getConfig(Constants.EventHubConnectionstringKey, Constants.EventHubConnectionStringTitle);
let eventHubPath = Utility.getConfig(Constants.EventHubPathKey, Constants.EventHubPathTitle);
if (!eventHubConnectionString || !eventHubPath) {
this.outputLine(Constants.EventHubMonitorLabel, `Invalid arguments of ${Constants.EventHub}.`);
return;
}
let config = Utility.getConfiguration();