Jump to content

GEO Fence unreliable - Help with any settings needed on Android?


EJones01

Recommended Posts

I have an enter and exit setup for my GEO Fence. 50% of the time it works great so I know i have it mostly setup OK. I run Google Maps in my car so location is always been read. For instance 2 days ago I went in and out of the area a couple of time and it worked perfectly. This morning I went out and nothing....  What am I missing? This would be a great feature so any help is appreciated.

P.S. It would be great to have a third option that was call "In GEO Fence" that wasn't tied to coming and going. So if it missed then entry or exit it would set once it saw location data.

Android 13

Latest UD Mobile

Nothing in the GEO log when it doesn't work.

Edited by EJones01
Link to comment

Hi @EJones01,

Do you have UD Mobile Location Services Enabled?  If there is nothing in the log then the Android System never alerted UDM to the crossing.

Android has Geofencing issues which have been acknowledged by Google, see link below. The UDM Location Services tries to overcome these issues.  I have been running for 2 months with little battery consumption using the default of every 30 minutes.  Location Services also runs a WiFi monitor, so whenever the device joins or drops a Wifi network location will be requested, dropped WiFi connections have a delay of 2 minutes to allow time to exist Geofence.

 

https://wiki.universal-devices.com/index.php?title=UD_Mobile#UD_Mobile_Location_Services

Link to comment
21 minutes ago, EJones01 said:

I'm using the location to open my gates when I approach so would need to set the time down to 20 seconds or less. Worried about battery. 

Weirdly I am finding that opening the UD App temporarily fixes the issue for a day or so!

I would not worry to much about the polling time, greater than 30 minutes should work especially if your driveway is within your WiFi range as Wifi events will trigger app to update location. The important thing is that the service is running. I have 30 minute updates and am only seeing 1% more consumption daily.  Unfortunately recent Android updates now require that the app is in the foreground (UDM Location Service) to track WiFi events.

If your driveway is not within WiFi range, you could setup multiple Geofences and then in commands increase or decrease polling interval to preserve battery.  For example when you are within a mile from your home increase polling to every minute or two, when you exist the same larger geofence decrease polling interval.  When  you enter your main home geofence decrease polling, on exit increase to every minute or two.  This is not done automatically by the app as it is very dependent on the user's travel distance and mode of transportation.

Link to comment

Thanks, let us know how it performs. 

For both iOS and Android some of the older Geofence methods may have been more or less reliable as they utilize different APIs supplied by Apple/Google. We target higher API levels than some of the other Geofence Apps which have not been updated in some time as higher targets are required to submit apps after the API is deprecated.

So, unless the app is having issues that are logged in the UDM Geofence log, then the issue is with the Operating System.

Link to comment

@JaviI've been running on two Pixel phones for a few days now and it's working great. I did not enable UD Mobile Location Services or change polling. Both phones do have a car insurance app running that may help to keep location services updated and both phones were previously using Google assistant geofences. I turned off the integration with UD, but did not disable the Google assistant geofence. Two kids are using iPhones with Locative, so I just set occupancy node status from UD Mobile on the Pixel's and let the node server handle the logic. I'll probably leave it that way since it's working. In the future if UD Mobile gets the ability to restrict access, I may put UD Mobile on their iPhones. I could just tell them never to mess with UD Mobile and they wouldn't, but I'm hesitant to set them up with full access just for general security reasons.

Thanks for the great work on UD Mobile,

Mike

Link to comment
3 hours ago, TexMike said:

 if UD Mobile gets the ability to restrict access, I may put UD Mobile on their iPhones. I could just tell them never to mess with UD Mobile and they wouldn't, but I'm hesitant to set them up with full access just for general security reasons.

Thanks! 

FYI:  You can restrict access if you have access to the device you want restricted.  Install and synchronize. Create favorites if needed.  Hide the system on the Home Tab or hide any folders/devices you don't want them to access. Then Lock Edits from Settings > Global Preferences.  This will prevent the user from unhiding hidden nodes/folders, Editing any Nodes/Folders, and Accessing anything in Admin or Settings Tab unless they have the pin used to lock edits. 

  • Like 1
  • Thanks 1
Link to comment
  • 3 weeks later...

Geofence is mostly working great now I have the location services turned on (even at 30min), but once every week or two I enter the area and it doesn't notice and still says exited. It will stay this way until I go out and back in again. The logs show that UD knows my location so this doesn't seem right...surely if it see's me in the area it should change to entered, no matter if its later or not?

Link to comment
8 minutes ago, EJones01 said:

Geofence is mostly working great now I have the location services turned on (even at 30min), but once every week or two I enter the area and it doesn't notice and still says exited. It will stay this way until I go out and back in again. The logs show that UD knows my location so this doesn't seem right...surely if it see's me in the area it should change to entered, no matter if its later or not?

Is there an error in the log?  The log shows both when UD Mobile received the the fence crossing event from the Android Operating System and when the enter/exist commands succeed or fail. 

Currently the app is not checking the coordinates only requesting so Android Operating System gets the update. So it could be any of the following.  If you can narrow the issue it would be very helpful.

  1. Command Failed. This would be logged as a failure but the app should still show the correct status, even though the ISY was never updated due to network command failures or Android blocking network access due to battery saving or restricted background access.
  2. The Android OS never notified the App about the fence crossing.  Currently the app does not calculate fence boundaries, it relies on the Android OS to calculate and notify of crossing.  The app does request location when Location Services are active to force the Android OS to update location as some Android devices are not doing this as intended.  If this is the issue there will be no fence crossing logs in the app only location updates if location services are enabled. If we can verify the app logs the correct location but the Android OS did not notify the app, then we may be able to calculate the fence in app.
  3. The GPS coordinates are inaccurate. Users will need to check the logged coordinates as sometimes Android is over a quarter mile off of the actual location, if this is happening then increasing the radius solves the issue.  My wife and I both have Pixel 6 XLs, my phone was constantly showing outside of the fence while home with 500m radius. My wife's fence is set at 200m and accurate all the time.  I needed to increase mine to 700m to avoid erroneous exists entries.  .

 

For users experiencing intermittent connection failures we recommend increasing the fence size and/or creating multiple fences.  For example create a 700m and a 200m with the 700m being the trigger for both entry and exit. Then setting the 200m with entry only command.  This way, if the 700m fails for some reason the 200m may trigger the enter command.  The same can be used for missed exits with a larger fence (1000m) only triggering exit.

Link to comment

I have had this problem with entry/access being missed as well. I’m on the latest iOS. I need to do a better job looking in the logs but I suspect that I my phone is missing these events purely because there’s a problem with the cell service signal. Is there a way to check the actual location once in a while rather than just geo-fence crossings from the OS? that way if a poor  signal caused a miss eventually it would look up my location and realize it was missed. 

Link to comment
19 hours ago, photogeek54 said:

I have had this problem with entry/access being missed as well. I’m on the latest iOS. I need to do a better job looking in the logs but I suspect that I my phone is missing these events purely because there’s a problem with the cell service signal. Is there a way to check the actual location once in a while rather than just geo-fence crossings from the OS? that way if a poor  signal caused a miss eventually it would look up my location and realize it was missed. 

For iOS there is no other way to lookup location when the app is in background as Apple has this locked down.  Apple already denied our request to run in the background for Geofencing purposes by stating the Geofencing APIs are all that is needed and we had to remove background tasks. The Geofence APIs do not allow us to poll location only receive events from iOS.  So, I would need proof that iOS does not handle this properly in order to contest Apple's denial. We  have an open issue in UDM with timeouts, however I have yet to be provided new logs since the most recent update. The latest update contains more details regarding to narrow the issue.

We do have polling on Android as we have proof Android does not handle Geofences on all devices. 

Without seeing logs I can only speculate as to the cause.  If this is caused by no internet, then you could workaround. If caused by iOS blocking connection, then UDM or iOS needs to be fixed.

If you are having intermittent connection failures on entry you could add additional fences with smaller radiuses which only have the enter command. If you are having intermittent connection failures on exist, then you could add additional fences with larger radiuses which only have the exit command.

On 5/15/2023 at 4:49 PM, Javi said:

For users experiencing intermittent connection failures we recommend increasing the fence size and/or creating multiple fences.  For example create a 700m and a 200m with the 700m being the trigger for both entry and exit. Then setting the 200m with entry only command.  This way, if the 700m fails for some reason the 200m may trigger the enter command.  The same can be used for missed exits with a larger fence (1000m) only triggering exit.

 

  • Like 1
  • Thanks 1
Link to comment
  • 3 weeks later...

@JaviI have managed to look at the log and the location when it didn't register. This is happening about once in 8 entering into the GEO. The log has the correct location(checked on Google maps) and the correct time. But the App didn't register entering until 2:14pm 45 mins later ?

image.jpeg

image.jpeg

Edited by EJones01
Link to comment
On 6/5/2023 at 6:23 PM, EJones01 said:

@JaviI have managed to look at the log and the location when it didn't register. This is happening about once in 8 entering into the GEO. The log has the correct location(checked on Google maps) and the correct time. But the App didn't register entering until 2:14pm 45 mins later ?

Not sure,  the posted image of the log does not show the app registered any geofences.  I would need to see the full log to check for errors.  The logs are limited to ~70 most recent entries.

If the issue is network related (i.e. timeout), we can try to find a solution.  If the device believes you are in another location, then increasing fence radius is usually the only way to correct the issue.   Both my wife and I have Pixel 6 phones, and mine frequently registers about a quarter mile away when location is requested. This caused a similar issue where it could take a few queries before the location is accurate which triggers the fence crossing.

My Wife's phone is accurate with 200m radius and mine is only accurate with a 700m radius. So, radius is very much device dependent even with the same model phone.

Link to comment
1 hour ago, Javi said:

Not sure,  the posted image of the log does not show the app registered any geofences.  I would need to see the full log to check for errors.  The logs are limited to ~70 most recent entries.

If the issue is network related (i.e. timeout), we can try to find a solution.  If the device believes you are in another location, then increasing fence radius is usually the only way to correct the issue.   Both my wife and I have Pixel 6 phones, and mine frequently registers about a quarter mile away when location is requested. This caused a similar issue where it could take a few queries before the location is accurate which triggers the fence crossing.

My Wife's phone is accurate with 200m radius and mine is only accurate with a 700m radius. So, radius is very much device dependent even with the same model phone.

Where do I get the full log? That last Lat/Long is well inside the fence i setup.

Link to comment
21 minutes ago, EJones01 said:

Where do I get the full log? That last Lat/Long is well inside the fence i setup.

The backup file contains the full log, it can be sent to me via Private Message or as an attachment to a Ticket when zipped.  The screenshot of the log above does not show any events at 2:14 PM, or the previous triggered crossing.  The logs are automatically deleted,  so issues must be recent or they may have been removed from logs.

Link to comment
  • 3 months later...

I'd like to revisit this. I have now set the poling to 1 min which as made it slightly more reliable. But there are many times when the Geofence log is receiving locations inside the GEO fence area and doing nothing about them. Here you can see (if you put into google maps, that there are many location reports inside the area. But its not triggering the Entry. I also exported the backup if that helps. Thanks Eddie

 

Link to comment
Guest
This topic is now closed to further replies.

×
×
  • Create New...