Product
December 20, 2024

Launch: LoRaWAN support on Viam

Written by
Esha Maharishi
Product Manager

Sensors are transforming industries by providing real-time data that enables smarter decision-making. However, many traditional IoT (Internet of Things) sensors rely on WiFi, which often presents challenges in terms of power consumption and range. This is where LoRaWAN comes in, offering a highly efficient alternative.

Benefits of LoRaWAN

LoRaWAN (Long Range Wide Area Network) is a wireless protocol designed to enable low-power, long-range communications for IoT devices. These sensors use minimal power and can run for months or even years on a single battery charge.

LoRaWAN sensors transmit data via radio signals in short bursts, typically every few minutes, which is ideal for many IoT applications. They can also transmit data over much longer distances than traditional WiFi, up to several miles in outdoor environments. WiFi is typically limited to a range of 150 feet.

Viam makes using LoRaWAN easy and affordable

But while LoRaWAN sensors have clear advantages, it can be complex to deploy and configure a server stack to receive, process, and forward the messages to the appropriate applications.

That’s where Viam’s unique approach comes in, making setting up a LoRaWAN system simple and affordable. With Viam, you can use inexpensive, off-the-shelf hardware like a Raspberry Pi to create your own LoRaWAN gateway, then install the Viam software on the same Raspberry Pi with minimal configuration to sync the data to Viam’s cloud.

How to use LoRaWAN with Viam

To get started with LoRaWAN on Viam, you’ll need to purchase a few small pieces of hardware:

  • Raspberry Pi (any model with GPIO pins)
  • An SX1302 Gateway HAT/concentrator board, like this one
  • One or more US915 LoRaWAN sensors, like this Dragino temperature sensor

First, follow your gateway HAT’s instructions for connecting the HAT and antenna to the Pi.

After following Viam’s installation guide to get Viam set up on your Raspberry Pi, you’ll simply configure your machine with two modules.

The first will be a viam:sensor:sx1302-gateway module that uses the Gateway HAT to listen for LoRaWAN messages over radio:

 viam:sensor:sx1302-gateway module that uses the Gateway HAT to listen for LoRaWAN messages over radio

The second will be a viam:sensor:node module that registers your LoRaWAN sensor with the gateway and allows you to configure data capture to sync the sensor’s data to the cloud.

For example, for the Dragino temperature sensor with data capture configured to match the uplink interval:

Dragino temperature sensor with data capture configured to match the uplink interval

From there, it’s easy to browse and visualize the data using Viam’s teleop:

Teleop - office temperature over time

You can also configure triggers that notify you when a significant data point is received, or build a full front-end application that consumes the data using Viam’s frontend or mobile SDK’s.

Common applications and industries

Because of their suitability for low-power, long-range communication, LoRaWAN sensors are often used to collect various types of environmental data such as temperature, humidity, and more.

Viam has recently partnered with Billion Oyster Project, a conservation initiative, that uses LoRaWAN sensors to monitor oyster beds and water quality.

Conclusion

LoRaWAN sensors offer many benefits over traditional WiFi-based solutions, especially in terms of range and battery life. With Viam’s easy-to-use, affordable gateway setup, integrating these sensors into your IoT system has never been simpler. 

Whether you’re monitoring environmental data, optimizing asset management, or enhancing conservation efforts, Viam’s platform makes deploying and managing LoRaWAN sensors both cost-effective and scalable.

Ready to get started? Find more details on the lorawan module’s GitHub readme.

On this page

Get started with Viam today!