Thanks for the suggestion. It's a bit more complicated than that because the app doesn't run continuously in the background so location of the car is not monitored constantly. I also don't want a server to monitor location of the car constantly as it affects the phantom drain. Still, I'm thinking along those lines.
The Siri commands that I've added for Sentry mode and enable/disable Sentry mode for now. The upcoming Watch app also has a button for this (in addition to Siri on the watch).
I grant that I haven't thought it through, but off the top of my head:
- You're doing something presumably event-driven to detect unoccupied and unlocked. Use the same trigger to check whether sentry should be enabled.
- If you aren't already using it, the common trick seems to be to use location services to wake the app occasionally. Some combination of noting the car location vs. the phone location shouldn't require waking the car at all to notice that te car and the phone are now in different locations and the check should be performed.
(I note that I'm presuming the logic is driven from a phone that is with the car and then not with the car, which is a stateful presumption rather than an elegant presumption. Still, I'd bet it's the 90% case.)