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
The file to download is the ***Baltimore CyberTrust Root*** entry in the **Root Certificate Authorities** section of the page.
101
-
100
+
The file to download is the ***DigiCert Global Root G2*** entry in the **Root Certificate Authorities** section of the page.
101
+
<figurealign="center">
102
102

103
+
<figcaption>CA Selection</figcaption>
104
+
</figure>
105
+
106
+
The CA file is in a binary format and requires conversion to a standard `pem` format (which starts with ```-----BEGIN CERTIFICATE-----``` to use by the DataLogger's Azure driver.
107
+
108
+
To convert the file, the following command is used at the command line of systems with openssl installed
109
+
110
+
```sh
111
+
openssl x509 -inform DER -in yourcert.crt -out yourcert.pem
112
+
```
113
+
114
+
Copy the file `yourcert.pem` to an SD card, insert the SD card into the Datalogger and enter the filename `yourcert.pen` in the Azure preferences, or use the JSON file mentioned in the following section.
103
115
104
116
## Setting Properties
105
117
@@ -143,32 +155,43 @@ Once installed, and connected to Azure via the Azure Account extension, you can
143
155
144
156
### Connect to Your Azure IoT Hub
145
157
146
-
On the Explorer panel of Visual Studio Code, click on the **...** menu of the **AZURE IOT HUB** section. In the popup menu, select the **Select IoT Hub** menu entry.
158
+
To validate that the DataLoggerIot is communicating with your Azure IoT Hub and the associated devices, several methods are available. All these methods read and post the messages or 'telemetry' sent by the DataLogger to the Azure IoT device.
147
159
148
-

160
+
#### Using the Azure Command Line (CLI)
149
161
150
-
The available IoT Hubs are displayed in the editors command prompt. Select the desired hub and press ```Enter``` (or click).
162
+
One of the fast methods to do this is using the Azure CLI.
First, install the Azure CLI. Instructions are provided here: [How to install the Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest).
153
165
154
-
### Select IoT Hub
166
+
Once installed, the `azure-iot` CLI extension needs installation. This is done with the following command:
155
167
156
-
The hub is then displayed in the **AZURE IOT HUB** section of the editor Explorer. Expanding the **Devices** section of the Hub will list the example device created above.
168
+
```sh
169
+
az extension add --name azure-iot
170
+
```
157
171
158
-

172
+
Then make sure you have logged into the Azure with the following command:
159
173
160
-
### Monitoring
174
+
```sh
175
+
az login
176
+
```
161
177
162
-
To monitor the telemetry data send to a device, right click on the device, ***TestDevice2023*** in this example, select the menu entry **Start Monitoring Build-in Event Endpoint**.
178
+
Then to monitor telemetry, enter the following command:
az iot hub monitor-events --hub-name <your-hub> --output table
182
+
```
165
183
166
-
Once selected, the editor output console will start displaying output for the selected device. For the above example, with a device that has environmental sensors attached, the output appears as follows:
184
+
Where `<your-hub>` is the name of your Azure IoT Hub.
167
185
168
-

186
+
You can also filter events for a specfic device using this variant of the command:
169
187
170
-
To stop monitoring, click the **Stop Monitoring build-in event endpoint** item that is displayed in the status bar of the editor.
188
+
```sh
189
+
az iot hub monitor-events --hub-name <your-hub> --device-id <device-id>
190
+
```
171
191
172
-

192
+
Where `<device-id>` is the ID of the device.
173
193
174
-
A menu option to stop monitoring is also available from the **...** menu of the **AZURE IOT HUB** section in the editor Explorer panel.
0 commit comments