iCloud3 v3 iDevice Tracker - Version 3

@gcobb321 I’m seeing a huge battery suck and want to make sure I’ve optimized my settings. Anything stand out here that’s either super good or bad?

inzone_interval: 60 min
max_interval: 4 hrs
center_in_zone: false
stationary_inzone_interval: 30 min
stationary_still_time: 6 min
stationary_zone_offset: 1, 0
travel_time_factor: .6

inzone_intervals:
#  - inzone_interval: 60 min
  - john_mbp: 1 hrs
  - johnwatch: 1 hrs
  - no_iosapp: 60 min

I’ve read and reread the docs and just haven’t fully wrapped my head around what the best practices are. I’m fighting a battle with not being detected upon arrival home.

Anyone? I can’t see anything out of line with the docs - any pro tips would be helpful. Battery suck, and a whole lotta this:

Your config looks fine. The ‘Requesting …’ message looks like it’s in an error recovery loop where gets new location data but the data might be old and unusable. I can’t tell from the image. You can get more detail about what is going on by selecting Event Log > Actions > Show Tracking Monitors.

Are you using the iOS App to trigger zone enter and exit events, along with other location updates?

@gcobb321 I’m using the iOS HA app to trigger zone enter/exit events, yes.

The current Event Log doesn’t have the loop atm, I’ll watch for it to happen again and add in screenshots of the Show Tracking Monitors.

You can also do a Event Log > Actions > Export Event Log which will create an \config\icloud3.event_log.[date-and-time].txt file with all of the event log info. Email the file to [email protected] and I’ll take a quick look at it to see if I notice anything.

@gcobb321 In your inbox, sir. Thank you!

@gcobb321 Update: correcting the name of the errant device (the MacBook Pro) resolved all issues including the retry loop and battery suck.

Right now the only thing plaguing me is a slow reaction time when entering/exiting zones. Is there a config I can tune to improve response time?

@gwp1 iCloud3 checks for those triggers every 5-seconds. I’d look at the iOS App to see how it is reacting. The Debugging screen lets you look at the triggers and events it has detected and reacted to.

I need some help PLEASE!!
I have this on my log:

Logger: custom_components.icloud3.device_tracker
Source: custom_components/icloud3/device_tracker.py:1003
Integration: icloud3 ([documentation](https://gcobb321.github.io/icloud3/#/), [issues](https://github.com/gcobb321/icloud3/issues))
First occurred: 15:53:04 (5 occurrences)
Last logged: 15:53:13

* ^3^iCloud3 Error > Invalid configuration parameter > . • Parameter .. - devices: None . • Valid values - device_name, email, picture, name, inzone_interval, track_from_zone, iosapp_suffix, iosapp_entity, iosapp_installed, noiosapp, no_iosapp. • Resetting to - []
* iCloud3 Setup Error > iluna_67 > The iOS App device_tracker entity was not found in the Entity Registry for this device.
* iCloud3 Setup Error > iluna_69 > The iOS App device_tracker entity was not found in the Entity Registry for this device.
* iCloud3 Setup Error > lunarwatch > The iOS App device_tracker entity was not found in the Entity Registry for this device.
* iCloud3 Error for iPad Mini (icloud3) (iluna_65)/iluna_65 > The iCloud Account for [email protected] did not return any device information for this device.. -------------------------. 1. Restart iCloud3 on the Event_log screen or restart HA.. 2. Verify the devicename on the `devices/device_name: iluna_65` parameter if the error persists.. 3. Refresh the Event Log in your browser to refresh the list of devices.

My devices are named at iCloud as iLuna 67, iLuna69, etc…

What am I doing wrong?

The iCloud3 Event Log shows the actual device names that are in the Family Sharing, Find my Friends and the HA entity registry for the iOS app (Example: iluna_65) that are used to identify the devices.

The docs with example screens are in the iCloud3 docs here.

Rather than use friendly names (iLuna 65) in the config parms, use the coded names (iluna_65) that match the device names shown in the Event Log.

HI All and Hey @gcobb321,

Is there a way to give the device_tracker entities that been created a unique id?
Lots of entities have this and now the entity is not edible because it does not have a unique id.

Maybe a nice tweak/finetune request?

1 Like

This is already in iCloud3 v3

ohh didn’t know there was a v3. Im still using v2.4.7 and there is no update popping up

It hasn’t been released yet. I thought it was done but noticed a few things last night related to entering the iCloud account verification code and the messages in the Event Log. I have started updating the docs but keep getting interrupted by other things.

3 Likes

This has improved dramatically - mind you, I just moved to a new phone and watch pretty seamlessly.

Hi Gary,

I obviously have problems getting an update from my phone when travelling.

Yesterday at noon I returned home in Germany coming from Seattle and my position is still in there.
I asked icloud3 for an update and got:

image

My apple watch though is updated properly (connected to the phone above).

devicename	Time	iOSApp State	iC3 Zone	Interval	Travel Time	Distance	Text
Tracked Devices: ['xxxx_iphonexr', ...]
Log Update Time: Sun, 10/09, 07:20:47
-- sys event --	00:51:58	-	-	-	-	-	iCloud Account Authenticated (#2) > LastAuth-:21:59  (30 min ago), Method-TrustToken/ServiceLogin, RequestedBy-ncos_apple_watch
-- sys event --	01:21:58	-	-	-	-	-	iCloud Account Authenticated (#3) > LastAuth-:51:58  (30 min ago), Method-TrustToken/ServiceLogin, RequestedBy-ncos_apple_watch
-- sys event --	01:51:58	-	-	-	-	-	iCloud Account Authenticated (#4) > LastAuth-1:21:58  (30 min ago), Method-TrustToken/ServiceLogin, RequestedBy-ncos_apple_watch
-- sys event --	02:51:59	-	-	-	-	-	iCloud Account Authenticated (#5) > LastAuth-1:51:58  (1 hrs ago), Method-TrustToken/ServiceLogin, RequestedBy-ncos_apple_watch
-- sys event --	03:51:59	-	-	-	-	-	iCloud Account Authenticated (#6) > LastAuth-2:51:59  (1 hrs ago), Method-TrustToken/ServiceLogin, RequestedBy-ncos_apple_watch
-- sys event --	04:51:59	-	-	-	-	-	iCloud Account Authenticated (#7) > LastAuth-3:51:59  (1 hrs ago), Method-TrustToken/ServiceLogin, RequestedBy-ncos_apple_watch
-- sys event --	07:13:39	-	-	-	-	-	iCloud3 Command Processed > Device-xxxx_iphonexr, Command-location 
-- sys event --	07:13:42	-	-	-	-	-	iCloud Account Authenticated (#8) > LastAuth-4:51:59  (2.4 hrs ago), Method-TrustToken/ServiceLogin, RequestedBy-xxxx_iphonexr

xxxx_iphonexr	03:00:00	-	Away	4 hrs	-	7936 km	¤s«HS¦LH-Device Counts¦RH-iCloud Counts»HE«LT-State/Trigger Chgs¦LC-0¦RT-Authentications¦RC-5»«LT-iCloud Updates¦LC-0¦RT-Total iCloud Loc Rqsts¦RC-123»«LT-iOS App Updates¦LC-0¦RT-Time/Locate (secs)¦RC-0.44»«LT-Discarded¦LC-0¦RT-Waze Routes¦RC-0»¤e
xxxx_iphonexr	07:13:39	-	Away	4 hrs	-	7936 km	Service Call Command Received > `location`
xxxx_iphonexr	07:13:39	-	Away	4 hrs	-	7936 km	FamShr update started (Locating)
xxxx_iphonexr	07:13:39	-	Away	4 hrs	-	7936 km	Requesting New iCloud Location > LastLocTime-15:26:40 (15.8 hrs ago)
xxxx_iphonexr	07:13:42	-	Away	4 hrs	-	7936 km	Refreshed FamShr iCloud location data
xxxx_iphonexr	07:13:42	-	Away	4 hrs	-	7936 km	Discarded > OldLocation-5:52:02 (1.4 hrs ago) (#25), OldLocThreshold-3 min, GPS-(47.43878, -122.302509/9m), NextUpdt-Paused, OldLocPoorGpsCnt-#25, DiscardCnt-#1
xxxx_iphonexr	07:13:43	-	Away	4 hrs	-	7936 km	Tracking Paused > Excessive Errors Encountered, • Old Location Errors-#25, • Discarded Updates-#1, ---------------------------------------------------------------------------, Event Log > Actions > Resume Polling to restart

ncos_apple_watch	00:51:55	-	Home	30 min	-	-	Requesting New iCloud Location > LastLocTime-21:27:42 (3.4 hrs ago)
ncos_apple_watch	00:52:00	-	Home	30 min	-	-	Next Update Time reached (Retry) > ncos_apple_watch
ncos_apple_watch	00:52:00	-	Home	30 min	-	-	FamShr update started (Next Update Time reached (Retry))
ncos_apple_watch	00:52:00	-	Home	30 min	-	-	Requesting New iCloud Location > LastLocTime-:28:37 (23.4 min ago)
ncos_apple_watch	00:52:00	-	Home	30 min	-	-	Refreshed FamShr iCloud location data
ncos_apple_watch	00:52:00	-	Home	30 min	-	-	Discarded > OldLocation-:28:37 (23.4 min ago) (#14), OldLocThreshold-3 min, GPS-(xxxx), NextUpdt-1:22:00, OldLocPoorGpsCnt-#14, DiscardCnt-#2
ncos_apple_watch	00:52:05	-	Home	30 min	-	-	Device Monitor > UpdateMethod-None, UpdateReason-OlderTrigger-NextUpdateTime (Retry)@21:27:03, State-home, Trigger-NextUpdateTime (Retry)@21:27:03, LastLoc-:52:00, Zone-home, HomeDist-0m, inZone-True, GPS-(xxxx), StateThisPoll-home, StateLastPoll-home
ncos_apple_watch	01:21:55	-	Home	30 min	-	-	Requesting New iCloud Location > LastLocTime-:28:37 (53.3 min ago)
ncos_apple_watch	01:22:00	-	Home	30 min	-	-	Next Update Time reached (Retry) > ncos_apple_watch
ncos_apple_watch	01:22:00	-	Home	30 min	-	-	FamShr update started (Next Update Time reached (Retry))
ncos_apple_watch	01:22:00	-	Home	30 min	-	-	Requesting New iCloud Location > LastLocTime-:52:18 (29.7 min ago)
ncos_apple_watch	01:22:00	-	Home	30 min	-	-	Refreshed FamShr iCloud location data
ncos_apple_watch	01:22:01	-	Home	30 min	-	-	Discarded > OldLocation-:52:18 (29.7 min ago) (#15), OldLocThreshold-3 min, GPS-(xxxx), NextUpdt-1:52:00, OldLocPoorGpsCnt-#15, DiscardCnt-#3
ncos_apple_watch	01:22:05	-	Home	30 min	-	-	Device Monitor > UpdateMethod-None, UpdateReason-OlderTrigger-NextUpdateTime (Retry)@21:27:03, State-home, Trigger-NextUpdateTime (Retry)@21:27:03, LastLoc-1:22:00, Zone-home, HomeDist-0m, inZone-True, GPS-(xxxx), StateThisPoll-home, StateLastPoll-home
ncos_apple_watch	01:51:55	-	Home	30 min	-	-	Requesting New iCloud Location > LastLocTime-:52:18 (59.6 min ago)
ncos_apple_watch	01:52:00	-	Home	30 min	-	-	Next Update Time reached (Retry) > ncos_apple_watch
ncos_apple_watch	01:52:00	-	Home	30 min	-	-	FamShr update started (Next Update Time reached (Retry))
ncos_apple_watch	01:52:00	-	Home	30 min	-	-	Requesting New iCloud Location > LastLocTime-1:22:39 (29.4 min ago)
ncos_apple_watch	01:52:00	-	Home	30 min	-	-	Refreshed FamShr iCloud location data

Is it possible that a plausibility check prevent this position update to work?
If there is more information I should share, please let me know.
Thank you!

Restarting iCloud3 will reset everything and create a new iCloud Web Services session. Event Log > Actions > Restart iCloud3

Or restart Home Assistant

So, you mean I need to restart iCloud3 or HA if this happens?

When iCloud goes off line for an extended period of time when the phone is in Airplane mode, iCloud3 can not get the phone’s Location and can have trouble getting it again when it becomes available. Restarting iCloud3 using ‘Event Log > Actions > Restart iCloud3’ Reset everything and sets up a new icl connection. The other thing you could try is ‘Event Log > Actions > Resume Pilling’. That will not reset everything but will ask for a new location.

Thank you, Gary.
I will play around with this on the next trip (Boston in 2 weeks). :wink:

However, I am pretty sure that I did “Update phone's location
I will consider to trigger a icloud restart with Device tracker: icloud3_restart from automations if a flight can be found in my calendar.