Skip to content

Commit 5ac207b

Browse files
Merge pull request #222621 from vmagelo/freshness-work2
Clarifications.
2 parents 9882a3e + 3a0a8f1 commit 5ac207b

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

articles/iot-hub/iot-hub-python-python-device-management-get-started.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.service: iot-hub
66
services: iot-hub
77
ms.devlang: python
88
ms.topic: conceptual
9-
ms.date: 01/17/2020
9+
ms.date: 12/29/2022
1010
ms.author: kgremban
1111
ms.custom: mqtt, devx-track-python, devx-track-azurecli, py-fresh-zinc
1212
---
@@ -22,7 +22,7 @@ This article shows you how to create:
2222
* **dmpatterns_getstarted_service.py**: a Python console app that calls the direct method in the simulated device app through your IoT hub. It displays the response and updated reported properties.
2323

2424
> [!NOTE]
25-
> See [Azure IoT SDKs](iot-hub-devguide-sdks.md) for more information about the SDK tools available to build both device and back-end apps.
25+
> For more information about the SDK tools available to build both device and back-end apps, see [Azure IoT SDKs](iot-hub-devguide-sdks.md).
2626
2727
## Prerequisites
2828

@@ -44,11 +44,13 @@ This article shows you how to create:
4444

4545
In this section, you:
4646

47-
* Create a Python console app that responds to a direct method called by the cloud
47+
* Create a Python console app that responds to a direct method called by the cloud.
4848

49-
* Simulate a device reboot
49+
* Simulate a device reboot.
5050

51-
* Use the reported properties to enable device twin queries to identify devices and when they last rebooted
51+
* Use the reported properties to enable device twin queries to identify devices and when they last rebooted.
52+
53+
In Azure Cloud Shell you used above or any other environment with Python, create the device code.
5254

5355
1. At your command prompt, run the following command to install the **azure-iot-device** package:
5456

@@ -155,6 +157,8 @@ In this section, you:
155157
156158
In this section, you create a Python console app that initiates a remote reboot on a device using a direct method. The app uses device twin queries to discover the last reboot time for that device.
157159
160+
In Azure Cloud Shell or any other environment with Python, create the console code.
161+
158162
1. At your command prompt, run the following command to install the **azure-iot-hub** package:
159163
160164
```cmd/sh
@@ -241,15 +245,15 @@ In this section, you create a Python console app that initiates a remote reboot
241245
242246
## Run the apps
243247
244-
You're now ready to run the apps.
248+
You're now ready to run the device code and the service code that initiates a reboot of the device.
245249
246-
1. At the command prompt, run the following command to begin listening for the reboot direct method.
250+
1. At the command prompt where you created the device, run the following command to begin listening for the reboot direct method.
247251
248252
```cmd/sh
249253
python dmpatterns_getstarted_device.py
250254
```
251255
252-
2. At another command prompt, run the following command to trigger the remote reboot and query for the device twin to find the last reboot time.
256+
2. At the command prompt where you create the service, run the following command to trigger the remote reboot and query for the device twin to find the last reboot time.
253257
254258
```cmd/sh
255259
python dmpatterns_getstarted_service.py

includes/iot-hub-get-started-create-device-identity.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
author: dominicbetts
66
ms.service: iot-hub
77
ms.topic: include
8-
ms.date: 09/07/2018
8+
ms.date: 12/29/2022
99
ms.author: dobett
1010
ms.custom: include file, devx-track-azurecli
1111
---
@@ -23,8 +23,8 @@ In this section, you use the Azure CLI to create a device identity for this arti
2323
2. Create a new device identity called `myDeviceId` and retrieve the device connection string with these commands:
2424
2525
```azurecli-interactive
26-
az iot hub device-identity create --device-id myDeviceId --hub-name {Your IoT Hub name}
27-
az iot hub device-identity connection-string show --device-id myDeviceId --hub-name {Your IoT Hub name} -o table
26+
az iot hub device-identity create --device-id myDeviceId --hub-name {Your IoT Hub name} --resource-group {Resource group of the Hub}
27+
az iot hub device-identity connection-string show --device-id myDeviceId --hub-name {Your IoT Hub name} --resource-group {Resource group of the Hub} -o table
2828
```
2929
3030
[!INCLUDE [iot-hub-pii-note-naming-device](iot-hub-pii-note-naming-device.md)]

0 commit comments

Comments
 (0)