Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS 16.1.1 Owntracks 1.6.2.5 Stops reporting in background #728

Closed
Mark-VG opened this issue Nov 15, 2022 · 13 comments
Closed

IOS 16.1.1 Owntracks 1.6.2.5 Stops reporting in background #728

Mark-VG opened this issue Nov 15, 2022 · 13 comments

Comments

@Mark-VG
Copy link

Mark-VG commented Nov 15, 2022

I have been using Owntracks for about a year on Android and recently started using IOS for one of my devices with details as above.

I have not been able to get Owntracks to report locations unless the APP is active and not in background.

I have tried all the solutions posted that I could find with no luck.

Not sure if this is a device issue (Iphone Xs) or something else. I have attached the current config

config.otrc.txt

I would appreciate any guidance on getting this to work reliably again on IOS?

Thanks
Mark

@jpmens
Copy link
Member

jpmens commented Nov 15, 2022 via email

@Mark-VG
Copy link
Author

Mark-VG commented Nov 15, 2022

Thank you. I have changed to Significant again (did try this before) and will report back.

@Mark-VG
Copy link
Author

Mark-VG commented Nov 16, 2022

I tested again with Significant Mode and it does work for Significant changes, but then immediately stops sending updates again.
Having re-read the booklet I now have a better understanding.
However also as per the booklet, even in Significant Mode the APP should still send ping-type messages - which I do not seem to be seeing?
"if you don't move, no new location is published - even if you don't move for hours. (Note, however, that the app will publish a ping-type message once in a while.)"
I like to keep a track of "Last Seen" for each device so that it is possible to tell if the device location is accurate, or just not sending any updates.
How can I debug the ping type messages?
Example, my device stopped moving at 07h00, which was also the last update received. It is now 07h30, and there has been no further updates (ping type messages). This can be the case for days is the device does not leave for example HOME?
Appreciate any advice.

@jpmens
Copy link
Member

jpmens commented Nov 16, 2022

Type ping messages sent with "t": "p" in the JSON payload, and these can take a long time if the device doesn't move at all. One of my friends' last ping was at

1668524358 Tue Nov 15 15:59:18 2022

and it is now

1668585963 Wed Nov 16 09:06:03 2022

@Mark-VG
Copy link
Author

Mark-VG commented Nov 16, 2022

Thank you.
So is the ping schedule not fixed in anyway?
The device does get moved around inside the home, but nowhere near the 500m requirement to trigger significant.
It would be really useful to have a ping message triggered at a fixed schedule to be able to confirm device is online and owntracks is running etc.

@ckrey
Copy link
Member

ckrey commented Nov 16, 2022

Mark, this is not possible unfortunately.

Apps in iOS are not active when not in Move mode and are only woken up by iOS when

  • a significant change in position happens
  • a region is entered or exited
  • randomly to do a background refresh
    The latter we use to issue ping messages. But iOS is not reliable to do the background refresh. It depends on the device, battery state, etc. and cannot be predicted.

If you definetely need a fixed schedule, you need to run in Move mode, which drains the battery within hours.

Otherwise, region events are reliable. So if you set a region around your home and the iPhone's last report is within your home region, you can be quite sure it still is (if it doesn't ran out of battery or the user switched to Quiet mode).

For smaller movements outside your known regions you may look at this:
https://owntracks.org/booklet/features/ios/#region-monitoring-with-follow

@Mark-VG
Copy link
Author

Mark-VG commented Nov 16, 2022

Thank you for the responses.

If you definetely need a fixed schedule, you need to run in Move mode, which drains the battery within hours.

I use the Android version as well - very happy with Move Mode. Battery lasts as required with a bit of tuning
However on the IOS device, in Move mode with the app in the background there are no updates at all until the APP is running in foreground.
Based on your response I seem to be missing something in Move mode?
Otherwise it looks like I will have to stay with Significant Mode and just live with no events for possibly hours until there is a significant move.
Thanks you - please let me know if I am not understanding Move Mode correctly

@ckrey
Copy link
Member

ckrey commented Nov 16, 2022

Please check in "Settings/Privacy/Location" if the OwnTracks app has permissions to use location "Always".

And make sure you don't swipe out (=kill) the app to put it in background.

@Mark-VG
Copy link
Author

Mark-VG commented Nov 16, 2022

Please check in "Settings/Privacy/Location" if the OwnTracks app has permissions to use location "Always".

And make sure you don't swipe out (=kill) the app to put it in background.
Yes Owntracks has "Always" Location permission
The issue is that Owntracks is swiped out/killed (running in background surely?) - in the Android version this still allows Move mode to work.
So I guess I am out of luck, which is a pity.

@jpmens
Copy link
Member

jpmens commented Nov 16, 2022 via email

@Mark-VG
Copy link
Author

Mark-VG commented Nov 16, 2022

Thank you all for the clarifications.
So I guess I will have to stick with Significant and work around the random pings while the device is within a region and not moving much.

@jpmens
Copy link
Member

jpmens commented Nov 16, 2022

This is a bit older but explains the reasons for not swiping out.

@Mark-VG
Copy link
Author

Mark-VG commented Nov 16, 2022

Makes sense then. Thanks for the support and great work.

@ckrey ckrey closed this as completed Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants