Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 3 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,25 +1,37 @@ 1 1 **Table of Contents:** 2 2 3 +{{toc/}} 3 3 4 4 5 5 7 += 1. Introduction = 6 6 7 -= 1. Deployment Guide = 8 8 10 +Azure IoT Hub is designed around standalone end devices communicating directly with the hub. Each end device must connect to the hub via one of the supported communication protocols ([[MQTT>>url:https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-mqtt-support]] / [[AMQP>>url:https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-amqp-support]]). These protocols are inherently stateful - each individual end device must have one connection always open in order to send and receive messages from the Azure IoT Hub. 9 9 12 +The Azure IoT Hub integration prefers to use an asynchronous, stateless communication style. When uplink messages are received from an end device, the integration connects on demand to the Azure IoT Hub and submits the message, and also updates the Device Twin. The data plane protocol used between The Things Stack and Azure IoT Hub is [[MQTT>>url:https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-mqtt-support]], and the connections are always secure using [[TLS 1.2>>url:https://datatracker.ietf.org/doc/html/rfc5246]]. 13 + 14 +(% class="wikigeneratedid" %) 15 +[[image:image-20230511145209-1.png||height="600" width="813"]] 16 + 17 + 18 += 2. Deployment Guide = 19 + 20 + 10 10 Learn how to deploy the Azure IoT Hub integration for The Things Stack. 11 11 12 12 13 -== 1.1 Prerequisites ==24 +== 2.1 Prerequisites == 14 14 15 15 16 -1. Access to an Azure account. [[Create a new account>>url:https://signup.azure.com/]] 27 +1. Access to an Azure account. [[Create a new account>>url:https://signup.azure.com/]] 17 17 18 - 1. An application in The Things Stack. [[See instructions>>url:https://www.thethingsindustries.com/docs/integrations/adding-applications/]]29 +2. An application in The Things Stack. [[See instructions>>url:https://www.thethingsindustries.com/docs/integrations/adding-applications/]] 19 19 20 -== 1.2 Create API Key == 21 21 32 +== 2.2 Create API Key == 22 22 34 + 23 23 Go to your application in The Things Stack Console, navigate to (% style="color:blue" %)**Integrations → Azure IoT**(%%) on the left hand menu and click on (% style="color:blue" %)**Expand** (%%)next to (% style="color:blue" %)**Azure IoT Hub**(%%). Now click on (% style="color:blue" %)**Generate API Key**. 24 24 25 25 ... ... @@ -31,7 +31,7 @@ 31 31 Leave the integration page open, as you will need to copy in your (% style="color:blue" %)**Azure IoT Hub hostname** (%%)and (% style="color:blue" %)**Azure IoT Hub access key**(%%) before saving the integration. 32 32 33 33 34 -== 1.3 Deploy Azure Resource Manager Template ==46 +== 2.3 Deploy Azure Resource Manager Template == 35 35 36 36 37 37 [[Deploy template>>url:https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fttsiothubintegration.blob.core.windows.net%2Fintegration-releases%2Flatest%2Fmain.json]] ... ... @@ -39,7 +39,7 @@ 39 39 View template as [[JSON>>url:https://ttsiothubintegration.blob.core.windows.net/integration-releases/latest/main.json]] or [[Bicep>>url:https://ttsiothubintegration.blob.core.windows.net/integration-releases/latest/main.bicep]] 40 40 41 41 42 -== 1.4 Settings ==54 +== 2.4 Settings == 43 43 44 44 45 45 The following parameters configure the integration: ... ... @@ -58,7 +58,7 @@ 58 58 59 59 [[image:image-20230105112836-2.png]] 60 60 61 -Click (% style="color:blue" %)**Review + Create**(%%), then (% style="color: #037691" %)**Create**.73 +Click (% style="color:blue" %)**Review + Create**(%%), then (% style="color:blue" %)**Create**. 62 62 63 63 64 64 (% style="color:red" %)**Note:** ... ... @@ -65,26 +65,27 @@ 65 65 66 66 Creating all resources can take up to five minutes. ☕ 67 67 68 -When the deployment is done, you’ll see the status .Your deployment is complete 80 +When the deployment is done, you’ll see the status .Your deployment is complete. 69 69 82 + 70 70 [[image:image-20230105112836-3.png]] 71 71 72 72 73 73 After the deployment has finished, click (% style="color:blue" %)**Outputs**. 74 74 75 -[[image:image-202301051 12836-4.png]]88 +[[image:image-20230105135055-2.png]] 76 76 77 -The two outputs can now be copied into your integration settings as (% style="color:blue" %)**Azure IoT Hub hostname**(%%) and (% style="color:#037691" %)**Azure IoT Hub access key**(%%). Click on (% style="color:blue" %)**Enable/Update Azure IoT Hub integration**. 78 78 91 +The two outputs can now be copied into your integration settings as (% style="color:blue" %)**Azure IoT Hub hostname**(%%) and (% style="color:blue" %)**Azure IoT Hub access key**(%%). Click on (% style="color:blue" %)**Enable/Update Azure IoT Hub integration**. 92 + 79 79 [[image:image-20230105112836-5.png]] 80 80 81 81 82 -= 2. Managing Devices =96 += 3. Managing Devices = 83 83 84 84 85 85 The Azure IoT Hub integration for The Things Stack synchronizes the device registry: you can create devices in Azure IoT Hub which trigger an Azure Function that creates the device in The Things Stack. 86 86 87 - 88 88 (% style="color:red" %)**Note:** 89 89 90 90 Devices that you create in The Things Stack are automatically created as Azure IoT Hub devices as soon as they activate or send their first uplink message. ... ... @@ -97,8 +97,9 @@ 97 97 Devices are created automatically as they join the network or send an uplink message. For the name of new devices, the end device ID in The Things Stack is used as the device ID in Azure IoT Hub. 98 98 99 99 100 - (% style="color:blue"%)**Creating Devices:**113 +== 3.1 Creating Devices == 101 101 115 + 102 102 You can use Azure IoT Hub to create and claim devices in The Things Stack. This is useful to manage all your devices in one place, without having to use The Things Stack Console, CLI or API. 103 103 104 104 (% style="color:blue" %)**Creating**(%%) a device allows you to add any LoRaWAN device by manually entering its information and security keys. ... ... @@ -109,8 +109,10 @@ 109 109 110 110 [[image:image-20230105112836-6.png]] 111 111 126 + 112 112 As (% style="color:blue" %)**Device ID**(%%), enter any device ID you like. Hit (% style="color:blue" %)**Save**. 113 113 129 + 114 114 (% style="color:red" %)**Note:** 115 115 116 116 See [[ID and EUI constraints>>url:https://www.thethingsindustries.com/docs/reference/id-eui-constraints/]] for guidelines about choosing a unique ID. ... ... @@ -117,37 +117,39 @@ 117 117 118 118 [[image:image-20230105112836-7.png]] 119 119 136 + 120 120 You will now have to setup the LoRaWAN specific settings of the device. Click on (% style="color:blue" %)**Device Twin**. 121 121 122 -[[image:image-202301051 12836-8.png]]139 +[[image:image-20230105134348-1.png]] 123 123 141 + 124 124 You will now be presented with a JSON document containing the Device Twin. You now have to add a new object called tags, which will contain an object called lorawan with the LoRaWAN specific tags. You will have to specify the following tags: 125 125 126 -* (% style="color:#037691" %)devEui:(%%) the hexadecimal LoRaWAN DevEUI. 144 +* (% style="color:#037691" %)**devEui:**(%%) the hexadecimal LoRaWAN DevEUI. 127 127 128 -* (% style="color:#037691" %)joinEui:(%%) the hexadecimal LoRaWAN JoinEUI (or AppEUI). 146 +* (% style="color:#037691" %)**joinEui:**(%%)** **the hexadecimal LoRaWAN JoinEUI (or AppEUI). 129 129 130 -* (% style="color:#037691" %)lorawanVersion:(%%) either 1.0, 1.0.1, 1.0.2, 1.0.3 or 1.1. 148 +* (% style="color:#037691" %)**lorawanVersion:**(%%) either 1.0, 1.0.1, 1.0.2, 1.0.3 or 1.1. 131 131 132 -* (% style="color:#037691" %)regionalParametersVersion:(%%) either 1.0, 1.0.1, 1.0.2 (or 1.0.2-a), 1.0.2-b, 1.0.3-a, 1.1-a or 1.1-b. 150 +* (% style="color:#037691" %)**regionalParametersVersion:**(%%) either 1.0, 1.0.1, 1.0.2 (or 1.0.2-a), 1.0.2-b, 1.0.3-a, 1.1-a or 1.1-b. 133 133 134 -* (% style="color:#037691" %)appKey:(%%) the hexadecimal LoRaWAN AppKey. 152 +* (% style="color:#037691" %)**appKey:**(%%) the hexadecimal LoRaWAN AppKey. 135 135 136 -* (% style="color:#037691" %)nwkKey:(%%) the hexadecimal LoRaWAN NwkKey (only when using LoRaWAN 1.1 or higher). 154 +* (% style="color:#037691" %)**nwkKey:**(%%) the hexadecimal LoRaWAN NwkKey (only when using LoRaWAN 1.1 or higher). 137 137 138 -* (% style="color:#037691" %)frequencyPlanId:(%%) the frequency plan ID. See [[Frequency Plans>>url:https://www.thethingsindustries.com/docs/reference/frequency-plans/]] for the supported values. 156 +* (% style="color:#037691" %)**frequencyPlanId:**(%%) the frequency plan ID. See [[Frequency Plans>>url:https://www.thethingsindustries.com/docs/reference/frequency-plans/]] for the supported values. 139 139 140 140 If your end device is a part of the [[LoRaWAN Device Repository>>url:https://www.thethingsindustries.com/docs/integrations/payload-formatters/device-repo/]], you may provide the identifiers of the device as part of an optional versionIdentifiers object. You can specify the following information as part of the identifiers: 141 141 142 -* (% style="color:#037691" %)bandId:(%%) the band ID. 160 +* (% style="color:#037691" %)**bandId:**(%%) the band ID. 143 143 144 -* (% style="color:#037691" %)brandId:(%%) the brand ID. 162 +* (% style="color:#037691" %)**brandId:**(%%) the brand ID. 145 145 146 -* (% style="color:#037691" %)firmwareVersion:(%%) the firmware version. 164 +* (% style="color:#037691" %)**firmwareVersion:**(%%) the firmware version. 147 147 148 -* (% style="color:#037691" %)hardwareVersion:(%%) the hardware version. 166 +* (% style="color:#037691" %)**hardwareVersion:**(%%) the hardware version. 149 149 150 -* (% style="color:#037691" %)modelId:(%%) the model ID. 168 +* (% style="color:#037691" %)**modelId:**(%%) the model ID. 151 151 152 152 (% style="color:red" %)**Note:** 153 153 ... ... @@ -189,12 +189,15 @@ 189 189 190 190 } 191 191 210 + 192 192 [[image:image-20230105112836-9.png]] 193 193 194 194 Click on (% style="color:blue" %)**Save**(%%) in the top-left corner. The end device will now be created in The Things Stack. 195 195 196 -(% style="color:blue" %)**Deleting Devices:** 197 197 216 +== 3.2 Deleting Devices == 217 + 218 + 198 198 In the Azure Console, open your Azure IoT Hub resource. In the menu on the left, click (% style="color:blue" %)**IoT Devices**. 199 199 200 200 Click on the checkbox in front of the device you want to delete, then click (% style="color:blue" %)**Delete**. ... ... @@ -203,15 +203,18 @@ 203 203 204 204 The end device will be deleted from Azure IoT Hub and The Things Stack. 205 205 206 -(% style="color:blue" %)Example(TrackerD): 207 207 228 +(% style="color:blue" %)**Example(TrackerD):** 229 + 208 208 [[image:image-20230105112836-11.png]] 209 209 232 + 210 210 [[image:image-20230105112836-12.png]] 211 211 212 212 213 -(% style="color:blue" %)Example(LHT65N): 236 +(% style="color:blue" %)**Example(LHT65N):** 214 214 215 -[[image:image-202301051 12836-13.png]]238 +[[image:image-20230105135558-2.png||height="495" width="1360"]] 216 216 240 + 217 217 [[image:image-20230105112836-14.png]]
- image-20230105135507-1.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +79.1 KB - Content
- image-20230105135558-2.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +106.1 KB - Content
- image-20230511145209-1.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Kilight - Size
-
... ... @@ -1,0 +1,1 @@ 1 +131.5 KB - Content