Android - Geofence not working

I am also having this issue again as well. My location will clearly be far outaide the geofence but the app says im in the geofence and vice versa. Only way to get presence to change is to change the geofence radius but that only fixes it till the next time i leave/enter the geofence. Sending a geo event eith the button doesnt help. I'm on the beta version of the app, version 1.6.8 build 128. Im on the beta version because one of the many other times ive had this issue, support told me to install the beta...

1 Like

Same issue still. Maddening.

Same for me...checked every settings on the phone and reinstalled the app on the phone but whitout success....

I've been chasing this issue forever. I believe it's really the ability of your device to track your location. I set up a simple automation test that has been running for a few months. I set the geo fence and the app when I'm returning home it text me. Rarely does it trigger the text when I first enter the geo fence. In most cases I've been home for a few minutes before I get the text message. Sometime I never get a text because my device never knew I left fenced area.

Same ongoing issues. Managed to resolve it with the free Life 360 app and free tier

Just a reminder that for our engineers to attempt to replicate issues with the geofence features, it is best if they know the exact device make and model, operating system version, Hubitat mobile app version, and whether phone's battery optimization as well as memory utilization tasks are turned off for the Hubitat app.

Failure to exclude the app from any and all optimization services that may otherwise terminate the background services that the Hubitat Mobile app is running, will result in unreliable geofence experience.

When posting feedback related to geofence, please consider providing the following details to help our engineers to narrow down the issues reported:

EXAMPLE

  • Mobile device: Samsung Galaxy S22
  • Android Version: 12
  • Software version: S901U1UEU2AVF7/
    S901010YM2AVF7/ S901U1UEU2AVF7
  • Security patch level: July 1, 2022
  • Mobile app version: 1.6.8. - build 129
    Notes:
    No 3rd party optimization apps
    Battery and CPU/memory optimization services are disabled for Hubitat app.
2 Likes

Nice to see such clear and direct instructions on logging an issue...

Taking that suggestion a step further, could the Hubitat App somehow gather at least some of this information and provide it in a screen for users to copy to the clipboard?

EDIT - I say that, I only now just realise there is a debug screen in the mobile app.... :slight_smile: Could these details be added and available to copy?

1 Like

Life360 wants way TOO much personal information..My 2 cents

That's step 2 in troubleshooting. We wouldn't ask users to provide their location coordinates in public.

1 Like

Good poiont. But some of the other info is not conviently available, from what I can see, or am I missing something?

The issue is that Hubitat does not report as inside geofence when I'm inside. I open app up, and I'm smack bang in the middle of geofence, and it thinks I'm outside. I have to manually change the size of the geofence, and hey presto, it reports me as home. It cant be any of the optimisation issues, since I manually open the app, and it still reports incorrectly. It's been this way for at least 6 months.

Nonetheless.

  • Mobile device: Samsung Galaxy S21 Ultra
  • Android Version: 12
  • Software version: SAOMC_SM-G998B_OXM_XSA_12_0017 XSA/XSA,XSA/XSA/XSA
  • Security patch level: Aug 1, 2022
  • Mobile app version: 1.6.8. - build 128

No 3rd party optimization apps: correct
Battery and CPU/memory optimization services are disabled for Hubitat app: correct.

1 Like

It sure can be, the app is looking at location. If the app didn't see the change in phone's location until you forced the location to refresh, then it wouldn't be able to report that you are inside. This is good feedback and something that we can set up to try to replicate to see how else can the app force the location update in order to more accurately report the location change.

For reference, the above example is actually my production phone. I run Life 360, MacroDroid and Hubitat app in parallel to monitor our app's performance, and so far Life 360 and Hubitat have been neck in neck, with Life 360 using a lot more resources, which means that they use more battery and more data to monitor phone's activity. It is something that we are currently exploring.

1 Like

If you can't get it to work Alexa can be an alternative. All it takes is a virtual switch and a basic rule. Alexa detects you inside geofence turn switch off. When your outside turn it on. Or vice versa, whatever you like. I prefer on/open/away or any alert to be on. The real trick that I haven't figured out is how do you track kids without phones?

Anyways here's a pic of the rule

I've read in a few stack overflow posts that another app which is requesting location can help speed up geofence events for your app. Meaning that this might not be a great test - having an app like Life360 which is doing lots of location updates could end up helping Hubitat get a more timely enter/exit notification. The same would be true if you're using Google Maps in the car.


On a separate note, I've been playing with geofencing on my own app a bit this week and it really seems device dependent.. I've got an S20, S10 and Pixel 4a - all running Android 12 and all geofencing the same area with no battery optimizations.

I drove outside the geofenced area and only the Pixel got an EXIT notification. After a few minutes of nothing from the Samsung devices I ended up reboot them which finally produced the EXIT notification. Then, several hours later driving back into the geofence - again only the Pixel got the ENTER notification. The S10 got the ENTER event this morning and my S20 never got the ENTER event at all.

So, all that is to say - I think Samsung is really locking down geofence events. So, in order to be reliable in any way on these devices I think the app's unfortunately going to have to be a lot more like Life360 and request location updates from the background -- which sucks because Life360 is constantly showing notifications (needed to request location from the background..)

2 Likes

Excellent points and great feedback, as always. Thank you! This is something we have observed as well, and our engineers are looking into it.

1 Like

Anecdotally, I've noticed presence works much better if I'm navigating using Google Maps. I've noticed the same thing on my wife's phone. Both Galaxy S9. That's also why I re-enabled the location permission for Facebook, even though I hardly use it anymore and Facebook definitely doesn't need to know where I am. I figure the more chance there is for my phone to check my location for any reason, the better my reporting should be. I don't know if that's how it actually works, but I thought I'd give it a try.

I have weather and call blocker apps that have a persistent notifications (one for temperature display in the status bar, and one to monitor incoming calls in real time). They both get relegated to the small "Silent notifications" section at the bottom of my notifications, so they're really not that obtrusive. The call blocker doesn't show up in the status bar unless it actually blocks a call.

Thank you for posting this, Joe. I've followed these posts and wanted to respond so many times with, "So, what is Samsung doing?". The geofence has worked great for me for three years with two Pixel 3A's and now two Pixel 6A's.

1 Like

I have noticed this too. I'm the only one in my family that is using Samsung and I'm the only one that is having an issue. I'm getting 5–10-minute delay. There was an update to the firmware addressing security that has introduced delayed, I believe. I have my setup L360, Hubitat GF, and UNIFI WiFi. Then I use combination presence application to aggregate them all. It worked very well. However, since one of the Android/Samsung updates seemed to introduce this issue recently I have been doing testing.
I have started testing the following: Values in Minutes

  1. Hubitat - 3-5+ delay
  2. WebCore - 0-5
  3. Life360 - 2-7+ delay
  4. IFTTT - 0 delay

Note: Unifi depends on the polling you have setup (static mac) Part of all the test but not measured.

I believe what is going on here (in my very limited testing) is that IFTTT is running different not as a process/service the background but more as application within the notification part on android. IFTTT does recommend doing this for android devices.

The configuration that I have right now. L360, WebCore, IFTTT and Unifi WiFi.
This seems to be working well thus far.
I plan on doing more testing, but I think this always to be chasing issues between app dev, Mobile manufactures, and OS developers.

Well, the problem is back. I had a problem with the geofence not recognizing my phone's presence. After the last update of the app on my Android phone, it worked flawlessly for a few months. Now it is back again. I have tried the following:

  • Force stopping the app and clearing cache and storage
  • Send geo event
  • Powered off/on my phone
  • Uninstalled and reinstalled the app

Nothing seems to help. I am in the middle of my geofence right now but it shows out of geofence. Any other suggestions?

Thanks

A post was split to a new topic: Geofence is not working