gcobb321 / icloud3

iCloud3 v3 - iCloud3 is an advanced iDevice tracker that uses Apple iCloud account and HA Companion App data for presence detection and location based automations.
MIT License
546 stars 54 forks source link

Default stationary zone triggers some unexpected side effects #246

Open groenmarsmannetje opened 1 year ago

groenmarsmannetje commented 1 year ago

For the iCloud3 devices I noticed an unexpected side effect in combination with the proximity integration. I use the proximity integration to determine distance of persons/devices from home zone.

When an iCloud3 device starts moving while in a stationary zone then it seems that the stationary zone is automatically changed back to it's default location (1 km North of home zone). But this also triggers that the iCloud device proximity to home zone is shortly (can be a couple of minutes) changed to only 1 kilometer from home, even if the real distance from home zone is much further away. At least this is my assumption because this always happens after leaving a stationary zone and distance from home is always then 1 kilometer for a couple of minutes.

This unexpected behavior triggers my automation to turn on the heating because somebody is getting near home. Very annoying when you are on holiday.

gcobb321 commented 1 year ago

You should not use the proximity integration. iCloud3 does everything it does regarding distance to the zone, etc. The proximity integration does not take gps accuracy and old location data into consideration when it sets the location and calculates the home distance, leading to inaccurate results. The stationary zone acts just like any other zone, other than changing locations depending on where you are for a given amount of time. The ios App issues an exit trigger that iC3 picks up and takes the device out of the stationary zone, moves the zone back to it's base location and starts tracking.

Try disabling the proximity integration and see what happens.

groenmarsmannetje commented 1 year ago

I still think this is caused by a bug in the iCloud3 integration. I cannot disable the proximity integration because it also includes other device trackers that are not iCloud3. Also be aware that the iOS device that I use with iCloud3 doesn’t have the companion app installed.

gcobb321 commented 1 year ago

As I said, the Stationary zone is just a zone and acts like any zone. No one else has reported an issue like yours related to using the proximity zone and iCloud3. The iCloud3 docs talk about not using the proximity zone and problems it can lead to. I understand you need it and that is ok. What I would suggest is disabling the stationary zone by adding the stationary_still_time: 9999 min parameter. That would mean the device had to stay in the same location for 9999 minutes

groenmarsmannetje commented 1 year ago

Thanks for your suggestion. I will try with that setting.