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

Stationary (or even turned off) device zone status not updated with zone moves #407

Open
mstarostik opened this issue Dec 16, 2024 · 1 comment

Comments

@mstarostik
Copy link

First of all, I'm using 3.0.5.8 as 3.1 cannot login to my Apple Account because of #401

I've got a GPS tracker in the car which updates an MQTT device_tracker every 30 seconds. This in turn triggers the zone.update action (from Spook) to update the "car" zone's position so all devices in the car are assigned to that zone.
This works fine while on the road and while there are intermittent in zone / not in zone transitions due to the locations not being sampled at the same time, it's all eventually consistent.

Now the problem: When I drive the kids to school, they transition from "home" to "car" zones just fine. But upon arrival they turn off the phones and while the iCloud location correctly reflects the school's coordinates which are within the "school" zone, the device_trackers are not removed from the "car" zone until I restart HA (or iC3, haven't tried that yet).
My assumption is that as the offline phones are stationary, iC3 doesn't re-evaluate the zone assignment and thus fails to notice that the "car" zone is no longer at this location. When I restart HA, this is apparently rechecked and the trackers correctly assigned to the "school" zone.

So, the correlation between device location and zones should be re-evaluated even when the device's location doesn't change, as the zones' locations may have changed in turn.

Hope this makes sense.

@gcobb321
Copy link
Owner

The iCloud3 Action can be fired to do an immediate locate of a single device or all devices. You could issue one based on the zone changes to school before they turn off your phones or when they enter the school zone. You might also have 2 school zones. a big one before they turn off the phones and the actual zone that might do some additional triggers.

One problem is the locate has to be done before they turn them off, otherwise the last known location is used.

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

2 participants