Geofencing question

They are working it on anther post, they have just released a new beta version on android

2 Likes

I think it’s premature to compare Hubitat to Wink at this point. Hubitat staff are, in general, very active here in the forum and responsive to bug reports.

2 Likes

Running 1.6.8.128 still does not show the geofence pin on Android 9 however in the debug logs its now showing the updates with lat/long. Fence lat and long are always 0/0 with no way to set it.

Adjusting the radius seems to trigger a refresh of the lat and long

I can see in the debug screen that each time you change the radius it does show something is restarting, but still no pin :frowning: will wait to see what the next beta holds for us folk :slight_smile:

Hubitat: We're releasing new updates, sometimes multiple times per day!

Also Hubitat: We're going to break geofence and not release an update for a month.

Can this please get resolved soon? Geofence was rock solid until this update to 2.3.0.124. I know the typical answer is, "Use something else for presence." That's not a solution, it is a kludge.

1 Like

FWIW, geofencing is phone app dependent; Hub platform version shouldn’t matter.

2 Likes

Well, all I know is it was working fine until that update. I can go into geofencing in the app and see that the pin was still on my home, it showed my location correctly, it even would say "outside geofence" at the bottom of the screen but yet my device still shows present on the device in hubitat. Then sometimes, like when I'm sleeping and my phone remains in my home the device is randomly not present for hours and then becomes present. Then I leave for work and it remains present. It's completely broken. I did just adjust the geofence size on the app and I see that I am no longer present at home (which is true, I'm at work right now). We'll see if it starts behaving, but I doubt it.

1 Like

Check if your phone is still connected to your Hubitat. From the device page for the phone can you send a notification, and is it received by your mobile?

1 Like

Notifications to my phone go through fine.

1 Like

After I got home from work, it said it was still not present. I went into the app, showed I was at home and said I was in the geofence location and then the device status in Hubitat changed to present finally. Apparently Android is sleeping the app even though I have the app battery setting set to Unrestricted. I can't find the Hubitat app to add it to the "Never sleeping apps" in the battery options of the phone, so that's not an option. So, apparently my phone is ignoring my battery use settings on the app and putting it to sleep. Still strange that this just started happening after the latest Hubitat update though.

Does reverting to the prior firmware version of your hub resolve the problem?

1 Like

Try removing from don't optimise battery
Then try to set it to never sleep
Then turn off battery optimise for the app

1 Like

You sir, are a genius. After doing that, I was able to put it into the never sleep category and then I was able to set it back to no battery optimization. We'll see if this fixes it, but I'm leery. Today it showed me as present while I'm at work. Before opening the app I was able to send a notification to my device and the notification went through and came up on my phone. I then opened the app and it then changed my presence to not present. There is something wonky going on with the app, but it doesn't seem to be because of sleeping. It seems to not be sending geo updates unless the app is opened, even though the app seems to be running in background okay.

1 Like

Not Android phones have a sleep option for apps.

In the Hubitat app debug information under Geofence, it states:
currently out of geofence
lat: 0.0
long: 0.0
rad: 1300.0

I am assuming it should state the phone’s current lat and long.

Zoom out find the pin and drag it to your location
Or the app might not have permissions to access location, need to check app settings

I think those details are your geofence settings not your location because the rad is the size of the fence
Screenshot_20220202-174526_Hubitat

1 Like

Android 9 on Motorola g6 doesn’t have a battery sleep setting for apps.

Hubitat app has location permissions.

Latitude and longitude are entered on the hub, and are correct. In the app, the blue dot is perfectly on my location. I zoomed out to all of north America and red pin is not present.

The phone is currently in the geofence, yet the app states “Out of Geofence.”

Hub and app are communicating because I can send notifications from the hub to the app.

I would suggest on phone, not hubitat app, under data, clear cache, clear user data, then relog into hubitat app and set your location. Also confirm these settings


28mleKfnmdNGRUovRjREnl9gY.jpeg)

Hubitat app will only be available to add to the never sleeping app list only if the app batter optimisation is on, ie not set like the last image

“Sleep” functionality appears to be a Samsung-phone-only feature.

My version of Android (9) only has uninstall and Force stop for an app – no clear data/cache. I forced stop, then logged out/in, but unable to set location (no red pin.)

Logging out/in of the app created a new device for the phone on the HE, which broke some rules. Easily fixed.

I was able to get the geofencing to work on my Samsung Galaxy A7 Android tablet (w/o SIM) running v11. The setting Goggle Location Accuracy under “Location” was disabled. I enabled it and the red pin was displayed on the Hubtitat geofencing page. The app now lists the correct lat and long for the location of the tablet and “currently inside geofence” under the app’s debug. (No device was created on HE for the tablet.) My phone, however, had and has this setting enabled.

So I made some progress.

Ehhhh not really. It has never worked reliably since the app was released. It had worked from time to time, but it's never been reliable enough to be depended upon.