owntracks / talk

Questions, talk about OwnTracks
30 stars 4 forks source link

Automatic mode switching #142

Closed connervieira closed 5 months ago

connervieira commented 2 years ago

I'm not sure if this is something that is already possible, but I couldn't seem to find anything related to it on the documentation.

I personally find that "move" mode drains far too much battery to run 24/7 (as would be expected). However, "significant changes" mode doesn't update nearly often enough to create an accurate picture of everywhere I've been. I've tried balancing battery with accuracy by changing the update intervals, but I haven't had much success.

I regularly run apps in my car that request my GPS location every few seconds. For this reason, I always have my phone plugged in in the car. It would be really convenient if OwnTracks could automatically switch to "move" mode based on certain conditions. For example, maybe OwnTracks could be configured to automatically switch to "move" mode when power is connected, or a certain time of day is reached.

I'm not sure if this is something that's already possible, but I think it would make OwnTracks a lot more convenient for day to day use.

jpmens commented 1 year ago

I think this is already possible on Android using, say, Tasker. Would that suffice for your needs?

sumnerboy12 commented 1 year ago

I can confirm this is possible using Tasker (Android only of course). I do something similar, so that whenever my phone connects or disconnects from my home WiFi SSID, it switches Owntracks into move mode for 30s, and then back to significant changes mode. This ensures I get an accurate location update when I am arriving or leaving home, which helps ensure I trigger the region enter/leave events.

captain-igloo commented 1 year ago

I have made a modification which switches to "move" mode when moving, then back to "significant changes" after five minutes of being stationary.

https://github.com/captain-igloo/owntracks-android