Jump to content



Recommended Posts

I am trying to create programs that activate when I leave my home.


Mobilinc has nice support for this in that it creates a variable for my phone on the ISY that changes when I leave. However I am finding that my program that evaluates the state of that variable runs constantly.


The result is that my program does exactly what I want (turn off certain lights) when I leave, but if someone still in the house turn them on, or I do remotely, they get shut back off since the variable state on the ISY still shows that I am not home.


Is there a way to have the program only execute upon leaving the house and not the entire time I am gone?



Link to comment

I don't believe programs "runs constantly". If a program shuts of your lights, it is likely because one or mor e of the program conditions gets triggered by something. Perhaps you should post your program.


Yes, there is a way to do what you want.

Link to comment

I'm sure the program is being reevaluated as the states of the lights are changing. How do I avoid that?


GPS - [iD 0006][Parent 0001]

        $Brian's_128GB_iPhone_6_Home is 0
    And $Heather's_iPhone6_Home is 0
    And (
             Status  'Chess Board Lights' is On
          Or Status  'Patio Lights' is On
        Set Scene 'Exterior / All outdoor lights' Off
   - No Actions - (To add one, press 'Action')

Duh I think it just occurred to me. Don't check the states of the lights in the IF, just force a scene off command. That way it accomplishes what I want, and the program should re-evaluate as there is not state change to trigger the IF.


This should work, right? I just confirmed from work, that if I make this change, the lights no longer turn back off if I remotely turn them on, so the program isn't revaluating on the light trigger. Now I just need to make sure they still shut off on their own when I leave, however there is no reason to suspect they won't.


What if I DID want to actually check the state of something when leaving and prevent a later change in state from causing the program to re-evaluate. How would I accomplish that?

Link to comment

Yes, you correctly identified the cause and solution. These lights should turn off when both variables are 0.


If you wanted to check state of something, one way would be to break this into two programs, where the first calls the second, the second is disabled (will not self trigger), and checks state before performing action.

Link to comment


This topic is now archived and is closed to further replies.

  • Create New...