Session:Introduction to LoRaWAN

Description An introduction to building IoT sensors and applications using the LoRaWAN standard The Things Network as free network provider
Website(s)
Type Workshop
Kids session No
Keyword(s) hardware, embedded, network, web
Tags lorawan, thethingsnetwork, iot
Processing village Village:Munich Maker Village
Person organizing User:Tiefpunkt
Language de - German, en - English
de - German, en - English
Other sessions... ... further results

Subtitle LoRaWAN Basics & Building your own sensor node
Starts at 2019/08/22 11:00
Ends at 2019/08/22 13:00
Duration 120 minutes
Location Village:Munich Maker Village

Subtitle Building an application that consumes your sensor data
Starts at 2019/08/23 11:00
Ends at 2019/08/23 13:00
Duration 120 minutes
Location Village:Munich Maker Village


LoRa Node Kit

  • Make sure to switch your FTDI programmer to 3.3V
  • Solder the two pins on the inner side of the Arduibno (A4,A5) as well, they are for I2C

LoRaWAN Application

  • This is not complete or secure at all. Drop me a line if you want to get an update on this when I figure this out. But please don't run this on a public server just like that

Node Red

apt update
apt install curl
curl -sL https://deb.nodesource.com/setup_11.x | bash -
apt-get install -y nodejs

npm install -g --unsafe-perm node-red

npm install -g pm2
pm2 start /usr/bin/node-red
pm2 save
pm2 startup

TIG Stack

apt update
apt install -y apt-transport-https

wget -qO- https://repos.influxdata.com/influxdb.key | apt-key add -
source /etc/os-release
echo "deb https://repos.influxdata.com/debian stretch stable" > /etc/apt/sources.list.d/influxdb.list

apt update
apt install -y influxdb
systemctl enable influxdb
systemctl start influxdb

influx

create database telegraf
#create user telegraf with password 'SafetyThird'


apt install -y telegraf

cd /etc/telegraf
mv telegraf.conf telegraf.conf.default
grep -v "^ *#" telegraf.conf.default | grep -v "^$" > telegraf.conf

vi telegraf.d/influx.conf

[[outputs.influxdb]]
  database = "telegraf"
  urls = [ "http://127.0.0.1:8086" ]
#  username = "telegraf"
#  password = "SafetyThird"

vi telegraf.d/ttn.conf

[[inputs.mqtt_consumer]]
  servers = ["tcp://eu.thethings.network:1883"]
  qos = 0
  connection_timeout = "30s"
  topics = [ "+/devices/+/up" ]
  client_id = ""
  username = "ttn-muc-paxcounter"
  password = "ttn-account-v2.Ey78w3jn9ttHS7kGrZ8uv6PCKCd1s6WkHGuB8YOMEPE"
  data_format = "json"
  json_query = "{app_id,dev_id,hardware_serial,\"payload\":payload_fields}"
  json_name_key = "app_id"
  tag_keys = ["dev_id", "hardware_serial"]

systemctl restart telegraf
systemctl enable telegraf

echo deb https://packages.grafana.com/oss/deb stable main > /etc/apt/sources.list.d/grafana.list

wget -q -O - https://packages.grafana.com/gpg.key | apt-key add -
apt update
apt install grafana
systemctl daemon-reload
systemctl enable grafana-server
systemctl start grafana-server