[Question] Rule Chain alert with timestamp filter
Component
- Rule Engine
Description
I'm using Thingsboard to monitor the temperature of a device, and I want to create a rule chain that will send me a notification only if the temperature stays consistently high for a certain period of time. Specifically, I want to set a threshold temperature (let's say 80 degrees Fahrenheit) and a time period (let's say 10 minutes), and receive a notification only if the temperature stays at or above 80 degrees for the entire 10-minute period. How can I set up this rule chain in Thingsboard?
Environment
- OS: Ubuntu 22.04
- ThingsBoard: 3.4.4
For this you can use the alarm rules in the devices profiles. https://thingsboard.io/docs/user-guide/device-profiles/#example-2-alarm-condition-with-a-duration
Thanks!
Em seg., 6 de mar. de 2023 04:26, Chris @.***> escreveu:
For this you can use the alarm rules in the devices profiles.
https://thingsboard.io/docs/user-guide/device-profiles/#example-2-alarm-condition-with-a-duration
— Reply to this email directly, view it on GitHub https://github.com/thingsboard/thingsboard/issues/8172#issuecomment-1455592841, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUURF6TV6RBOYU3XHDBR7ATW2WGS7ANCNFSM6AAAAAAVQFTL5Y . You are receiving this because you authored the thread.Message ID: @.***>
Good morning, a query is possible to delimit particular emails for each alarm by time. Since from what I see it only has alarm creation and deletion output, but not for particular alarms that are created within the device profile. I would be very grateful for your answer.
I can't follow you. What do you mean exactly?
For example, I have an alarm with a time of 10 minutes for a temperature greater than 80C° and another alarm for 20 minutes less than 40C°, I am aware that to perform these times the device profile node is used, which has outputs (Alarm created, Alarm Update, Alarm Severity Update, Alarm Cleared, Succes and failure), what I want is to create a particular email for those two alarms, and by putting alarm created it generates the same email for both alarms. It is understood?
I hope. :)
In rule chain I use a script node after device profile node to enhance some data.
And use email node with more details.
In the device profile I have two alarm rules. High temperature and low temperature.
Here is a snap of my rule chain.

Is it that you want to know?
@Backdraft007 helped me, thank you very much!
HI is there a way to wite this in a Rule node? for example

id like this to alam after 10 mins. How do I write that in this flite node? Thanks
I'm very interested in this original question, and I think it has not been resolved. How do you achive this without alarm rules? I'm redoing the question: How can I set up a rule chain in Thingsboard that get's the threashold and the duration from the customer (or the asset) and create the alarm if the value is over that customer's threashold during the customer's time specified as an attribute?
Good morning, I don't know if it will help you but I will give you some ideas that I use or used. Counters (take time based on time of incoming data packets) or take start date and time and count minutes. Remember that in case of returning to the normal state, the timer or time would always be reset. I hope it helps. There is no time node in thingsboard, I also think that makes sense because it works with data inputs that are defined by the client. I hope it helps you