Let's now speak about our application. 1
We'll use three different services to set up the overall IoT platform. 2
Node-RED, 3
Influxdb, 4
And finally Grafana. 5
First we have Node-RED. 6
This is our No code programming tool. 7
We've used it several times already and we're going to use it again for the MQTT connection with our 8
LoRaWAN server. 9
So node-RED will be an MQTT client acting as a subscriber to get the uplink data from the end-device 10
or as a publisher to provide data to the end-device. 11
And on the other side, Node-RED will also be connected to the Influxdb database. 12
Of course, Influxdb is not the only choice and we could have used many others, but it's a perfect 13
solution to manage time series data. 14
In our case, that's exactly what we need because with a LoRaWAN device we'll mostly display timestamp 15
data from sensors. 16
So Node-RED will receive the census data on one side and simply feed the database on the other side. 17
But where is this database? Actually influxdb is not a simple node in Node-RED because of course there will 18
be a node to provide the interface between Node-RED and Influxdb. 19
But Influxdb is a real piece of software that needs to be installed separately. 20
Of course we'll explain how we can do that later. 21
Great. 22
So, so far we have retrieved our data from the LoRaWAN server and we have stored them in a database. 23
Now we need to build the dashboard. 24
And that's what Grafana is all about. 25
It's a free and open source visualization tool. 26
It can be used on top of a variety of different databases, but as you've guessed, we're going to use 27
it on top of Influxdb. 28
So with Grafana, we'll create dashboards and depending on what we want to display, then Grafana will 29
request all data it needs directly to the database. 30
Then when we're happy with tables, graphs or chart created, then we'll gather them in a dashboard. 31
So how will we set up these three services? 32
I'm sure you know, because once again, we'll use Docker. 33
So the installation will be very easy. 34
And where can we set up this IoT platform? 35
Anywhere. 36
That's exactly the same story as the installation of 37
our own private LoRaWAN server. 38
We can use our own PC, a virtual machine, a public server, or even a Raspberry Pi. 39
In our case, we'll use a public server. 40
Exactly the same as the one used for ChirpStack on The Thing Stack installation. 41
And we're going to install these three services on the same machine. 42
We could imagine that for a bigger deployment, services would be set up on different servers. 43
For example, a specific server would be used for the database and another one for Grafana. 44
Great. 45
So anyway, whether we install everything on the same server or on different machines doesn't change 46
anything because in both cases, containers told to each other thanks to an IP address on a specific port. 47
Let's see how it looks like in our situation where everything is on the same public server with only 48
one IP address. 49
It's like this most of the time. 50
Node-RED will open an MQTT communication on Port 1883 on the LoRaWAN server. To access the Node-RED user 51
interface, 52
We'll use the Port 1880. 53
Node-RED 54
will use the port 8086 to access influxdb. 55
We'll also use the port 8086 to access the influxdb web interface. 56
That will be very useful to check that our data are stored properly. 57
Grafana will also use the port 8086 to access the database and get all data it needs in order to produce 58
its dashboard. 59
And finally, we'll access the Grafana web interface on Port 3000 so we can build our dashboard. 60
So now let's install everything.