,

How to integrate LoRa with thethings.iO IoT platform

As you know, thethings.iO is the most simple enterprise IoT platform. An IoT platform consists of helping and improving life of developers that are connecting products to the Internet. And as good makers, we love integrating new systems and platforms to thethings.iO that enable our clients of connecting to the Internet more devices.

In today’s post we will show you what is LoRa and its basics. We’ll also show how can it be integrated within thethings.iO platform.

LPWAN protocols

Nowadays, there is a growing interest to connect devices to the Internet, and there is an emphasis on low power wireless commutations (LPWAN).

LPWAN is designed to allow long range communications at a low rate transmission among low power connected things. LPWAN stands for Low Power Wide Area Network standard.

Devices, such as ESP8266 are capable to connect to WiFi networks. We all know that its reach is limited to few meters around the access point. IoT devices require to bridge much bigger distances since we want to use them everywhere. IoT devices usually work on batteries and we don’t have lots of power for transmission.

The dilemma is… how to reach many kilometres without spending too much power? To create radio connections for a certain distance we can either increase transmission power of the system or decrease the bandwidth of the channel and that’s the key of LPWAN protocols. LPWAN is not comparable with WiFi or 2G networks, and not all a replacement for these technologies since size of data payload is not a strong point of LPWAN. On the other hand, we have all the numerous benefits that we commented before.

As you probably know there are different LPWAN protocols such as SigFox, NB-IoT or LTE-M. As you know thethings.iO is the most simple IoT platform for Sigfox, is getting compatible with NB-IoT (I don’t want to spoiler now). Nevertheless today we want to connect thethings.iO with LoRa.

LoRa

LoRa is a Low Power Wide-Area Network (LPWAN) solution coming out France and it is intended for systems that require the ability to send and receive low amounts of data over a range of many kilometres without high power costs. It is not an open protocol as it is driven by a chip company called Semtech.

The LoRa wireless system makes use of the unlicensed frequencies that are available worldwide. The most widely used frequencies / bands are 868 MHz (Europe), 915 MHz (North America) and 433 MHz (Asia). LoRa is capable of providing data rates from between 0.3kbps to 50kbps which varies based on required range and interference. The LoRaWAN protocol provides both signing and encryption for parts of LoRaWAN packets.

LoRa topology. Source: https://www.mwrinfosecurity.com/

LoRa solutions are made up of nodes and gateways that communicate with a network server. Nodes represent connected things and they are typically low powered and communicate wirelessly with one or many gateways. Gateways are fewer in number, and transfer data from the nodes back to the network server using standard IP connections. A LoRa solution therefore follows a “star of star” topology, where multiple nodes talk to one or more gateways. Network server represents the edge of the systems that would store and parse the data sent from the nodes.

About The Things Network

The Things Network is a community-based, global initiative to provide free LPWAN coverage over LoRa. LoRaWAN coverage is entirely crowdsourced. Members also contribute by providing support or through software development.

The Things Network Backend route messages from gateways to the right application through the Internet, and back. In our case, the application would be thethings.iO platform. The question is, how can we integrate The Things Network data with our platform? How can receive the data  sent through The Things Network in thethings.iO

Integrating The Things Network within thethings.iO

In order to integrate both platforms we encourage you to read this article https://developers.thethings.io/docs/http-integrations#section-a-integration-example-with-the-things-network in our Developer Center at the thethings.iO, but here you can find a summary of the steps.

  1. Get and customize your callback URL with the productid and the hash. You can find both parameter in the Product Details of the Things Manager. The base path of the URL should be like this https://subscription.thethings.io/http/{productId}/{hash}?idname=dev_id*.
  2. Insert this url at the HTTP Integration section of The Things Network Platform.
  3. Finally, go back to thethings.iO Cloud Code section a create function with the name http_parser. Here you can find an example:
function main(params, callback){
  var result = [
      {
        "key": "temperature",
        "value": params.payload.payload_fields.temperature
      },
      {
        "key": "$settings.name",
        "value": params.payload.hardware_serial
      },
      {
        "key": "$geo",
        "value": [params.payload.metadata.longitude,params.payload.metadata.latitude]
      },
  ];

   callback(null, result);
}

Once the URL is configured and the Cloud Code function is coded, everything is ready to start receiving data and monitoring from thethings.iO IoT Platform.

We hope all this information will be helpful for you. If you want to know more about us, you can create an account by clicking here, sign up to receive our monthly newsletter or follow us on Twitter! Stay tuned and be the first in knowing the latest news of the IoT world and thethings.iO

How to display data from your things on a map with thethings.iO IoT platform

Some customers just contact at thethings.iO because they heard that it’s super simple to use thethings.iO IoT platform to visualize their devices, draw some points in a map or apply business logics on their connected devices. And that’s right! thethings.iO is the most simple IoT platform. Nowadays we are helping hundreds of companies and developers to reduce the time to market of their IoT projects just using thethings.iO IoT solution.

One of the most popular question is how to display data from connected devices on a map. Seriously it’s very simple to do it with thethings.iO IoT platform. Nevertheless, there are tricks to have more fancy maps, it all depends if you have 2, 3 or five minutes 🙂

How to send geolocated data to the IoT platform

First of all, it’s important to understand that thethings.iO has 2 ways to geolocation things.

Locate the device

We call this $geo resource, or also magic resource. This magic resource allows the update of the current thing position in GeoJSON format. GeoJSON and legacy [long, lat] pairs are accepted as valid input value, or you can use the geo attribute: the final value will be saved in GeoJSON format.

Find here the code to send data to locate the device.


{
"values":
[{
"key": "$geo",
"value" : {
"type": "Point",
"coordinates": [2.154007, 41.390205]
}
},
// OR using legacy [long, lat]
{
"key": "$geo",
"value" : [2.154007, 41.390205]
},
// OR using geo attribute object
{
"key": "$geo",
"value" : null,
"geo" : {
"lat": 41.390205,
"long": 2.154007
}
}]
}

Locate a sensor read in the space and time

Sometimes the GPS reading does not correspond to a sensor read position, so this is the reason why we differentiate among them. Find here the code to send data with this second way to geolocate a device or a sensor read.


{
"values":
[{
"key": "my-geolocated-key",
"value" : 23,
"geo" : {
"lat" : 41.4121132,
"long" : 2.2199454
}
}]
}

How to show things on a map

Now that we have geolocated devices, let’s paint the devices and routes on a map.

It’s simple right? Feel free to register at thethings.iO and contact us if you have any question.

Announcing Sigfox & thethings.iO partnership

Today at thethings.iO we are excited to announce a strategic partnership between Sigfox and thethings.iO to bring the most simple enterprise IoT platform with the most simple connectivity solution to the business world.

Since few weeks ago, thethings.iO became an official partner of Sigfox connectivity. That means that thethings.iO is able to sell Sigfox connectivity for their customers, including this price on thethings.iO service.

At thethings.iO, this milestone is an important mark in our company’s journey. Sigfox simplicity enables companies to create successful business cases around Internet of Things and connectivity that were not possible before LPWAN was properly working and business available. With this partnership thethings.iO can provide in a most simple way the state of the art IoT platform to help companies to collect their data, analyze it and visualize it in a very simple way and ready to go.

Currently, thethings.iO serves hundreds of companies using Sigfox and millions of requests worldwide.

Sigfox and thethings.iO are strong believers of how the Internet of Things can be a gamechanger for most of the companies in several verticals. This is the reason why thethings.iO with Sigfox wants to offer a very tangible and plug&play solution at the market. thethings.iO has achieved the partnership to re-sell Sigfox connectivity. So from now your company can enjoy an IoT solution for your industry in a really simple way.

Contact us if you need further information about what thethings.iO can offer to your business.

Connect a Pycom SiPy with thethings.iO

On today’s post we’re going to show you how to connect a Pycom SiPy to thethings.iO. The newest Pycom SiPy supports multiple networks such as Sigfox, Wi-Fi and BLE. The SiPy it’s great for prototyping products for it’s small size, development tools and enormous possibilities. At thethings.iO we worked internally in several projects with the SiPy and we have the first customers prototyping with this board, using thethings.iO IoT platform to collect, visualize and analyze the data.

Configure the Pycom SiPy

Before following the next steps, make sure that you have the required hardware:

  • A SiPy with the expansion board.
  • A micro USB cable.
  • An active internet connection.
  • A thethings.iO account. If you still don’t have an account, please register at thethings.iO IoT platform.

Now it’s time to start configuring the device.

  • Visit the Pycom Getting Started portal in order to download and configure all the necessary software for your SiPy.

Register the device with Sigfox network. If you need any help with the Sigfox account, feel free to contact us.

  • In order to allow the device to send messages throw Sigfox, we need to activate it at the Sigfox backend.
  • Please, follow the steps mentioned in the Pycom documentation about Registering a device.

It’s time for flashing the software of the Pycom SiPy.

  1. We already have a Github repository with the code that sends the 2 strongest Wi-Fi MAC addresses and the temperature, divided into 2 payloads.
  2. Download the repository  and open it with the Atom editor configured with the Pymakr plugin.
  3. Plug your Sipy with the computer using the USB port and connect to its wifi network.
  4. Having opened the code in the Atom IDE, click on Connect down in the Pymakr plugin.
  5. Once the connection is established, Sync the code with the device. Once its send the device will reboot and start running the flashed code.

Connect the Pycom SiPy with thethings.iO IoT platform

Once you have a thethings.iO account, if you don’t have a Sigfox product to use, follow this steps:

  1. Enter to your account and click on Things.
  2. Press on Create new IoT product.
  3. Select Sigfox as Serialisation format.
  4. Give a name and choose Akeru for the board.
  5. Click on the previously created product and copy the subscription URL.

Now it’s time to register thethings.iO Callback at the Sigfox backend. Once you have copied the previous URL, navigate to the Sigfox backend.

  1. Click on your device.
  2. Navigate to callbacks.
  3. Create a new callback. Make sure you choose DATA as the type of callback and UPLINK as the type of service.
  4. Copy the URL inside the URL pattern.

The url should look like this: https://subscription.thethings.io/sgfx/1234/abcdefghijklmn?id={device}&data={data}&radius={radius}&seqNumber={seqNumber}&snr={snr}&time={time}&station={station}&rssi={rssi}&lat={lat}&lng={lng}

Update the sigfox parser at thethings.iO

Back into thethings.iO, move to the cloud code area. You’ll see that a new function called sigfox_parser is created.

Copy the contents of the sigfox_parser of the previous Github repository and make sure you get your GOOGLE API KEY to change it on the code.

Available resources & Dashboard creation

Once the device sends its first messages, the following resources will be shown:

  • Geolocation: Google geolocation based on 2 strongest wifi’s.
  • Google Accuracy: Accuracy of the previous geolocation.
  • Temperature: Temperature taken by the device.

If you also want to add the Sigfox Geolocation service, make sure to read our last post about the Sigfox Geolocation!

Feel free to use thethings.iO widgets in order to create awesome IoT dashboards!

Connect your Pallets to the Internet and don’t waste more material

Is Your Company Losing Thousands of Pallets Each Year? Do you need to manufacture or purchase dozens or hundreds of new Pallets because you loose most of your existing Pallets? At thethings.iO partnering with Sigfox, we provide a solution for this leak of material on your company. Now you can track your assets in a very low cost way in order to have all your assets geolocated and understand your operational insights in (almost) real-time.

Pallet Delivery & the Problem

Pallet delivery is important because this method of delivery is highly efficient and cost effective. Many delivery companies have millions of pallets moving through supply chains throughout different regions of the world. So what is the problem? It is extremely difficult to keep track of such a large number of pallets and therefore they are often lost or mishandled and the benefits of efficiency and cost are repudiated.

Companies are losing thousands of pallets each year. They are sometimes lost in transport, but often they are also misplaced while being stored in huge warehouses. Additionally, it’s not rare for pallets to be stolen. People steal pallets that are made of wood, plastic, and metal and then sell the materials for money. The goods in the pallets are also often lost making this problem even worse for companies making deliveries. There are have been scenarios where truck drivers even sell palettes to make some side money. Clearly, losses are potentially huge.

Location Tracker Solution

thethings.iO offers a solution to end this costly problem. The Location Tracker enables companies to connect their pallet’s to the Internet in order to track there whereabouts in real-time.

The tracker is so simple to set up. Companies just have to install a small, portable sensor to the pallet’s wit long battery life (up to 3 years of battery) and then they can begin to monitor and manage there locations. Alerts can be sent according to the settings set by the company. For example, if a palette leaves a specified location range, the company can be sent an immediate alert. This Location tracker is the key to preventing mishandled and lost palettes while maintaining the systems high efficiency and low costs.

With thethings.iO solution, based on Sigfox technology, your company will be able to identify the leak of pallets and materials during your delivery chain. That means that your company will reduce considerably the pallet losses in short time with a real low-cost technology with connectivity in almost 60 countries all around the world that will make the payback easy to achieve in several months. The installation process only take 3 minutes for pallet and the technology is secured on the wood or plastic for long time.

thethings.iO will provide an operational dashboard with real-time information about the location of your pallets and relevant information about them.

Contact us at thethings.iO in order to have a free demo about our newest location trackers for Pallets.

thethings.iO is Featured as one of the Top 10 IoT Solution Providers by Insights Success magazine

Insights Success has recently published a special issue, “The 10 Most Innovative IoT Solution Providers”. Insights Success is the Best Business Magazine in the world for enterprises. In this issue, they talk about how IoT is changing the world by changing people’s everyday lives. thethings.iO is excited to be featured as one of the top 10 most innovative and prominent IoT solution providers of 2017!

Insights Success features thethings.iO as the most simple enterprise platform. This slogan comes from our ability to allow companies to focus less on the cloud and more on their products. The services we provide are unique and very simple to use. Here at thethings.iO customer satisfaction is our number one priority and that is why we make the adoption of IoT as quick and easy as possible. Despite some challenges, thethings.iO and the IoT market have a very promising future.

Go to http://magazines.insightssuccess.com/The-10-Most-Innovative-Iot-Solution-Providers-June2017/ to find out more about thethings.iO and other innovative IoT solution providers.

Webinar – Build Apps and dashboards with thethings.iO

Most of the times Internet of Things connected devices complements the user experience of the product with beautiful mobile applications or web interface. Usually it is a native app sometimes a website, having in mind that the UX is essential for the success of the connected product.

At thethings.iO IoT platform we help companies who are connecting their products to the Internet to collect data, analyze it and visualize it. We are working with dozens of companies giving them support to build their own mobile apps or frontend on the top of thethings.iO API (or websockets). On the other hand, we have several customers using thethings.iO dashboard composer (Apps Manager) in order to give access to 3rd parties or their final customers to the data of the devices (or subset of data).

During this webinar, we will explain how to connect a mobile application with thethings.iO API or how you can build a dashboard with thethings.iO dashboard composer.

If you are connecting a product to the Internet and you want to reduce your time to market. Don’t waste more time and contact us at thethings.iO. thethings.iO is the most simple enterprise IoT platform.

Locate your luggage during your holidays with thethings.iO

Has your luggage ever been lost while traveling or been traveling with someone whose did? If so, you know it is a nightmare that can ruin your trip. The situation is extremely frustrating and stressful for travelers. Imagine traveling to a ski resort with no ski apparel or having to go to an important business meeting with no business suit. That would definitely be a downer on your trip. Often, people never see their lost luggage again and it is donated to charity or auctioned off for a bargain price.

In 2016, about 6 bags per 1.000 passengers were lost. This number translates to around 20 million suitcases that were lost that year. Surprisingly, this number was low compared to previous years. The number of travelers has been on the rise over the past years and trend is expected to continue. This challenges airlines ability to handle everyone’s luggage properly ever further. Airlines have made a lot of improvements to their luggage transit systems, but despite their efforts they are still losing many bags each day. Most often, connecting flights have the highest rates of lost luggage.

Don’t let lost luggage ruin your trip whether it is for work or vacation! With thethings.iO Location Tracker you can travel stress-free and hassle-free. The tracker allows you to monitor your luggage while it is in transit. It is very user-friendly and allows you locate your luggage in real-time right from your phone with a dashboard, e-mail and SMS alerts.

The thethings.iO Location Tracker is a connected sensor that you connect inside your luggage and allows you to locate them. Each of the geolocations corresponds to a moment so you know when and where the asset is, in real-time.

This Location Tracker is one of the first thethings.iO IoT devices connected with Sigfox in an open, scalable manner, operated with Sigfox connectivity and ready to deliver between 4 to 6 weeks. The low power consumption of this Location Tracker makes that your luggage can be tracked during up to 3 years without changing AA batteries.

Contact thethings.iO for further information about the Sigfox Location Tracker.