Hello JRP!
You can make a script for current wind speed object. You will have three objects 1.)current wind speed, 2.)wind speed threshold 3.)alarm (boolean object)
Every time when wind speed changes, script will check the value of wind speed, if it is above threshold value (and alarm was off) it sets alarm object value to true and sends log. Next time if alarm was on (alarm object value was true) it will not send any log (till you unset the alarm object).
You can make a script for current wind speed object. You will have three objects 1.)current wind speed, 2.)wind speed threshold 3.)alarm (boolean object)
Code:
local wind_current = grp.getvalue('34/1/57')
local wind_treshold = grp.getvalue('34/1/59')
local alarm = grp.getvalue('34/1/60') -- if alarm was already running do not send new telegram
if ( (wind_current >= wind_treshold) and not alarm ) then
grp.write('34/1/60', true) -- set alarm true
message = 'Alarm wind speed is ' .. wind_current .. ' m/s'
log(message)
end
Every time when wind speed changes, script will check the value of wind speed, if it is above threshold value (and alarm was off) it sets alarm object value to true and sends log. Next time if alarm was on (alarm object value was true) it will not send any log (till you unset the alarm object).