• Stars
    star
    453
  • Rank 96,573 (Top 2 %)
  • Language
    Go
  • Created about 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Things Network Stack V2

The Things Network Stack

Build Status Coverage Status GoDoc

The Things Network

The Things Network is a global open crowdsourced Internet of Things data network.

Getting Started With The Things Network

When you get started with The Things Network, you'll probably have some questions. Here are some things you can do to find the answer to them:

Installing and Running The Things Network Stack

Although we're all about building an open, public network, we understand that some people rather have everything privately on their own servers. On our website, you'll find some articles describing how you can set up a private routing environment and how you can deploy this environment using Docker.

Development

First, you'll have to prepare your development environment. Follow the steps below to set up your development machine.

  1. Make sure you have Go installed (version 1.11 or later).
  2. Set up your Go environment
  3. Install the protobuf compiler (protoc)
  4. Install make. On Linux install build-essential. On macOS, make comes with XCode or the developer tools. On Windows you can get make from https://gnuarmeclipse.github.io/windows-build-tools/
  5. Make sure you have Redis and RabbitMQ installed and running.
    On a fresh installation you might need to install the MQTT plugin for RabbitMQ.
    If you're on Linux, you probably know how to do that. On a Mac, just run brew bundle. The Windows installer will setup and start RabbitMQ as a service. Use the RabbitMQ Command Prompt (sbin dir) to run commands, i.e. to enable plugins.
  6. Declare a RabbitMQ exchange ttn.handler of type topic. Using the management plugin, declare the exchange in the web interface http://server-name:15672 or using the management cli, run rabbitmqadmin declare exchange name=ttn.handler type=topic auto_delete=false durable=true. If your handler's user has sufficient permissions on RabbitMQ, it will attempt to create the exchange if not present.

Next, you can clone this repository and set up the TTN part:

  1. Fork this repository
  2. Clone your fork: git clone --branch develop https://github.com/YOURUSERNAME/ttn.git $GOPATH/src/github.com/TheThingsNetwork/ttn
  3. cd $GOPATH/src/github.com/TheThingsNetwork/ttn
  4. Install the dependencies for development: make dev-deps
  5. Run the tests: make test
  6. Run make build to build both ttn and ttnctl from source.
  7. Run make dev to install the go binaries into $GOPATH/bin/
    • Optionally on Linux or Mac you can use make link to link them to $GOPATH/bin/ (In order to run the commands, you should have export PATH="$GOPATH/bin:$PATH" in your profile).
  8. Configure your ttnctl with the settings in .env/ttnctl.yml.dev-example by copying that file to ~/.ttnctl.yml.
  9. Trust the CA certificate of your local discovery server by copying .env/discovery/server.cert to ~/.ttnctl/ca.cert.

You can check your ttnctl configuration by running ttnctl config. It should look like this:

  INFO Using config:

         config file: /home/your-user/.ttnctl.yml
            data dir: /home/your-user/.ttnctl

         auth-server: https://account.thethingsnetwork.org
   discovery-address: localhost:1900
           router-id: dev
          handler-id: dev
        mqtt-address: localhost:1883

NOTE: From now on you should run all commands from the $GOPATH/src/github.com/TheThingsNetwork/ttn directory.

License

Source code for The Things Network is released under the MIT License, which can be found in the LICENSE file. A list of authors can be found in the AUTHORS file.

More Repositories

1

lorawan-stack

The Things Stack, an Open Source LoRaWAN Network Server
Go
951
star
2

arduino-device-lib

Arduino Library for TTN Devices
C
207
star
3

lorawan-devices

Device Repository for LoRaWAN devices
JavaScript
189
star
4

Manifesto

The Things Network Manifesto
94
star
5

gateway-conf

The Things Network Master Gateway Configurations
Python
92
star
6

workshops

Workshops for The Things Network
C++
81
star
7

gateway-connector-bridge

Bridge between Gateway Connector (protobufs over MQTT) and gRPC
Go
64
star
8

docs

Documentation for The Things Network
Go
63
star
9

croft

[OLD] LoRa Croft Gateway Server
Go
39
star
10

ttn-gateway-connector

Embedded C library for The Things Gateway and Linux-based gateways to connect to The Things Network
C
38
star
11

lorawan-frequency-plans

LoRaWAN Frequency Plans for The Things Stack
36
star
12

python-app-sdk

The Things Network Application SDK for Python
Python
28
star
13

wiki

[OLD] Former wiki, now go to https://www.thethingsnetwork.org/docs
Go
25
star
14

arduino-node-lib

Arduino Library for The Things Node
C++
22
star
15

kerlink-wirnet-firmware

Firmware and tools used to connect Kerlink Wirnet gateways to The Things Network Stack for LoRaWAN
Shell
20
star
16

go-app-sdk

The Things Network Application SDK for Go
Go
18
star
17

api

Generated code for accessing The Things Network v2 API
JavaScript
13
star
18

server-devenv

[OLD] Jolie, Croft, RabbitMQ and InfluxDB docker image
Shell
12
star
19

integration-azure

Microsoft Azure IoT Hub Integration for TTN Applications
JavaScript
10
star
20

rabbitmq

RabbitMQ Docker Image
Shell
10
star
21

lorawan-webhook-templates

Go
9
star
22

lorawan-stack-migrate

Migrate devices from other LoRaWAN Network Servers to The Things Stack
Go
8
star
23

lorawan-stack-application-cookbook

A guide for building an application or integration for The Things Stack. Work in progress. 🚧
Makefile
8
star
24

jolie

[OLD] MQTT and Mongo backends for Croft
Go
7
star
25

lorawan-example-atecc608a-tnglora

Example for using the Microchip ATECC608A-TNGLORA secure element
C
7
star
26

go-utils

Go utility packages used in other TheThingsNetwork repositories
Go
4
star
27

server-shared

[OLD] Shared files for Croft/Jolie
Go
4
star
28

lorawan-stack-example-clock

Example application to synchronize a device clock using class C
C
4
star
29

go-cayenne-lib

CayenneLPP in Go
Go
3
star
30

go-account-lib

Go
2
star
31

eslint-config-ttn

Eslint config for use within The Things Network
JavaScript
2
star
32

stylebook

The Things Network Stylebook
JavaScript
2
star
33

homebrew-lorawan-stack

Homebrew tap for The Things Network Stack for LoRaWAN
Ruby
1
star
34

lorawan-application-payload

LoRaWAN application payload helpers
Go
1
star
35

redis

Redis Docker Image
Dockerfile
1
star
36

landingpages

The Things Network Landing Pages
HTML
1
star