Hello everyone. I am developing an application through node red whose main objective is to read the information of sensors through the mqtt protocol.
But anyway, I'll get straight to the point: I intend to implement a notification system in my app. In a way, if a given sensor's data exceeds the maximum allowed value, the notification is activated. So far so good. through a function node I was able to implement the logic through an if and a comparison. I only compare the msg.payload with a value and if the condition is met the msg.payload is returned until notification.
Here's my problem: I wanted to implement a button on the dashboard to activate notifications if necessary, a kind of "don't be disturbed".
In what ways could you do this?
I have already tried to insert in the if within a function node the value of the button and the maximum value of the sensor. if both conditions were true the notification shown on the screen. but it didn't work.
If anyone has another solution to my problem through dashboar, I would be grateful if I checked.
Thank you.