From 484caab2d180fc4e3839e16e0935c15cf8a0102d Mon Sep 17 00:00:00 2001 From: Mathis De Witte Date: Sat, 6 Dec 2025 21:34:27 +0100 Subject: [PATCH] answer question 3 --- answers.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/answers.md b/answers.md index 682e6b8..3e87b23 100644 --- a/answers.md +++ b/answers.md @@ -5,13 +5,24 @@ Thingsboard? How this could be done?* A: Yes this is possible, there are generally two ways of doing this: 1. You could add a script node to the rule chain which receives the (voltage) sensor data and transforms this into the temperature through a certain function. -2. There is now also a new feature in Thingsboard called "Calculated fields". This way is generally more elegant as it doesn't require you changing the rule chain. The calculated fields can be configured at both the device level and the device profile level. +2. There is now also a new feature in Thingsboard called "Calculated fields". This way is generally more elegant as it doesn't require you changing the rule chain. The calculated fields can be configured at both the device level and the device profile level. We can either use a "Simple calculated field" for simple arithmetic functions, or we can use a "Script calculated field", which allows us more control over the computation on the data. These scrips are written in a language called "TBEL". sources: - https://thingsboard.io/docs/user-guide/rule-engine-2-0/overview/ - https://thingsboard.io/docs/user-guide/rule-engine-2-0/tutorials/transform-incoming-telemetry/ - https://thingsboard.io/docs/user-guide/calculated-fields/ +## 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 +ThingsBoard.* + +A: This too can be done by calculated fields. For this field we would probably want to use a "Script calculated field" as it allows us to access historical data (through the variable ctx). The function will need to do some analysis on thi historical data and based on that estimate when a device would need preventive maintenance. The output of this script should be an Attribute, as we want a single answer for when to plan the maintenance. + +source: +- https://thingsboard.io/docs/user-guide/calculated-fields/ + ## 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.*