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 ➤ Questions & Answers #384

Open
gcobb321 opened this issue Nov 4, 2024 · 32 comments
Open

iCloud3 v3.1 ➤ Questions & Answers #384

gcobb321 opened this issue Nov 4, 2024 · 32 comments

Comments

@gcobb321
Copy link
Owner

gcobb321 commented Nov 4, 2024

Post any questions you have to this issue. Create a new issue if you are having problems.

@gcobb321 gcobb321 pinned this issue Nov 4, 2024
@B-Hartley
Copy link

Hi,
Just upgraded to 3.1
Seem to be having problems.

  1. Am I supposed to put something into "TOTP Key" field on the apple account screen.
  2. How can i delete all config stoed by icloud3 so I can start again with a clean install.

thanks

@gcobb321
Copy link
Owner Author

gcobb321 commented Nov 4, 2024 via email

@B-Hartley
Copy link

B-Hartley commented Nov 4, 2024

When I go into the icloud devices screen I get "unknown error occurred" so I can't do it from there.
Is there a "back end" way to remove all the data ?

@gcobb321
Copy link
Owner Author

gcobb321 commented Nov 4, 2024 via email

@B-Hartley
Copy link

Yes, I'd just found the icloud3 folder in .storage/

Errors in log are:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 477, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 559, in _handle
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/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(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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 532, in async_step_menu_0
    return await self.async_step_menu(user_input, errors)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/icloud3/config_flow.py", line 610, in async_step_menu
    return await self.async_step_device_list()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/icloud3/config_flow.py", line 2714, in async_step_device_list
    await self._build_mobapp_entity_selection_list()
  File "/config/custom_components/icloud3/config_flow.py", line 3927, in _build_mobapp_entity_selection_list
    Device = Gb.Devices_by_devicename[devicename]
             ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'xxxxx_iphone'

xxxxx was the name on one of my family sharing members.
I'd removed the apple account and made the devices inactive.
I couldn't then get to them to change them back.

Deleted config, restarting and trying again.

Thanks

@gcobb321
Copy link
Owner Author

gcobb321 commented Nov 4, 2024 via email

@dodgydd
Copy link

dodgydd commented Nov 4, 2024

3.1 seems to be working for me, thank you very much for your efforts.

@B-Hartley
Copy link

Still can't get it to setup.
Wiped config.

Setup again.
Sometimes it says 0 of 10 icloud devices tracked.
sometimes is says 0 of 27 icloud devices tracked.

But I can't enabled any of them.

not sure if this is related ?

2024-11-04 19:28:20.792 WARNING (MainThread) [custom_components.localtuya.common] [bf2...t8f] Failed to connect to 192.168.21.217: [Errno 113] Connect call failed ('192.168.21.217', 6668)
2024-11-04 19:28:28.219 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 477, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 559, in _handle
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/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 262, in post
    return await super().post(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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 77, in post
    return await self._post_impl(request, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 84, in _post_impl
    result = await self._flow_mgr.async_init(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 332, in async_init
    flow = await self.async_create_flow(handler, context=context, data=data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 3003, in async_create_flow
    return handler.async_get_options_flow(entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/icloud3/config_flow.py", line 122, in async_get_options_flow
    Gb.OptionsFlowHandler = iCloud3_OptionsFlowHandler()
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/icloud3/config_flow.py", line 365, in __init__
    self.initialize_options()
  File "/config/custom_components/icloud3/config_flow.py", line 472, in initialize_options
    self._initialize_self_PyiCloud_fields_from_Gb()
  File "/config/custom_components/icloud3/config_flow.py", line 496, in _initialize_self_PyiCloud_fields_from_Gb
    self.username = conf_apple_acct[CONF_USERNAME]
                    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: 'username'

@i8nemo
Copy link

i8nemo commented Nov 5, 2024

is there any way to change from mi to km?

@mobiledude
Copy link

mobiledude commented Nov 5, 2024

Started all over. deleted all files in .storage for icloud3. Uninstalled the integration and re-installed. unable to login into my apple account: this is the HA log:

`Laatst gelogd: 07:56:38

'AA-NOTSPECIFIED-#0'
Traceback (most recent call last):
File "/config/custom_components/icloud3/support/start_ic3.py", line 1139, in create_Devices_object
pyicloud_ic3_interface.verify_all_apple_accounts()
File "/config/custom_components/icloud3/support/pyicloud_ic3_interface.py", line 119, in verify_all_apple_accounts
Gb.username_valid_by_username[f"AA-NOTSPECIFIED-#{cnt}"]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'AA-NOTSPECIFIED-#0'`

Edit:running latest HA Beta

Update: Solved by resetting apple account

@malvibra
Copy link

malvibra commented Nov 5, 2024

Hello! It's my first configuration, but I keep getting this message: ❌ Entry Error, Invalid Username or Password
Credentials are obviously right. I already have purged all the files from .storage and custom_components folders.

@gcobb321
Copy link
Owner Author

gcobb321 commented Nov 5, 2024

Did you just install iCloud3 v3 for the first time? If so, have you followed the instructions in the User Guide for setting up iCloud3?. The screen images and some instructions are out of date and have not been updated for v4.1, released a few days ago. The basics are the same and you will have to go by the screens.

@rh37hd
Copy link

rh37hd commented Nov 5, 2024

Started all over. deleted all files in .storage for icloud3. Uninstalled the integration and re-installed. unable to login into my apple account: this is the HA log:

`Laatst gelogd: 07:56:38

'AA-NOTSPECIFIED-#0' Traceback (most recent call last): File "/config/custom_components/icloud3/support/start_ic3.py", line 1139, in create_Devices_object pyicloud_ic3_interface.verify_all_apple_accounts() File "/config/custom_components/icloud3/support/pyicloud_ic3_interface.py", line 119, in verify_all_apple_accounts Gb.username_valid_by_username[f"AA-NOTSPECIFIED-#{cnt}"] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^ KeyError: 'AA-NOTSPECIFIED-#0'`

Edit:running latest HA Beta

Update: Solved by resetting apple account

Can you clarify what you mean by resetting Apple account? I'm encountering the same issues.

@FlowFrank
Copy link

FlowFrank commented Nov 5, 2024

Did you just install iCloud3 v3 for the first time? If so, have you followed the instructions in the User Guide for setting up iCloud3?. The screen images and some instructions are out of date and have not been updated for v4.1, released a few days ago. The basics are the same and you will have to go by the screens.

I had the same problem, but then managed to solve it. But I can't add a device, I always get the message below. Same when adding an iPhone.

Bildschirmfoto 2024-11-05 um 21 25 27

@GerdRuetten
Copy link

is there any way to change from mi to km?

Open the configuration dialog from icloud3

Select "MENU > CONFIGURE PARAMETERS MENU ᐳ Format Parameters; Display Text As; Waze Route Distance, Time & History; inZone Intervals; Special Zones; Other Parameters"
image

Select FORMAT SETTINGS ᐳ Log Level; Zone Display Format; Device Tracker State; Unit of Measure; Time & Distance, Display GPS Co
image
ordinates

Set UNIT OF MEASUREMENT to Metric
image

@naseemr
Copy link

naseemr commented Nov 6, 2024

Hi,
In Add iCloud3 Device windows what is the what is the icloud3 entity id? is it fmshr email? Also I followed the user guide for new install, but still cant add device from family share

@enedberg
Copy link

enedberg commented Nov 6, 2024

I am also getting "0 of 0" tracked devices and are unable to add new devices.

Did you just install iCloud3 v3 for the first time? If so, have you followed the instructions in the User Guide for setting up iCloud3?. The screen images and some instructions are out of date and have not been updated for v4.1, released a few days ago. The basics are the same and you will have to go by the screens.

I had the same problem, but then managed to solve it. But I can't add a device, I always get the message below. Same when adding an iPhone.

Bildschirmfoto 2024-11-05 um 21 25 27

@freddanastrom
Copy link

I am also getting "0 of 0" tracked devices and are unable to add new devices.

Did you just install iCloud3 v3 for the first time? If so, have you followed the instructions in the User Guide for setting up iCloud3?. The screen images and some instructions are out of date and have not been updated for v4.1, released a few days ago. The basics are the same and you will have to go by the screens.

I had the same problem, but then managed to solve it. But I can't add a device, I always get the message below. Same when adding an iPhone.
Bildschirmfoto 2024-11-05 um 21 25 27

Same issue here, 0 of 0 iCloud devices.
Not a new install, just upgrade to 3.1.

I also get this during startup stage 4 in the event log:
APPLE ACCOUNT NOT LOGGED INTO > A device’s Apple Acct was not logged into and will not be tracked:

  • Apple Acct-> Fredrik (fredriks_iphone)
  • Apple Acct-> *** (***_iphone)

When updating the login information it seems to be accepted, also accepting the verification code.

@gcobb321
Copy link
Owner Author

gcobb321 commented Nov 6, 2024

@B-Hartley
I will be releasing v3.1.1 tomorrow and it fix the problem getting the devices and locations when iCloud3 starts, leading to the '0 of 0' errors. It was a bug that in the authentication routine, caused by deleting the icloud2.apple_acct cookie files, requiring a new authentication. Also a number of other fixes.

@gcobb321
Copy link
Owner Author

gcobb321 commented Nov 6, 2024

@naseemr
The iCloud3 Device Name is the device_tracker entity you are assigning to the iCloud3 device you want to track. The Apple Account and Mobile App devices to be associated with this device_tracker entity are selected on the next page. (Example: gary_iphone)

I have added this to the v3.1.1 Add Device screen. The process is explained in the iCloud3 Docs.

@FlowFrank
Copy link

It's been working for me for a few hours. I successfully installed iPhones and Apple Watches. Worked after the last supervisor update.

@gcobb321
Copy link
Owner Author

gcobb321 commented Nov 7, 2024

iCloud3 v3.1.1 has been to HACS

Release page is here

Change Log - v3.1.1

  1. LOCATING DEVICES:
    • Added additional checks to insure the Apple Account location data was refreshed during startup and while configuing iCloud3 settings. Fixed a problem where the location information data from Apple was not being initialized properly.
    • Fixed the location refresh not being done that caused the '0 of 0' to be displayed in the Configure Setting screens, leading to the Apple Account selection lists to not be populated.
    • Fixed some problems where 'Locate All Devices = False' would still locate all the devices in the Apple account
    • Added error checking to make sure the Locate All Devices can not be disabled if there were Family devices that
      were assigned to that Apple account. If it was disabled, they would never be located.
  2. UPDATE DEVICE SCREEN - Added (and fixed) the TOOLS - RESET DATA SOURCE(S), DELETE DEVICE(S) option where you can reset the device's Apple Account and Mobile App to default values (None) and fixed a problem deleting devices. Reworked the Apple Account selection list to provide more information and identify setup errors.
  3. UPDATE APPLE ACCOUNT USERNAME/PASSWORD SCREEN - Added checks to insure Locating All Devices can not be disabled if there are tracked devices assigned to this account that are in the Family list.
  4. OTHER THINGS - Changed several things under the covers.

@Harry-1976
Copy link

Devices don’t update after a HA restart. I have to reload the integrations to sync them.

@gcobb321
Copy link
Owner Author

Are there any messages in the Event Log?
Is the Apple account being logged into? Are all devices in the account being displayed in the Event Log?
Stages 3-5 provide a lot of detail about how Apple and Mobile App devices are associated with the iCloud3 device. Do you see any notifications?
When it stops working, what does the Event Log show regarding location updates?
Are there any error related to iCloud3 in the HA load at Settings > System > Logs?

@Harry-1976
Copy link

I haven't been able to reproduce it. Must have been something on my end. Sorry for trouble.

@i8nemo
Copy link

i8nemo commented Nov 25, 2024

I recently removed all tracked devices and I reinstalled icloud v3 integration. I can successfully add my icloud credentials, but when it comes to add new devices from my Apple account drop down, nothing is listed with line "all Apple account devices are signed". Yet no tracked devices are configured.
Screenshot_20241125_211626_Home Assistant

@gcobb321
Copy link
Owner Author

@i8nemo
Try exiting the Configure screens and Restart iCloud3 on the Event Log > Actions > if it doesn’t restart, then go back to the Configure > iCloud3 Devices > Select > Update Device screen
If that doesn’t work, Try restarting HA and see if they are picked up.

@i8nemo
Copy link

i8nemo commented Nov 25, 2024

Unfortunately restart does not correct the issue. I've also have tried deleting and reinstalled both integration and from HACS with HA restart. Same result.

@gcobb321
Copy link
Owner Author

@i8nemo
Apple might not be completely logged into and the family share devices were not picked up.

There have been errors starting iCloud3 lately where Apple reverted back to the old method of validating passwords. You need to revert to v3.0.5.9 and then reject the Family Sharing in the _Configure > Data Sources-Apple Accts & MobApp _ screen

See here

@Kuchiru
Copy link

Kuchiru commented Dec 9, 2024

Hello, i've been using this addon for a while without issues. unfortunately, recently i started having issues.
First I had login issues, this was resolved with downgrading.
Second, i got a new iPhone - restored my backup and set everything up. All entity names are the same for the new phone and i can see the phone report everything correctly via the mobile app. however, icloudv3 states the following:

Error, The Mobile App Integration is not installed. The Mobile App will not be used as a data source; location data and zone enter/exit triggers will not be monitored

And this is exactly what happens, even the mobile app reports zone changes correctly in home assistant but the icloudv3 integration does not.

What can i do to remedy this?

@gcobb321
Copy link
Owner Author

gcobb321 commented Dec 9, 2024

@Kuchiru
That message comes from iCloud3 not being able to find the mobapp device tracker entity associated with the iCloud3 device.

  1. Check the Mobile App Integration and make sure the device is listed.
  2. go to the iCloud3 update device configuration screen for the device and check the mobile app it is using.
  3. Check the Event Log > Stage 4 & 5 for messages and the mobapp device tracker assignment.

@rktr2009
Copy link

New user here, for a wonderful integration. Everything works now, thanks to the developers. A quick question. Does tracking devices through icloud3 affect the device's battery drain? I am just curious as I am seeing battery levels decreasing slightly quicker than it was before using the integraion. I am assuming that is so because of tracking data more than a standard icloud connection. Or is it because it is using also HA companion app for tracking? Thanks.

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