owntracks / android

OwnTracks Android App
http://owntracks.org
Eclipse Public License 1.0
1.34k stars 474 forks source link

Region Departing/Entering Notification Not Working #1764

Open anthonycle67 opened 1 month ago

anthonycle67 commented 1 month ago

Regions are defined to provide notifications when the device enter and exit the region used to work. However, a while ago, this no longer works even before V2.5.0. Only home region works. Looking at the OwnTracks device details in Hubitat, it only shows that the device departing or entering Home region but never for other defined regions. Is there something that I have to change to make this works again?

V2.5.0 is installed from Google Play Store.

Thanks.

jpmens commented 1 month ago

It's possible this is an artifact of your device not reporting positions. Please see this issue regarding enabling "Always on" for location reporting.

growse commented 1 month ago

Hmm, there's nothing special about 'Home' (or any region name), so it's weird that it's working for one and not the others.

I assume that home is your first defined region?

anthonycle67 commented 1 month ago

Yes, Home is the first region I defined. Also, for Home region, I also specified it in the "Home Place" where as the other regions I didn't specify anything for them. Screenshot_20240723_061659_Samsung Internet

ckrey commented 1 month ago

Can you tell us which backend you are using? We don't know this UI

anthonycle67 commented 1 month ago

I use OwnTracks app code in Hubitat designed by Lyle Pakula. Configured OwnTracks mobile app for HTTP and Hubitat URL provided in Lyle's OwnTracks app.

Thanks.

⁣Get TypeApp for Android ​

On Jul 23, 2024, 7:10 AM, at 7:10 AM, Christoph Krey @.***> wrote:

Can you tell us which backend you are using? We don't know this UI

-- Reply to this email directly or view it on GitHub: https://github.com/owntracks/android/issues/1764#issuecomment-2245365474 You are receiving this because you authored the thread.

Message ID: @.***>

jpmens commented 1 month ago

You'll have to check with the Hubitat people then; that's out of scope for us.

compuguy commented 1 month ago

I'm not using hubitat as my back end. Owntracks recorder + frontend. I get the location info, but I just don't get any notifications on endpoints (Android app).

growse commented 4 weeks ago

There is a bug here with events and notifications. Using this to track.

speckenbuettel commented 3 weeks ago

Hi,

not sure if my problem is related to this bug?

When I leave a region, and on the map both my current position and the latest position received via MQTT are outside the region, the device is still shown "in region" under regions:

Screenshot_20240816_070653_OwnTracks Screenshot_20240816_070702_OwnTracks

Attached two screenshots (sorry all in German, but it should be self-explaining when you are familiar with the UI).

growse commented 3 weeks ago

I'm just re-poking the logic here for 2.5.2.

The behaviour you're seeing could be because the device also takes location accuracy into account. E.g. if your location is 120m away from a 100m-radius region centre, and your location accuracy is more than 20m, then you might not get an exit transition.

Locations are circles of uncertainty, not points, so the actual business of working out if a device is likely in a region is a little non-trivial.