iCloud3 v2.1 Device Tracker - iCloud3 v2.2 has been released (10/10/2020)

@gcobb321 Thanks for the explanation. The entity ‘device_tracker.iphoneexpress_xxx’ doesn’t exist and I don’t believe it was ever created.

Is the ‘iphone_express’ your old ic3 entity?
No, it wasn’t created by ic3, I believe it was created when I was using another tracking integration i.e. previous to using ic3.

On the iosapp 3.1(1) in App Configuration>General screen the ‘Device name’ is simply ‘iPhone’. Can this be changed to ‘iphone_express-xxx’ to match to what ic3 is expecting ?

Since you have ‘iphoneexpress > …’ on the track devices parameter, you will want to use ‘iphoneexpress-xxx’ (xxx can be app, 2, iosapp, or anything else). If you use ‘iphone_express_xxx’, then the track devices parameter will need to be ‘iphone_express’

Thanks again Gary. Where do I change the entity name from 'iphoneexpress’ to '‘iphoneexpress-xxx’ for IC3?.

Is the entity changed within the ‘Entity registry’ file?, as from Configuration->Entities the entity does not have a unique ID and therefore can’t be changed from the UI.

In the iosapp 3.1(1) there doesn’t appear to be anyway of changing the ‘Device name’ to iphoneexpress-xxx’ where ‘xxx’ is as you speak to above.

Update: with respect to entities I have three related to my iphone i.e. iphoneexpress. Two of which belong to “platform”: “mobile_app” and are:

  1. “entity_id”: “device_tracker.iphone” (This presumably is as the ‘Device name’ of the iosapp 3.1(1) is ‘iPhone’

  2. “entity_id”: “device_tracker.iphoneexpress_app” (This one I was able to add the suffix _app)

  3. "entity_id: “device_tracker.iphoneexpress” ( This entity was presumably created from the track device parameter of IC3)

Even with the addition of the suffix to the ‘mobile app’ entity I’m still getting the error previously reported.

![Screen Shot 2020-07-10 at 4.29.25 PM|468x500](upload://dWGrICzxzrwN1rzrNRb0FsTI8ei.png)

@bastero The name on your phone is set in the Settings App>General> About.screen. iC3 uses that name to track the device through iCloud Web Services. The iosApp entity name is now on the iOSApp>General window. The name might be greyed out but you can still change it there to add the -xxx.

More info about this is here . That link points to the v2.2.0 docs which has more info on the ios App and other things.

Edit: I can remember if I posted this yesterday.

1 Like

Release Candidate 9b is now available.

Program Changed device_traker.py. Download it here

  • Fixed a few problems dealing with old location/poor gps accuracy messages filling up the HA log.
  • Removed some debug code left by mistake that caused a location to always be old.
  • Tweaked some Stationary Zone items.
  • Tweaked some Event Log formatting items.
  • Added some Event Log messages displayed when the Debug button is pressed.

See the Release Candidate Change Log here for details

Thank you Gary, that seems to have done the trick!! Errors eliminated

Cheers :slight_smile:

I installed iCloud 3 last night. I believe I have everything set up correctly. I’m getting an entity id specific for icloud3. The event log shows devices it’s tracking. I’m having a couple issues/questions.

I was getting the two factor notification about ever 2 hours. Now I’m getting it about every 10-15 mins. I was in a zone during the 2hrs, now I’m not.

I allow but there is no where to enter the code. The last instruction I read said to check notifications in HA to enter the code but I never have a notification.

My other issue is my device is only showing home and not home. It recognizes the zones in the event log but when I I’m in one (like work) it is shows a state of not_home. My wife just left home but it still shows state home. She is currently in a zone for my son’s school.

I’m not sure what I’m doing wrong. I have to say the instructions could use some work, they were a little difficult to follow.

@CommittotheIndian Zone enter/exit events are triggered by the ios app and picked up by iC3. What version of the ios app are you using? Is it set to always access the location? The ios app triggers are displayed in it’s Event Log screen (HA Sidebar App Configuration>Scroll Down> Event Log). Does the ios app show zone enter/exit events?

What version of iCloud3 are you running? v2.1.0 from HACS or v2.2.0 in the v2.2.0 Release Candidate directory on the iCloud3 GitHub repository? v2.2.0 supports the 2fa and FamShr tracking method without constant notifications where v2.1.0 will send them out every 1/2-hour or so. There is no place to enter the code you get on the 1/2-hour notification. That code is for apps that access the iCloud Web Services, not programs. Programs use the HA Sidebar>Notification area and use a text method of entering the authentication code.

I would suggest trying the v2.2.0 which supports the FamShr method. The docs for v2.2.0 are still under development and can be found here.

@gcobb321 My HA iOS app is 0.112d.4. I wasn’t sure if location services for HA had to be on always or not so I’ve tried a couple different ways (I’ll change it to always). The Event Log appears to show me entering/exiting one of my zones this morning (I would have had wifi there but I don’t think GPS was always at the time).

My iC3 is v2.1.0 from HACS. I will switch to 2.2.0 when I get home. Those 2fa requests every 30mins or so was very annoying, I had to comment out config until I could get home.

My HA is not open to the word, I generally will connect to it via a VPN while on WiFi. I assume this won’t have an impact on performance? Also is the Event Log Lovelace card required? I have not installed that yet, I’m a little hesitant to mess with the Lovelace UI. I don’t think it’s difficult, I just like how it currently more automated.

Thanks for the reply.

@CommittotheIndian The ios app on your phone is the one that triggers the enter/exit/background fetch/etc events. It’s version will be something like 2019.3 or 2020.1 Open the app on your phone, HA Sidebar on the phone>App Config (at the bottom)>About. the 0.112d.4 is the HA version running on your RPi (or whatever you are running HA on). You will also see the Event Log on the phone too.

@gcobb321 I’m having issues finding the v 2.2.0. I found 2.2.0 in the master. I loaded all the files per the documentation. Now both devices show not home with no information. I am not even presented with the 2fa alert. I’m not sure if I copied the files wrong somehow or what.

My HA is 2020.3.1. (1). I removed iC3 from HACS (actually somehow my entire HACS instance deleted and I had to start recovering. I added iC3 manually from the GitHub releases but it appears that was 2.1.

Ok @gcobb321,

I think I have everything set up for v2.2.0 but I’m still running into some issues. I finally got a new 2fa after deleting the cloud cookie file you mention up in the 300s. I got the pop up in the notifications but nothing works. I tried using the 6 digit code that pops up when I first restart, didn’t work. I tried filling in my phone number, nothing happens. I can’t seem to get 2fa set up. I tried my phone number with hyphens, no hyphens, * in stead of hyphens, nothing works. I tried ( ) around the area code, nothing. I copied the trusted number straight from the two factor setting on my phone, nothing.

EDIT: I was able to complete the authentication by setting up the iCloud integration. Below is my event log and what comes up for my device ID (I’m home):

device_tracker.travisiphonex
state: not home
source_type: null
friendly_name: Travisx

names:
  travis_iphonex: Travisx
log_level_debug: 'Off'
filtername: Travisx
update_time: 'Wed, 07/15, 09:01:58'
logs: >-
  [['9:01:50p', '', 'Home', '2 hrs', '', '0 mi', 'Results: Home > CurrZone-Home,
  GPS-(40.****, -85.****)/10m), Interval-2 hrs, Dist-0 mi, TravTime-
  (in_zone), NextUpdt-11:01:45, Located-9:01:49 (1 sec ago), OldLocThreshold-3
  min'], ['9:01:50p', '', 'not_set', '0 sec', '', '', 'Select Zone >
  Home-0m/r266, Travis` Work-25.61km/r73, Katie`s Work-43.46km/r98, George`s
  School-2.78km/r98, Dornberger`s-25.24km/r3, Wheeler`s-42.18km/r78 >
  Selected-Home'], ['9:01:50p', '', 'not_set', '0 sec', '', '', 'Updating Device
  > GPS-(40.****, -85.*****)/10m), Located-9:01:49 (1 sec ago)'],
  ['9:01:50p', '', 'not_set', '0 sec', '', '', 'Sending location request to
  iCloud > Last Updated: Never (Initial Locate)'], ['9:01:50p', '', 'not_set',
  '0 sec', '', '', 'FamShr update started (Initial Locate)'], ['9:01:49p', '',
  '', '', '', '', 'Setup Stationary Zone > travis_iphonex_stationary, Using Base
  Location-(40.****, -85.****), DistFromHome-1.0km'], ['9:01:49p', '', '',
  '', '', '', 'Initialize Data Fields > travis_iphonex'], ['9:01:49p', '', '',
  '', '', '', 'Stage 4 > Configure tracked devices'], ['9:01:49p', '', '', '',
  '', '', 'Tracking Devices >  travis_iphonex'], ['9:01:49p', '', '', '', '',
  '', 'Not Tracking Device > Katies (katie_s_iphone)'], ['9:01:49p', '', '', '',
  '', '', 'iCloud3 Error for Katies (katie_s_iphone)/katie_s_iphone > The iCloud
  Account for [email protected] did not return any device information for
  this device when setting up Family Sharing.CRLF 1. Restart iCloud3 on the
  Event_log screen or restart HA.CRLF 2. Verify the devicename on the
  track_devices parameter if the error persists.CRLF 3. Refresh the Event Log in
  your browser to refresh the list of devices.'], ['9:01:49p', '', '', '', '',
  '', 'iOS App monitoring > device_tracker.travis_iphonex'], ['9:01:49p', '',
  '', '', '', '', 'Verified Device > Travisx (travis_iphonex)'], ['9:01:49p',
  '', '', '', '', '', 'Stage 3 > Verify tracked devices'], ['9:01:49p', '', '',
  '', '', '', 'Tracking Devices > Travis’ iPhoneX/travis_iphonex (iPhone), '],
  ['9:01:49p', '', '', '', '', '', 'Not Tracking Devices > TAS (iMac),  Travis’s
  Apple\xa0Watch (Watch),  bsuadmin’s iMac (iMac),  Travis’s MacBook Air
  (MacBookAir),  Travis’s 44 Apple\xa0Watch (Watch),  Katie’s iPhone (iPhone), 
  Katie’s iPhone (iPhone),  George`s iPhone (iPhone), '], ['9:01:48p', '', '',
  '', '', '', 'iCloud Account Authentication Successful >
  [email protected]'], ['9:01:46p', '', '', '', '', '', 'iCloud did not
  return device data for a tracked device > Retrying, No data for
  [`katie_s_iphone`]'], ['9:01:45p', '', '', '', '', '', 'Results >
  FriendlyName-Katies, Email-None, Picture-/local/katie.png, DeviceType-iphone,
  TrackFromZone-[`home`]'], ['9:01:45p', '', '', '', '', '', 'Decoding >
  katie_s_iphone > Katie.png'], ['9:01:45p', '', 'not_set', '', '', '', 'iCloud3
  Setup Error >  > The iOS App device_tracker entity was not found in the Entity
  Registry.CRLFDevice_tracker entities (suffix) found -'], ['9:01:45p', '', '',
  '', '', '', 'Results > FriendlyName-Travisx, Email-None,
  Picture-/local/travis.png, DeviceType-iphone, TrackFromZone-[`home`]'],
  ['9:01:45p', '', '', '', '', '', 'Decoding > travis_iphonex > Travis.png'],
  ['9:01:45p', '', '', '', '', '', 'iCloud Account Authentication Successful >
  [email protected]'], ['9:01:43p', '', '', '', '', '', 'iCloud Web
  Services interface (pyicloud_ic3.py) > Verified'], ['9:01:43p', '', '', '',
  '', '', 'Preparing Tracking Method > Family Sharing'], ['9:01:43p', '', '',
  '', '', '', 'Stage 2 > Set up tracking method & identify devices'],
  ['9:01:43p', 'Device.Cnts', '', 'iCloud.Cnts', '', '', '¤s«LT-State/Trigger
  Chgs¦LC-0¦RT-Authentications¦RC-2»«LT-iCloud Updates¦LC-1¦RT-Web Svc
  Locates¦RC-1»«LT-iOS App
  Updates¦LC-0¦RT-Time/Locate¦RC-1.52sec»«LT-Discarded¦LC-0¦RT-Waze
  Routes¦RC-0»¤e'], ['9:01:43p', '', '', '', '', '', 'Set Up Waze > Region-US,
  MinDist-1.61 mi (2.59km), MaxDist-1609.35 mi (2590.0km), Realtime-False'],
  ['9:01:43p', '', '', '', '', '', 'Set Initial Stationary Zone Location >
  GPS-(40.****, -85.****), Radius-100m, DistFromHome-1.0km'], ['9:01:43p',
  '', '', '', '', '', 'Set up Zones > home/Home (r266m), travis_work/Travis`
  Work (r73m), katie_s_work/Katie`s Work (r98m), george_s_school/George`s School
  (r98m), dornberger_s/Dornberger`s (r3m), wheeler_s/Wheeler`s (r78m),
  travis_iphonex_stationary/travis_iphonex_stationary (r1m)'], ['9:01:43p', '',
  '', '', '', '', 'Stage 1 > Prepare iCloud3 for [email protected]'],
  ['9:01:43p', '', '', '', '', '', '^^^ Initializing iCloud3 v2.2.0rc9b >
  Wednesday, Jul 15'], ['9:01:30p', '', 'Home', '2 hrs', '', '0 mi', 'FamShr
  update completed'], ['9:01:20p', '', 'Home', '2 hrs', '', '0 mi', 'Results:
  Home > CurrZone-Home, GPS-(40.****, -85.****)/10m), Interval-2 hrs, Dist-0
  mi, TravTime- (in_zone), NextUpdt-11:01:15, Located-9:00:27 (53 sec ago),
  OldLocThreshold-3 min'], ['9:01:20p', '', 'not_set', '0 sec', '', '', 'Select
  Zone > Home-0m/r266, Travis` Work-25.59km/r73, Katie`s Work-43.48km/r98,
  George`s School-2.8km/r98, Dornberger`s-25.22km/r3, Wheeler`s-42.2km/r78 >
  Selected-Home'], ['9:01:20p', '', 'not_set', '0 sec', '', '', 'Updating Device
  > GPS-(40.****, -85.****)/10m), Located-9:00:27 (53 sec ago)'],
  ['9:01:20p', '', 'not_set', '0 sec', '', '', 'Sending location request to
  iCloud > Last Updated: Never (Initial Locate)'], ['9:01:20p', '', 'not_set',
  '0 sec', '', '', 'FamShr update started (Initial Locate)'], ['9:00:35p', '',
  '', '', '', '', '^^^ Initializing iCloud3 v2.2.0rc9b > Complete, Took 14.87
  sec'], ['9:00:35p', '', '', '', '', '', 'Initialize Sensors >
  travis_iphonex'], ['9:00:35p', '', '', '', '', '', 'Sensor entity prefix >
  sensor.travis_iphonex'], ['9:00:26p', '', '', '', '', '', 'Setup Stationary
  Zone > travis_iphonex_stationary, Using Base Location-(40.058841, -85.640878),
  DistFromHome-1.0km'], ['9:00:26p', '', '', '', '', '', 'Initialize Data Fields
  > travis_iphonex'], ['9:00:26p', '', '', '', '', '', 'Stage 4 > Configure
  tracked devices'], ['9:00:26p', '', '', '', '', '', 'Tracking Devices > 
  travis_iphonex'], ['9:00:26p', '', '', '', '', '', 'Not Tracking Device >
  Katies (katie_s_iphone)'], ['9:00:26p', '', '', '', '', '', 'iCloud3 Error for
  Katies (katie_s_iphone)/katie_s_iphone > The iCloud Account for
  [email protected] did not return any device information for this device
  when setting up Family Sharing.CRLF 1. Restart iCloud3 on the Event_log screen
  or restart HA.CRLF 2. Verify the devicename on the track_devices parameter if
  the error persists.CRLF 3. Refresh the Event Log in your browser to refresh
  the list of devices.'], ['9:00:26p', '', '', '', '', '', 'iOS App monitoring >
  device_tracker.travis_iphonex'], ['9:00:26p', '', '', '', '', '', 'Verified
  Device > Travisx (travis_iphonex)'], ['9:00:26p', '', '', '', '', '', 'Stage 3
  > Verify tracked devices'], ['9:00:26p', '', '', '', '', '', 'Tracking Devices
  > Travis’ iPhoneX/travis_iphonex (iPhone), '], ['9:00:26p', '', '', '', '',
  '', 'Not Tracking Devices > TAS (iMac),  Travis’s Apple\xa0Watch (Watch), 
  bsuadmin’s iMac (iMac),  Travis’s MacBook Air (MacBookAir),  Travis’s 44
  Apple\xa0Watch (Watch),  Katie’s iPhone (iPhone),  Katie’s iPhone (iPhone), 
  George`s iPhone (iPhone), '], ['9:00:25p', '', '', '', '', '', 'iCloud Account
  Authentication Successful > [email protected]'], ['9:00:23p', '', '',
  '', '', '', 'iCloud did not return device data for a tracked device >
  Retrying, No data for [`katie_s_iphone`]'], ['9:00:22p', '', '', '', '', '',
  'Results > FriendlyName-Katies, Email-None, Picture-/local/katie.png,
  DeviceType-iphone, TrackFromZone-[`home`]'], ['9:00:22p', '', '', '', '', '',
  'Decoding > katie_s_iphone > Katie.png'], ['9:00:22p', '', 'not_set', '', '',
  '', 'iCloud3 Setup Error >  > The iOS App device_tracker entity was not found
  in the Entity Registry.CRLFDevice_tracker entities (suffix) found -'],
  ['9:00:22p', '', '', '', '', '', 'Results > FriendlyName-Travisx, Email-None,
  Picture-/local/travis.png, DeviceType-iphone, TrackFromZone-[`home`]'],
  ['9:00:22p', '', '', '', '', '', 'Decoding > travis_iphonex > Travis.png'],
  ['9:00:22p', '', '', '', '', '', 'iCloud Account Authentication Successful >
  [email protected]'], ['9:00:20p', '', '', '', '', '', 'iCloud Web
  Services interface (pyicloud_ic3.py) > Verified'], ['9:00:20p', '', '', '',
  '', '', 'Preparing Tracking Method > Family Sharing'], ['9:00:20p', '', '',
  '', '', '', 'Stage 2 > Set up tracking method & identify devices'],
  ['9:00:20p', '', '', '', '', '', 'Set Up Waze > Region-US, MinDist-1 mi
  (1.61km), MaxDist-1000 mi (1609.35km), Realtime-False'], ['9:00:20p', '', '',
  '', '', '', 'Set Initial Stationary Zone Location > GPS-(40.058841,
  -85.640878), Radius-100m, DistFromHome-1.0km'], ['9:00:20p', '', '', '', '',
  '', 'Set up Zones > home/Home (r266m), travis_work/Travis` Work (r73m),
  katie_s_work/Katie`s Work (r98m), george_s_school/George`s School (r98m),
  dornberger_s/Dornberger`s (r3m), wheeler_s/Wheeler`s (r78m)'], ['9:00:20p',
  '', '', '', '', '', 'Stage 1 > Prepare iCloud3 for [email protected]'],
  ['9:00:20p', '', '', '', '', '', '^^^ Initializing iCloud3 v2.2.0rc9b >
  Wednesday, Jul 15'], ['00:00:00', '', '', '', '', '', 'Last Record']]

@CommittotheIndian Stage 2 of starting iCloud3 decodes the track devices parameter and looks at the Family Share list returned from iCloud web services. The Event Log also shows the list of devices that are n the Family Share list to help you solve any mismatches in how the device is named on the phone’s General>About screen and name on the track devices parameter.h

The device name katie_s_iphone is not being found in the list and is generating an error as you can see in the Event Log. It looks like there are 2entries in the iCloud list for Katie’s iPhone which would lead to problems. Which one should iCloud3 track? I would go to your iCloud account and delete one of them. It is probably left over from an old device.

Another thing to check is are there any spaces at the end of the name that are not showing in the log but are in the General>About name for Katie’s phone. It would be helpful if the name HA makes from name in the Family Sharing list that is being matched to the track devices parameter is in the log file. I’ll add that to v2.2.0 before it is released.

There is a section in the iCloud3 docs talking about device names, how they are decoded by iCloud and by HA and how apostrophes at the end of names can make things difficult. It can be found here in the v2.2.0 docs.

The v2.2.0 docs are almost done and have some other screenshots of the Event Log screen with the error messages. It also describes the new parameters among other things…

Edit - I added the device name to the non-tracker devices. The ’s is stored as s by iCloud. Try changing katie_s_iphone to katies_iphone. You will still need to delete the duplicate entry in your iCloud Family List.

@gcobb321

I know I need to work on Katie’s iPhone but I’m still having issues just tracking mine. All i see is not home and source null. I thought maybe leaving home it would trigger something but alas I’m at work and no update.

@CommittotheIndian. I looked at the log file again and there are error messages that no iOS app entity was found in the entity registry for your phone. The iOS app sends the zone enter, zone exit and other triggers that are monitored by iCloud3. Without the iOS app, nothing happens. Also, have you set up and reviewed the Event Log start up messages. There are error messsages on the text you posted with these errors in them. The errors are also posted to the HA log file and can be seen in HASidebar>Developer Tools> Logs.

The iCloud3 docs have sample screens with the errors
here and here

iOS app info is here and here

@gcobb321

I have the HA iOS App. I provided the version number above. That’s why I can’t figure out what the problem is.

I have not installed the event log card yet. I’m not sure I want to use the custom YAML at this point. I’ve pulled that data from the event log<state.

Do I need to install the card to make everything work/find the problem?

@CommittotheIndian The v2.2.0 docs I linked to show how to install the Event Log without installing any custom yaml up-Lovelace files. You really need to do it. It will make everything easier to set up and use and figure out what is going on when you have a problem. It’s easy to do and the version I’m working on now will let you issue iCloud3 service calls (restart iCloud3, pause, resume, etc).

If you have the iOS app installed, the name of the iOS app device tracker is different than the one you are using for iCloud and iCloud3. It needs to be the iCloud3 device name followed by a suffix. You are tracking travis_iphonex. The iOS app name needs to be travis_iphonex_iosapp. The _iosapp can be any suffix but the first part has to match the devicename you are using. I believe your devicename in the iosapp is travisiphonex. If so, the iCloud3 can not identify the device tracker to monitor. See more info here about that.

Location communications between the iOS App and your HA server should always be available. If these communications are intermittent, it’s likely location tracking performance will suffer.

Hi Guys, I was hoping someone could point me in the right direction. I have iCloud3 installed with the Event Log card, absolutely brilliant, thanks for all the hard work. There is a small niggle I can’t quite figure out though. The Stationary nodes is generated with a significant shift which results in my phone going a tad crazy now and again when we are home. How does it generate the stationary nodes?

I updated to the latest version btw

Many thanks

Ok @gcobb321 'm starting to see pattern. I can not add the card per your instructions. Just like you screenshot in the instructions it says “can not read property” and it’s just a red card when I save (even after restart).

When I was using 2.1 both device_tracker.names “appeared” to be tracking both devices (with the names as I had them).

source_type: gps
latitude: 40.****
longitude: -85.****
gps_accuracy: 9
battery: 37
name: Katies
zone: home
last_zone: home
zone_timestamp: '07/16/20, 06:50:06'
interval: 2 hrs
travel_time: ''
zone_distance: 0
calc_distance: 0
waze_distance: ''
last_located: '6:48:46'
last_update: '6:49:56'
next_update: '8:50:00'
poll_count: '1:0:0'
dir_of_travel: in_zone
travel_distance: 0
trigger: 'iCloud3@6:49:56'
timestamp: '2020-07-16T18:50:06'
authenticated: '07/16/20, 06:49:53'
battery_status: NotCharging
info: ' ●Track.Method: FamShr ●Battery-37% ●Metrics: iCloud.Locates-0, IOS.App.Updates-0, Discarded-0, State.Changes-0, Trigger.Changes-0'
altitude: 0
vertical_accuracy: 0
device_status: offline
low_power_mode: false
group: group1
entity_picture: /local/katie.png
tracking: ' travisiphonex, katiesiphone'
icloud3_version: '2.1'
friendly_name: Katies

However, when I change iC3 to 2.2.0 (because I didn’t want the 2fa every 20 minutes I get the null source.

source_type: null
friendly_name: Katies

This makes me think either something is wrong in 2.2.0 or I loaded it wrong. I created a folder “icloud” in custom components. There I copied init.py, device_tracker.py, manifest.json, plycloud_ic3.y, & services.yaml.

I got these files from icloud3-master>v2.2.0 Release Candidate