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.

Multiple Value true
#6
I have a second question about comparing an address with its old value. I explain myself I have an event script (on TAG) with two addresses. I send an email as soon as the address goes to 10 (2 Byte signed integer). The value 10 indicates a fault. I would like to send the return to the proper functioning after the passage of 10 to some other value. For example value 10 then sending mail, change to value 5 (after value 10) then send a second mail. On the other hand passage from 5 to 0 or 0 to 5 we do nothing ...

FAULT1 = grp.getvalue('14/1/34') -- Status FAULT1
FAULT2 = grp.getvalue('13/1/34') -- Status FAULT2


subject = 'FAULT'
message = 'FAULT'

subject1 = 'OK'
message1 = 'OK'

if FAULT1 == 10 or FAULT2 == 10 then
 mail('@', subject, message)
 
--elseif FAULT1 ~= 10 and FAULT2 ~= 10 then
--  mail('alertes@test', subject1, message1)
 
end

with this script the sending of the second mail is systematic during a change of state different from 10

Do you have to compare the event.dst value with the old value given that I have several group addresses on this tag? Thank you.
Best regards
Reply


Messages In This Thread
Multiple Value true - by Gadjoken - 24.01.2019, 14:20
RE: Multiple Value true - by demeur - 24.01.2019, 14:43
RE: Multiple Value true - by admin - 24.01.2019, 15:11
RE: Multiple Value true - by Daniel - 24.01.2019, 15:14
RE: Multiple Value true - by Gadjoken - 24.01.2019, 15:27
RE: Multiple Value true - by Gadjoken - 25.01.2019, 08:40
RE: Multiple Value true - by admin - 25.01.2019, 08:58
RE: Multiple Value true - by Gadjoken - 25.01.2019, 09:19

Forum Jump: