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: README.rst
+34-2Lines changed: 34 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,7 +85,16 @@ To interact with Azure IoT Hub, you will need to create a hub, and a register a
85
85
86
86
- Open the `Azure Portal <https://aka.ms/AzurePortalHome>`_.
87
87
- Follow the instructions in `Microsoft Docs <https://aka.ms/CreateIoTHub>`_ to create an Azure IoT Hub and register a device.
88
-
- Copy the devices Primary Key, and add this to your ``secrets.py`` file.
88
+
- Copy the devices Primary or secondary connection string, and add this to your ``secrets.py`` file.
89
+
90
+
You can find the device connection string by selecting the IoT Hub in the `Azure Portal <https://aka.ms/AzurePortalHome>`_, *selecting Explorer -> IoT devices*, then selecting your device.
91
+
92
+
:: images/iot-hub-device.png
93
+
:alt: Locating the device in the IoT hub blade
94
+
95
+
Then copy either the primary or secondary connection string using the copy button next to the value.
96
+
97
+
:: images/iot-hub-device-keys.png
89
98
90
99
**Connect your device to Azure IoT Hub**
91
100
@@ -162,7 +171,30 @@ To use Azure IoT Central, you will need to create an Azure IoT Central app, crea
162
171
- Head to `Azure IoT Central <https://apps.azureiotcentral.com/?WT.mc_id=AdafruitCircuitPythonAzureIoT-github-jabenn>`__
163
172
- Follow the instructions in the `Microsoft Docs <https://docs.microsoft.com/azure/iot-central/core/quick-deploy-iot-central?WT.mc_id=AdafruitCircuitPythonAzureIoT-github-jabenn>`__ to create an application. Every tier is free for up to 2 devices.
164
173
- Follow the instructions in the `Microsoft Docs <https://docs.microsoft.com/azure/iot-central/core/quick-create-simulated-device?WT.mc_id=AdafruitCircuitPythonAzureIoT-github-jabenn>`__ to create a device template.
165
-
- Create a device based off the template, and select **Connect** to get the device connection details. Store the ID Scope, Device ID and Primary Key in your ``secrets.py`` file.
174
+
- Create a device based off the template, and select **Connect** to get the device connection details. Store the ID Scope, Device ID and either the Primary or secondary Key in your ``secrets.py`` file.
175
+
176
+
.. image:: images/iot-central-connect-button.png
177
+
:alt:The IoT Central connect button
178
+
179
+
*The connect button*
180
+
181
+
.. image:: images/iot-central-connect-dialog.png
182
+
:alt:The IoT Central connection details dialog
183
+
184
+
*The connection details dialog*
185
+
186
+
.. code-block:: python
187
+
188
+
secrets = {
189
+
# WiFi settings
190
+
"ssid": "",
191
+
"password": "",
192
+
193
+
# Azure IoT Central settings
194
+
"id_scope": "",
195
+
"device_id": "",
196
+
"key": ""
197
+
}
166
198
167
199
**Connect your device to your Azure IoT Central app**
0 commit comments