This guide will walk you though integrating a LORA device to Azure IoT Hub using solution templates. This guide involves importing multiple solution templates depending on which LORA network server you are using and what device type you are looking to integrate.
Before starting this guide, be sure to read the deep dive here: LORA-to-AzureIoT
If you already have an IoT Hub, you can skip this step.
For a detailed walkthrough from Microsoft, check out the following link:
Depending on which LORA Network Server you are using, follow the relevant guide to configure your server.
After configuring the LORA Network Server, continue to the next step.
Follow the steps below to import the solution template:
Click Solution Templates at the bottom of any page.
Find the LORA to Microsoft Azure IoT Hub template and click Import.
Follow the instructions below to import the template:
There are several ways to configure decoders for your LORA sensors, you can select from the following:
There are several templates already available for common devices, and new ones are being added as needed. Check out the solution templates and filter on
Device and import these templates.
LORA to Azure IoT Hubtemplate, after importing them you do not need to modify the triggers.
Decode Sensor Datatrigger to add logic to route to the decoder. You can see a sample commented out that shows how to route based on ports.
Decode Sample Data trigger for an example of where to start. Here are the key considerations when creating a custom decoder:
Decode Sensor Datatrigger
Each decoder trigger must be given a unique filter based on the key for the generic event. This is to ensure that you can route events from the
LORA Message Router trigger to the correct decoder. Additionally, you must add logic to the
LORA Message Router trigger to route traffic to your decoder. The most common way to manage multiple different sensor types is to ensure they are publishing on separate data ports.
You now should be able to start sending data from your devices and see that data work its way through the system. As your devices transmit, you will see activity registered in the IoT Bridge.
With the device connected, you should now see it connected in the IoT Hub, and data being updated in the device twin.