Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ISY/Mobilinc/GPS

Featured Replies

Posted

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?

 

Brian

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.

  • Author

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]

If
        $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
        )
 
Then
        Set Scene 'Exterior / All outdoor lights' Off
 
Else
   - No Actions - (To add one, press 'Action')
 
Edit...

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?

Edited by brianp6621

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.

Guest
This topic is now closed to further replies.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.