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

Updated to the new version and it seems to be fixed, thanks!

I’m using the new ios App v2 for tracking multiple devices currently and it works very well.

If I use “tracking_method: isoapp” instead of family sharing or fmf would the entries under “track_devices:” be the device_tracker instances made by the ios app?

The iCloud3 device name in track_devices must be different than the iOS app in iOS app v2 but can be the same in v1.

This is explained in detail in the iCloud3 documentation here. This applies to all tracking methods.

I think I’ve gotten all of that figured out.

I’m getting this error through. I’m running home assistant on a mac mini:

Tue Dec 10 2019 20:15:37 GMT-0500 (Eastern Standard Time)
[Errno 2] No such file or directory: ‘/config/.storage/core.entity_registry’
Traceback (most recent call last):
File “/Users/myusername/.homeassistant/custom_components/icloud3/device_tracker.py”, line 6061, in _get_entity_registry_entities
entitity_reg_file = open(self.entity_registry_file)
FileNotFoundError: [Errno 2] No such file or directory: ‘/config/.storage/core.entity_registry’

@emergent The file name for the entity registry defaults to the HA file name running under Hassio on a Raspberry Pi in a Linux environment. Since you are running on a Mac, you need to use the entity_registry_file_name configuration parameter to specify a different file name for your computer.

See the iCloud3 documentation here for more information. Once you get it working, post the file name and I’ll add it to the documentation.

Thanks. For MacOS you can add that the user should add:

entity_registry_file_name: ‘/Users/USERNAME/.homeassistant/.storage/core.entity_registry’

to the config

Hi!

I’m very new to HA and I was using iCloud “native” component. Just discovered this one and seems pretty complete.

I just want to know why we need a “bypass” manipulation to use this one with 2FA (add new account without 2FA as friend) when the basic component doesn’t need one?

@anon19817668 You do not have to set up a special non-2fa account if you are not using 2fa with your Apple iCloud account. If, however, you have set it up, iCloud3 is logged out of your iCloud account every 30-minutes. The next time iCloud3 requests a new location, it is reauthenicated, which displays a notification on your phone that someone has logged into your iCloud account. This is explained in the iCloud3 documentation here.

If you have been using iCloud without any issues, you may not have 2fa turned on on your iCloud account and you could use the Family Sharing tracking method without creating the non-2fa account.

If you do have 2fa turned on, and you don’t get constant notifications, I wonder what versions of HA and some components you are using .

I confirm that I’m using 2FA since few years (notification push to all devices when unknown login, with map and code).

image

With iCloud component, I just get a 2FA ask code for the first set up and that’s all, no new asking since that (few weeks, and of course the location works perfectly).

I’ve got a pretty fresh installation right now (last version of HassOS and HA) and just iCloud, HACS and iCloud3, but no issues with iCloud component and 2FA.

Ok. Not quite sure what you’re asking or if you have a problem using iCloud3. Have you set it up with “famshr” tracking method with the same username as your regular iCloud account and are having a problem? Or just had a question on how to set it up based on your iCloud component setup and in you needed to create the dummy noon-2fa account.

What I would do is to set it up with the same username as the iCloud component with the “famshr” tracking method and see if it operates properly without the notifications. That was how iCloud3 was originally set up. If that works, great. Apple controls the notifications and maybe there is something on your iCloud account that bypasses them. The non-2fa special account was added as a workaround after Apple updated iOS to version 13 and made internal changes to log out programs that were accessing the account after 30 minutes.

My initial question was just about why it works with iCloud component without 2FA bypass and not with iCloud3. I haven’t tried famshr because or the “only if no-2FA” thing, so I’m trying right now.

I’ve done the thing about renaming mobile app entity id because of conflict (iphone_s_adrien), but still “No devices to track.” after reboot. I think that’s because after all reboot I got a 2FA ask on my trusted devices but NO new notification in HA to put the 6 digits code.

Check the Trouble Shooting hints here to see why no devices were tracked.

The 6 digit code is not used by HA to authorize the device like it normally is with other apps. Instead an authorization code is entered from the notification panel on the HA sidebar and described here

I’ll reinstall the iCloud component and see if there are any changes I don’t know about that I could incorporate into iCloud3 regarding 2fa and the iCloud account access.

I already check the possible troubles with famshr and all is good (my apple credentials ofc, and the name of the device (“Adrien’s iPhone” > “adrien_s_iphone”, and that was the name of the iOS app entity id before I added a suffix).

I read the process about the authorization code too and that’s my issue here. I got an alert on my trusted devices but no notification in HA, so I can’t do this:

  1. Press the Notifications on your Home Assistant screen to open the Notification window. A window is displayed, listing the trusted devices associated with your account. It will list an number (0, 1, 2, etc.) next to the phone number that can receive the text message containing the 2-step authentication code number that is used to authenticate the computer running Home Assistant (your Raspberry Pi for example).

It seems like to same procedure as iCloud component (which is works fine for me), but not with iCloud3.

1 Like

I don’t think it’s an authentication issue. You would get an authentication error message if it was.

I think it is a device name issue… The account is scanned when iCloud3 starts, matching the device name in the iCloud account with the one on the track_devices parameter. In no match is found, you get the error you have. Check the HA file or the iCloud3 Event Log for the device names that were found in the account.

The suffix is for the iOS app, not the iCloud account. With the device name in your message, Your track_devices parameter should be “adrien_s_iphone > otherparameters”.

Tips on naming the device is here
Event log info at startup is here

Ok, seems like “Adrien’s iPhone” (original name is iOS settings) need to be written “adrien_siphone” and not “adrien_s_iphone”.

This conduct to a different issue: I use the v2 iOS app which is named “adrien_s_iphone” and not “adrien_siphone” as iCloud3 detect, so iCloud3 will use v1 because of this difference.

image

Mobile app integration: image

Thanks for the help. I’ll tell you later if I have issues (notification on trusted devices) because of 2FA.

I have found, over the years and on multiple devices and computers, that the " 's " always makes device name assignment confusing and a crap shoot as to how different programs translate it. So my devices and computers just use a name and device type, e.g., gary_iphone, lillian_ipad, gary_pc.

The device name for iOS app v2 can be changed to any name you want. The suffix is added by the iOS app just to make it unique. You can change it to ‘adrien_siphone_v2’ and then it will be picked up by iCloud3 (assuming adrien_siphone is the device name).

Thanks, I was thinking that I cannot “completely” change to entity id for the app.

So after few hours with iCloud3 OK (famshr, I was at home), it sent a notification on my trusted devices every 2 hours (as written in doc). Maybe you should check if there has been significant change in iCloud component because I haven’t this with it (same account/device tracked).

I can’t get custom cards to work for the iCloud3 integration. I’ve got the following as a Manual Card:

entity: sensor.icloud3_event_log
icon: ‘mdi:information-outline’
type: ‘custom: icloud3-event-log-card’

And the following in my Raw Config:

  • type: js
    url: /local/custom_cards/icloud3/icloud3-event-log-card.js?v=1.000

And I’ve verified that in my www/custom_cards there is an icloud3 directory with the icloud3-event-log-card.js in it. But I still get “Custom element doesn’t exist: icloud3-event-log-card” error in the UI.

What else am I overlooking? Thank in advance for any help.

On my working installation there is no icloud3 sub-directory under www/custom_cards. Resource is:

  - type: js
    url: /local/custom_cards/icloud3-event-log-card.js?v=1.000

I understand. But since I have another custom card (Dark Sky Weather) then I created subdirs.