PhanTomiZ Posted March 6, 2015 Posted March 6, 2015 Hi, I have this simple program that I thought would turn on some lights (Then) when MS Tstat sensor is on and it's between 12 and 5:20 am which it does. But when it's not between 12 and 5:20am, it seems the (Else) part of the program runs by the status of the MS. I thought the AND in my IF statement had to have both conditions true, to run the "Then" and both conditions false to run the "Else", Seems like it acts more like an OR statement. Do I have the right logic????What am I missing? Hope this makes sense. Turn all lights on Living RM - [iD 0016][Parent 0001] If ( Status 'TStat Main / MS TStat Main-Sensor31.F3 64' is On And From 12:00:56AM To 5:20:00AM (same day) ) Then Send X10 'A2/On (3)' Send X10 'A5/On (3)' Set 'Range L.E.D.' On Set Scene 'zScenes / Foyer Light when Closet open' Fade Up Else Send X10 'A2/Off (11)' Send X10 'A5/Off (11)' Run Program 'Range L.E.D.' (If) Set Scene 'zScenes / Foyer Light when Closet open' Fade Down
EricK Posted March 6, 2015 Posted March 6, 2015 When the ms triggers and the time is out of range, the program is false. Seems strange that you have motion used to trigger some things off, but not sure what you are trying to accomplish.
LeeG Posted March 6, 2015 Posted March 6, 2015 To add a little additional information about Programs and triggers. Any change in the Motion Sensor Status or when the From time or the To time is reached, the Program is triggered (runs If). The various If conditions are evaluated and when True the Then clause executes. If not True for any reason the If is considered False and the Else clause runs. When a program is triggered it will execute either the Then or Else. There is no case where a Program is triggered and no clause (Then or Else) is executed.
PhanTomiZ Posted March 6, 2015 Author Posted March 6, 2015 What I'm trying to accomplish is.... When it's between 12 and 5 am AND if there is motion from MS, THEN turn on the lights. When there is no motion AND it's still between 12 and 5 am ELSE turn off the lights. Looks like I will need 2 program to do this, right? So whether there is an AND or an OR, each individual condition in my IF statement is evaluated separately? If either of these conditions are false, the the ELSE action is triggered?
LeeG Posted March 6, 2015 Posted March 6, 2015 For those conditions and using the Motion Sensor Off two Programs are needed. There is some additional logic required for the Fade. It is easier to combine into one Program. If Control 'TStat Main / MS TStat Main-Sensor31.F3 64' is switched On And From 12:00:56AM To 5:20:00AM (same day) Then Send X10 'A2/On (3)' Send X10 'A5/On (3)' Set 'Range L.E.D.' On Set Scene 'zScenes / Foyer Light when Closet open' Fade Up Wait 4 seconds Set Scene 'zScenes / Foyer Light when Closet open' Fade Stop. Wait 5 minutes (this is wait timeout value now in MS) Send X10 'A2/Off (11) Send X10 'A5/Off (11)' Run Program 'Range L.E.D.' (If) Set Scene 'zScenes / Foyer Light when Closet open' Fade Down Wait 4 seconds Set Scene 'zScenes / Foyer Light when Closet open' Fade Stop Else
PhanTomiZ Posted March 6, 2015 Author Posted March 6, 2015 With this, the timeout of the MS is not used, but rather the wait time in the program. So, IF both conditions are met THEN my program runs and we could care less about the MS timeout. This is what I wanted to accomplish, but wasn't looking at it the right way... Why is it the "Fade UP/Down" needs a "Fade Stop"? Thanks PhanTomiZ
LeeG Posted March 6, 2015 Posted March 6, 2015 When a paddle/button on a device is pressed and held active, the device issues a Fade Up/Down when the paddle/button is pressed and a fade Stop when the button/paddle is released. The Fade Stop terminates the Fade Up/Down. Even though I suspect you want the Fade Up/Down to run to the On/Off limit the device firmware is expecting a Fade Stop. The lack of a Fade Stop can cause the next command to the device to do unexpected things. Some devices are ok without the Fade Stop, others have problems when they do not see the Fade Stop. A device always sends the commands in pairs, Fade Up - Fade Stop, Fade Down - Fade Stop.
PhanTomiZ Posted March 6, 2015 Author Posted March 6, 2015 Ok...Got it...Would be less lines of program if I change or set the Fading in my device?
LeeG Posted March 6, 2015 Posted March 6, 2015 (edited) Nothing can be set in device to affect Fade. It changes the load at a predicable rate because a human (normally) is pressing and holding the paddle/button. Would not want a human to sit there holding a paddle/button while a device took 2 minutes to Fade Up/Down. The Fade operation can be simulated by setting the Scene Responder Ramp Rate to like .4 seconds (whatever Fade uses, don't know the specific rate) and using the normal Scene On/Off commands. The device would Ramp Up or Down as if Fade was being used. Edited March 6, 2015 by LeeG
PhanTomiZ Posted March 6, 2015 Author Posted March 6, 2015 I assumed the ramp rate was the same as Fade Up/Down...
Xathros Posted March 6, 2015 Posted March 6, 2015 (edited) I believe the Ramp Rate is really what you want. Set on level and ramp rate in the scene and just use Scene On and Scene Off in the program. -Xathros Edited March 6, 2015 by Xathros
Recommended Posts