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.

Event trigger information
#1
If I have a event script linked to a tag is it possible to "read" what group address with that tag triggered the event, and write it in a telegram message?

something like this:

value = event.getvalue()

if value==true and grp.getvalue('1/0/0') then

telegram('Group %s triggered the event')

end
Reply
#2
You look for event.dst
Reply
#3
(26.08.2023, 20:37)Erwin van der Zwart Wrote: You look for event.dst

I had some trouble implementing it, and I could not find any information in the docs, but I figured it out and it works, thank you



Code:
value = event.getvalue()
objekt = grp.find(event.dst)

if value==true and grp.getvalue('1/0/0') then

    alert("ALARM " .. objekt.name .. " ALARM")
    telegram("ALARM " .. objekt.name .. " ALARM")
end
Reply


Forum Jump: