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
570 stars 55 forks source link

Findmy friends no longer working #172

Closed hijamie32 closed 3 years ago

hijamie32 commented 3 years ago

Hi

I am having an issue with this since I think iCloud was updated to iCloud+.

Now it no longer finds any findmy friends email accounts?

Was working fine before

Is anyone else having this issue.

Thanks

Jamie

Snuffy2 commented 3 years ago

Same issue. It seems to now only be showing users who have upgraded to iOS 15.

gcobb321 commented 3 years ago

With the release of iOS 15 (9/21/2021), the url used to access the Apple iCloud Find-My-Friends (FmF) is no longer being returned by Apple when signing on to the account. The Family Sharing (FamShr) url is still being returned.

The FmF tracking method is no longer available until it can be determined how to access the FindMy friends data. Until this problem is solved, you will have to use the Family Sharing tracking method.

miraixyz commented 3 years ago

I am not sure if this is related, but after switching to fmshr because of the above mentioned issue, my picture no longer displayed. It worked perfectly before and all I changed was the tracking method. My configuration.yaml:

device_tracker:  
  - platform: icloud3
    username: username@gmail.com
    password: !secret icloud3_pw
    tracking_method: famshr
    track_devices: 
      - myiphone > /local/me.jpg
miraixyz commented 3 years ago

Found my problem....seems that changing the tracking method also changes the entity name...at least it did for me. So the picture that was associated with my iphone wasn't showing because my front end wasn't displaying the correct device entity name.

gcobb321 commented 3 years ago

Glad you found it.

BTW-iCloud3 v2.4 also depreciated the track_devices parameter and replaced it with the devices parameter.

devices:
  - device_name: myiphone
    picture: /local/me.jpg
    name: Me
    email: me@email.com

The full description is here.

Radushka commented 3 years ago

Hi, have been using famshr method for quite a while and all worked until a few days ago. On 2.4.2. Logs are full of 'No location data' for three of my family devices. Here is one of them.

daniel_s_iphone 8:17:03a - - 1 min - - Next Update Time reached (Retry) > daniel_s_iphone daniel_s_iphone 8:17:03a - - 1 min - - FamShr update started (Next Update Time reached (Retry)) daniel_s_iphone 8:17:03a - - 1 min - - Requesting New iCloud Location > LastLocTime-Never (Initial Locate) daniel_s_iphone 8:17:03a - - 1 min - - Refreshed FamShr iCloud location data daniel_s_iphone 8:17:04a - - 5 min - - Discarded > No location data (#8)

Please advise.

miraixyz commented 3 years ago

Apple made some changes a few days ago to the way famshr and FnF works. If you check your iphone settings, it may be prompting you to agree to the new changes. Until you do, location sharing will be disabled. At least this is the way it was for me.

So check your icloud profile to see if it prompting for your approval

Ghawken commented 3 years ago

HI Gary,

Discovered that can recover findmyfriends by simply changing the fmf web endpoint to findme.

Essentially change in pyicloud:

Found =- line 663 in pyicloud_ic3.py modified version

#----------------------------------------------------------------------------
    @property
    def friends(self):
        """Gets the 'Friends' service."""
        self.authenticate_method = ""
        service_root = self._get_webservice_url("findme")
        data = FindFriendsService(service_root, self.session, self.params)
        return data

The findme = was fmf

Data appears completely compatible.

Glenn

hijamie32 commented 3 years ago

HI Gary,

Discovered that can recover findmyfriends by simply changing the fmf web endpoint to findme.

Essentially change in pyicloud:

Found =- line 663 in pyicloud_ic3.py modified version

#----------------------------------------------------------------------------
    @property
    def friends(self):
        """Gets the 'Friends' service."""
        self.authenticate_method = ""
        service_root = self._get_webservice_url("findme")
        data = FindFriendsService(service_root, self.session, self.params)
        return data

The findme = was fmf

Data appears completely compatible.

Glenn

Hey,

Thanks for helping.

Unfortunately it still doesn't find anyone in my friends list :/

I don't suppose you did anything else whilst you was trying?

Cheers

Jamie

sossienl commented 3 years ago

For me it did fix it, but instead of line 663, it's on 668

----------------------------------------------------------------------------

@property
def friends(self):
    """Gets the 'Friends' service."""
    self.authenticate_method = ""
    service_root = self._get_webservice_url("**findme**")
    data = FindFriendsService(service_root, self.session, self.params)
    return data
gcobb321 commented 3 years ago

@Ghawken Great discovery. Thanks for solving the problem. The ‘findme’ url end point is the same one used by Family Sharing so it looks like Apple combined the Family Sharing and FindMe web services together.

I’ll issue a new release on HACS (iCloud3 v2.4.4) when I get back home but will post a fix in the iCloud3 GitHub repository development directory.

Edit: The new version of pyicloud_ic3.py has been uploaded to the iCloud3 development v2.4.4 directory here.

Download iCloud3 v2.4.4.zip and unzip it to the /custom_components/icloud3 directory. Then restart HA.

Radushka commented 3 years ago

Thanks @gcobb321 and @Ghawken, the fix addressed my problem!

fenty17 commented 3 years ago

Massive thanks for the fix @Ghawken. Works a treat 👍🏼

gcobb321 commented 3 years ago

AlfaJackal Have you gone into the FindMy app and verified the emails for the phone are still there and all of the phones can see each other on the map?  Also make sure location services is on and set to Always allow. If you got a new phone, make sure the old phone and the new I one don’t have the same name and the old one was deleted from the iCloud account.

———————— Gary Cobb On Oct 1, 2021, 7:17 AM -0400, AlfaJackal @.***>, wrote:

I am facing (the same?) issue but also using the 2.4.4 version of pyicloud_ic3.py hasn't helped. The location is still the last location at home. GPS-Coordinates won't change a thing. I posted the logs after restarting HA and iCloud3. It worked without any flaws before...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

AlfaJackal commented 3 years ago

Thank you @gcobb321!

I deleted my comment, because I made a stupid mistake or to say it better: I had a small incidence that made my testing incorrect.

The second device crashed while being remote and didn't reboot properly. So, it was offline all the time while I was testing. #facepalm

Sorry, I bothered you! I really appreciate you took your time to answer me.