(28.12.2021, 08:33)admin Wrote: You can create a custom function and place it into Common functions. Then this function can be used in all script.
Code:function mailalert(subject, message)
mail({ ... }, subject, message)
alert(message)
end
Thanks, now I get emails
It's just the alerted function stoped working, what am I missing?
temperature = event.getvalue()
setpoint = 68
alerted = storage.get('alerted')
if temperature >= setpoint then
if not alerted then
mailalert('Vestis Gerby', 'Kayttovesi Lahto Lampotila Korkea Ouman ' .. temperature)
storage.set('alerted', true)
end
else
storage.set('alerted', false)
end
Send a Email when a New alert occurs
|
|
« Next Oldest | Next Newest »
|
Messages In This Thread |
Send a Email when a New alert occurs - by Jonas S - 28.12.2021, 07:19
RE: Send a Email when a New alert occurs - by admin - 28.12.2021, 08:33
RE: Send a Email when a New alert occurs - by Jonas S - 29.12.2021, 05:50
|