Announcement

Collapse
No announcement yet.

Geofencing?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Geofencing?

    What would be the best way to set up an event that would trigger if both my wife and I are out of the house to turn lights out?

    Do I run the IF as:

    If This device had its value set and is not equal to (Life360 Location) is not equal to Home?

    Going to the next step, what would be the best way for two people? Should I set up a virtual device as Home/Away and both my wife and I have to have the device change to =/= Home to set the virtual device to "Away"?

    Thanks.

    #2
    One way to do it...

    For this example, assume Life360 location value/status pairs are as follows:
    0 = away
    1 = work
    2 = home

    IF Life360Location(his) changes and becomes value in the range 0-1
    AND IF Life360Location(hers) <> 2

    OR IF Life360Location(hers) changes and becomes value in the range 0-1
    AND IF Life360Location(his) <>2

    THEN turn off lights


    edit: Better still, if you use EasyTrigger the Trigger can be:

    IF Life360Location(his) was 2 and becomes value in range [0,1]
    AND IF Life360Location(hers) <>2

    OR IF...
    -Wade

    Comment


      #3
      The way I have done it is with two statements

      if john location changes and becomes Away
      And doe location is away

      OR IF doe location changes and becomes Away
      And john location is away

      A variance of that may be needed depending on the update speed of each phone/device. This catches scenarios if one person is away and the other changes to away. So it can account for each person leaving individually or both leaving at the same time. However it still requires both parties to be away for the event to continue to the THEN statement.

      This also depends on time/distance between one geofence to another. If you leave "Home" and immediately enter another geofence that is named and is not classified as "Away" then this example won't work

      Comment


        #4
        Originally posted by Simplex Technology View Post
        The way I have done it is with two statements

        This also depends on time/distance between one geofence to another. If you leave "Home" and immediately enter another geofence that is named and is not classified as "Away" then this example won't work
        I think this is the problem. I have multiple locations (my work, her work, my daughter's school, etc.). "Away" is different than "Work", "School", etc. right?

        Comment


          #5
          Originally posted by cc4005 View Post
          One way to do it...

          For this example, assume Life360 location value/status pairs are as follows:
          0 = away
          1 = work
          2 = home

          IF Life360Location(his) changes and becomes value in the range 0-1
          AND IF Life360Location(hers) <> 2

          OR IF Life360Location(hers) changes and becomes value in the range 0-1
          AND IF Life360Location(his) <>2

          THEN turn off lights


          edit: Better still, if you use EasyTrigger the Trigger can be:

          IF Life360Location(his) was 2 and becomes value in range [0,1]
          AND IF Life360Location(hers) <>2

          OR IF...
          So in my use case, I see that "7" is associated with "Home" under values within my device settings. So I would do in the range 0-6 for my use case.

          I should probably set up another virtual device to put the home in an "Away" state and then I can trigger the lights off when set to Away.

          Thanks for the help.

          Comment


            #6
            Originally posted by GadgetBoySI View Post

            I think this is the problem. I have multiple locations (my work, her work, my daughter's school, etc.). "Away" is different than "Work", "School", etc. right?
            My example in the 2nd post deals with this problem. The EasyTrigger solution I suggested is best as it ensures the action fires only when departing Home. My first example works but will fire when both are not home and one moves from a known place to away, from away to a known place, etc.

            edit: I see you noted this already. Yes, 0-6 should work for you.

            edit edit: Curious that Home in both our cases is the highest value. I wonder if it changes when another known place is added. I.e., if you were to add another, would your Home change to 8. If so that will break these events.
            -Wade

            Comment


              #7
              Originally posted by cc4005 View Post

              edit edit: Curious that Home in both our cases is the highest value. I wonder if it changes when another known place is added. I.e., if you were to add another, would your Home change to 8. If so that will break these events.
              Wondering that myself.

              Yesterday, I allowed the event to run throughout the day and the event was firing pretty often. If I left work, the state changed and since my wife wasn't home it executed the event. I changed the event this morning that if my location changes to "Away" and wife isn't home fire the event. Now I am thinking the idea of a virtual device makes sense. Then only if the value of the virtual device changes will the event fire.

              Comment


                #8
                Originally posted by GadgetBoySI View Post
                ...and the event was firing pretty often. If I left work, the state changed and since my wife wasn't home it executed the event.
                The virtual device should solve it. Also EasyTrigger's "change from / to" capability--if you have that PI.
                -Wade

                Comment


                  #9
                  Originally posted by cc4005 View Post

                  The virtual device should solve it. Also EasyTrigger's "change from / to" capability--if you have that PI.
                  I don't have that plugin - do you recommend it? I tend to find Spud's plugins to be very good.

                  Comment


                    #10
                    Originally posted by GadgetBoySI View Post

                    I don't have that plugin - do you recommend it? I tend to find Spud's plugins to be very good.
                    Yes, I find it extremely useful in a variety of ways. I'd guess it contributes to at least 25% of my 400+ events.

                    edit: I find it's is the only way to achieve certain functionality (aside from scripts) and makes a great many other things much simpler to achieve.
                    -Wade

                    Comment

                    Working...
                    X