This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Notification of exceeding wind speed threshold
#1
hello

I need to send a notification to telegram that a certain wind speed threshold has been exceeded.

To get started, create the following script as a proof of principle

Code:
require("user.Telegram")                         -- Requiere la librería de usuario

valor_actual_viento = grp.getvalue('1/0/3')
valor_umbral_viento = grp.getvalue('32/1/7')


if valor_actual_viento >= valor_umbral_viento then
message = 'Alarma de viento ' ..valor_actual_viento.. 'm/s'         -- Texto del mensaje a enviar
telegram(message)                             -- Se pasa a la biblioteca de usuario el mensaje
log(message)
 
end

The problem is that while the wind alarm signal is above the threshold, notifications are sent continuously, I only want it to be sent once and require user action to dismiss the alarm.

How could I do it?

Thank you
Reply


Messages In This Thread
Notification of exceeding wind speed threshold - by JRP - 15.09.2022, 11:33

Forum Jump: