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
541 stars 54 forks source link

Problem Authenticating and Verifying iCloud Account #83

Closed gcobb321 closed 3 years ago

gcobb321 commented 3 years ago

General area dealing with this problem.

poudenes commented 3 years ago

I've tried the latest version 2.2.1c with my 2FA account, it worked for 2 days and then it started raining persistant notifications and errors again asking me to reauthorize again. Switched back to my non-2FA account again for now.

Here it ask for verification also. Approve the popup on my iPhone or iMac and then the notification in HA is gone and iCloud3 is still running normal....

bobvmierlo commented 3 years ago

I've tried the latest version 2.2.1c with my 2FA account, it worked for 2 days and then it started raining persistant notifications and errors again asking me to reauthorize again. Switched back to my non-2FA account again for now.

Here it ask for verification also. Approve the popup on my iPhone or iMac and then the notification in HA is gone and iCloud3 is still running normal....

Tried that aswell, but I just don't want to approve all those popup's on my iPhone every hour. So untill this 2FA works properly i'll just revert back to the old non-2FA account.

poudenes commented 3 years ago

I've tried the latest version 2.2.1c with my 2FA account, it worked for 2 days and then it started raining persistant notifications and errors again asking me to reauthorize again. Switched back to my non-2FA account again for now.

Here it ask for verification also. Approve the popup on my iPhone or iMac and then the notification in HA is gone and iCloud3 is still running normal....

Tried that aswell, but I just don't want to approve all those popup's on my iPhone every hour. So untill this 2FA works properly i'll just revert back to the old non-2FA account.

I don't want change my account. Learned in past when you change your account on iPhone and want update apps you messed up things...

bobvmierlo commented 3 years ago

I just noticed this on the HA Alerts page:

iCloud causes Apple ID sign-in notifications every 30 min Since Oct 9, 2020 the iCloud integration prompts a sign-in notification every 30 min. It is not compulsory to respond to the notification, the integration is still working during this time.

A fix will be proposed to avoid this issue but we don't know when yet.

Link here

Maybe related since you also use (a slightly changed version) of the pyicloud script?

gcobb321 commented 3 years ago

iCloud3 v2.2.2d has been uploaded to the development-v2.2.2 directory here


iCloud3 now works with Real 2fa Support

This is significant update to iCloud3. It supports true 2fa verification using the 6-digit Apple ID Verification Code sent from Apple when you log into iCloud.

Download the zip file from the development-v2.2.2 directory here, unzip it into the icloud3 directory and restart HA.

When iCloud3 starts, you will get the standard Apple Login warning and the 6-digit Apple ID Verification Code notification. YOU WILL USE THAT 6-DIGIT CODE IN THE ID ENTRY SCREEN ON THE HA NOTIFICATIONS AREA. Select the Verification Code entry window like you always have from the HA Notifications area and enter the 6-digit code. This will create the Trusted Device token like other apps and browsers. iCloud3 will then continue starting as it usually does.

Other changes:

Deleted parameter display_zone_fname: True/False has been eliminated.

New Parameter: display_zone_format: name/title/fname/zone, Default: name

This parameter indicates how the zone should be displayed in the device_tracker.[DEVICENAME] states field and on the Event Log. The zone is formatted as follows:

Bug Fix (I think)

The sensor.[DEVICENAME_last_zone values should be correct.

gcobb321 commented 3 years ago

I haven't announced this yet on the v2.2 Forum yet. I thought I'd release it to you first. Let me know if everything works OK or doesn't work. Also, look at the last_zone values and let me know if they are correct.

poudenes commented 3 years ago

Tomorrow I download the zip and give it a shot!!!

poudenes commented 3 years ago

I removed the file in .storage/icloud to start clear. Reboot HA, get a nice validation screen, but no popup on my iPhone, Watch or iMac to enter the validation code...

poudenes commented 3 years ago

Ok. Removed the file in .storage/cloud. Removed the session folder. Reboot HA and now the popup screen is back on devices. Entered the code and now its working 👍

bobvmierlo commented 3 years ago

Used the latest zip within minutes of your comment. No errors since, seems like this is the solution! I do however keep getting a few mails from Apple during the day stating that someone used my icloud account to login on a Linux machine. But I can live with this and it's not within your power to change this anyway.

gcobb321 commented 3 years ago

Getting the emails is odd. I'm not getting any and no one else has mentioned it.

bobvmierlo commented 3 years ago

Getting the emails is odd. I'm not getting any and no one else has mentioned it.

I get those every single time I login to icloud.com. Even on the laptop i've been using for years now. Seems to be some security thing that apple won't even let you turn off. It's not something thats related to your integration, so I wouldn't waste your time on it. Thanks for your great work so far!