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.0 --> Questions and Answers Area #258

Open
gcobb321 opened this issue Jan 22, 2024 · 36 comments
Open

iCloud3 v3.0 --> Questions and Answers Area #258

gcobb321 opened this issue Jan 22, 2024 · 36 comments

Comments

@gcobb321
Copy link
Owner

gcobb321 commented Jan 22, 2024

The other Q&A Issue was getting long and contained a lot of very old items that we don't need to week through. So this is the fresh copy. Add comments below for help, assistance and guidance.

@gcobb321 gcobb321 pinned this issue Jan 22, 2024
@gcobb321 gcobb321 changed the title iCloud3 v3-rc10 Questions and Answers Area iCloud3 v3 Release Candidate 10 --> Questions and Answers Area Jan 22, 2024
@gcobb321 gcobb321 changed the title iCloud3 v3 Release Candidate 10 --> Questions and Answers Area iCloud3 v3 - Release Candidate 10 --> Questions and Answers Area Jan 22, 2024
@shim895
Copy link

shim895 commented Jan 23, 2024

EDITED to add that I am only seeing this when turning on DEBUG logging.

I am seeing this in my HA logs:

2024-01-23 09:08:20.342 ERROR (SyncWorker_0) [icloud3] 'NoneType' object has no attribute 'next_update_secs' Traceback (most recent call last): File "/config/custom_components/icloud3/icloud3_main.py", line 276, in _polling_loop_5_sec_device self._main_5sec_loop_update_tracked_devices_icloud(Device) File "/config/custom_components/icloud3/icloud3_main.py", line 475, in _main_5sec_loop_update_tracked_devices_icloud or icloud_data_handler.no_icloud_update_needed_tracking(Device) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/icloud3/support/icloud_data_handler.py", line 35, in no_icloud_update_needed_tracking elif (Device.is_next_update_time_reached is False ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/icloud3/device.py", line 1416, in is_next_update_time_reached return Gb.this_update_secs >= self.FromZone_NextToUpdate.next_update_secs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'next_update_secs'

I've also attached a screenshot of my EventLog page. Was there anything I need to add or tweak in the config?

image

Thank you for this integration!!

@gcobb321
Copy link
Owner Author

I think I have tracked it down to an invalid configuration item.

Can you do one of the following:

  • send your icloud3-0.log file to [email protected]. Also send icloud3-1.log and icloud3_2.log if they exist. They are older versions I can compare to the current version.

The 'track_from_base_zone': '' configuration field being empty ('') will cause this error. It should be 'track_from_base_zone': 'home' and I'd like to check it out. That field is on each device and in the general parameters. After you send the files, go to the Configure Settings > Update Devices screen and check the Primary Track-from-Home-zone override field for your devices and see if any are wrong. If it is wrong and an error message is displayed, set it to Home and restart iCloud3 as it normally does when you Exit the Configure Settings screen.

@shim895
Copy link

shim895 commented Jan 23, 2024

I think I have tracked it down to an invalid configuration item.

Can you do one of the following:

  • send your icloud3-0.log file to [email protected]. Also send icloud3-1.log and icloud3_2.log if they exist. They are older versions I can compare to the current version.

The 'track_from_base_zone': '' configuration field being empty ('') will cause this error. It should be 'track_from_base_zone': 'home' and I'd like to check it out. That field is on each device and in the general parameters. After you send the files, go to the Configure Settings > Update Devices screen and check the Primary Track-from-Home-zone override field for your devices and see if any are wrong. If it is wrong and an error message is displayed, set it to Home and restart iCloud3 as it normally does when you Exit the Configure Settings screen.

I followed your steps at the bottom - each appeared to be previously set. I then went and reselected that value for each device, along with a save and then a full restart. Now the errors are gone.

@gcobb321
Copy link
Owner Author

gcobb321 commented Jan 23, 2024 via email

@gcobb321
Copy link
Owner Author

@shim895
Here is rc10.1 that prevents zone maintenance when iC3 is starting and improves device parameter/sone verification and error reporting during start up.

Unzip into the icloud3 directory and restart HA.
icloud3_v3-rc10.1.zip

@shim895
Copy link

shim895 commented Jan 23, 2024

@shim895 Here is rc10.1 that prevents zone maintenance when iC3 is starting and improves device parameter/sone verification and error reporting during start up.

Unzip into the icloud3 directory and restart HA. icloud3_v3-rc10.1.zip

Appreciate it @gcobb321! Loading it now.

@DS-B-BB-G
Copy link

DS-B-BB-G commented Jan 26, 2024

Hi,

my log get also spam with following error below.

Is this a simmilar issue and make it sense to take you zip file update?

This error originated from a custom integration.

Logger: icloud3
Source: custom_components/icloud3/device.py:1416
Integration: iCloud3 v3: iDevice Tracker (documentation, issues)
First occurred: 8:33:23 AM (3865 occurrences)
Last logged: 1:55:20 PM

'NoneType' object has no attribute 'next_update_secs'
Traceback (most recent call last):
File "/config/custom_components/icloud3/icloud3_main.py", line 276, in _polling_loop_5_sec_device
self._main_5sec_loop_update_tracked_devices_icloud(Device)
File "/config/custom_components/icloud3/icloud3_main.py", line 475, in _main_5sec_loop_update_tracked_devices_icloud
or icloud_data_handler.no_icloud_update_needed_tracking(Device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/icloud3/support/icloud_data_handler.py", line 35, in no_icloud_update_needed_tracking
elif (Device.is_next_update_time_reached is False
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/icloud3/device.py", line 1416, in is_next_update_time_reached
return Gb.this_update_secs >= self.FromZone_NextToUpdate.next_update_secs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'next_update_secs'

———- next error log ——-

This error originated from a custom integration.

Logger: icloud3
Source: custom_components/icloud3/icloud3_main.py:994
Integration: iCloud3 v3: iDevice Tracker (documentation, issues)
First occurred: 8:33:22 AM (18 occurrences)
Last logged: 1:55:15 PM

'NoneType' object has no attribute 'from_zone'
Traceback (most recent call last):
File "/config/custom_components/icloud3/icloud3_main.py", line 894, in process_updated_location_data
self._get_tracking_results_and_update_sensors(Device, update_requested_by)
File "/config/custom_components/icloud3/icloud3_main.py", line 994, in _get_tracking_results_and_update_sensors
from_zone = Device.FromZone_TrackFrom.from_zone
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'from_zone'

Thanks for watching into it.

@fila612
Copy link

fila612 commented Jan 27, 2024

Same here, tried also with rc10.1:

EventLog:
System Events:

Time Event

05:52:05 INTERNAL ERROR > Det IntervalLoop⣇⠋•⠉File... > File /icloud3_main.py, line 1051, in _determine_interval
_and_next_update)⣇⠋•⠉Code > log_start_finish_update_banner(finish, devicename, Device.dev_data_sou

05:52:10 INTERNAL ERROR > Det IntervalLoop⣇⠋•⠉File... > File /icloud3_main.py, line 1051, in _determine_interval
_and_next_update)⣇⠋•⠉Code > log_start_finish_update_banner(finish, devicename, Device.dev_data_sou

05:52:10 INTERNAL ERROR > Det IntervalLoop⣇⠋•⠉File... > File /icloud3_main.py, line 1051, in _determine_interval
_and_next_update)⣇⠋•⠉Code > log_start_finish_update_banner(finish, devicename, Device.dev_data_sou

05:52:15 INTERNAL ERROR > Det IntervalLoop⣇⠋•⠉File... > File /icloud3_main.py, line 1051, in _determine_interval
_and_next_update)⣇⠋•⠉Code > log_start_finish_update_banner(finish, devicename, Device.dev_data_sou

iCloud3.log
[...]
UnboundLocalError: cannot access local variable 'from_zone' where it is not associated with a value
2024-01-27 06:20:25 [icloud3_main:1055] ICLOUD > Traceback (most recent call last):
File "/config/custom_components/icloud3/icloud3_main.py", line 1051, in _determine_interval_and_next_update
log_start_finish_update_banner('finish', devicename, Device.dev_data_source, from_zone)
^^^^^^
UnboundLocalError: cannot access local variable 'from_zone' where it is not associated with a value
2024-01-27 06:20:25 [icloud3_main:1054] ICLOUD > Traceback (most recent call last):
File "/config/custom_components/icloud3/icloud3_main.py", line 1051, in _determine_interval_and_next_update
log_start_finish_update_banner('finish', devicename, Device.dev_data_source, from_zone)
^^^^^^^^^
UnboundLocalError: cannot access local variable 'from_zone' where it is not associated with a value
2024-01-27 06:20:25 [icloud3_main:1055] ICLOUD > Traceback (most recent call last):
File "/config/custom_components/icloud3/icloud3_main.py", line 1051, in _determine_interval_and_next_update
log_start_finish_update_banner('finish', devicename, Device.dev_data_source, from_zone)
^^^^^^
[...]

@gcobb321
Copy link
Owner Author

Here is the latest rc10.1 (1/27/2024) that fixes all of the above items. This will be on the GitHub Releases page tomorrow.

Download, unzip into the icloud3 directory and restart HA.
icloud3_v3-rc10.1.zip

@smart-ctrl
Copy link

rc10.1
image

@gcobb321
Copy link
Owner Author

gcobb321 commented Jan 28, 2024

@smart-ctrl
Was that error from the 1/27 rc10.1 or the one from 1/22. That should have been fixed in the 1/27 version

Edit: I was in the process of updating the GitHub Release to rc10.1 but will wait untilo you confirm it is fixed (or not). Thanks.

@smart-ctrl
Copy link

@gcobb321 My bad, now it works fine with 1/27 rc10.1 :)

@gcobb321
Copy link
Owner Author

Thanks for the confirmation. Updating now.

@gcobb321
Copy link
Owner Author

I've just uploaded v3.0.rc10.4. Visit the Releases page for more info. It should show up on HACS on 2/19 or 2/20 when HACS does a refresh. Or go into HACS, select iCloud3 and update it's information.

@gcobb321
Copy link
Owner Author

Nir,
As it turns out, everything is correct. The distance to the devices is the calculated distance is the straight line distance between two gps points. The _zone_distance and _home_distance state values is the Waze Route Driving distance between these same points. I have done some reformatting of these sensor's attributes and updated the documentation to explain this better. The '--Nir/iPhone', and the 'calc distance' are all in agreement (3.98km) as shown on the sample images you sent

I also changed the Device name in the attributes to remove the device type so you would use '--Nir' instead of '--Nir/iPhone' for your dashboard sensors.

Unzip rc10.5 below into the icloud3 directory and restart HA.
icloud3_v3.0.rc10.5.zip

@gcobb321 gcobb321 changed the title iCloud3 v3 - Release Candidate 10 --> Questions and Answers Area iCloud3 v3.0 --> Questions and Answers Area Feb 26, 2024
@amaisano
Copy link

amaisano commented Mar 1, 2024

One of the past couple releases changed the minimum interval you can set a device to from 1 minute to 5 minutes.

5 minutes is not fast enough for the majority of my use cases. I know this is a conversation that has been had before, and suggestions using distance-from-home and/or Waze timing to address this, but those workarounds are not going to work for the following AFAICT:

  1. Going for a walk around the block w/o phone (Apple Watch)
  2. Driving to get coffee 1 mile away - I can be through the drivethru and back to my driveway within 5-10 minutes, which is not enough time to calculate workarounds in my experience.

Is there a setting or detail I am missing? 1 minute was adequate for almost all of my automations. When it changed to 5 minutes, nearly all my automations are failing.

Again, this is apple watch related. If it was iPhone only I could easily rely on the Companion app.

You can see the significant lag here:

image

PS: Congrats on the 3.0 release!

@gcobb321
Copy link
Owner Author

gcobb321 commented Mar 1, 2024

When the calculates the interval based on distance is less than 5-minutes, it uses that. For example when the distance goes below 1-km, the interval is 15-secs. I’ll look at how the Watch interval works this afternoon when I go to see Dune 2.

I base my Home arrive automations on north a zone enter trigger and the distance goes below .2

@amaisano
Copy link

amaisano commented Mar 1, 2024

When the calculates the interval based on distance is less than 5-minutes, it uses that. For example when the distance goes below 1-km, the interval is 15-secs.

FWIW, i've never seen it at 15 seconds for the Apple Watch and I spend most of my time at the home location.

@gcobb321
Copy link
Owner Author

gcobb321 commented Mar 2, 2024

The 15-sec time would be determined when the watch or other device approached Home zone and is under 1km Away. When you are in a zone, the watches inzone interval determines when the next location update will be done.

The sensor.[devicename]_interval shows what the interval is. Also look at the Event Log for the watch while it is away and approaching Home to see what is actually going on at that time.

@peetereczek
Copy link

Are you planning to implement new authentication method for accounts which are protected with passkeys / hardware FIDO keys?

Reason is that traditional MFA with code popup is no longer available

@gcobb321
Copy link
Owner Author

gcobb321 commented Mar 3, 2024

I'd like to and it's on the Feature request list but the web interface that is used to retrieve location data does not support it. I do not see it happening any time soon.

@gcobb321
Copy link
Owner Author

gcobb321 commented Mar 4, 2024

@amaisano
I have just released a new v3.0. It does not effect current users so the version is still v3.0. However, I did change the Fixed Interval minimum value from 5-min to 3-min.

The Releases page is here and it should show up on HACS tomorow.

@peetereczek
Copy link

I'd like to and it's on the Feature request list but the web interface that is used to retrieve location data does not support it. I do not see it happening any time soon.

So as I understand, that depends actually from Apple?

@peetereczek
Copy link

I'd like to and it's on the Feature request list but the web interface that is used to retrieve location data does not support it. I do not see it happening any time soon.

Aha, in iOS 17.4 there is an option to manage web applications which requested passkey authentication. Looks like Apple is preparing to extend functionality. Fingers crossed

@gcobb321
Copy link
Owner Author

gcobb321 commented Mar 5, 2024

I'll keep a look out for it. Post any more info you find.

@gcobb321
Copy link
Owner Author

iCloud3 v3.0.1 (3/20/2024) has been released

Go to the Releases page, download the zip file, unzip it into the icloud3 directory, restart HA and enjoy.
--or--
Get it from HACS

@pedropombeiro
Copy link

Hi @gcobb321! I'm seeing a behavior with my kid's integration, where it seems to frequently query FamShr for his battery level, even when he's home (which's the case in the picture below), and the trigger says it's at a 2h interval. I even tried pausing updates for his device, but I still see locate requests in the log after that:

image

Any ideas what might be happening here? Happy to open a bug if this warrants it, but just wanted to check first if I'm reading things correctly.

@gcobb321
Copy link
Owner Author

gcobb321 commented Jun 5, 2024

@pedropombeiro
When iCloud3 gets location info for one device, info for all devices is returned from iCloud. iCloud3 will update all devices with the location and battery status. When you pause a device, that device will no longer request it’s location but will be updated when others request theirs.

@barney34
Copy link

barney34 commented Jul 5, 2024

I have three zones.

Home
Lake
Neighborhood

I want to say if I exit Lake or Neighborhood and I'm moving towards Home do x. But I dont want x to happen if I am moving away from home. How would I write that condition?

@thogens
Copy link

thogens commented Sep 25, 2024

I'm new to iCloud3 and I'm wondering if there is any way to dynamically set the minimum interval to save battery on my kids Apple Watch.
My idea would be to set interval to 5mins, when usually school is over, so that I get notified "quickly" when my kid goes home. But I don't need 5mins interval over the whole day. That should save a lot of battery consumption, correct?
Any idea?

@amaisano
Copy link

amaisano commented Sep 25, 2024 via email

@thogens
Copy link

thogens commented Sep 25, 2024

What do you mean with "automatic"? I set interval to 2h and the interval goes down automatically to 5mins? But what would trigger this?

@amaisano
Copy link

amaisano commented Sep 25, 2024

I've set mine to the minimum i can (3 minutes) which is not as fast as it used to be in the older integration, which was 1 minute. I think this is the "in home interval."

If you look carefully at the logs, you'll see the interval change depending on what zone you are in or not in. Most of the time "it just works" where the interval reduces when in a stationary zone that isn't home, and gets more frequent when on the move.

There is also an automation or two the author of this integration suggests for pinging/updating devices when "approaching home."

See my post and Gary's comments above for more info (if you haven't already):

#258 (comment)

The 15-sec time would be determined when the watch or other device approached Home zone and is under 1km Away. When you are in a zone, the watches inzone interval determines when the next location update will be done.

@ctankep23
Copy link

ctankep23 commented Oct 15, 2024

  1. Ive updated/migrated to the latest version, I get stuck in configuration at an error saying mobile app integration is not installed (but it is). What now?

  2. A family shared device is missing, and when I press "add device" I get "Unkown error occured". What now?

@gcobb321
Copy link
Owner Author

@ctankep23
The mobile app issue is caused by the mobile app loading after iCloud3 which is causing the ‘Monitor the mobile app’ to be reset if there is a problem when it is checked again after HA starts. The way this works has been changed in the next release ( not available yet). v3.0.5.10 will be released after I get back home. A prerelease is below. There is an error which can be ignored.

Unzip the file below into the icloud3 directory and restart ha.
icloud3 v3.0.5.10.zip

@gcobb321 gcobb321 unpinned this issue Nov 4, 2024
@Homealone-2021
Copy link

After every Update i have the issue that every Entitie in HA got a new Name.
before the Update "sensor.homealone_arrival_time" and after the update the Entitie ist lost but i found all entities with new endings like "_2" or "_3" looks like this "sensor.homealone_arrival_time_3"
What can i do to prevent this? I have Version 3.1.4.1 installed.

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