gcobb321 / icloud3_v3

iCloud3 v3, Development Version - This Repo/Version is used for development and testing of new and updated features. It is not the official release of iCloud3 v3, .
MIT License
169 stars 13 forks source link

iCloud3 v3.1b4 (10/31/2024) is available as a zip file here. It fixes the Apple Account login issue. HACS will be updated in a few days. #346

Open gcobb321 opened 3 weeks ago

gcobb321 commented 3 weeks ago

### iCloud3 v3.1b2 is now available

iCloud3 v3.1b4 is now available (10/31/2024) Scroll to the bottom of this post

I have worked out the problems with logging into the Apple Account and tracking devices. Download the zip file below, unzip it into the icloud3 directory and restart HA. Good luck and lets hope it solves the problems we have all been experiencing this last week.

I'll update HACS if it works and there are not too many issues to deal with. I am looking forward to a non-computer day or two. Thanks for hanging in there and the words of encouragement.

Gary

There are some pretty extensive changes in v3.1. I have relisted them below. What to expect when you start it up.

  1. The Event Log Lovelace card is updated so you will have to refresh your browser so it will display. This is on your HA system and all devices running the HA Mobile App.
  2. Many of the configuration screens have changed. The Significant ones are the Data Source screen (Apple Account and Mobile App). There are new screens for entering the Apple Account username and password and the Devices List screen has been changed to improve it's operations. The documentation has not been done but most things are pretty obvious.
  3. The Event Log startup screens dealing with device configuration and Apple Account configuration have been changed.
  4. Error recovery during startup has been changed to only retry setting up the devices with a problem.
  5. There are times you may get a 'Connection 503' error. Apple generates this error when the account has been logged into a bunch of times in a short interval, probably to try to prevent suspicious activity. This is detected and the login will automatically be done every 15-minutes until it is completed. You will probably be asked for the 6-digit code at that time

Known issues:

  1. When you request a new 6-digit code, the new code may or may or not be generated immediately. It might take 20-30 minutes before it appears. Enter it at that time. If a code does appear on a trusted device when you request it, the a message is displayed at the top of the configuration screen. It may say there is a connection error and to wait for 20-30 minutes. Enter the code anyway. It will probably be accepted.

Change Log - v3.1

  1. SUPPORT FOR THE NEW METHOD OF LOGGING INTO APPLE ACCOUNTS.
  2. MULTIPLE APPLE ACCOUNTS (New) - iCloud3 now supports tracking devices from more than one Apple Account. The accounts are setup on the 'Configuration > Data Sources' screen and devices can be tracked from any apple account and the d if the device is set up as an account owners deviceThe Primary account belongs to the person with the main Family Sharing list as it always has. Secondary accounts can also be configured and devices from those accounts can be tracked. The Apple Account for the specific iCloud3 device is selected on the Update Devices screen as it always has.
  3. FAMSHR - Everything called FamShr has been changed to iCloud.
  4. THE APPLE ACCOUNT (Improved) - Logging into the Apple Account is now started before the beginning the HA process that creates the device_tracker and sensor entities. Both processes now run concurrently, eliminating (or reducing) any delays waiting for the Apple Account device data to be returned. The result is iCloud3 starts up faster.
  5. APPLE ACCOUNT & MOBILE APP DEVICE ASSIGNMENT (Improved) - The results of matching the Apple Account iCloud devices and the Mobile App devices during startup are displayed in the Event Log. This has been simplified and is easier to read.
  6. CONFIGURATION SCREENS (Improved) -
    • Saving changes is faster.
    • The iCloud3 Devices screen indicates if there is a problem with the iCloud or Mobile App device selection.
    • Update Devices screen - Impoved selection of Apple Account and Mobile App devices.
  7. MISSING APPLE ACCOUNT DEVICES (Improved) - Sometimes, an iCloud device's information is not returned from iCloud when iCloud3 starts. The error recovery and data request retry routines have been rewritten to only retry setting up devices with the error. This greatly simplifies and reduces the steps needed to retrieve the data from iCloud.
  8. WAZE & WAZE HISTORY (Improved) - Improved the error checking, added retry on error conditions and updated the History database recalculation routines to better support concurrent operations.
  9. APPLE ACCOUNT DEVICE STARTUP ERRORS (Enhanced) - Improved the handling and reporting duplicate and missing Apple Account devices. 8 STARTING/RESTARTING ICLOUD3 -
    • Device Sensors (Fixed) - They were being reinitialized when Restarting iCloud3 when they shouldn't have been.
    • Mobile App entities (Fixed) - They are no longer being reinitialized when iCloud3 is restarted on a configuration change or Event Log restart request. This includes the device_tracker, battery, trigger and notify entities..
    • Improved messaging and fixed miscellaneous bugs
jlachance commented 3 weeks ago

I can’t access to « ICLOUD3 DEVICES », it say’s « Unknown error occurred ». How can I access to it and configure my devices?

demonaxxx commented 3 weeks ago

same error https://github.com/gcobb321/icloud3_v3/issues/341#issuecomment-2445809641

zakoman81 commented 3 weeks ago

Great, its working now :)

thank you, appreciate it

gcobb321 commented 3 weeks ago

@zakoman81 @demonaxxx @jlachance v3.1b2 above fixes the Add Devices issue

rononline commented 3 weeks ago

I have this error in v3.1b2


Traceback (most recent call last):
  File "/config/custom_components/icloud3/support/icloud_data_handler.py", line 356, in update_device_with_latest_raw_data
    log_rawdata(f"iCloud - {rawdata_msg}-{_Device.devicename}/{_Device.is_data_source_FAMSHR}",
                                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'iCloud3_Device' object has no attribute 'is_data_source_FAMSHR'. Did you mean: 'is_data_source_ICLOUD'?
2024-10-30 11:39:55.947 ERROR (SyncWorker_4) [custom_components.icloud3] 'iCloud3_Device' object has no attribute 'is_data_source_FAMSHR'
Traceback (most recent call last):
  File "/config/custom_components/icloud3/support/icloud_data_handler.py", line 352, in update_device_with_latest_raw_data
    latitude = _RawData.device_data[LOCATION][LATITUDE]
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'latitude'
gcor71 commented 3 weeks ago

UPDATE: Patience is (at least) part of the solution. I left it spinning and some time later it showed as logged on. Now waiting to see if devices appear.


Posting this because I can't tell if I'm being an idiot, or there's something going wrong. To the best of my knowledge I have a new installation of v3.1b2. When I perform configuration to add a new account, it seems to hang - with the spinning wheel. I've tried a couple of times including with a verification code in the TOTP Key field obtained from my iCloud account... but can't get further.

Screen grab from current/latest attempt: new install, HA restarted, new configuration, new account... blue spinning wheel not captured.

image
gcobb321 commented 3 weeks ago

@rononline The ker error latitude means there was no location data in the data returned from your Apple account. The other FAMSHR was generated building a message about that. Was this a one time occurrence or does it happen all the time? The Event Log should provide you with some info about the location data returned from your Spoke account

gcobb321 commented 3 weeks ago

@gcor71 Apple has really slowed things down when adding an account. It also has changed getting a verification code. Sometimes it will come back with an error but will then do the authentication if you enter the code. Other times you have to restart HA

KampersandR commented 3 weeks ago

Since installing the Fully Kiosk browser on my Fire HD tablet crashes and reloads rather frequently. If I go to the iCloud3 logs and hit a button, it crashes immediately. Not seeing anything in the logs, but will have to make it administrator again to look at the HA logs. Not familiar with the tablets, so please let me know if and what you want to see.

gcobb321 commented 3 weeks ago

iCloud3 v3.1b4 is available below

This update addresses most of the above items.

  1. Additional alerts, errors and notifications are displayed when the Apple Account, an Apple Account iCloud Device or the Mobile App device assigned to an iCloud3 device has a problem.
  2. The 'Verify Logon' file error has been fixed.
  3. The Request a new Verification code has been retested and some of the status and error messages have been changed.
  4. the 'data_source_FAMSHR' error has been fixed.
  5. And a few other things.

Gary

Unzip icloud3 v3.1b4.zip into the icloud3 directory and restart HA. icloud3 v3.1b4.zip

Aekung commented 3 weeks ago

Replacing the file from the latest v3.1b4 version but still couldn't login to iCloud. Whenever I tried, it returns

Warning: iCloud Account is not Logged Into

I also don't receive any verification code from Apple.

PS. Tried multiple times

Here is the error in logs file

Error logging into Apple Account: HomeAssistant.async_add_executor_job() got an unexpected keyword argument 'verify_login'

gcobb321 commented 3 weeks ago

@Aekung Click on. That error message and see if you get more information. It should show some ‘trace back ’ info that lists module name, line numbers etc that will tell me what was g going on.

Were you in the Configure Settings when that happened? Or just starting up?

Never mind. I found the problem. Will do an update to b5 after I check on an another bug.

broyuken commented 3 weeks ago

I'm still unable to select a mobile app from the list even though I have 4 mobile_app devices configured, and ic3 finds them according to the logs. The dropdown just doesn't list them.

image

gcobb321 commented 3 weeks ago

@broyuken Another user just had the same problem. He installed these two patches and it worked.

Unzip the patch_config_flow.zip into the icloud3 directory Unzip the patch.start_ic3.zip file into the icloud3/support directory Restart HA

Will you try it too patch_config_flow.zip patch_start_ic3.zip

broyuken commented 3 weeks ago

Yep that seems to have fixed it for me! Thank you!

gcobb321 commented 3 weeks ago

@broyuken Good, will be in b5 later today.

larronni commented 2 weeks ago

Is it possible to make b5 available on HACS for the development version repository?

gcobb321 commented 2 weeks ago

I can. I haven't yet because it is a lot quicker to create a zip file and let some of the people download that. HACS can take a day before it becomes available.

GerdRuetten commented 2 weeks ago

@broyuken Good, will be in b5 later today.

had the same problem with the empty dropdown-list for the mobile app devices.

The two patch files fixed the error.

Aekung commented 2 weeks ago

@Aekung ~Click on. That error message and see if you get more information. It should show some ‘trace back ’ info that lists module name, line numbers etc that will tell me what was g going on.~

~Were you in the Configure Settings when that happened? Or just starting up?~

Never mind. I found the problem. Will do an update to b5 after I check on an another bug.

Really looking forward to b5 version.

Thanks in advance.

gcobb321 commented 2 weeks ago

I just posted v3.1b6.zip file here

jata1 commented 2 weeks ago

@gcobb321 - hey Gary. I just wanted to say thanks for all the effort generally and with the authentication issue that you have been working on for the last week or two. Decided to install v3.1b6 today and after a restart/new authentication code everything is working normally.

So thanks again!

gcobb321 commented 2 weeks ago

I have released v3.1. It should be available on HACS shortly.