Announcement

Collapse
No announcement yet.

Confusion over how to use near and not near

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

    Confusion over how to use near and not near

    I have an iPhone and have configured the iPhone with PHLocation.

    I also use Geofency and have configured it with PHLocation.

    On my iPhone, Geofency is very accurate in my in and out of known locations within the Geofency app. Can I use these to run events?

    I have set up known locations in PHLocation.

    I have tried to use Direction and Near to run events based on whether I am coming or going. It never seems to work.

    Am I doing something wrong? Any ideas would be appreciated!

    Thanks,

    Michael
    Michael

    #2
    Originally posted by Rvtravlr View Post
    I have an iPhone and have configured the iPhone with PHLocation.

    I also use Geofency and have configured it with PHLocation.

    On my iPhone, Geofency is very accurate in my in and out of known locations within the Geofency app. Can I use these to run events?

    I have set up known locations in PHLocation.

    I have tried to use Direction and Near to run events based on whether I am coming or going. It never seems to work.

    Am I doing something wrong? Any ideas would be appreciated!

    Thanks,

    Michael
    If you have configured Geofency to work with the plug-in, you should have near / not near devices in HS3 corresponding the the fences configured on the mobile app. You can use these to trigger events.

    Known place (near / not near) and (approaching / leaving) devices should work as you have them configured on the PHL tab of the root place device.
    The frequency of polling your iPhone will affect how quickly these devices update but the speed of near detection is unlikely to be anywhere near as good as Geofency.

    Paul..

    Comment


      #3
      I do have Near / Not Near but how do I differentiate between leaving and arriving, as in In and Out?


      Sent from my iPad using Tapatalk
      Michael

      Comment


        #4
        Originally posted by Rvtravlr View Post
        I do have Near / Not Near but how do I differentiate between leaving and arriving, as in In and Out?


        Sent from my iPad using Tapatalk
        With Geofency (and other fence based services) there is no concept of approaching and / or leaving, just within (near) or not within (not near) a defined geofence.

        When you create a known place associated with a position based service, then you have a near / not near device and a direction device. The direction device has 3 possible states, Approaching, Leaving and Static.

        When position updates are processed, the plug-in calculates if the position is nearer to or further from each known place for that user compared with the last known position.

        On the PHL tab for a known place root device you will see 2 options. Approach Leave Pos Qty and Approach Leave Timeout. These options adjust the behaviour of the direction device.

        So, if you have Qty set to 2, then the plug-in will need to see at least 2 consecutive same direction position updates before changing state. e.g. if you have a 5 minute update interval, a Qty of 2 and you are driving towards home then it would take 10 minutes for the direction device to change state to Approaching.

        The timeout option sets the number of minutes without any position updates before the direction device state will be set to static.

        Paul..

        Comment


          #5
          Thank you for th explanation. I will try adjusting these parameters.
          Michael

          Comment


            #6
            Have you created a location around your house? I set mine up to have a tight circle and it triggers within 3 houses of mine either in or out for geofency. I also use iPhone as well for the wife (she won't install apps) and it works but not as well as geofency. I have events setup to force a poll of her phone when she opens the garage door to let HS know she is home, works about 90 percent.

            Comment


              #7
              WayneHead,

              Are you using a radius in miles?

              I have set to 0.2 miles but it is hit and miss if my phone is at me house address. I appreciate any help.

              Michael
              Michael

              Comment


                #8
                Confusion about how to get Geofency to talk to PHLocation

                I have read through the message board and user guide instructions, but I am still having difficulty. PHLocation is not updating when I enter and leave monitored locations in Geofency.

                I have Geofency installed on my iPhone 7 and it is working great. I have created several monitored locations within Geofency and have included my home and it works on my iPhone. I installed webhooks on the locations within Geofency on my iPhone that I wanted to communicate with PHLocation. My iPhone passed the information to PHLocation successfully and created devices within PHLocation. In Geofency, I have the webhooks on the "Notify on Entry" and "Notify on Exit" turned on, and I have the "Send Current Position" turned on. Yet, PHLocation will not update when I enter or leave any of the monitored locations that Geofency handed off to PHLocation.

                I can hit the "Test the Connection Enter" on my monitored devices on my iPhone and it will manually change the status to "Near" in PHLocation. If I hit the "Test the Connection on Exit" it will manually change the status to "Not Near". When I do this it displays a Successful message (GC data accepted OK). However, it will not communicate automatically with PHLocation when I enter or leave monitored locations.

                I think I'm getting close. But, I need some guidance.

                Comment


                  #9
                  Originally posted by jrhocker View Post
                  I can hit the "Test the Connection Enter" on my monitored devices on my iPhone and it will manually change the status to "Near" in PHLocation. If I hit the "Test the Connection on Exit" it will manually change the status to "Not Near". When I do this it displays a Successful message (GC data accepted OK). However, it will not communicate automatically with PHLocation when I enter or leave monitored locations.



                  I think I'm getting close. But, I need some guidance.


                  I think I remember having that same behaviour a long time ago and a full reboot of the iPhone sorted it.

                  Worth a try.

                  Steve

                  Comment


                    #10
                    Tried Hard Reboot

                    I tried turning off the iPhone and then tested the PHLocation and after leaving the area, it still did not change the status for my locations.

                    Then, I tried the "hard reboot" of the iPhone and repeated the test of leaving the area, but the status for my location did not change.

                    Any other ideas?

                    Jim

                    Comment


                      #11
                      Do you have a signal where you cross the geofence? Try enabling the notify on error option in the webhook. With that enabled, if it's trying to send the info and it can't it will eventually time out and pop up a GeoFency warning on your iPhone. I have very poor cell service in my neighbourhood and sometimes it times out. Other times it works and sometimes it only sends when the phone has hooked onto my WiFi
                      cheeryfool

                      Comment


                        #12
                        Checked Cell Signal & Turned "Notify on Error" On

                        I turned "Notify on Error" on and checked the cell signal when I exited and entered locations. Geofency updated, but didn't pass it on to PHLocation. No errors showed up. Cell signal was 3 bars out of 4.

                        Still no luck. It still works when I do a manual test and it's fast.

                        Comment


                          #13
                          So no error in Geofency about failing to post? And nothing in the HS3 log? Are you using the webserver built into the plugin with a port forward rule in your router or MHYS?
                          cheeryfool

                          Comment


                            #14
                            No error in Geofency

                            No error in Geofency. I'm using the built-in web server with port forwarding.

                            Comment


                              #15
                              HS3 log

                              In HS3 I do see:

                              PHLocation UPD Timer elapsed

                              Comment

                              Working...
                              X