LoRaWAN/Workshops: Difference between revisions
< LoRaWAN
Jump to navigation
Jump to search
(updates latest workshop) |
(Dashboard workshop) |
||
Line 58: | Line 58: | ||
** [https://github.com/jpmeijers/ttn-resin-gateway-rpi Sources resin.io application] | ** [https://github.com/jpmeijers/ttn-resin-gateway-rpi Sources resin.io application] | ||
** resin.io website instructions not quite up to date | ** resin.io website instructions not quite up to date | ||
== TTN Application Dashboard == | |||
Note: This is not complete or secure at all. Please don't run this on a public server just like that. | |||
=== Node Red === | |||
<pre> | |||
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 | |||
</pre> | |||
=== TIG Stack === | |||
<pre> | |||
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 | |||
</pre> |
Revision as of 15:19, 16 September 2019
Intro To LoRaWAN
Build your own Gateway
- March 10th, 2018
August 27th, 2018September 24th, 2018
Parts
Part | Partnumber | Source | Cost | Notes |
---|---|---|---|---|
LoRaWAN Concentrator | iMST ic880a | iMST | 142€ + Shipping | |
RaspberryPi 3 | Reichelt | 32€ | ||
Adapter PCB | Severin | 2€ | https://github.com/ch2i/iC880A-Raspberry-PI | |
SD Card | Reichelt | 6,50€ | ||
uFL Pigtail | AliExpress | 3€ (BNC) | ||
Antenna | Aurel GP-868 | Conrad | 40€ | |
DELOCK 89583 | Jacob, eBay | 40€ | ||
"Antenne kollinear 868 MHz" | eBay Seller | 30€ | if it's not available in the shop, send them an email, they'll reply | |
Case | RF-Elements StationBox ALU (SBX-ALU-6N1E) | Varia Store | 32€ | deprecated? Seems to be out of stock everywhere |
EZ-SOE01W | Aerial | 19€ + Shipping (~10€) | No longer for sale | |
EZ-DCE15 | Aerial | 19€ + Shipping | Currently out of stock | |
RND 455-00185 | Reichelt | 7,50€ | probably not an outdoor case | |
RND 455-00137 | reichelt | 9,90€ | ||
RND 455-00148 | reichelt | 6,95€ | Same as above, but without transparent front, used for workshop 2. Works pretty well | |
WaveArena GOLD ALUBOX | wlan-shop24.de | 32,99€ | Outdoor case, works great (used in WS2) | |
PSU | 30 W, 12 V, 2,5 A | Reichelt | 12€ |
Small Stuff
- MPE 094-2-040 :: Buchsenleisten 2,54 mm, 2X20, gerade
- LED 3MM GN :: LED, 3 mm, bedrahtet, grün, 18 mcd, 60°
- LED 3MM RT :: LED, 3 mm, bedrahtet, rot, 4,5 mcd, 60°
- LED 3MM GE :: LED, 3 mm, bedrahtet, gelb, 18 mcd, 60°
- LED EL 3-800BL :: LED, 3 mm, bedrahtet, blau, 800 mcd, 20°
- DC BU21 90 :: Einbaubuchse, Ø innen: 2,1 mm
- BL 1X20G8 2,54 :: 20pol. Buchsenleiste, gerade, RM 2,54, H: 8,5mm
- RND 205-00053 :: Lötbare Schraubklemme - 10-pol, RM 5 mm, 90°
- 1N400x diode (MuMa stock)
- Jumper (Severin stock)
HowTos
- JPMeijer's Gateway building description
- Sources resin.io application
- resin.io website instructions not quite up to date
TTN Application Dashboard
Note: This is not complete or secure at all. 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