snowtech Posted April 11, 2013 Posted April 11, 2013 Hi, I'm working on a Garage Program where : If the Sensor is "On" (Meaning the garage is Open) and the Motion Sensor is Off (No movement) for more than 2 mins so Start the next Program: Next Program is : * Send a message to my cellphone saying the garage is open and it will close automatically (Which i got that working already through Growl) * Close the garage * When it closes, send another message saying the garage is Safely Closed * If it doesnt close for some reason, send me another message saying that "for some reason the garage didnt close, Go Check" and then after 20 seconds, repeat the "Close the garage command" again and keep on trying until the door is closed and I get the message that the door is Safely Closed. The problems Im going through is : If the garage is in the middle of the "Then Path" and the Condition "If" changes, the program stops in the middle and sometimes I get the message that it will close and never closes because the If is "False" now ... If I have a program that runs only the "then path", because there is no If, It triggers right away ... I was trying to find a way of Even if the Condition Changes, Make sure the program runs the "then" all the way to the end ... I hope I can get a solution for this. Thanks a lot !
Michel Kohanim Posted April 12, 2013 Posted April 12, 2013 Hi snowtech, Wait can be interrupted. This means that if the condition changes while waiting, then statements after wait are NOT executed and the program stops till next time the condition becomes true. On the other hand, if the program keeps becoming true while in wait, the program restarts wait afresh. So, what you want something like this: If Status Garage Door is not off And ( Control Motion Sensor is Switched On And Control Motion Sensor is not Switched Off ) Then Wait 2 minutes Call the other program With kind regards, Michel
snowtech Posted April 12, 2013 Author Posted April 12, 2013 Michael, thanks for the reply! Just one question, why did you use both options for the sensor: Control Motion Sensor is Switched On And Control Motion Sensor is not Switched Off And also i noticed you used "control" and not "status" would that change anything ? I will try it again and I will let you know. Thanks a lot
Michel Kohanim Posted April 12, 2013 Posted April 12, 2013 snowtech, http://wiki.universal-devices.com/index ... _vs_Status You do need to use Control because you want the Wait to restart as long as there's motion in the past two minutes. Status will not work because in this scenario, status does Not change. With kind regards, Michel
snowtech Posted April 12, 2013 Author Posted April 12, 2013 Thanks Michael. I got it!!!! I will share the program i did to make it work... If you have any suggestion i will be happy to take it. Thanks a lot
Recommended Posts