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
#6
Hello

That's what I thought, but it's the same script as the one proposed but with my variables and addresses.

This is the script


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

local valor_actual_viento = grp.getvalue('1/0/3')
local valor_umbral_viento = grp.getvalue('32/1/7')
local alarma = grp.getvalue('32/2/25')

if ( (valor_actual_viento >= valor_umbral_viento) and not alarma ) then
  grp.write('32/2/25', true) -- set alarm true
  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)
  else
saltado = "saltado"
log(saltado)
end
Reply


Messages In This Thread
RE: Notification of exceeding wind speed threshold - by JRP - 24.09.2022, 11:14

Forum Jump: