Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iCloud3 v3.1.4.1 ➤ 12/24/2024 - A new release is available #409

Open
gcobb321 opened this issue Dec 24, 2024 · 34 comments
Open

iCloud3 v3.1.4.1 ➤ 12/24/2024 - A new release is available #409

gcobb321 opened this issue Dec 24, 2024 · 34 comments

Comments

@gcobb321
Copy link
Owner

gcobb321 commented Dec 24, 2024

Happy holidays

image

Change Log - v3.1.4.1 (12/24/2024)

  1. APPLE ACCOUNT PASSWORD AUTHENTICATION:
    • Reverted back to the old password authentication protocol before the Secure Remote Password (SRP) protocol was implemented
    • The Password SRP protocol will be tried if the old password authentication protocol fails.
  2. ADD ICLOUD3 DEVICE SCREEN (Redesign) - Redesigned the screen so the basic tracking parameters (iCloud & Mobile App devices and picture) are selected on this screen instead of the Update Device screen.
  3. UPDATE DEVICE SCREEN (Redesign) - The rarely used fields (inZone & Fixed Interval, Track from Zone, etc) are not displayed if they are using the default values. A check box is enabled to display these fields.
  4. TOOLS SCREEN (New Feature) - A Tools screen replaces the Actions screen on the Configure Menu screen. This is used for configuration file maintenance to reset all Devices Apple Account fields, Delete all Apple Accounts and Devices, Delete all iCloud3 and Apple Account cookie files, etc.
  5. STARTUP (Improved) - Error and warning messages have been improved when setting up Apple Accounts and the Mobile App devices. When errors are encountered (devices can not be found, invalid Apple Account information, etc), an attempt will be made to correct the error using known device names and identification codes. Sometimes it works, sometimes it doesn't and the configuration will need to be updated.
  6. ERROR & WARNING MESSAGES (Improved) - Changed various messages to improve readability and simplify the text.
  7. ICLOUD3 LOG FILES - The name of the log file was changed from icloud3-0.log to icloud3.log.
  8. A lot of internal code changes to improve code maintenance and to remove dead code.

What's Next:

  1. YubiKey support.
  2. Implementation of the Password SRP protocol as the primary method of authentication passwords. It works but asks for the 6-digit verification code constantly. I have things to try but it will need long-term testing to insure the verification code request is minimized.
  3. There are times when HA adds a _2 extension to the device_tracker and sensor entity name when HA is reloaded and the iCloud3 integration is still running. A new Tool will be developed to easily reset these entity names to their correct name without the _2.
  4. Update the iCloud3 User Guide with all the new stuff and to make it easier to find what you are looking for.
@gcobb321 gcobb321 changed the title iCloud3 v3.1.4.1 ➤ A new release is available - 12/24/2024 iCloud3 v3.1.4.1 ➤ 12/24/2024 - A new release is available Dec 24, 2024
@gcobb321 gcobb321 pinned this issue Dec 24, 2024
@sassyass
Copy link

thanks for all of your hard work!

@gcobb321
Copy link
Owner Author

Your welcome. Much appreciated.

@Friedi1970
Copy link

Friedi1970 commented Dec 26, 2024

I really appreciate your work but unfortunately all my devices (again) are not available :(
I even can't login into my account ...
image

And the account as well as the password is correct. Logged into with the same cred. at icloud.com.

Btw. Anyway, I wish you a very merry christmas.

@gcobb321
Copy link
Owner Author

gcobb321 commented Dec 26, 2024

@Friedi1970
Go to Settings > System > Log and look for an error message related to iCloud3. What is it?

@Friedi1970
Copy link

@Friedi1970 Go to Settings > System > Log and look for an error message related to iCloud3. What is it?

Well, there is nothing because I deleted the account to login again. Unfortunately that doesn't work at all ...

@gcobb321
Copy link
Owner Author

Restart HA and try again. See if you get the error again.

@Friedi1970
Copy link

I did a complete system restart and tried again. It doesn't work.
I figured out a (maybe) additional problem. When copying and pasting user name and/or password there is an additional space before the name/password.
Anyway, it doesn't work for me :(

@gcobb321
Copy link
Owner Author

A detailed error message would be helpful if it is in the HA logs.
Spaces are stripped from the p/w before processing but I’ll make sure.

@Friedi1970
Copy link

A detailed error message would be helpful if it is in the HA logs.

As I wrote, there is nothing within the logs. The only message I get is the error above. Please see the screen in my first comment.

@500Foods
Copy link

I was having all kinds of trouble, so I used the menu items to clear out all the config settings and reset up my config from the beginning, and all went smoothly. Didn't take more than 5 minutes.

@gcobb321
Copy link
Owner Author

@500Foods
I guess you used the new Tools screen?

@Friedi1970
Copy link

I restored from my yesterday's backup and with that I switched back to v3.0.5.9 which works again but unfortunately I can't do any update of icloud 3 because I always run into trouble :-(

@500Foods
Copy link

@500Foods I guess you used the new Tools screen?

Was that new? I just saw it in the list and thought I'd give it a try. Worked great. Good job! I don't know what the problem was. The first time I tried after this update, I couldn't get logged in to Apple - it kept saying it was the wrong auth code. Then I tried later and that worked, but I couldn't configure the devices - just an unknown error. So I reset it all and everything sailed on through. I suppose with people with various versions upgraded over time, perhaps something was lingering about that was tripping it up. Sorry I didn't save any of the logs for you, but it is working, so I'm happy.

@wormvortex
Copy link

Not working for me.

The Verification Code was not correct. Reenter or request a new code

Just keep getting this when I try and log into my apple account.

@gcobb321
Copy link
Owner Author

@wormvortex
Any messages in Event Log during startup about configs tates 3,,?
Any 'unknown errors' on the Configure screens? Get details of the error from the ~HA Sidebar > Settings > System > Logs_ (look for icloud3 Errors)?
Version number is displayed hovering over the Event Log > Actions and on the Event Log startup. Verify the version you are running is v3.1.4.1 and this version number is displayed.

@gcobb321
Copy link
Owner Author

@Friedi1970
Reinstall v3.1.4.1 and try again. If you get Apple Account errors, select Configure > Tools > Delete all Apple accounts and Devices. Then add the Apple account and Devices you want to track again. That will clear any configuration problems that might be lingering in the configuration file when going from v3.0.5.9 to v3.1.4.1.

@Friedi1970
Copy link

Friedi1970 commented Dec 26, 2024

@gcobb321 I did it; without success.
Before deleting I got this:
0285C843-2071-49EC-87CE-B3FCEA01C29A

and this in the logs:
Dieser Fehler stammt von einer benutzerdefinierten Integration

Logger: py.warnings
Quelle: custom_components/icloud3/helpers/entity_io.py:259
Integration: iCloud3 v3 (Dokumentation, Probleme)
Erstmals aufgetreten: 18:27:46 (2 Vorkommnisse)
Zuletzt protokolliert: 18:27:46

:1: SyntaxWarning: invalid escape sequence '\s'
:1: SyntaxWarning: invalid escape sequence '\ '


Dieser Fehler stammt von einer benutzerdefinierten Integration

Logger: custom_components.icloud3
Quelle: custom_components/icloud3/helpers/messaging.py:498
Integration: iCloud3 v3 (Dokumentation, Probleme)
Erstmals aufgetreten: 18:27:49 (7 Vorkommnisse)
Zuletzt protokolliert: 18:27:49

iCloud3 Device Configuration Error > Marco’s iPhone (Schaeffler) (marcos_iphone_comp), iCloudDevice-Marco's iPhone SE, Not in Apple Acct-mail@mail.de
iCloud3 Device Configuration Error > Marco's iPad Pro (marcos_ipad_pro_ic3), iCloudDevice-Marco's iPad Pro, Not in Apple Acct-mail@mail.de
iCloud3 Device Configuration Error > Doris' iPad Air (doris_ipad_air_ic3), iCloudDevice-Doris' iPad Air, Not in Apple Acct-mail@mail.de
iCloud3 Device Configuration Error > Marcos Watch (iwatch_marco), iCloudDevice-Apple Watch von Marco, Not in Apple Acct-mail@mail.de
iCloud3 Device Configuration Error > Doris Watch (iwatch_doris), iCloudDevice-Apple Watch von Doris, Not in Apple Acct-mail@mail.de

After deleting and trying to readd:
image

@gcobb321
Copy link
Owner Author

@Friedi1970
That helps. Can you email me the ‘icloud3.log‘ file. That will/might show a lot more info. Send it to geekstergary@gmail.com.

Thanks

@jphansendk
Copy link

@Friedi1970 Go to Settings > System > Log and look for an error message related to iCloud3. What is it?

I have the same error:

`Logger: aiohttp.server
Source: /usr/local/lib/python3.13/site-packages/aiohttp/web_protocol.py:451
First occurred: 20:11:36 (8 occurrences)
Last logged: 20:19:55

Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/aiohttp/web_protocol.py", line 480, in _handle_request
resp = await request_handler(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/aiohttp/web_app.py", line 569, in _handle
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 86, in ban_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
response = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
result = await handler(request, **request.match_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin
return await func(self, request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 285, in post
return await super().post(request, flow_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 74, in wrapper
return await method(view, request, data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post
result = await self._flow_mgr.async_configure(flow_id, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in async_configure
result = await self._async_configure(flow_id, user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 414, in _async_configure
result = await self._async_handle_step(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
flow, cur_step["step_id"], user_input
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 517, in _async_handle_step
result: _FlowResultT = await getattr(flow, method)(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/icloud3/config_flow.py", line 548, in async_step_menu_0
return await self.async_step_menu(user_input, errors)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/icloud3/config_flow.py", line 627, in async_step_menu
return await self.async_step_device_list()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/icloud3/config_flow.py", line 2672, in async_step_device_list
await self._build_icloud_device_selection_list()
File "/config/custom_components/icloud3/config_flow.py", line 3876, in _build_icloud_device_selection_list
f"{icloud_dname_apple_acct}{status_msg}")
^^^^^^^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'icloud_dname_apple_acct' where it is not associated with a value
`

@Friedi1970
Copy link

@Friedi1970 That helps. Can you email me the ‘icloud3.log‘ file. That will/might show a lot more info. Send it to geekstergary@gmail.com.

Thanks

I'd di if I knew where to find that file.

@gcobb321
Copy link
Owner Author

That file is in the config directory, the same location as the home-assistant.log file and a lot of other HA files.

image

@lane333999
Copy link

Hi, I'm having the same error message,
I can find 2 errors in the log.
Attached the screen shots and log content.
image

'PyiCloudService' object has no attribute 'DeviceSvc'.txt
'PyiCloudService' object has no attribute 'HOME_ENDPOINT'.txt

@happyeddie
Copy link

Hi, I'm having the same error message, I can find 2 errors in the log. Attached the screen shots and log content. image

'PyiCloudService' object has no attribute 'DeviceSvc'.txt 'PyiCloudService' object has no attribute 'HOME_ENDPOINT'.txt

+1

@gcobb321
Copy link
Owner Author

@happyeddit @lane333999
I've patched the module that interfaces with the Apple Acct to try to solve the ENDPOINT error. I could never get that error but reworked the code to try to prevent it from occurring.

Unzip the zip file below into the icloud3/support directory and restart HA.
patch-v3.1.4.2-pyicloud_ic3.zip

@Friedi1970
You might want to unzip the file also. I do not think it will help you. I found some problems dealing with invalid passwords during the initial startup in Stage 1 where an invalid password would give an 'Invalid p/w' message when it was probably invalid and later in the Stage 3 think the p/w was really valid when it probably was not. Then when you try to correct it in the Configure > Data Sources > Username Password screen, it would not update to the correct password and display the wrong error message. I'm still working on that problem.

Meanwhile, edit the -.support/icloud3/configuration_ file. Enter your correct password in the 2 password fields highlighted below. Type it between the quote marks, replacing the ««R2NpdDMyMTc=»» with yourrealpassword. Keep the quote marks.

image

Then restart HA and see if you get in. I do not think you will but lets try that anyway

@wormvortex
Copy link

@wormvortex

Any messages in Event Log during startup about configs tates 3,,?

Any 'unknown errors' on the Configure screens? Get details of the error from the ~HA Sidebar > Settings > System > Logs_ (look for icloud3 Errors)?

Version number is displayed hovering over the Event Log > Actions and on the Event Log startup. Verify the version you are running is v3.1.4.1 and this version number is displayed.

Looks like it was a permission error. Log showed

** [Errno 13] Permission denied: '/config/.storage/icloud3.apple_acct/tmp442v7esl'
18:38:26 – (ERROR) iCloud3 v3 (custom integration) - message first occurred at 18:37:51 and shows up 2 times**

I've changed the folders permissions and can log in fine now. Only issue I now face is it will list all my Apple devices but it is not listing my partners when it did before.

@Friedi1970
Copy link

@Friedi1970 You might want to unzip the file also. I do not think it will help you. I found some problems dealing with invalid passwords during the initial startup in Stage 1 where an invalid password would give an 'Invalid p/w' message when it was probably invalid and later in the Stage 3 think the p/w was really valid when it probably was not. Then when you try to correct it in the Configure > Data Sources > Username Password screen, it would not update to the correct password and display the wrong error message. I'm still working on that problem.

Meanwhile, edit the -.support/icloud3/configuration_ file. Enter your correct password in the 2 password fields highlighted below. Type it between the quote marks, replacing the ««R2NpdDMyMTc=»» with yourrealpassword. Keep the quote marks.

image

Then restart HA and see if you get in. I do not think you will but lets try that anyway

To be honest, I am not that familiar with terminal and I have no clue where to find the .support folder.
Since the version v3.0.5.9 works fine for me at the moment I will wait for a working fix.
Thanks for your help and I hope my log could help you!!!

@JanneBoj
Copy link

Thanks a lot Gary for your ongoing support and for your hard work.

@gcobb321
Copy link
Owner Author

@Friedi1970
I found a problem where an invalid password, or one that didn’t pass a validity test, when starting iCloud3 could not be changed in the Configure > Data Sources … > Apple Username/Password screen. Yours was getting the’ invalid Password’ message when starting iCloud3 and you could not correct it.

I can send you a zip file that you could unzip into the config/custom_compontnts/icloud3 directory to try it if you want.

@gcobb321
Copy link
Owner Author

@JanneBoj
Thanks.

@Friedi1970
Copy link

@Friedi1970
I can send you a zip file that you could unzip into the config/custom_compontnts/icloud3 directory to try it if you want.

@gcobb321 that would be really great!!!

@gcobb321
Copy link
Owner Author

@Friedi1970
Here is v3.1.4.2b2 with the following changes:

  1. APPLE ACCOUNT LOGIN (Fixed)
    • Fixed a problem verifying the password before logging into the Apple account when iCloud3 was starting.
    • Fixed a problem where a valid password may fail the initial verification test and an invalid password may pass the validation test.
    • Fixed a problem where a password that failed the initial verification test could not be corrected on Configure > Data Sources ... > Apple Username/Password screen.
  2. UPDATE ICLOUD3 DEVICE (Fixed) - Fixed a problem where changing the Apple account and/or Mobile App device selection would be saved in the configuration file but not used when iCloud3 was restarted after the Configure update.

I have not released this yet. There are still several other things I want to look at. Let me know if it works or if you still have issues.

If there are problems, go to Configure > Tools and select Log Level - Debug. Then restart iCloud3 and go through the startup process and the process that does not work. Then send the icloud3.log file to geekstergary@gmail.com like you did before. Debug will give me more info and data to look at.

Unzip into the icloud3 directory and restart HA
icloud3 v3.1.4.2b2.zip

@Friedi1970
Copy link

@gcobb321 thanks for that! It works perfectly for me without any problems. 🙏

@gcobb321
Copy link
Owner Author

Excellent. Thanks for checking it out

@lane333999
Copy link

@happyeddit @lane333999 I've patched the module that interfaces with the Apple Acct to try to solve the ENDPOINT error. I could never get that error but reworked the code to try to prevent it from occurring.

Unzip the zip file below into the icloud3/support directory and restart HA. patch-v3.1.4.2-pyicloud_ic3.zip

@Friedi1970 You might want to unzip the file also. I do not think it will help you. I found some problems dealing with invalid passwords during the initial startup in Stage 1 where an invalid password would give an 'Invalid p/w' message when it was probably invalid and later in the Stage 3 think the p/w was really valid when it probably was not. Then when you try to correct it in the Configure > Data Sources > Username Password screen, it would not update to the correct password and display the wrong error message. I'm still working on that problem.

Meanwhile, edit the -.support/icloud3/configuration_ file. Enter your correct password in the 2 password fields highlighted below. Type it between the quote marks, replacing the ««R2NpdDMyMTc=»» with yourrealpassword. Keep the quote marks.

image

Then restart HA and see if you get in. I do not think you will but lets try that anyway

Working now after replacing the file and reboot HA.

Thanks a lot for your quick response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants