LoRaWAN/Workshops: Difference between revisions
< LoRaWAN
Jump to navigation
Jump to search
(updates latest workshop) |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Intro To LoRaWAN == | == Intro To LoRaWAN == | ||
* [https://www.thethingsnetwork.org/labs/story/creating-a-ttn-node TTN Lab] | |||
* [https://www.tinytronics.nl/shop/nl/communicatie/rf(id)-wifi-bt/things-network-lorawan-node-workshop-2017 Kit for sale] | |||
=== Parts === | |||
{| class=wikitable | |||
! Part !! Partnumber !! Source !! Cost !! Notes | |||
|- | |||
| PCB || || SeedStudio, JLCPCB || 2 || | |||
|- | |||
| Arduino || Pro Mini, 3.3V, 8Mhz || AliExpress || 1,90 || | |||
|- | |||
| Antenna || 868Mhz SMA || AliExpress (NextRF) || 1,50 || | |||
|- | |||
| SMA Connector || Edge mount || AliExpress, DigiKey || 0,15 || | |||
|- | |||
| LoRa Module || RFM95 || DigiKey || 7,6 || | |||
|- | |||
| Battery Holder || 2x AA || AliExpress || 0,20 || | |||
|- | |||
| Case || Abzweigdose 75x75 || Hardware store [https://www.bauhaus.info/schalterdosen-deckel/abzweigdose/p/12165125], [https://www.hornbach.de/shop/Spelsberg-Abzweigkasten-SD7-75x75-mm-33290701/6060827/artikel.html?] || 0,70 || | |||
|} | |||
== Build your own Gateway == | == Build your own Gateway == | ||
Line 58: | Line 78: | ||
** [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> | |||
==== References ==== | |||
* https://devconnected.com/how-to-setup-telegraf-influxdb-and-grafana-on-linux/ |
Latest revision as of 10:38, 18 February 2020
Intro To LoRaWAN
Parts
Part | Partnumber | Source | Cost | Notes |
---|---|---|---|---|
PCB | SeedStudio, JLCPCB | 2 | ||
Arduino | Pro Mini, 3.3V, 8Mhz | AliExpress | 1,90 | |
Antenna | 868Mhz SMA | AliExpress (NextRF) | 1,50 | |
SMA Connector | Edge mount | AliExpress, DigiKey | 0,15 | |
LoRa Module | RFM95 | DigiKey | 7,6 | |
Battery Holder | 2x AA | AliExpress | 0,20 | |
Case | Abzweigdose 75x75 | Hardware store [1], [2] | 0,70 |
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