Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 0 added, 5 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,174 +1,117 @@ 1 -** Tablef Contents:**1 +**Deployment Guide** 2 2 3 -{{toc/}} 4 - 5 - 6 - 7 -= 1. Introduction = 8 - 9 - 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. 11 - 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 - 21 21 Learn how to deploy the Azure IoT Hub integration for The Things Stack. 22 22 5 +**Prerequisites** 23 23 24 -== 2.1 Prerequisites == 7 +1. Access to an Azure account. [[Create a new account>>url:https://signup.azure.com/]] 8 +1. An application in The Things Stack. [[See instructions>>url:https://www.thethingsindustries.com/docs/integrations/adding-applications/]] 25 25 10 +**Create API Key** 26 26 27 - 1.Accessto an Azureaccount. [[Create awaccount>>url:https://signup.azure.com/]]12 +Go to your application in The Things Stack Console, navigate to **Integrations → Azure IoT** on the left hand menu and click on **Expand** next to **Azure IoT Hub**. Now click on **Generate API Key**. 28 28 29 -2. An application in The Things Stack. [[See instructions>>url:https://www.thethingsindustries.com/docs/integrations/adding-applications/]] 30 - 31 - 32 -== 2.2 Create API Key == 33 - 34 - 35 -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**. 36 - 37 - 38 38 [[image:image-20230105112836-1.png]] 39 39 40 - 41 41 Copy the generated API key and store it in a safe place, because you will need it in the next section. 42 42 43 -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.18 +Leave the integration page open, as you will need to copy in your **Azure IoT Hub hostname** and **Azure IoT Hub access key** before saving the integration. 44 44 20 +**Deploy Azure Resource Manager Template** 45 45 46 -== 2.3 Deploy Azure Resource Manager Template == 47 - 48 - 49 49 [[Deploy template>>url:https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fttsiothubintegration.blob.core.windows.net%2Fintegration-releases%2Flatest%2Fmain.json]] 50 50 51 51 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]] 52 52 26 +**Settings** 53 53 54 -== 2.4 Settings == 55 - 56 - 57 57 The following parameters configure the integration: 58 58 59 -* (% style="color:#037691" %)**Location**(%%): The region in which the Azure resources will be deployed. Defaults to the region used by the selected Resource Group. 30 +* **Location**: The region in which the Azure resources will be deployed. Defaults to the region used by the selected Resource Group. 31 +* **Name Suffix**: The suffix added to the Azure Resources. Defaults to a random string. 32 +* **Stack Cluster Address**: The address of your The Things Stack deployment. Can be retrieved from the **Azure IoT** integration page in The Things Stack (see image above). 33 +* **Stack Application ID**: The application ID of your application. Can be retrieved from the **Azure IoT** integration page in The Things Stack (see image above). 34 +* **Stack API Key**: The application API key that you generated in the previous step. 35 +* **Enable fallback route**: Defines if the Azure IoT Hub fallback route should be added. If enabled, uplink messages will be submitted to the default endpoint in your Azure IoT Hub.events 60 60 61 -* (% style="color:#037691" %)**Name Suffix**(%%): The suffix added to the Azure Resources. Defaults to a random string. 62 - 63 -* (% style="color:#037691" %)**Stack Cluster Address**(%%): The address of your The Things Stack deployment. Can be retrieved from the (% style="color:blue" %)**Azure IoT**(%%) integration page in The Things Stack (see image above). 64 - 65 -* (% style="color:#037691" %)**Stack Application ID**(%%): The application ID of your application. Can be retrieved from the (% style="color:blue" %)**Azure IoT** (%%)integration page in The Things Stack (see image above). 66 - 67 -* (% style="color:#037691" %)**Stack API Key**(%%): The application API key that you generated in the previous step. 68 - 69 -* (% style="color:#037691" %)**Enable fallback route**(%%): Defines if the Azure IoT Hub fallback route should be added. If enabled, uplink messages will be submitted to the default endpoint in your Azure IoT Hub.events 70 - 71 71 [[image:image-20230105112836-2.png]] 72 72 73 -Click (% style="color:blue" %)**Review + Create**(%%), then(% style="color:blue" %)**Create**.39 +Click **Review + Create**, then **Create**. 74 74 41 +**Note:** 75 75 76 -(% style="color:red" %)**Note:** 77 - 78 78 Creating all resources can take up to five minutes. ☕ 79 79 80 -When the deployment is done, you’ll see the status .Your deployment is complete .45 +When the deployment is done, you’ll see the status .Your deployment is complete 81 81 82 - 83 83 [[image:image-20230105112836-3.png]] 84 84 49 +After the deployment has finished, click **Outputs**. 85 85 86 - After the deployment has finished, click (% style="color:blue" %)**Outputs**.51 +[[image:image-20230105112836-4.png]] 87 87 88 - [[image:image-20230105135055-2.png]]53 +The two outputs can now be copied into your integration settings as **Azure IoT Hub hostname** and **Azure IoT Hub access key**. Click on **Enable/Update Azure IoT Hub integration**. 89 89 90 - 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 - 93 93 [[image:image-20230105112836-5.png]] 94 94 57 +**Managing Devices** 95 95 96 -= 3. Managing Devices = 97 - 98 - 99 99 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. 100 100 101 - (% style="color:red" %)**Note:**61 +**Note:** 102 102 103 103 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. 104 104 105 105 In Azure IoT Hub, create only devices that are not yet in your The Things Stack application. 106 106 67 +**Device Names** 107 107 108 -(% style="color:blue" %)**Device Names:** 109 - 110 110 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. 111 111 71 +**Creating Devices** 112 112 113 -== 3.1 Creating Devices == 114 - 115 - 116 116 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. 117 117 118 - (% style="color:blue" %)**Creating**(%%)a device allows you to add any LoRaWAN device by manually entering its information and security keys.75 +**Creating** a device allows you to add any LoRaWAN device by manually entering its information and security keys. 119 119 120 -In the Azure Console, open your Azure IoT Hub resource. In the menu on the left, click (% style="color:blue" %)**IoT Devices**.77 +In the Azure Console, open your Azure IoT Hub resource. In the menu on the left, click **IoT Devices**. 121 121 122 -Click (% style="color:blue" %)**Add Device**.79 +Click **Add Device**. 123 123 124 124 [[image:image-20230105112836-6.png]] 125 125 83 +As **Device ID**, enter any device ID you like. Hit **Save**. 126 126 127 - As (% style="color:blue" %)**Device ID**(%%), enter any device ID you like. Hit(% style="color:blue" %)**Save**.85 +**Note:** 128 128 129 - 130 -(% style="color:red" %)**Note:** 131 - 132 132 See [[ID and EUI constraints>>url:https://www.thethingsindustries.com/docs/reference/id-eui-constraints/]] for guidelines about choosing a unique ID. 133 133 134 134 [[image:image-20230105112836-7.png]] 135 135 91 +You will now have to setup the LoRaWAN specific settings of the device. Click on **Device Twin**. 136 136 137 - You will now have to setup the LoRaWAN specific settings of thedevice. Click on (% style="color:blue" %)**DeviceTwin**.93 +[[image:image-20230105112836-8.png]] 138 138 139 -[[image:image-20230105134348-1.png]] 140 - 141 - 142 142 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: 143 143 144 -* (% style="color:#037691" %)**devEui:**(%%) the hexadecimal LoRaWAN DevEUI. 97 +* devEui: the hexadecimal LoRaWAN DevEUI. 98 +* joinEui: the hexadecimal LoRaWAN JoinEUI (or AppEUI). 99 +* lorawanVersion: either 1.0, 1.0.1, 1.0.2, 1.0.3 or 1.1. 100 +* 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. 101 +* appKey: the hexadecimal LoRaWAN AppKey. 102 +* nwkKey: the hexadecimal LoRaWAN NwkKey (only when using LoRaWAN 1.1 or higher). 103 +* frequencyPlanId: the frequency plan ID. See [[Frequency Plans>>url:https://www.thethingsindustries.com/docs/reference/frequency-plans/]] for the supported values. 145 145 146 -* (% style="color:#037691" %)**joinEui:**(%%)** **the hexadecimal LoRaWAN JoinEUI (or AppEUI). 147 - 148 -* (% style="color:#037691" %)**lorawanVersion:**(%%) either 1.0, 1.0.1, 1.0.2, 1.0.3 or 1.1. 149 - 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. 151 - 152 -* (% style="color:#037691" %)**appKey:**(%%) the hexadecimal LoRaWAN AppKey. 153 - 154 -* (% style="color:#037691" %)**nwkKey:**(%%) the hexadecimal LoRaWAN NwkKey (only when using LoRaWAN 1.1 or higher). 155 - 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. 157 - 158 158 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: 159 159 160 -* (% style="color:#037691" %)**bandId:**(%%) the band ID. 107 +* bandId: the band ID. 108 +* brandId: the brand ID. 109 +* firmwareVersion: the firmware version. 110 +* hardwareVersion: the hardware version. 111 +* modelId: the model ID. 161 161 162 -* (% style="color:#037691" %)**brandId:**(%%) the brand ID.113 +**Note:** 163 163 164 -* (% style="color:#037691" %)**firmwareVersion:**(%%) the firmware version. 165 - 166 -* (% style="color:#037691" %)**hardwareVersion:**(%%) the hardware version. 167 - 168 -* (% style="color:#037691" %)**modelId:**(%%) the model ID. 169 - 170 -(% style="color:red" %)**Note:** 171 - 172 172 If the version identifiers are provided, the end device will automatically load the [[Payload Formatters>>url:https://www.thethingsindustries.com/docs/integrations/payload-formatters/]] from [[LoRaWAN Device Repository>>url:https://www.thethingsindustries.com/docs/integrations/payload-formatters/device-repo/]]. 173 173 174 174 The final JSON tags object should look as follows: ... ... @@ -207,35 +207,29 @@ 207 207 208 208 } 209 209 210 - 211 211 [[image:image-20230105112836-9.png]] 212 212 213 -Click on (% style="color:blue" %)**Save**(%%)in the top-left corner. The end device will now be created in The Things Stack.155 +Click on **Save** in the top-left corner. The end device will now be created in The Things Stack. 214 214 157 +**Deleting Devices** 215 215 216 - ==3.2DeletingDevices==159 +In the Azure Console, open your Azure IoT Hub resource. In the menu on the left, click **IoT Devices**. 217 217 161 +Click on the checkbox in front of the device you want to delete, then click **Delete**. 218 218 219 -In the Azure Console, open your Azure IoT Hub resource. In the menu on the left, click (% style="color:blue" %)**IoT Devices**. 220 - 221 -Click on the checkbox in front of the device you want to delete, then click (% style="color:blue" %)**Delete**. 222 - 223 223 [[image:image-20230105112836-10.png]] 224 224 225 225 The end device will be deleted from Azure IoT Hub and The Things Stack. 226 226 167 +Example(TrackerD): 227 227 228 -(% style="color:blue" %)**Example(TrackerD):** 229 - 230 230 [[image:image-20230105112836-11.png]] 231 231 232 - 233 233 [[image:image-20230105112836-12.png]] 234 234 235 235 236 - (% style="color:blue" %)**Example(LHT65N):**174 +Example(LHT65N): 237 237 238 -[[image:image-202301051 35558-2.png||height="495" width="1360"]]176 +[[image:image-20230105112836-13.png]] 239 239 240 - 241 241 [[image:image-20230105112836-14.png]]
- image-20230105134348-1.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Xiaoling - Size
-
... ... @@ -1,1 +1,0 @@ 1 -78.2 KB - Content
- image-20230105135055-2.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Xiaoling - Size
-
... ... @@ -1,1 +1,0 @@ 1 -48.7 KB - Content
- image-20230105135507-1.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Xiaoling - Size
-
... ... @@ -1,1 +1,0 @@ 1 -79.1 KB - Content
- image-20230105135558-2.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Xiaoling - Size
-
... ... @@ -1,1 +1,0 @@ 1 -106.1 KB - Content
- image-20230511145209-1.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Kilight - Size
-
... ... @@ -1,1 +1,0 @@ 1 -131.5 KB - Content