Difference between revisions of "Azure IoT Hub cloud connection (Legacy WebUI)"
From Teltonika Networks Wiki
Oscar.morao (talk | contribs) |
|||
(7 intermediate revisions by one other user not shown) | |||
Line 4: | Line 4: | ||
==Introduction== | ==Introduction== | ||
− | This article contains instructions on how to configure a RUT router in order to connect to the Azure IoT Hub. | + | This article contains instructions on how to configure a RUT router in order to connect to the Azure IoT Hub. |
− | + | ||
− | |||
− | |||
==Prerequisites== | ==Prerequisites== | ||
Line 17: | Line 15: | ||
==Azure account creation== | ==Azure account creation== | ||
− | Visit https://azure.microsoft.com/en-us/ and create an account that will suit your needs, for testing purposes we will be using free Azure account. | + | Visit <nowiki>https://azure.microsoft.com/en-us/</nowiki> and create an account that will suit your needs, for testing purposes we will be using free Azure account. |
==Managing Azure services== | ==Managing Azure services== | ||
Line 24: | Line 22: | ||
<li>First you will want to create a Resource group for easier management of resources that you will add later. In Microsoft Azure home page.</li> | <li>First you will want to create a Resource group for easier management of resources that you will add later. In Microsoft Azure home page.</li> | ||
<ul>Select '''Resource groups''' <br>If it is not in very first page, click '''More services''' and locate it there. </ul> | <ul>Select '''Resource groups''' <br>If it is not in very first page, click '''More services''' and locate it there. </ul> | ||
− | <div>[[File:Azure01.png| | + | <div>[[File:Azure01.png|thumb|1130x1130px]]</div> |
<li>In new window, select '''Add'''</li> | <li>In new window, select '''Add'''</li> | ||
− | [[File:Azure02.png| | + | {| |
+ | |- | ||
+ | | [[File:Azure02.png|thumb|4000x4000px]] | ||
+ | |} | ||
<li>And then finish creating yours Resource group </li> | <li>And then finish creating yours Resource group </li> | ||
− | Select your subscription, we are using '''Free Trial''' for this test. | + | <li>Select your subscription, we are using '''Free Trial''' for this test. |
− | + | # Name your group | |
− | #Name your group | + | # Finally, choose server location for meta data. We will choose '''''(South America) Brazil South''''' and will use it during test where available.</li> |
− | #Finally, choose server location for meta data. We will choose '''''(South America) Brazil South''''' and will use it during test where available | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | [[File: | + | {| |
+ | |- | ||
+ | | [[File:Azure03.png|thumb|775x775px]] | ||
+ | |} | ||
+ | <li>At this moment we will skip adding Tags since we will be able to do that later if needed, so simply press Review + create at the bottom of screen and then click Create to finish setup.</li> | ||
+ | {| | ||
+ | |- | ||
+ | | [[File:Azure04.png|thumb|523x523px]] | ||
+ | |} | ||
+ | {| | ||
+ | |- | ||
+ | | [[File:Azure05.png|thumb|800x800px]] | ||
+ | |} | ||
+ | <li>You will be redirected to Homepage, then click on Resource groups. You should see yours newly created group, select it, and press Add.</li> | ||
+ | {| | ||
+ | |- | ||
+ | | [[File:Azure06.png|thumb|800x800px]] | ||
+ | |} | ||
+ | <li>Select Internet of Things or simply search IoT Hub and press '''Create'''.</li> | ||
+ | {| | ||
+ | |- | ||
+ | | [[File:Azure07.png|thumb|800x800px]] | ||
+ | |} | ||
<li>We leave default subscription and resource group and choose: | <li>We leave default subscription and resource group and choose: | ||
− | <div>1. Region – | + | <div>1. Region – (South America) Brazil South as before</div> |
<div>2. Create a name for IoT Hub</div> | <div>2. Create a name for IoT Hub</div> | ||
<div>3. Then go to '''Size and scale tab''' </div> | <div>3. Then go to '''Size and scale tab''' </div> | ||
</li> | </li> | ||
− | [[File:Azure08.png| | + | {| |
+ | |- | ||
+ | | | ||
+ | [[File:Azure08.png|thumb|800x800px]] | ||
+ | |} | ||
+ | |||
<li>For testing purposes, we are using '''F1: Free tier''' </li> | <li>For testing purposes, we are using '''F1: Free tier''' </li> | ||
<div>At the bottom of the screen '''Review + create'''</div> | <div>At the bottom of the screen '''Review + create'''</div> | ||
− | [[File:Azure09.png| | + | {| |
+ | |- | ||
+ | | | ||
+ | [[File:Azure09.png|thumb|800x800px]] | ||
+ | |} | ||
<div>And finally, Click on >> '''Create''' </div> | <div>And finally, Click on >> '''Create''' </div> | ||
− | [[File:Azure10.png| | + | {| |
+ | |- | ||
+ | | | ||
+ | [[File:Azure10.png|thumb|600x600px]] | ||
+ | |} | ||
<div>'''Note:''' Wait until resource deploys and press Go to '''Resources''' </div> | <div>'''Note:''' Wait until resource deploys and press Go to '''Resources''' </div> | ||
Line 66: | Line 88: | ||
<li> Inside IoT Hub list: | <li> Inside IoT Hub list: | ||
<div>Scroll down to Explorers and select '''IoT devices''' </div> | <div>Scroll down to Explorers and select '''IoT devices''' </div> | ||
− | [[File:Azure11.png| | + | {| |
− | + | |- | |
+ | | | ||
+ | [[File:Azure11.png|thumb|600x600px]] | ||
+ | |} | ||
<li>Press '''New''' </li> | <li>Press '''New''' </li> | ||
− | [[File:Azure12.png| | + | {| |
+ | |- | ||
+ | | | ||
+ | [[File:Azure12.png|thumb|1000x1000px]] | ||
+ | |} | ||
<li> | <li> | ||
<div>In new device creation</div> | <div>In new device creation</div> | ||
Line 75: | Line 104: | ||
<div>2. Leave everything else on default and press '''Save'''</div> | <div>2. Leave everything else on default and press '''Save'''</div> | ||
</li> | </li> | ||
− | [[File:Azure13.png| | + | {| |
+ | |- | ||
+ | | | ||
+ | [[File:Azure13.png|thumb|600x600px]] | ||
+ | |} | ||
− | <li>After you finish creation, you will be redirected back to IoT devices select yours newly created | + | <li>After you finish creation, you will be redirected back to IoT devices select yours newly created Device ID</li> |
− | [[File:Azure14.png| | + | {| |
+ | |- | ||
+ | | | ||
+ | [[File:Azure14.png|thumb|1000x1000px]] | ||
+ | |} | ||
<li>In your device window you will find information needed to connect RUT devices to Azure IoT Hub.</li> | <li>In your device window you will find information needed to connect RUT devices to Azure IoT Hub.</li> | ||
− | <div>For now, we will only need | + | <div>For now, we will only need connection string. Copy Primary Connection string by pressing copy icon next to it. </div> |
− | [[File:Azure16.png| | + | {| |
+ | |- | ||
+ | | | ||
+ | [[File:Azure16.png|thumb|1000x1000px]] | ||
+ | |} | ||
+ | </li> | ||
</ul> | </ul> | ||
==Configuring RUT955 Azure IoT Hub== | ==Configuring RUT955 Azure IoT Hub== | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Checking if Data reaches Azure IoT Hub== | ==Checking if Data reaches Azure IoT Hub== | ||
− | + | ===Linux=== | |
− | + | ===Windows=== | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | == | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | === | + | ==****Configuring the device****== |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<ul> | <ul> | ||
− | <li> | + | <li>Login to the router's WebUI and go to the <b>System → Administration → Azure IoT Hub</b> page.</li> |
− | < | + | <hr /> |
− | < | + | <li>Configure the main connection settings:<br>[[File:Azure_iot_hub_1.png]] |
− | < | + | <ul> |
− | [[File: | + | <li>The "Connection string" should be provided by Azure. The format of the string should something like this: <pre>HostName=aics-prod-hub.azure-devices.net;DeviceId=6eLklROrG5;SharedAccessKey=xcRgQpJtY13laOumje3DrxJw1R3LlqnKmVxPFA0Z7Rw=</pre></li> |
− | + | <li>Take note that a lower sending interval value will mean more data usage.</li> | |
− | < | + | </ul> |
− | < | + | </li> |
− | < | + | <hr /> |
− | [[File: | + | <li>Below the main connection settings there is a list of parameters that will be sent to the Azure IoT Hub. Place check marks next to parameters that are relevant you (once again take into account that more parameters will mean more data usage).<br>[[File:Azure_iot_hub_2.png]]<br><b>Note</b>: the parameters in the figure above are selected for demonstrative purposes. Select the parameters that are relevant to your solution.</li> |
− | + | <hr /> | |
− | <li> | + | <li>Don't forget to save the configuration:<br>[[File:Azure_iot_hub_3.png]]</li> |
</ul> | </ul> | ||
− | |||
− | |||
− | |||
− |
Revision as of 00:11, 6 February 2020
Azure IoT Hub is an open and flexible cloud platform that supports open-source SDKs and multiple protocols.
Introduction
This article contains instructions on how to configure a RUT router in order to connect to the Azure IoT Hub.
Prerequisites
You will need:
- A router from the RUT2xx, RUT9xx series or RUTX09
- An Azure IoT Hub account
Azure account creation
Visit https://azure.microsoft.com/en-us/ and create an account that will suit your needs, for testing purposes we will be using free Azure account.
Managing Azure services
- First you will want to create a Resource group for easier management of resources that you will add later. In Microsoft Azure home page.
- In new window, select Add
- And then finish creating yours Resource group
- Select your subscription, we are using Free Trial for this test.
- Name your group
- Finally, choose server location for meta data. We will choose (South America) Brazil South and will use it during test where available.
- At this moment we will skip adding Tags since we will be able to do that later if needed, so simply press Review + create at the bottom of screen and then click Create to finish setup.
- You will be redirected to Homepage, then click on Resource groups. You should see yours newly created group, select it, and press Add.
- Select Internet of Things or simply search IoT Hub and press Create.
- We leave default subscription and resource group and choose:
1. Region – (South America) Brazil South as before2. Create a name for IoT Hub3. Then go to Size and scale tab
- For testing purposes, we are using F1: Free tier
- Inside IoT Hub list:
Scroll down to Explorers and select IoT devices
- Press New
-
In new device creation1. Enter Device ID2. Leave everything else on default and press Save
- After you finish creation, you will be redirected back to IoT devices select yours newly created Device ID
- In your device window you will find information needed to connect RUT devices to Azure IoT Hub.
- Select Resource groups
If it is not in very first page, click More services and locate it there.
At the bottom of the screen Review + create
And finally, Click on >> Create
Note: Wait until resource deploys and press Go to Resources
For now, we will only need connection string. Copy Primary Connection string by pressing copy icon next to it.
Configuring RUT955 Azure IoT Hub
Checking if Data reaches Azure IoT Hub
Linux
Windows
****Configuring the device****
- Login to the router's WebUI and go to the System → Administration → Azure IoT Hub page.
- Configure the main connection settings:
- The "Connection string" should be provided by Azure. The format of the string should something like this:
HostName=aics-prod-hub.azure-devices.net;DeviceId=6eLklROrG5;SharedAccessKey=xcRgQpJtY13laOumje3DrxJw1R3LlqnKmVxPFA0Z7Rw=
- Take note that a lower sending interval value will mean more data usage.
- The "Connection string" should be provided by Azure. The format of the string should something like this:
- Below the main connection settings there is a list of parameters that will be sent to the Azure IoT Hub. Place check marks next to parameters that are relevant you (once again take into account that more parameters will mean more data usage).
Note: the parameters in the figure above are selected for demonstrative purposes. Select the parameters that are relevant to your solution. - Don't forget to save the configuration: