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
@@ -171,18 +171,14 @@ For more information about IoT Hub shared access policies and permissions, see [
171
171
172
172
## Schedule jobs for calling a direct method and updating a device twin's properties
173
173
174
-
In this section, you create a Python console app that initiates a remote **lockDoor** on a device using a direct method and update the device twin's properties.
174
+
In this section, you create a Python console app that initiates a remote **lockDoor** on a device using a direct method and also updates the device twin's desired properties.
175
175
176
-
1. At your command prompt, run the following command to install the **azure-iot-service-client** package:
176
+
1. At your command prompt, run the following command to install the **azure-iot-hub** package:
177
177
178
178
```cmd/sh
179
-
pip install azure-iothub-service-client
179
+
pip install azure-iot-hub
180
180
```
181
181
182
-
> [!NOTE]
183
-
> The pip package for azure-iothub-service-client is currently available only for Windows OS. For Linux/Mac OS, please refer to the Linux and Mac OS-specific sections on the [Prepare your development environment for Python](https://github.com/Azure/azure-iot-sdk-python/blob/v1-deprecated/doc/python-devbox-setup.md) post.
184
-
>
185
-
186
182
2. Using a text editor, create a new **scheduleJobService.py** file in your working directory.
187
183
188
184
3. Add the following `import` statements and variables at the start of the **scheduleJobService.py** file. Replace the `{IoTHubConnectionString}` placeholder with the IoT hub connection string you copied previously in [Get the IoT hub connection string](#get-the-iot-hub-connection-string). Replace the `{deviceId}` placeholder with the device ID you registered in [Register a new device in the IoT hub](#register-a-new-device-in-the-iot-hub):
@@ -193,35 +189,28 @@ In this section, you create a Python console app that initiates a remote **lockD
193
189
import threading
194
190
import uuid
195
191
196
-
import iothub_service_client
197
-
from iothub_service_client import IoTHubRegistryManager, IoTHubRegistryManagerAuthMethod
198
-
from iothub_service_client import IoTHubDeviceTwin, IoTHubDeviceMethod, IoTHubError
192
+
from azure.iot.hub import IoTHubRegistryManager
193
+
from azure.iot.hub.models import Twin, TwinProperties, CloudToDeviceMethod, CloudToDeviceMethodResult, QuerySpecification, QueryResult
0 commit comments