Ryan0751 Posted September 25, 2013 Posted September 25, 2013 I set up a simple program to turn a light on daily to appear as though someone is home. I set the If from 5:30 pm for 2 hours then The light comes on, but after 2 hours it doesn't turn off. I'm a bit confused at to the logic here. Would turn light off go in the else?
TJF1960 Posted September 25, 2013 Posted September 25, 2013 Yes. ISY programs are event driven. If from 5:30 pm for 2 hours then else
Ryan0751 Posted September 25, 2013 Author Posted September 25, 2013 That works fine. So I assume when the 2 hours "for" time expires, the ISY triggers another event and runs the program again, this time evaluating the else? Now what if that lamp is part of another scene, I want that lamp to come on if I am not home, stay on for two hours, then turn off. That's working great. However, if I am at home, and am running one of my usual lighting scenes, and that lamp is on as part of that scene, I really don't want it turning off randomnly in two hours. There doesn't appear to be an "else if"... how could I accomplish this? Or, should I set a condition in the upper folder, would that catch the second event and not run the "off" event?
oberkc Posted September 26, 2013 Posted September 26, 2013 So I assume when the 2 hours "for" time expires, the ISY triggers another event and runs the program again, this time evaluating the else? Yes. This is generally consistent for all programs. Conditions are triggers. One needs to understand how each condition triggers a program evaluation. Once triggered, it will either evaluate True (run then path) or False (run else path). However, if I am at home, and am running one of my usual lighting scenes, and that lamp is on as part of that scene, I really don't want it turning off randomnly in two hours. Well, then, you will have to decide how to tell the ISY that you are home. I use a keypad button. I have experimented around with using cell phone location. Perhaps motion sensors? Garage door status? However you decide to do it, you would have to update your program: if I am away and time from 530 for 2 hours then....
Ryan0751 Posted September 26, 2013 Author Posted September 26, 2013 Yeah, I'll have to experiment. I have my motion sensors setup to trigger text and email notifications. Usually when I get home I used my cell phone and mobilelync to run an "I'm home" program. I could tie into that. I'm curious as to your cell phone location implementation... Something trigger from my cell phone present on my wifi would be neat.
Ryan0751 Posted September 26, 2013 Author Posted September 26, 2013 Ha I think I answered my own question... I never noticed mobilelinks location feature before.
oberkc Posted September 26, 2013 Posted September 26, 2013 Ha I think I answered my own question... I never noticed mobilelinks location feature before. Yes, I think that is a unique capability to the iOS version of mobilinc. With Android, one can use the tasker app, now integrated with mobilinc, to initiate such triggers. I am not entirely sure if the iOS version allows location based on proximity to certain wifi networks, but tasker does this.
Recommended Posts