diff --git a/report/images/add_tenant.png b/report/images/add_tenant.png new file mode 100644 index 0000000..e672590 Binary files /dev/null and b/report/images/add_tenant.png differ diff --git a/report/images/add_tenant_admin.png b/report/images/add_tenant_admin.png new file mode 100644 index 0000000..78ec8e3 Binary files /dev/null and b/report/images/add_tenant_admin.png differ diff --git a/report/images/sysadmin_home.png b/report/images/sysadmin_home.png new file mode 100644 index 0000000..55d0770 Binary files /dev/null and b/report/images/sysadmin_home.png differ diff --git a/report/images/tenant_admin_home.png b/report/images/tenant_admin_home.png new file mode 100644 index 0000000..d902b6e Binary files /dev/null and b/report/images/tenant_admin_home.png differ diff --git a/report/images/tenants_list.png b/report/images/tenants_list.png new file mode 100644 index 0000000..4971658 Binary files /dev/null and b/report/images/tenants_list.png differ diff --git a/report/report.md b/report/report.md index 9aa9291..92df014 100644 --- a/report/report.md +++ b/report/report.md @@ -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? \ No newline at end of file diff --git a/scripts/memory_used.sh b/scripts/memory_used.sh index c20ab0d..a75d8da 100755 --- a/scripts/memory_used.sh +++ b/scripts/memory_used.sh @@ -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