gcobb321 / icloud3

iCloud3 v3 - iCloud3 is an advanced iDevice tracker that uses Apple iCloud account and HA Companion App data for presence detection and location based automations.
MIT License
567 stars 55 forks source link

Doesn't detect fmshr users until after restart of ic3 #130

Closed broyuken closed 3 years ago

broyuken commented 3 years ago

Since the last update, I believe it was v2.3.4 my wife is no longer tracked when I restart HA until I also go in and restart ic3. I see the following in my event log card.


  | FamShr update started (Initial Locate)
-- | --
  | Initializing iCloud3 v2.3.5 > Complete, Took 6.79 sec
11:24:35a | Initialize Event Log Sensor
11:24:35a | Configuring Device > Brians (brians_iphone)   • Initialize Tracking Fields   • Initialize Zones   • Initialize Stationary Zone > brians_iphone_stationary   • Update HA Device Entities   • Sensor entity prefix > sensor.brians_iphone   • Initialize Sensor Fields
  | Stage 4 > Configure tracked devices
11:24:34a | Tracking Devices >    • brians_iphone > Brians, iOSAppSuffix-_2, TrkMethod-FamShr
11:24:34a | Not Tracking Device > Britnis (britnis_iphone)
11:24:34a | iCloud3  Error for Britnis (britnis_iphone)/britnis_iphone > The iCloud  Account for xxxxxxxxxxxxxx@gmail.com did not return any device information  for this device.------------------------- 1. Restart iCloud3 on the Event_log screen or restart HA. 2. Verify the devicename on the `devices/device_name: britnis_iphone` parameter if the error persists. 3. Refresh the Event Log in your browser to refresh the list of devices.
11:24:34a | iOS App location requests sent to > Brians (brians_iphone) >    • brians_iphone
11:24:34a | iOS App monitoring > Brians (brians_iphone) >   • device_tracker.brians_iphone_2   • sensor.brians_iphone_last_update_trigger
11:24:34a | Verified Device > Brians (brians_iphone)
11:24:34a | Entity Registry mobile_app device_tracker. entities found >   • britnis_iphone_2 (Britni’s iPhone)   • brians_iphone_2 (Brian’s iPhone)
  | Stage 3 > Identify iOS App entities, Verify tracked devices
11:24:34a | Family Sharing List devices that can be tracked >   • brians_ipad > Brians iPad, iPad   • charlotte_s_iphone > Charlotte`s iPhone, iPhone ✓ brians_iphone > Brian’s iPhone, iPhone   • britnis_airpods > Britni’s AirPods, Accessory   • brians_apple_watch > Brian’s Apple\xa0Watch, Watch   • brians_airpods_pro > Brian’s AirPods Pro, Accessory
11:24:32a | Friends in the FindMy app data that can be located >
11:24:31a | iCloud Account Authenticated (#1) > LastAuth-Never (Initializing), Method-Account/PasswordSignin
11:24:29a | iCloud Web Services interface (pyicloud_ic3.py) > Verified
  | Stage 2a > Authenticate iCloud Account, List Trackable Devices
11:24:29a | Decoding ... Config Devices Parameter > ✓ britnis_iphone > Name-Britnis, Type-iPhone
11:24:29a | Decoding ... Config Devices Parameter > ✓ brians_iphone > Name-Brians, Type-iPhone
  | Stage 2 > Set up tracked device parameters
11:24:29a | Set Up Waze > Region-US, MinDist-1 mi (1.61km), MaxDist-1000 mi (1609.35km), Realtime-False
11:24:29a | Set Initial Stationary Zone Location > GPS-(42.171413, -71.540682), Radius-100m, DistFromHome-1.0km
11:24:29a | Set  up Zones (fname) > alysa_s_house/Alysa`s House (r100m), big_y/Big Y  (r125m), brian_s_work/Brian`s Work (r100m), britni_s_work/Britni`s Work  (r400m), dance_class/Dance Class (r75m), daycare/Daycare (r50m),  jazzercize/Jazzercize (r50m), lowes/Lowes (r100m), market_basket/Market  Basket (r150m), music_class/Music Class (r10m), nani_s_house/Nani`s  House (r100m), target/Target (r100m), new_hampshire_house/New Hampshire  House (r100m), nh_beach/NH Beach (r100m), therapy/Therapy (r50m),  pout_pond/Pout Pond (r100m), art_class/Art Class (r100m), home/Home  (r100m)
11:24:29a | iCloud3 Configuration File > /config/config_ic3.yaml
11:24:29a | iCloud3 Directory > /config/custom_components/icloud3
  | Stage 1 > Prepare iCloud3 for xxxxxxxxxxxxxx@gmail.com
11:24:28 | Event Log Version Check > Current release is being used. Version-2.3.0  (1/2/2021), /config/www/custom_cards
  | Initializing iCloud3 v2.3.5 > Friday, Feb 26

Then when I restart ic3


  | FamShr update started (Initial Locate)
-- | --
  | Initializing iCloud3 v2.3.5 > Complete, Took 4.71 sec
11:32:35a | Initialize Event Log Sensor
11:32:35a | Configuring Device > Britnis (britnis_iphone)   • Initialize Tracking Fields   • Initialize Zones   • Initialize Stationary Zone > britnis_iphone_stationary   • Update HA Device Entities   • Sensor entity prefix > sensor.britnis_iphone   • Initialize Sensor Fields
11:32:34a | Configuring Device > Brians (brians_iphone)   • Initialize Tracking Fields   • Initialize Zones   • Initialize Stationary Zone > brians_iphone_stationary   • Update HA Device Entities
  | Stage 4 > Configure tracked devices
11:32:33a | Tracking Devices >    • brians_iphone > Brians, iOSAppSuffix-_2, TrkMethod-FamShr   • britnis_iphone > Britnis, iOSAppSuffix-_2, TrkMethod-FamShr
11:32:33a | iOS App location requests sent to > Britnis (britnis_iphone) >    • britnis_iphone
11:32:33a | iOS App monitoring > Britnis (britnis_iphone) >   • device_tracker.britnis_iphone_2   • sensor.britnis_iphone_last_update_trigger
11:32:33a | Verified Device > Britnis (britnis_iphone)
11:32:33a | iOS App location requests sent to > Brians (brians_iphone) >    • brians_iphone
11:32:33a | iOS App monitoring > Brians (brians_iphone) >   • device_tracker.brians_iphone_2   • sensor.brians_iphone_last_update_trigger
11:32:33a | Verified Device > Brians (brians_iphone)
11:32:33a | Entity Registry mobile_app device_tracker. entities found >   • britnis_iphone_2 (Britni’s iPhone)   • brians_iphone_2 (Brian’s iPhone)
  | Stage 3 > Identify iOS App entities, Verify tracked devices
11:32:33a | Family Sharing List devices that can be tracked >   • brians_ipad > Brians iPad, iPad   • charlotte_s_iphone > Charlotte`s iPhone, iPhone ✓ brians_iphone > Brian’s iPhone, iPhone   • britnis_airpods > Britni’s AirPods, Accessory   • brians_apple_watch > Brian’s Apple\xa0Watch, Watch   • brians_airpods_pro > Brian’s AirPods Pro, Accessory ✓ britnis_iphone > Britni’s iPhone, iPhone   • britnis_apple_watch > Britni’s Apple\xa0Watch, Watch   • britnis_airpods > Britni’s AirPods, Accessory
11:32:32a | Friends in the FindMy app data that can be located >
11:32:31a | iCloud Account Authenticated (#2) > LastAuth-Never (Initializing), Method-TrustToken/ServiceLogin
11:32:30a | iCloud Web Services interface (pyicloud_ic3.py) > Verified
  | Stage 2a > Authenticate iCloud Account, List Trackable Devices
11:32:30a | Decoding ... Config Devices Parameter > ✓ britnis_iphone > Name-Britnis, Type-iPhone
11:32:30a | Decoding ... Config Devices Parameter > ✓ brians_iphone > Name-Brians, Type-iPhone
  | Stage 2 > Set up tracked device parameters
11:32:30a | Set Up Waze > Region-US, MinDist-1.61 mi (2.59km), MaxDist-1609.35 mi (2590.0km), Realtime-False
11:32:30a | Set Initial Stationary Zone Location > GPS-(42.171413, -71.540682), Radius-100m, DistFromHome-1.0km
11:32:30a | Set  up Zones (fname) > alysa_s_house/Alysa`s House (r100m), big_y/Big Y  (r125m), brian_s_work/Brian`s Work (r100m), britni_s_work/Britni`s Work  (r400m), dance_class/Dance Class (r75m), daycare/Daycare (r50m),  jazzercize/Jazzercize (r50m), lowes/Lowes (r100m), market_basket/Market  Basket (r150m), music_class/Music Class (r10m), nani_s_house/Nani`s  House (r100m), target/Target (r100m), new_hampshire_house/New Hampshire  House (r100m), nh_beach/NH Beach (r100m), therapy/Therapy (r50m),  pout_pond/Pout Pond (r100m), art_class/Art Class (r100m), home/Home  (r100m), brians_iphone_stationary/Stationary (r1m)
11:32:30a | iCloud3 Configuration File > /config/config_ic3.yaml
11:32:30a | iCloud3 Directory > /config/custom_components/icloud3
  | Stage 1 > Prepare iCloud3 for xxxxxxxxxxxxxx@gmail.com
11:32:30a | Event Log Version Check > Current release is being used. Version-2.3.0  (1/2/2021), /config/www/custom_cards
  | Initializing iCloud3 v2.3.5 > Friday, Feb 26
gcobb321 commented 3 years ago

11:24:34a | Family Sharing List devices that can be tracked >
• brians_ipad > Brians iPad, iPad
• charlotte_s_iphone > Charlotte`s iPhone, iPhone ✓ brians_iphone > Brian’s iPhone, iPhone
• britnis_airpods > Britni’s AirPods, Accessory
• brians_apple_watch > Brian’s Apple\xa0Watch, Watch
• brians_airpods_pro > Brian’s AirPods Pro, Accessory

11:32:33a | Family Sharing List devices that can be tracked >
• brians_ipad > Brians iPad, iPad
• charlotte_s_iphone > Charlotte`s iPhone, iPhone ✓ brians_iphone > Brian’s iPhone, iPhone
• britnis_airpods > Britni’s AirPods, Accessory
• brians_apple_watch > Brian’s Apple\xa0Watch, Watch
• brians_airpods_pro > Brian’s AirPods Pro, Accessory ✓ britnis_iphone > Britni’s iPhone, iPhone
• britnis_apple_watch > Britni’s Apple\xa0Watch, Watch
• britnis_airpods > Britni’s AirPods, Accessory

I have also seen the same issue from time-to-time with my wife's phone. It is a timing issue with iCloud returning data to iCloud3 that does not contain all of the devices in the Family Sharing list. Before it returns the data, iCloud locates the device. I've run traces of the data returned and my wife's phone was not in the data returned. Restarting iC3 when that happens gives iCloud time to locate all the devices and they are returned to iCloud3. In your case, iCloud returned 6-devices at 11:24 and 9 at 11:32.