CheckTrigger in Events module
Posted: Sat Sep 18, 2010 4:00 pm
Hi
I had some troubles getting my Oregon sensor to control the bathroom fan when I noticed this in the debug log:
2010/09/18 11:27:06 [Events] Check trigger 67 > 63 = False
2010/09/18 11:27:06 [Events] Check trigger 67 < 63 = False
Well, turns out to be line 343 that failed:
So I replaced that block with the one from CheckCondition:
Do the same for > an it works - And then I realised that CheckTrigger and CheckCondition does the same, and are identical except for the log messages, so in the end, I just replaced the call in line line 218 in CheckDeviceChangeEvent with a call of CheckCondition:
And then deleting the CheckTrigger procedure
/hhg
I had some troubles getting my Oregon sensor to control the bathroom fan when I noticed this in the debug log:
2010/09/18 11:27:06 [Events] Check trigger 67 > 63 = False
2010/09/18 11:27:06 [Events] Check trigger 67 < 63 = False
Well, turns out to be line 343 that failed:
Code: Select all
IF IsDigit(sValue) AND IF IsDigit(sCond) = FALSE THEN
Code: Select all
CASE ">"
sValue = "" & sValue ' be sure it are strings
sCond = "" & sCond
IF IsDigit(sValue) AND IsDigit(sCond) THEN
IF Val(sValue) > Val(sCond) THEN bReturn = TRUE
ENDIF
Code: Select all
IF NOT CheckCondition(sValue, rResult["triggers.param3"], rResult["triggers.param4"]) THEN CONTINUE
/hhg