icloud3_v3 icon indicating copy to clipboard operation
icloud3_v3 copied to clipboard

iCloud3 v3.0 --> Questions and Answers Area

Open gcobb321 opened this issue 5 months ago • 26 comments

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 avatar Jan 22 '24 23:01 gcobb321

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!!

shim895 avatar Jan 23 '24 15:01 shim895

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.

gcobb321 avatar Jan 23 '24 19:01 gcobb321

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.

shim895 avatar Jan 23 '24 21:01 shim895

I've redone the device field/valid zone error checking when starting up. It seems HA was firing the new "remove_zone" handler when iC3 was starting and iC3 was removing the home and other zones.

2024-01-23 13:30:16 [start_ic3...:1160] STAGE 3 > HA Zone Deleted > Zone-Angie's Home/angie_s_home (0m 2024-01-23 13:30:16 [start_ic3...:1160] STAGE 3 > HA Zone Deleted > Zone-Millard South/millard_south (0m 2024-01-23 13:30:16 [start_ic3...:1276] STAGE 3 > INITIALIZED Device > Ryan's iPhone (ryan_iphone) 2024-01-23 13:30:16 [start_ic3...:1160] STAGE 3 > HA Zone Deleted > Zone-West Campus/west_campus (0m 2024-01-23 13:30:16 [start_ic3...:1300] STAGE 3 > ✓ ryan_iphone > Ryan's iPhone (Tracked) • FamShr Device: Shimmy • MobApp Entity: shimmy 2024-01-23 13:30:16 [start_ic3...:1160] STAGE 3 > HA Zone Deleted > Zone-Westside High/westside_high (0m 2024-01-23 13:30:16 [start_ic3...:1160] STAGE 3 > HA Zone Deleted > Zone-Boot Barn/boot_barn (0m

Things when down hill from there. I can not duplicate it but the validation is working better. I'll send you a link to updated code in a few minutes.

Also, go to Settings > Areas & zones > zones and make sure everythink looks ok. It should since the iC3 remove routine is to clean up iC3 stuff and has nothing to do with HA.

Gary Cobb (geekstergary)

------ Original Message ------ From "Ryan Schilmoeller" @.> To "gcobb321/icloud3_v3" @.> Cc "Gary Cobb" @.>; "Author" @.> Date 1/23/2024 4:15:07 PM Subject Re: [gcobb321/icloud3_v3] iCloud3 v3 - Release Candidate 10 --> Questions and Answers Area (Issue #258)

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 @.*** 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.

— Reply to this email directly, view it on GitHub https://github.com/gcobb321/icloud3_v3/issues/258#issuecomment-1906929075, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIOOVBY4GVRUL5QHKJ7SC33YQAR5XAVCNFSM6AAAAABCGAMO7CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBWHEZDSMBXGU. You are receiving this because you authored the thread.Message ID: @.***>

gcobb321 avatar Jan 23 '24 21:01 gcobb321

@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

gcobb321 avatar Jan 23 '24 21:01 gcobb321

@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.

shim895 avatar Jan 23 '24 22:01 shim895

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.

DS-B-BB-G avatar Jan 26 '24 13:01 DS-B-BB-G

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) ^^^^^^ [...]

fila612 avatar Jan 27 '24 05:01 fila612

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

gcobb321 avatar Jan 27 '24 22:01 gcobb321

rc10.1 image

smart-ctrl avatar Jan 28 '24 20:01 smart-ctrl

@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.

gcobb321 avatar Jan 28 '24 20:01 gcobb321

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

smart-ctrl avatar Jan 28 '24 20:01 smart-ctrl

Thanks for the confirmation. Updating now.

gcobb321 avatar Jan 28 '24 20:01 gcobb321

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 avatar Feb 18 '24 23:02 gcobb321

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 avatar Feb 20 '24 19:02 gcobb321

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!

amaisano avatar Mar 01 '24 18:03 amaisano

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

gcobb321 avatar Mar 01 '24 18:03 gcobb321

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.

amaisano avatar Mar 01 '24 21:03 amaisano

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.

gcobb321 avatar Mar 02 '24 08:03 gcobb321

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

peetereczek avatar Mar 03 '24 19:03 peetereczek

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 avatar Mar 03 '24 19:03 gcobb321

@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.

gcobb321 avatar Mar 04 '24 15:03 gcobb321

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 avatar Mar 05 '24 18:03 peetereczek

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

peetereczek avatar Mar 05 '24 18:03 peetereczek

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

gcobb321 avatar Mar 05 '24 19:03 gcobb321

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

gcobb321 avatar Mar 20 '24 18:03 gcobb321