Long-range IoT

The Things Network: a LoRaWAN network built by its community

Narrowband technology is today one of the best ways to create long-range IoT projects such as Smart City, Industry 4.0 or even Smart Farming, as it offers great wireless range and penetration while being energy efficient.

In previous publications we have talked about other 0G technologies such as Sigfox, and the benefits they bring by not overloading the traditional lines of communication on the Internet. This time the subject is another project of the IoT data infrastructure: The Things Network.

The Things Network is a European company whose proposal is to create the world's largest LoRaWAN network through a large community of users in which anyone can participate, just by signing up on its website or contributing to the gateway network. Thanks to this orientation it counts today with almost global coverage: almost 11,000 gateways that support more than 100,000 developers, as its website shows.

World map of The Things Network gateways, clustered by region, under the line: at this moment, there are 11426 gateways up and running
The gateway map on The Things Network website at the time of writing: 11,426 gateways up and running, with the densest clusters in Europe. thethingsnetwork.org

All of this has been created by a company with an open source vision, focused on giving other developers a flexible tool to democratize IoT technology, and making a strong effort to build a development community, as its "community" section shows. The Thinger.io team found many similarities with its own vision.

Why integrate

TTN brings the data in; a platform has to do the rest

Starting a project on TTN's infrastructure is quite simple.

TTN retrieves data from any LoRa device connected through a gateway registered in its service, and leaves the data exposed on its server until a new message arrives. This solves one of the bigger problems of many IoT projects: getting an internet connection where no traditional data network, such as WiFi, GPRS or 3G, can be reached.

What The Things Network gives

  • Connectivity for LoRa devices through community gateways
  • No WiFi, GPRS or 3G needed at the device
  • Device data on the TTN server almost in real time

Until the next message arrives

What a project still needs

  • Storing the data
  • Analyzing it
  • Showing it in dashboards

Where Thinger.io comes in

Once the device data arrives at the TTN server it can be shown almost in real time, but other services are required to store, analyze or show it in dashboards. That is where Thinger.io becomes the complement of any project, simplifying these and other tasks in a scalable, robust and very simple way.

The plugin

From a data bucket per device to one plugin per application

The integration of any The Things Network project with Thinger.io is based on a callback integration tool of the TTN web console, which sends data to any third-party platform through HTTP requests.

The traditional callback integration

TTN messages sent from each device to a Thinger.io data bucket. It had some limitations:

  • The payload metadata could not be separated from the message
  • A data bucket and a request were required for each device, hard to work with on large device networks
  • Some Thinger.io features were lost

The integration plugin

A software interface that adapts TTN HTTP requests to a format Thinger.io can use:

  • Integrates TTN "Applications", the device groupings of the TTN infrastructure, instead of individual devices
  • Simplifies data acquisition and processing
  • Takes full advantage of both technologies

Knowing that developers were already creating projects with both platforms through the traditional integration, the team decided to take on an integration project to provide a better service to TTN users.

Diagram: LoRaWAN devices talk to gateways, the gateways to The Things Network, and the integration plugin carries data both ways between The Things Network and the Thinger.io platform, which feeds data buckets, dashboards and endpoints
The integration plugin sits between The Things Network and the platform, and the data lands in data buckets, dashboards and endpoints.

The integration has been built with the new Thinger.io plugin system, which extends the capacities of the platform with new features in a modular way: the base platform stays simple to learn and use, with the flexibility to adapt it to any use case. The plugin simplifies the integration in a way that is transparent to the developer and improves the deployment of large device networks.

Plugins are installed today from the Marketplace, where The Things Network plugin sits with LORIOT and ChirpStack among the LoRaWAN network servers. See device connectivity.

What it adds

Device management, payload processing and more

On top of the integration by application, the plugin offers some advanced functionalities.

Improved device management

  • Device auto-provisioning to simplify large network deployments
  • Connection timeout alerts
  • Device geolocation support and representation in the Google Maps widget

Uplink with payload data processing

  • Custom payload processing to convert float variables, transform units or process data with custom algorithms
  • Automatic storage in data buckets
  • Third-party integrations with a custom endpoint manager

Extended features

  • Simple configuration of device program parameters in JSON format
  • Downlink requests with payload encoding that translates JSON into an 8-byte message
  • Device data in the Node-RED rule engine
The device view of the Thinger.io console on a laptop: transmitted and received data, IP address, device state online, last connection, and the device location on a Google map near Madrid
Device geolocation in the console: the device view shows the location on a Google map. The screenshot, shared with the Sigfox plugin, shows a Sigfox device.

Try it

All you need is a LoRa device and TTN coverage

If you are thinking of testing this technology, go for it. You only need a device equipped with LoRa: check whether your area has TTN coverage on The Things Network website, then follow the instructions in the documentation of both platforms to connect the device and make the integration.

That opens a world of possibilities: data representation of the devices in dashboards, status triggers with the Node-RED rule engine, email alerts and much more.

In 2021 The Things Network launched its new stack, and the plugin followed: TTN Stack V3 Integration Plugin.

Bring your TTN applications to Thinger.io

Auto-provisioning, payload processing, storage and downlinks for a whole TTN application, installed from the console.