Skip to content

Commit 13c39eb

Browse files
committed
Updated language for VS Code interaction, removed Device Workbench content.
1 parent da83053 commit 13c39eb

File tree

4 files changed

+67
-84
lines changed

4 files changed

+67
-84
lines changed

articles/iot-hub/iot-hub-create-use-iot-toolkit.md

Lines changed: 8 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ This article shows you how to use the [Azure IoT Hub extension for Visual Studio
2323

2424
- [Azure IoT Hub extension](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-toolkit) installed for Visual Studio Code
2525

26+
- An Azure subscription: [create a free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
27+
2628
- An Azure resource group: [create a resource group](../azure-resource-manager/management/manage-resource-groups-portal.md#create-resource-groups) in the Azure portal
2729

28-
## Create an IoT hub without an IoT Project
30+
## Create an IoT hub
2931

30-
The following steps show how to create an IoT Hub without an IoT Project in Visual Studio Code (VS Code).
32+
The following steps show how to create an IoT hub in Visual Studio Code (VS Code).
3133

3234
1. In VS Code, open the **Explorer** view.
3335

@@ -39,7 +41,7 @@ The following steps show how to create an IoT Hub without an IoT Project in Visu
3941

4042
:::image type="content" source="./media/iot-hub-create-use-iot-toolkit/create-iot-hub.png" alt-text="A screenshot that shows the location of the Create IoT Hub list item in Visual Studio Code." lightbox="./media/iot-hub-create-use-iot-toolkit/create-iot-hub.png":::
4143

42-
4. A pop-up shows in the bottom-right corner to let you sign in to Azure for the first time, if you're not signed in already.
44+
4. If you're not signed into Azure, a pop-up notification is shown in the bottom right corner to let you sign in to Azure. Select **Sign In** and follow the instructions to sign into Azure.
4345

4446
5. From the command palette at the top of VS Code, select your Azure subscription.
4547

@@ -49,55 +51,12 @@ The following steps show how to create an IoT Hub without an IoT Project in Visu
4951

5052
8. Select a pricing tier.
5153

52-
9. Enter a globally unique name for your IoT hub, then press **Enter**.
53-
54-
10. Wait a few minutes until the IoT hub is created. You'll see a confirmation in the output console.
55-
56-
## Create an IoT hub and device in an existing IoT project
57-
58-
The following steps show how to create an IoT hub and register a device to the hub within an existing IoT project in Visual Studio (VS) Code.
59-
60-
This method allows you to provision in Visual Studio Code without leaving your development environment.
61-
62-
1. In the new opened project window, press `F1` to open the command palette, type and select **Azure IoT Device Workbench: Provision Azure Services...**.
63-
64-
:::image type="content" source="media/iot-hub-create-use-iot-toolkit/provision.png" alt-text="A screenshot that shows how to open the command palette in VS Code." lightbox="media/iot-hub-create-use-iot-toolkit/provision.png":::
65-
66-
> [!NOTE]
67-
> If you have not signed into Azure, follow the pop-up notification for signing in.
68-
69-
1. Select the subscription you want to use.
70-
71-
:::image type="content" source="media/iot-hub-create-use-iot-toolkit/select-subscription.png" alt-text="A screenshot that shows how to choose your Azure subscription in Visual Studio Code." lightbox="media/iot-hub-create-use-iot-toolkit/select-subscription.png":::
72-
73-
1. Select an existing resource group or create a new [resource group](../azure-resource-manager/management/overview.md#terminology).
74-
75-
:::image type="content" source="media/iot-hub-create-use-iot-toolkit/select-resource-group.png" alt-text="A screenshot that shows how to choose a resource group or create a new one in Visual Studio Code." lightbox="media/iot-hub-create-use-iot-toolkit/select-resource-group.png":::
76-
77-
1. In the resource group you specified, follow the prompts to select an existing IoT hub or create a new Azure IoT hub.
78-
79-
:::image type="content" source="media/iot-hub-create-use-iot-toolkit/iot-hub-provision.png" alt-text="A screenshot that shows the first prompt in choosing an existing IoT hub in Visual Studio Code." lightbox="media/iot-hub-create-use-iot-toolkit/iot-hub-provision.png":::
80-
81-
:::image type="content" source="media/iot-hub-create-use-iot-toolkit/select-iot-hub.png" alt-text="A screenshot that shows the second prompt in choosing an existing IoT hub in Visual Studio Code." lightbox="media/iot-hub-create-use-iot-toolkit/select-iot-hub.png":::
82-
83-
:::image type="content" source="media/iot-hub-create-use-iot-toolkit/iot-hub-selected.png" alt-text="A screenshot that shows the third prompt in choosing an existing IoT hub in Visual Studio Code." lightbox="media/iot-hub-create-use-iot-toolkit/iot-hub-selected.png":::
84-
85-
1. In the output window, you see the Azure IoT hub provisioned.
86-
87-
:::image type="content" source="media/iot-hub-create-use-iot-toolkit/iot-hub-provisioned.png" alt-text="A screenshot that shows the output window in Visual Studio Code." lightbox="media/iot-hub-create-use-iot-toolkit/iot-hub-provisioned.png":::
88-
89-
1. Select or create a new IoT device in the Azure IoT hub you provisioned.
90-
91-
:::image type="content" source="media/iot-hub-create-use-iot-toolkit/iot-device-provision.png" alt-text="A screenshot that shows the fourth prompt in choosing an existing IoT hub in Visual Studio Code." lightbox="media/iot-hub-create-use-iot-toolkit/iot-device-provision.png":::
92-
93-
:::image type="content" source="media/iot-hub-create-use-iot-toolkit/select-iot-device.png" alt-text="A screenshot that shows an example of an existing IoT hub in Visual Studio Code." lightbox="media/iot-hub-create-use-iot-toolkit/select-iot-device.png":::
94-
95-
1. Now you have an Azure IoT hub provisioned and a device created in it. The device connection string is saved in VS Code.
54+
9. Enter a globally unique name for your IoT hub, and then select the Enter key.
9655

97-
:::image type="content" source="media/iot-hub-create-use-iot-toolkit/provision-done.png" alt-text="A screenshot that shows IoT hub details in the output window in Visual Studio Code." lightbox="media/iot-hub-create-use-iot-toolkit/provision-done.png":::
56+
10. Wait a few minutes until the IoT hub is created. You'll see a confirmation in the **Output** panel.
9857

9958
> [!TIP]
100-
> To delete a device from your IoT hub, use the `Azure IoT Hub: Delete Device` option from the Command Palette. There is no option to delete your IoT hub in Visual Studio Code, however you can [delete your hub in the Azure portal](iot-hub-create-through-portal.md#delete-an-iot-hub).
59+
> There is no option to delete your IoT hub in Visual Studio Code, however you can [delete your hub in the Azure portal](iot-hub-create-through-portal.md#delete-an-iot-hub).
10160
10261
## Next steps
10362

articles/iot-hub/iot-hub-device-management-iot-toolkit.md

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.date: 01/04/2019
1313

1414
![End-to-end diagram](media/iot-hub-get-started-e2e-diagram/2.png)
1515

16-
In this article, you learn how to use the [Azure IoT Hub extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-toolkit) with various management options on your development machine. The IoT Hub extension is a useful Visual Studio Code extension that makes IoT Hub management and IoT application development easier. It comes with management options that you can use to perform various tasks.
16+
In this article, you learn how to use the [Azure IoT Hub extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-toolkit) with various management options on your development machine. The IoT Hub extension is a useful Visual Studio (VS) Code extension that makes IoT Hub management and IoT application development easier. It comes with management options that you can use to perform various tasks.
1717

1818
[!INCLUDE [iot-hub-basic](../../includes/iot-hub-basic-whole.md)]
1919

@@ -39,50 +39,66 @@ Device twins are JSON documents that store device state information (metadata, c
3939

4040
## Sign in to access your IoT hub
4141

42-
1. In **Explorer** view of VS Code, expand **Azure IoT Hub Devices** section in the bottom left corner.
42+
Follow these steps to sign into Azure and access your IoT hub from your Azure subscription:
4343

44-
2. Click **Select IoT Hub** in context menu.
44+
1. In the **Explorer** view of VS Code, expand the **Azure IoT Hub** section in the side bar.
4545

46-
3. A pop-up will show in the bottom right corner to let you sign in to Azure for the first time.
46+
1. Select the ellipsis (…) button of the **Azure IoT Hub** section to display the action menu, and then select **Select IoT Hub** from the action menu.
4747

48-
4. After you sign in, your Azure Subscription list will be shown, then select Azure Subscription and IoT Hub.
48+
1. If you're not signed into Azure, a pop-up notification is shown in the bottom right corner to let you sign in to Azure. Select **Sign In** and follow the instructions to sign into Azure.
4949

50-
5. The device list will be shown in **Azure IoT Hub Devices** tab in a few seconds.
50+
1. From the command palette at the top of VS Code, select your Azure subscription from the **Select Subscription** dropdown list.
51+
52+
1. Select your IoT hub from the **Select IoT Hub** dropdown list.
53+
54+
1. The devices for your IoT hub are retrieved from IoT Hub and shown under the **Devices** node in the **Azure IoT Hub** section of the side bar.
5155

5256
> [!NOTE]
53-
> You can also complete the set up by choosing **Set IoT Hub Connection String**. Enter the **iothubowner** policy connection string for the IoT hub that your IoT device connects to in the pop-up window.
57+
> You can also use a connection string to access your IoT hub, by selecting **Set IoT Hub Connection String** from the action menu and entering the **iothubowner** policy connection string for your IoT hub in the **IoT Hub Connection String** input box.
5458
5559
## Direct methods
5660

57-
1. Right-click your device and select **Invoke Direct Method**.
61+
To invoke a direct method from your IoT device, follow these steps:
62+
63+
1. In the side bar, expand the **Devices** node under the **Azure IoT Hub** section.
64+
65+
1. Right-click your IoT device and select **Invoke Device Direct Method**.
5866

59-
2. Enter the method name and payload in input box.
67+
1. Enter the method name in the input box, and then select the Enter key.
6068

61-
3. Results will be shown in **OUTPUT** > **Azure IoT Hub** view.
69+
1. Enter the payload in the input box, and then select the Enter key.
70+
71+
1. The results are shown in the **Output** panel.
6272

6373
## Read device twin
6474

65-
1. Right-click your device and select **Edit Device Twin**.
75+
To display the JSON document for the device twin of your IoT device, follow these steps:
76+
77+
1. In the side bar, expand the **Devices** node under the **Azure IoT Hub** section.
78+
79+
1. Right-click your IoT device and select **Edit Device Twin**.
6680

67-
2. An **azure-iot-device-twin.json** file will be opened with the content of device twin.
81+
1. The JSON document for the device twin, named **azure-iot-device-twin.json**, is shown in the editor.
6882

6983
## Update device twin
7084

71-
1. Make some edits of **tags** or **properties.desired** field.
85+
After [reading the device twin](#read-device-twin), follow these steps to update the device twin for your IoT device:
7286

73-
2. Right-click on the **azure-iot-device-twin.json** file.
87+
1. Make changes to arrays or values in the JSON document for the device twin. For example, add tags in the **tags** array, or change the values of desired properties in the **properties.desired** array.
7488

75-
3. Select **Update Device Twin** to update the device twin.
89+
1. Right-click the content area of the **azure-iot-device-twin.json** file and select **Update Device Twin**.
7690

7791
## Send cloud-to-device messages
7892

7993
To send a message from your IoT hub to your device, follow these steps:
8094

81-
1. Right-click your device and select **Send C2D Message to Device**.
95+
1. In the side bar, expand the **Devices** node under the **Azure IoT Hub** section.
96+
97+
1. Right-click your IoT device and select **Send C2D Message to Device**.
8298

83-
2. Enter the message in input box.
99+
1. Enter the message in the input box, and then select the Enter key.
84100

85-
3. Results will be shown in **OUTPUT** > **Azure IoT Hub** view.
101+
1. The results are shown in the **Output** panel.
86102

87103
## Next steps
88104

articles/iot-hub/iot-hub-mqtt-support.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,14 @@ If a device can't use the device SDKs, it can still connect to the public device
121121
You can also use the cross-platform [Azure IoT Hub extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-toolkit) or the CLI extension command [az iot hub generate-sas-token](/cli/azure/iot/hub#az-iot-hub-generate-sas-token) to quickly generate a SAS token. You can then copy and paste the SAS token into your own code for testing purposes.
122122

123123
### Using the Azure IoT Hub extension for Visual Studio Code
124-
125-
1. Expand the **AZURE IOT HUB DEVICES** tab in the bottom left corner of Visual Studio Code.
126124

127-
2. Right-click your device and select **Generate SAS Token for Device**.
125+
1. In the side bar, expand the **Devices** node under the **Azure IoT Hub** section.
126+
127+
1. Right-click your IoT device and select **Generate SAS Token for Device** from the context menu.
128128

129-
3. Set **expiration time** and press 'Enter'.
129+
1. Enter the expiration time, in hours, for the SAS token in the input box, and then select the Enter key.
130130

131-
4. The SAS token is created and copied to clipboard.
131+
1. The SAS token is created and copied to clipboard.
132132

133133
The SAS token that's generated has the following structure:
134134

articles/iot-hub/iot-hub-vscode-iot-toolkit-cloud-device-messaging.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,38 +32,46 @@ The [Azure IoT Hub extension for Visual Studio Code](https://marketplace.visuals
3232

3333
## Sign in to access your IoT hub
3434

35-
1. In **Explorer** view of VS Code, expand **Azure IoT Hub Devices** section in the bottom left corner.
35+
Follow these steps to sign into Azure and access your IoT hub from your Azure subscription:
3636

37-
2. Click **Select IoT Hub** in context menu.
37+
1. In the **Explorer** view of VS Code, expand the **Azure IoT Hub** section in the side bar.
3838

39-
3. A pop-up will show in the bottom right corner to let you sign in to Azure for the first time.
39+
1. Select the ellipsis (…) button of the **Azure IoT Hub** section to display the action menu, and then select **Select IoT Hub** from the action menu.
4040

41-
4. After you sign in, your Azure Subscription list will be shown, then select Azure Subscription and IoT Hub.
41+
1. If you're not signed into Azure, a pop-up notification is shown in the bottom right corner to let you sign in to Azure. Select **Sign In** and follow the instructions to sign into Azure.
4242

43-
5. The device list will be shown in **Azure IoT Hub Devices** tab in a few seconds.
43+
1. Select your Azure subscription from the **Select Subscription** dropdown list.
44+
45+
1. Select your IoT hub from the **Select IoT Hub** dropdown list.
46+
47+
1. The devices for your IoT hub are retrieved from IoT Hub and shown under the **Devices** node in the **Azure IoT Hub** section of the side bar.
4448

4549
> [!NOTE]
46-
> You can also complete the set up by choosing **Set IoT Hub Connection String**. Enter the **iothubowner** policy connection string for the IoT hub that your IoT device connects to in the pop-up window.
50+
> You can also use a connection string to access your IoT hub, by selecting **Set IoT Hub Connection String** from the action menu and entering the **iothubowner** policy connection string for your IoT hub in the **IoT Hub Connection String** input box.
4751
4852
## Monitor device-to-cloud messages
4953

5054
To monitor messages that are sent from your device to your IoT hub, follow these steps:
5155

52-
1. Right-click your device and select **Start Monitoring Built-in Event Endpoint**.
56+
1. In the side bar, expand the **Devices** node under the **Azure IoT Hub** section.
57+
58+
1. Right-click your IoT device and select **Start Monitoring Built-in Event Endpoint**.
5359

54-
2. The monitored messages will be shown in **OUTPUT** > **Azure IoT Hub** view.
60+
1. The monitored messages are shown in the **Output** panel.
5561

56-
3. To stop monitoring, right-click the **OUTPUT** view and select **Stop Monitoring Built-in Event Endpoint**.
62+
1. To stop monitoring messages, right-click the **Output** panel and select **Stop Monitoring Built-in Event Endpoint**.
5763

5864
## Send cloud-to-device messages
5965

6066
To send a message from your IoT hub to your device, follow these steps:
67+
68+
1. In the side bar, expand the **Devices** node under the **Azure IoT Hub** section.
6169

62-
1. Right-click your device and select **Send C2D Message to Device**.
70+
1. Right-click your IoT device and select **Send C2D Message to Device** from the context menu.
6371

64-
2. Enter the message in input box.
72+
1. Enter the message in the input box, and then select the Enter key.
6573

66-
3. Results will be shown in **OUTPUT** > **Azure IoT Hub** view.
74+
1. The results are shown in the **Output** panel.
6775

6876
## Next steps
6977

0 commit comments

Comments
 (0)