You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: includes/iot-pnp-connect-device-node.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ ms.date: 11/20/2020
8
8
9
9
This quickstart shows you how to build a sample IoT Plug and Play device application, connect it to your IoT hub, and use the Azure IoT explorer tool to view the telemetry it sends. The sample application is written in Node.js and is included in the Azure IoT device SDK for Node.js. A solution builder can use the Azure IoT explorer tool to understand the capabilities of an IoT Plug and Play device without the need to view any device code.
You use the device SDK to build the included sample code. The application you build simulates a device that connects to an IoT hub. The application sends telemetry and properties and receives commands.
38
38
39
-
1. In a local terminal window, go to the folder of your cloned repository and navigate to the */azure-iot-sdk-node/device/samples/pnp* folder. Then run the following command to install the required libraries:
39
+
1. In a local terminal window, go to the folder of your cloned repository and navigate to the */azure-iot-sdk-node/device/samples/javascript* folder. Then run the following command to install the required libraries:
40
40
41
41
```cmd/sh
42
42
npm install
@@ -52,7 +52,7 @@ You use the device SDK to build the included sample code. The application you bu
52
52
53
53
This sample implements a simple IoT Plug and Play thermostat device. The model this sample implements doesn't use IoT Plug and Play [components](../articles/iot-develop/concepts-modeling-guide.md). The [DTDL model file for the thermostat device](https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/samples/Thermostat.json) defines the telemetry, properties, and commands the device implements.
54
54
55
-
Open the _simple_thermostat.js_ file. In this file, you can see how to:
55
+
Open the _pnp_simple_thermostat.js_ file. In this file, you can see how to:
56
56
57
57
1. Import the required interfaces.
58
58
1. Write a property update handler and a command handler.
@@ -75,7 +75,7 @@ To learn more about the sample configuration, see the [sample readme](https://gi
75
75
Run the sample application to simulate an IoT Plug and Play device that sends telemetry to your IoT hub. To run the sample application, use the following command:
76
76
77
77
```cmd\sh
78
-
node simple_thermostat.js
78
+
node pnp_simple_thermostat.js
79
79
```
80
80
81
81
You see the following output, indicating the device has begun sending telemetry data to the hub, and is now ready to receive commands and property updates.
0 commit comments