Link Search Menu Expand Document

Getting started with TTN


Table of contents

  1. Account
  2. Console
  3. Create a new Application
  4. Adding Sensor Devices
  5. Fetching the Data via MQTT
  6. Add Storage

Account

  • First of all you need a “The Things Network” account
  • The account and usage is free of charge
  1. Go to www.thethingsnetwork.org/login/ and log in
    • If you don’t have an account, click Sign up for free to create one
    • You will receive an email to confirm your email address. You have 24 hours to do so.

Console

  • The Console is the place where you can add sensor devices and gateways.
  1. Once logged in, select Console from the menue on top right, that will bring you to console.cloud.thethings.network/
  2. Choose the cluster, for Europe thats Europe 1

Create a new Application

  • Each device must be assigned to an application which you let organize and manage them.
  • It is recommended to create an own application for each project and sensor model.
  • You can add multiple sensor of the same type to the application.
  1. Log in and open the Console.
  2. Press Go to applications
  3. Click (+) Create application
    • For Application ID, choose a unique ID of lower case, alphanumeric characters and nonconsecutive - and _.
    • For Application Description, enter anything you like.
  4. Click Create Application to finish.

You will be redirected to an application page where you can add and manage devices.


Adding Sensor Devices

Refer to the indiviual sensor pages. There you’ll find step by step guides on how to add and configure each device.


Fetching the Data via MQTT

  • MQTT (Message Queuing Telemetry Transport) is a lightweight and efficient messaging protocol commonly used in IoT.
  • The Things Network exposes the data via such an MQTT Server. Your End User application simply can subscribe to it and receives all sensor data updates in real time.
  • For that its required to create an API key, refer to this documentation for details.
  • Be aware of, that this is a fire and forget principle. That means, in The Things Network Community you are responsible for saving the data.
  • If your end user application or database is down e.g. because of maintenance, the data gets per default not saved. Refer to the Add Storage section below for a short time storage option.

Add Storage

  • The Storage Integration allows storing received upstream messages in a persistent database, and retrieving them at a later time.
  • Normally incoming data in the network only gets forwarded to the end user applications via the MQTT Server and does not get saved. Fire and forget.
  • The Things Network Community offers a 24h storage which is accessible through an API.
  • Use case: If the end user application or database is down for maintenance reasons, its possible to fetch the missed data from this storage.
  • To activate it, follow these steps.
  1. Log in and go to applications
  2. Select the desired application
  3. Select the tab Integrations > Storage Integration
  4. Press Activate Storage Integration