question

engmoh-3069 avatar image
0 Votes"
engmoh-3069 asked SandervandeVelde42 commented

Gateway and Azure IoT hub

Hi,

I have the following scenario so any advise!
a device / sensor sends data (measurements) to Gateway by using LoRaWan, this gateway offers many APIs to read the collected data and I did that by using Postman, now what's the best scenario to integrate this gateway with Azure IoT then I can stream and represent the collected data in Azure!

Thanks in advance,

azure-iot
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

SandervandeVelde42 avatar image
2 Votes"
SandervandeVelde42 answered SandervandeVelde42 commented

Hello @engmoh-3069 ,

this is an ice IoT use-case.

With gateway, I expect you mean the local gateway which takes and exposes messages received by LoraWan devices in the neighborhood.

You are already able to receive messages using a REST endpoint on your gateway using POST of GET calls (via Postman).

What you need is some way to make the REST calls using code, optionally convert the incoming message in a JSON format, and finally, send that message to the Azure cloud.

The easiest way is just to write some application in a programming language of your choice (C#, Python, NodeJS, etc.) to make the REST call and do the conversion. And consume the Azure IoT SDK related to your programming language to send an IoT Hub message.

The only thing to remember is that you have to redeploy your application by hand on the local device if you make a change in the program.

A more reliable way is making use of Azure IoT Edge. You still write that application but you put it in a docker container which is deployed to your device using Azure IoT Edge.

If your gateway is running eg. Ubuntu Linux or Raspbian and it's capable to run the Moby container runtime, your gateway can become the Azure IoT Edge device.

Check out this MS Learn Module about Azure IoT Edge.


· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for your reply,

I think this is a good approach if we want to read the measurements from APIs but I am trying also to do the opposite way to configure the gateway which is Netmore to send all the measurements to Azure IoT hub, then the question is how can I continue in this flow correctly to represent the data!

0 Votes 0 ·

Hello @engmoh-3069 ,

Once the data arrives in the IoT Hub, there are several ways to represent the data.

Here are a few alternatives:

  • You can ingest the data using Azure TimeSeries Insights

  • You can of course build your own website with eg. Asp.Net MVC Blazor or an equivalent programming model

  • You can use Azure PowerBI in combination with Azure Stream Analytics using the PowerBI output.

  • Use some open-source alternative like Grafana

Here is an introduction module of MS Learn about Stream Analytics.

1 Vote 1 ·

Once again thank you @SandervandeVelde42,

I started to build the pipeline as the following:

Gateway sends data (they are using the default Shared access policies / device / primary connection string) --> Azure IoT Hub (configure built-in endpoint) --> Azure Stream analytics job with IoT hub as input and Power BI as output --> Power BI

but the problem is I can't find the dataset in Power BI in my workspace after running stream analytics job and I am wondering if there is any required action to import this dataset or is there any error in the previous pipeline?

0 Votes 0 ·
Show more comments