This guide will walk you though integrating a LORA device connected to the Everynet LNS to Azure IoT Hub using solution templates. This guide involves importing multiple solution templates depending on which LORA 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:
https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-create-through-portal
Everynet quickstart
solution template by clicking the Import button.Filters
on the main menu.join_request
, uplink
, downlink
, and location
.Connections
on the main menu.HTTP
, set the filter to the ID you stored from step 4, and set the application URL to https://bridge-us.tartabit.com/webhook/<webhook from above>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 LORA
and Device
and import these templates.
LORA to Azure IoT Hub
template, after importing them you do not need to modify the triggers.Decode Sensor Data
trigger to add logic to route to the decoder. You can see a sample commented out that shows how to route based on ports.The trigger scripts use a javascript runtime, you can decode the payload in the script. Check out the Decode Sample Data
trigger for an example of where to start. Here are the key considerations when creating a custom decoder:
Decode Sensor Data
triggerEach 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.