Explain how to add tenant

This commit is contained in:
Jarne Clauw 2025-12-19 19:53:45 +01:00
parent 395e7a8b43
commit ea359452b0
7 changed files with 39 additions and 11 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

View file

@ -4,21 +4,49 @@ Jarne Clauw
Tibo De Peuter
Mathis De Witte
# Introduction
## Introduction
Idk small introduction text
# ThingsBoard
## ThingsBoard
Setup of ThingsBoard...
# Injecting data
## Injecting data
Jarne had already a script that could inject data...
We will now demonstrate how to use ThingsBoard by injecting telemetry data. First we will create a tenant, which will be the the university of Ghent. The tenant can then add customers, which will be us, the students. The customer will have a device, from which we send data to the platform.
# Discussion
### Tenant
## Question 2
In this section we will set up a new tenant. When browsing to `http://localhost:8080` we land on the login page. We log in with the following credentials, the email is `sysadmin@thingsboard.org` with password `sysadmin`. Once we successfully logged in, we land on the home page.
![[sysadmin_home.png]]
To add a tenant we can navigate to the `tenants` page by using the hamburger icon and clicking the `+` icon, or click on the `Add tenant` button on the home page.
![[images/add_tenant.png]]
After filling in the necessary information and adding the tenant, it should show up in the list of tenants.
![[images/tenants_list.png]]
To be able to log in as that tenant, we need to create an admin user for that tenant. Click on the three dots of our tenant, and click on `Manage tenant admins`. Fill in the information, click `Add` and activate the account (can be done through email if needed).
![[add_tenant_admin.png]]
If everything was successful, you are now redirected to the home page, logged in as the tenant sysadmin.
![[tenant_admin_home.png]]
This concludes this section where we created a tenant. In the next section we will add a customer for this tenant.
### Customer
## Discussion
### Question 2
Q: *Due to processing constraints, one of our end nodes cannot convert the measured voltage
from a TMP36 sensor to temperature. Is it possible to accomplish this conversion at
Thingsboard? How this could be done?*
@ -32,7 +60,7 @@ sources:
- https://thingsboard.io/docs/user-guide/rule-engine-2-0/tutorials/transform-incoming-telemetry/
- https://thingsboard.io/docs/user-guide/calculated-fields/
## Question 3
### Question 3
Q: *We have a node monitoring pumps vibration on a water station. We need to predict when
vibration will reach critical levels so we can schedule preventive maintenance for the pump
and avoid unplanned downtime. Briefly describe how this could be accomplished with
@ -43,7 +71,7 @@ A: This too can be done by calculated fields. For this field we would probably w
source:
- https://thingsboard.io/docs/user-guide/calculated-fields/
## Question 4
### Question 4
Q: *Alarms are an important part of telemetry monitoring. Describe how they work in
ThingsBoard and what options are available to send notifications when an alarm is triggered.*
@ -57,10 +85,10 @@ sources:
- https://thingsboard.io/docs/user-guide/device-profiles/#alarm-rules
- https://thingsboard.io/docs/getting-started-guides/helloworld/#step-6-alarm-notifications
# Conclusion
## Conclusion
Conclusion and lessons learned
# References
## References
Do we add them to where we use them or here at the end of the report?

View file

@ -2,7 +2,7 @@
while true; do
mem_used=$(free -m | grep 'Mem' | awk '{print $3}')
curl -X POST http://localhost:8080/api/v1/0dz8qhj68h7hqgvasoam/telemetry --header Content-Type:application/json --data "{mem_used:$mem_used}"
curl -s -X POST http://localhost:8080/api/v1/$KEY/telemetry --header Content-Type:application/json --data "{mem_used:$mem_used}"
sleep 1
done