Jump to content

Status Vs. Control


Recommended Posts

The differences affect both when a program runs, and what the outcome of the IF statement will be. While my understanding/experience with how it works doesn't always jibe with the sample programs you see on this site, here it is:

 

If you use a Control-type condition, e.g. "Control 'Outdoor / Driveway Motion-Sensor' is switched On," then your program will only run with ON commands from the motion sensor. OFF commands from the motion sensor will not trigger the program. Thus this condition in an IF statement will always resolve to True since the program only runs when it is true, and a program with only one such condition will always run the THEN branch, never the ELSE branch.

 

If you use a Status-type condition, e.g. "Status 'Outdoor / Garage Keypad-Pizza Delivery' is On," the program will run on any change of status of the KPL button registered in the ISY, whether by a physical button push, a scene command, a direct command, etc. This condition may evaluate to either TRUE or FALSE, depending on the actual status of the device in the condition. Thus programs with Status-type conditions may run either the THEN branch or the ELSE branch, depending on the outcome of the IF statement.

Link to comment

You like that one? A KPL button that, if on, turns on the driveway floods, the front walk, the front porch, and brings the front accent lighting to 100%. Motion in the driveway, instead of activating the driveway floods, activates the foyer light, to signal arrival of the pizza. When deactivated (or after two hours), it returns the outdoor lighting to the nightime lighting state.

 

Now if I could just get the ISY to send our standard order over the Internet, that would be sweet. Of course, my 4 year old would be ordering 5 or 6 pizzas a day (at the press of a button, literally).

Link to comment

[quote name="kingwr"Thus this condition in an IF statement will always resolve to True since the program only runs when it is true' date=' and a program with only one such condition will always run the THEN branch, never the ELSE branch.

[/quote]

 

There is an exception to this. If you write a line in another program "run (if)" or manually do a run (if) from the program summary page it will turn false. (assuming someone isn't pushing the button at the exact same time, which I am not sure is even possible)

Link to comment
  • 5 months later...
Ha Ha, how about:

 

If
       Control  'Outdoor / Garage Keypad-Pizza Delivery' is Switched On

Then
       Send Notification to 'Mountain Mike's Pizza'

Else
  - No Actions - (To add one, press 'Action')

 

Tim

 

I used to work at a Mountain Mikes - they didn't offer delivery, though, liability was too expensive.

Link to comment
Guest
This topic is now closed to further replies.

×
×
  • Create New...