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.

Alert manager example
#1
To get the alerts into the "Alert manager" i guess they have to come from scripts first. 
Does anybody have an example for me to get started, or a tip to get into using it?
Reply
#2
Hi,

Just use the script command alert('This is my alert') and the alert manager picks it up automatically.

You can also use dynamic alerts like alert('The value of object ' .. grp.find(event.dst).name .. ' is ' .. event.getvalue() .. " degrees")

BR,

Erwin
Reply
#3
Sorry, Erwin. Still as far getting this to work. 

Would not know where to put this or where to make this work. 

Would it be possible to ask for an example or a little more push in the right direction`?
Reply
#4
How about an example about what you wish to achieve with a little bit more detail?
Reply
#5
Hi,

Just make a event based script and attach it to a group address or TAG and enter a script like this:
Code:
if event.getvalue() == true then
   alert('There is a defect found in ' ..  grp.find(event.dst).name)
end
BR,

Erwin
Reply
#6
(22.10.2020, 12:46)FatMax Wrote: How about an example about what you wish to achieve with a little bit more detail?

Lets say i want a boolean value give alarm with value 1. And am wondering how to do it.

Or an ability to give alarm if a temp rises above a certain value.
Reply
#7
The Erwin's script is for boolean for alarm with value 1.  For temp above you can do similar
Code:
if event.getvalue() > 21 then
   alert('Temp is above 21 in ' ..  grp.find(event.dst).name)
end
------------------------------
Ctrl+F5
Reply


Forum Jump: