latinet:unicaes:workshops:nig
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
latinet:unicaes:workshops:nig [2023/09/01 01:25] – jan.sonntag | latinet:unicaes:workshops:nig [2024/09/13 19:11] (current) – [3. InfluxDB] harley.lara | ||
---|---|---|---|
Line 13: | Line 13: | ||
- If you are on Linux, you can forward to step 2. If you are on Windows we recommend installing the Windows-Subsystem-for-Linux (WSL) with Ubuntu as the distribution. | - If you are on Linux, you can forward to step 2. If you are on Windows we recommend installing the Windows-Subsystem-for-Linux (WSL) with Ubuntu as the distribution. | ||
- Now that we are in our Linux (testing done in Ubuntu) environment, | - Now that we are in our Linux (testing done in Ubuntu) environment, | ||
- | | + | * For windows user: [[https:// |
- | - Unpack the files into an empty folder | + | |
- | - Open your WSL instance/ | + | - Open your WSL instance/ |
- '' | - '' | ||
- Open the individual application locally: | - Open the individual application locally: | ||
Line 33: | Line 33: | ||
- Now double-click on the node you just dropped. Because you never used it you will have to connect to a new server. Just click on the little pen on the right side of " | - Now double-click on the node you just dropped. Because you never used it you will have to connect to a new server. Just click on the little pen on the right side of " | ||
* Version: 2.0 | * Version: 2.0 | ||
- | * URL: http:// | + | * URL: '' |
- | * Token: influx (!This is just for demonstration purposes, in production, you should generate a custom token in the InfluxDB UI!) | + | * Token: |
* Uncheck " | * Uncheck " | ||
- | * Organisation: | + | * Organisation: |
- | * Bucket: workshop | + | * Bucket: |
- | * Measurement: | + | * Measurement: |
- Click on save. The database is now saved in node-red and you can use it on every influxdb-node you want to. If you want to, you can delete the node we just created. | - Click on save. The database is now saved in node-red and you can use it on every influxdb-node you want to. If you want to, you can delete the node we just created. | ||
- Drag in a "mqtt in" | - Drag in a "mqtt in" | ||
Line 47: | Line 47: | ||
===== 3. InfluxDB ===== | ===== 3. InfluxDB ===== | ||
+ | [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | - Open up your [[http:// | ||
+ | - On the left-hand side you will find a sidebar. Click on the little graph symbol which is the Data Explorer | ||
+ | - The Data Explorer can be used to review your data and help with developing new database queries. For this tutorial it is very easy to use: | ||
+ | - In the '' | ||
+ | - Then in the second column you can select the measurement that you want to read out | ||
+ | - As we are saving only one simple number in the database, you must select '' | ||
+ | - Click '' | ||
+ | - For use in Grafana we will now need to copy the actual query that we just built with the help of the handy query builder. To get this query you need to click '' | ||
===== 4. Grafana ===== | ===== 4. Grafana ===== | ||
+ | [[https:// | ||
+ | > The analytics platform for all your metrics | ||
+ | With grafana, you can query the data from the database and show it off in graphs. You can also create alerts. So when you want to get a notifications when let's say a value gets above a certain threshold, grafana can do that for you. You can find more information here: | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | - Open up your [[http:// | ||
+ | - Then before we can get started with creating our nice graphs, we need to create a data source. Of course, our data source will be our influx database. Open the burger menu on the left-hand side. As one of the last options you will find the '' | ||
+ | - It will now ask you to create a new connection. So search for '' | ||
+ | - As a query language we want to select '' | ||
+ | - Now we need to fill in some of the information we used before in NodeRed as well. Just for documentation here they are again: | ||
+ | - HTTP - URL: '' | ||
+ | - InfluxDB details: | ||
+ | - Organisation: | ||
+ | - Token: '' | ||
+ | - Default bucket: '' | ||
+ | - Click '' | ||
+ | - Before we start, lets make sure to save our Dashboard first. For that just click the '' | ||
+ | - After doing that, we can now finally click the big blue button '' | ||
+ | - Now we are in the UI where we can create our graph. At the bottom of the screen, you can see a text box. In this text box, we need to paste in the query we created earlier. If you click out of the text box this should already show us our graph!! | ||
+ | - The next steps are pretty self-explanatory. First, you can for example change the name of the graph. All of the options for modifying the graph can be found in that menu. Just go through them. Most of them are easy to understand like Unit, Min, Max, etc. Play around and have fun! | ||
+ | - To save the graph just click '' | ||
+ | |||
+ | That's basically it! You now have your first dashboard that shows YOUR sensor data from a sensor that YOU developed and built! Now there is a lot more to come. Just think of something you want to build and try to do it. We just gave you a brief introduction to the world of IoT. | ||
===== Recording ===== | ===== Recording ===== |
latinet/unicaes/workshops/nig.1693524348.txt.gz · Last modified: 2023/09/01 01:25 by jan.sonntag