smokegrub Posted June 15, 2015 Posted June 15, 2015 I want the BuzzLinc to buzz 3 times when either of 3 hidden door sensors are open between sunset and sunrise the next day. The buzzer sounds whenever a door is opened, i.e., it is unrestricted as to the timeframe. What am I doing wrong? If From Sunset To Sunrise (next day) And Status 'Door Sensors / Deck Door Sensor' is On Or Status 'Door Sensors / Kitchen Door Sensor' is On Or Status 'Door Sensors / Man Cave Door Sensor' is On Then Repeat 3 times Set 'BuzzLinc' On Set 'BuzzLinc' 2 (Beep Duration) Set 'BuzzLinc' Off Else Set 'BuzzLinc' Off
LeeG Posted June 15, 2015 Posted June 15, 2015 Need Parens so time range applies to all Sensors If From Sunset To Sunrise (next day) And ( Status 'Door Sensors / Deck Door Sensor' is On Or Status 'Door Sensors / Kitchen Door Sensor' is On Or Status 'Door Sensors / Man Cave Door Sensor' is On )Then Repeat 3 times Set 'BuzzLinc' On Set 'BuzzLinc' 2 (Beep Duration) Set 'BuzzLinc' Off Else Set 'BuzzLinc' Off
stusviews Posted June 15, 2015 Posted June 15, 2015 What, specifically, is not working correctly? Which mode is the I/O Linc set for, Latching, Momentary A, B, C?
LeeG Posted June 15, 2015 Posted June 15, 2015 Also if the BuzzLinc should alert ONLY when door is Opened and NOT if door remains Open then use If Control If From Sunset To Sunrise (next day) And ( Control 'Door Sensors / Deck Door Sensor' is switched On Or Control 'Door Sensors / Kitchen Door Sensor' is switched On Or Control 'Door Sensors / Man Cave Door Sensor' is switched On )Then Repeat 3 times Set 'BuzzLinc' On Set 'BuzzLinc' 2 (Beep Duration) Set 'BuzzLinc' Off Else Set 'BuzzLinc' Off
smokegrub Posted June 15, 2015 Author Posted June 15, 2015 Thanks. Once again I am educated by the experts. I didn't know that parenthses served that purpose.
LeeG Posted June 15, 2015 Posted June 15, 2015 Generally Parens are needed when the If has both Or and And statements. The Parens bracket a set of conditions, a group of Ors or a Group of Ands that then need to be Ored or Anded with something else. Without the Parens some of the Ored conditions operate without benefit of the time range. The Wiki has some examples that may be helpful.
Recommended Posts