The sensor data received on the Kerlink Wanesy Management Centre doesn’t have to be stored only there. It is possible to integrate various dashboards or other cloud servers such as Microsoft Azure with Wanesy by setting up the HTTP push.
In this blog post, I will guide you through the steps you need to take to integrate Kerlink’s Wanesy Management Centre with Microsoft Azure.
Setting up Microsoft Azure
The first step for integrating your data is to create an account on Microsoft Azure. You can do this for free by visiting the Microsoft Azure website: Create Your Azure Free Account Today | Microsoft Azure.
There are various Pricing Plans to choose from. Some features may be limited in the free variant. The account, however, is free to create and features are paid on a pay-as-you-use basis.
Once the account is created, we will need to use the IoT Central Application and the IoT Hub platform. The IoT Central Application can display data on the dashboard as well as integrate the device templates. The IoT Hub platform is used to adapt the WMC push to Azure.
Setting up the Azure IoT Central Application
In the search bar type ‘IoT Central Applications’ and hit search. You could also click on the icon if shown on the main page.
Then click on the Create button and fill in the boxes as in the picture below.
If the Resource group tab is empty, click Create new and type in a new name.
At this stage the URL is chosen, by default, it is the name of the resource .azureiotcentral.com but you can adjust it accordingly.
Once all the information is inserted, click on the Create button and give it a few minutes to deploy your application.
When you have a “Your deployment is complete” message, you can move forward to the next step.
Connecting Your Devices
Go to your IoT Central Application– the quickest way is to go to the URL chosen in the previous step.
In my example that will be kerlink-demo.azureiotcentral.com
Once you are in your dashboard, go to the Administration section and go to ‘Device Connection’. Find and copy Scope ID. Go to the IoT devices group type and copy the Primary Key. Save it in a text file as it will be required at a later stage.
Now, go to the following link to create your custom template. https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FBenoitDuffez%2Fiotc-device-bridge%2Fmaster%2Fazuredeploy.json<
Choose ‘Kerlink Resource Group’ and paste the Scope ID here as well as the Primary Key. Paste the Primary Key in the “IoT Central SAS Key” box.
Click Next: Review + create. Review the options and click Create.
Wait a minute until the Deployment is done and when you have the message saying “Your deployment is complete” you can move on to the next steps.
Adding Your Devices to Kerlink WMC
Now is a great time for you to add your devices to the Wanesy Management Center. You can skip this step if you have devices already added. Just remember to create a new push configuration later and assign it to the existing cluster.
First of all, login to WMC, go to the Administration section, then select Clusters. In the bottom right corner click the plus icon and create a new cluster. A pop up window till open, in here you will need to give it a name and disable Push configuration. (later on, once we have the push configuration made, we will need to enable this).
Click Validate. Once you have done this, go to the Administration section and ‘End Devices’ tab. Click on the plus icon in the bottom right and fill in all the information. Follow instructions until you can click Validate. When you click Validate the device will be added to the WMC.
Setting up the Push URL
Go back to Microsoft Azure and go toIoT Central applications, click on the Kerlink resource group and click on the function app which has a thunder icon.
Once that is open, go to the Functions section on the left-hand side menu and click on Functions. Click on the function that triggers the HTTP event and select the Code + Test tab. Give it a minute to load and from the tabs on the top of the screen select Get function URL.
In the pop-up window leave the key as default and copy the URL.
Now go to Kerlink Wanesy and click on the Administration section and Clusters tab. On top of the screen select Push Configurations and then click the plus icon in the bottom right.
In the pop-up window, type the name, select HTTP type and Payload message detail level. Click next.
On the next screen paste the URL from Azure. You need to cut the URL from its end up to the question mark symbol (including the ?). You will then need to pastethis into the Data Up route box.
This is my example link from Azure:
In the URL box should be this part:
And in the Data Up route the rest, that is:
Then click Next, don’t choose any SSLs, click Next again, and click Validate without creating any custom headers.
Now go to the Clusters tab on the top of the screen. Find the cluster you have created previously (or find the cluster that you have the sensors in) and click on the pencil icon next to it to edit.
In the pop-up window under the ‘Push’ section, click Enable and from the drop-down list select the Push configuration that you’ve just created. Press Validate.
Once that is done, uplink messages will start being pushed to Azure from the next time the sensor sends the uplink.
Creating the Device and Device Template on Azure
In MS Azure go to your IoT Central Application. The easiest way to get there is to go via the URL created at the beginning – the name of the resource .azureiotcentral.com
In my case it is kerlink-demo.azureiotcentral.com.
You can start with creating a device. Click on Devices and then New. Type the name and Device ID. You can use any name and any ID, for demo purposes I’ve selected the name of the sensor as the name and its DevEui as the ID. You can leave the Template as unassigned at this stage. Then click Create.
Once you create a device, it will have a “registered” status. After it starts sending data, the status will change from “registered” to “provisioned”.
You can then go into the device screen and in the Raw data screen, you should see uplink messages. Go to the Manage template tab at the top of the screen and select the Auto-create template option. Then click on Create template button.
Once you go back to the devices tab and click the row with a message, you will see more detailed pieces of information for each message.
It is worth mentioning here, the number of messages you can see on Azure depends on the plan you’ve selected earlier. Free plans limit the number of messages quite drastically. If you exceed the number of messages they will just stop appearing in the Azure.
If you have a device sending the uplink every few minutes, you will most likely exceed the limit in no time.
“How To” video
To summarise this article up to this point you can watch the above video.
Further steps to use the decoder and fully decode the data will be researched soon. The way to do it is by creating the IoT Hub in Azure and registering the device there along with linking the decoder to it. The further steps of how to do it are currently under development.
To speak with a member of our team about integrating Kerlink Wanesy with your chosen cloud server call us on 01484 599544 or contact us.