Connecting FLOW to LoRaWAN

Enjoy our most advanced video analytics even at remote locations with limited connectivity.

DataFromSky avatar
Written by DataFromSky
Updated over a week ago

TrafficEmbedded units can be optionally equipped with a modem for connection into a LoRaWAN network. LoRaWAN is a low-power wide-area network ideal for transferring data from distributed sensors. Therefore, it allows FLOW units to send required analytic data even from very remote locations where high-bandwidth connection options are not available. You can either select a convenient LoRaWAN provider or build your own infrastructure.

Connecting to a network

LoRaWAN equipped TrafficEmbedded units come with fully integrated LoRa modem, therefore no hardware configuration is required on user side. You only need to define the network identification data provided by your LoRaWAN provider. In the following example, we will use The Things Network as a LoRaWAN provider.

To configure your LoRaWAN modem, head to Block/Interfaces menu in FLOW Insights. You will see the LoRaWAN modem listed in the connected interfaces:

Click on the edit button in the interface list and enter Device EUI, Application EUI, and the Application Key that you have created in your LoRaWAN administration environment.

Easy as that. Now you are able to send your first message from FLOW via LoRaWAN.

Message definition

Multiple messages with varying transmission intervals and payloads can be defined to transfer the maximum amount of insights from your FLOW unit while staying within your uplink budget - due to the nature of LoRaWAN, the transmitted messages need to be as lightweight as possible. FLOW allows you to fine-tune the message composition to save precious bandwidth - you define the messages literally byte by byte.

Let's create your first message by pressing the Add output button in the LoRaWAN interface settings.

Set the message name and trigger that will send the message - time interval. The first message will be sent when you hit Save settings and subsequent messages will follow in the time interval that you have set.

Basically, the message consists of a sequence of items. The first item is MessageID and is generated arbitrarily by FLOW. You will be able to distinguish between different messages thanks to this identifier. After Message ID, you can add as many items as you like with the Add item button.

Set name and expression that defines the message item. You can input anything from a constant value to complex scripts. The most common scenario would be sending a widget value:

You can check expression evaluation based on current data to make sure your definition works as intended.

To minimize payload size, FLOW enables you to set data type for each message item. Please set the type carefully - selection of too small data type will lead to truncation or data overflow. When selecting data type, the size of the message item together with supported data range is displayed. Final result - current message item value represented in selected type - is calculated:

Pressing Apply completes the message item definition and places it in the message sequence. You can add as many message items as needed. Total message length and anticipated data consumption per day considering the set message time interval is displayed. Consult these numbers with your LoRaWAN uplink budget to make sure the data will be transferred.

Please note that messages are not being sent during the definition process to avoid partial or misconfigured messages. You will see a corresponding notification in the settings window. Save settings confirms the message definition and sends the message. Countdown to the next message transmission is started.

Data retrieval

We have carefully configured messages and their payloads. These messages have been transferred through the LoRaWAN network and it is now time to access them. Navigate to your LoRaWAN provider console. There, you will be able to see a list of the received uplink messages.

Message items are BigEndian encoded and follow the sequence from message definition in FLOW. Parsing the messages is therefore straightforward:

Further communication options

LoRaWAN is only one of several communication channels available for FLOW.

You can take advantage of powerful FLOW API - REST and UDP sinks to achieve true real-time integration. Furthermore, FLOW is able to control third-party devices with relay outputs directly.

Please do not hesitate to contact us in case you have any specific requirements for your communication interfaces. We are more than happy to discuss custom integration projects!

Did this answer your question?